rbtc_arbitrage 2.3.0 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -2
  3. data/Gemfile +2 -2
  4. data/Gemfile.lock +32 -24
  5. data/lib/rbtc_arbitrage/version.rb +1 -1
  6. data/rbtc_arbitrage.gemspec +1 -1
  7. data/spec/spec_helper.rb +1 -0
  8. data/spec/support/cassettes/RbtcArbitrage_Clients_CoinbaseClient/_price/calls_coinbase.yml +136 -104
  9. data/spec/support/cassettes/RbtcArbitrage_Clients_CoinbaseClient/_price/fetches_price_for_buy_correctly.yml +36 -22
  10. data/spec/support/cassettes/RbtcArbitrage_Clients_CoinbaseClient/_price/fetches_price_for_sell_correctly.yml +36 -22
  11. metadata +4 -41
  12. data/.gitmodules +0 -3
  13. data/bitstamp/.gitignore +0 -21
  14. data/bitstamp/.rspec +0 -2
  15. data/bitstamp/.ruby-gemset +0 -1
  16. data/bitstamp/.ruby-version +0 -1
  17. data/bitstamp/Gemfile +0 -24
  18. data/bitstamp/Gemfile.lock +0 -64
  19. data/bitstamp/LICENSE.txt +0 -20
  20. data/bitstamp/README.md +0 -96
  21. data/bitstamp/Rakefile +0 -49
  22. data/bitstamp/VERSION +0 -1
  23. data/bitstamp/bitstamp.gemspec +0 -94
  24. data/bitstamp/lib/bitstamp.rb +0 -77
  25. data/bitstamp/lib/bitstamp/collection.rb +0 -30
  26. data/bitstamp/lib/bitstamp/helper.rb +0 -19
  27. data/bitstamp/lib/bitstamp/model.rb +0 -33
  28. data/bitstamp/lib/bitstamp/net.rb +0 -49
  29. data/bitstamp/lib/bitstamp/orders.rb +0 -41
  30. data/bitstamp/lib/bitstamp/ticker.rb +0 -16
  31. data/bitstamp/lib/bitstamp/transactions.rb +0 -37
  32. data/bitstamp/spec/bitstamp_spec.rb +0 -57
  33. data/bitstamp/spec/collection_spec.rb +0 -12
  34. data/bitstamp/spec/fixtures/vcr_cassettes/bitstamp/balance.yml +0 -63
  35. data/bitstamp/spec/fixtures/vcr_cassettes/bitstamp/order_book.yml +0 -1910
  36. data/bitstamp/spec/fixtures/vcr_cassettes/bitstamp/orders/all.yml +0 -62
  37. data/bitstamp/spec/fixtures/vcr_cassettes/bitstamp/orders/buy.yml +0 -62
  38. data/bitstamp/spec/fixtures/vcr_cassettes/bitstamp/orders/sell/failure.yml +0 -60
  39. data/bitstamp/spec/fixtures/vcr_cassettes/bitstamp/ticker.yml +0 -63
  40. data/bitstamp/spec/fixtures/vcr_cassettes/bitstamp/transactions.yml +0 -244
  41. data/bitstamp/spec/fixtures/vcr_cassettes/bitstamp/user_transactions/all.yml +0 -223
  42. data/bitstamp/spec/orders_spec.rb +0 -40
  43. data/bitstamp/spec/spec_helper.rb +0 -26
  44. data/bitstamp/spec/support/bitstamp_setup.rb +0 -19
  45. data/bitstamp/spec/support/vcr.rb +0 -21
  46. data/bitstamp/spec/transactions_spec.rb +0 -32
  47. data/spec/support/cassettes/RbtcArbitrage_Clients_CoinbaseClient/_balance/fetches_the_balance_correctly.yml +0 -109
@@ -2,8 +2,19 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://coinbase.com/api/v1/prices/buy
6
- headers: {}
5
+ uri: https://coinbase.com/api/v1/prices/buy?qty=1
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Access-Key:
11
+ - <COINBASE_KEY>
12
+ Access-Signature:
13
+ - f04dbaf80cbe0217b1c167979915b075f315cf6077a472733581b16c382bfe70
14
+ Access-Nonce:
15
+ - '1406308780089377'
16
+ Content-Type:
17
+ - application/json
7
18
  response:
8
19
  status:
9
20
  code: 200
@@ -12,7 +23,7 @@ http_interactions:
12
23
  Server:
13
24
  - cloudflare-nginx
14
25
  Date:
15
- - Mon, 23 Dec 2013 01:46:11 GMT
26
+ - Fri, 25 Jul 2014 17:19:42 GMT
16
27
  Content-Type:
17
28
  - application/json; charset=utf-8
18
29
  Transfer-Encoding:
@@ -20,37 +31,40 @@ http_interactions:
20
31
  Connection:
21
32
  - keep-alive
22
33
  Set-Cookie:
23
- - __cfduid=de180eda480bef28c6b1572e925ddcd721387763171524; expires=Mon, 23-Dec-2019
34
+ - __cfduid=d3a2fa250275edf59b22bb16b92e40dc01406308781275; expires=Mon, 23-Dec-2019
24
35
  23:50:00 GMT; path=/; domain=.coinbase.com; HttpOnly
36
+ - _coinbase=BAh7B0kiD3Nlc3Npb25faWQGOgZFVEkiJWUxYmQ0ODk1NmM5N2M4YTcxNjhiY2I2MmFmYmFkMjJiBjsAVEkiC2RldmljZQY7AEZJIhxEMmlwbXZvdnFGY0ZGd0ZHWDdwUURlbQY7AFQ%3D--75f5cf18d7647734b58f9f45b60eef124d35687b;
37
+ path=/; expires=Mon, 25-Jul-2016 17:19:42 GMT; secure; HttpOnly
25
38
  - request_method=GET; path=/; secure
39
+ Cache-Control:
40
+ - no-cache, no-store, max-age=0, must-revalidate
41
+ Expires:
42
+ - '-1'
43
+ Pragma:
44
+ - no-cache
26
45
  Status:
27
46
  - 200 OK
28
47
  Strict-Transport-Security:
29
48
  - max-age=31536000
30
- - max-age=31536000
31
- X-Ua-Compatible:
32
- - IE=Edge,chrome=1
33
- Etag:
34
- - '"a804177e060807151cd66a68563f9ca7"'
35
- Cache-Control:
36
- - max-age=0, private, must-revalidate
37
- X-Request-Id:
38
- - 905bf73eff8d4954c758c3c7c5032a5e
39
- X-Runtime:
40
- - '0.039337'
41
- X-Frame-Options:
42
- - SAMEORIGIN
49
+ Vary:
50
+ - Accept-Encoding
43
51
  X-Content-Type-Options:
44
52
  - nosniff
53
+ X-Frame-Options:
54
+ - SAMEORIGIN
45
55
  X-Rack-Cache:
46
56
  - miss
47
- Vary:
48
- - Accept-Encoding
57
+ X-Request-Id:
58
+ - 36e9ff07-ca0b-4414-835b-9aaa9fa88ef9
59
+ X-Runtime:
60
+ - '0.892429'
61
+ X-Ua-Compatible:
62
+ - IE=Edge,chrome=1
49
63
  Cf-Ray:
50
- - e11606d945f0296
64
+ - 14fa061afea7051a-SEA
51
65
  body:
52
66
  encoding: UTF-8
53
- string: '{"subtotal":{"amount":"633.49","currency":"USD"},"fees":[{"coinbase":{"amount":"6.33","currency":"USD"}},{"bank":{"amount":"0.15","currency":"USD"}}],"total":{"amount":"639.97","currency":"USD"},"amount":"639.97","currency":"USD"}'
67
+ string: '{"subtotal":{"amount":"602.93","currency":"USD"},"fees":[{"coinbase":{"amount":"6.03","currency":"USD"}},{"bank":{"amount":"0.15","currency":"USD"}}],"total":{"amount":"609.11","currency":"USD"},"amount":"609.11","currency":"USD"}'
54
68
  http_version:
55
- recorded_at: Mon, 23 Dec 2013 01:46:11 GMT
69
+ recorded_at: Fri, 25 Jul 2014 17:19:42 GMT
56
70
  recorded_with: VCR 2.8.0
@@ -2,8 +2,19 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://coinbase.com/api/v1/prices/sell
6
- headers: {}
5
+ uri: https://coinbase.com/api/v1/prices/sell?qty=1
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Access-Key:
11
+ - <COINBASE_KEY>
12
+ Access-Signature:
13
+ - b1923f3993e171bfdf3dd079bc22f8a02c9e43c27afbae22597d5814184c44f0
14
+ Access-Nonce:
15
+ - '1406308786559019'
16
+ Content-Type:
17
+ - application/json
7
18
  response:
8
19
  status:
9
20
  code: 200
@@ -12,7 +23,7 @@ http_interactions:
12
23
  Server:
13
24
  - cloudflare-nginx
14
25
  Date:
15
- - Mon, 23 Dec 2013 01:46:12 GMT
26
+ - Fri, 25 Jul 2014 17:19:46 GMT
16
27
  Content-Type:
17
28
  - application/json; charset=utf-8
18
29
  Transfer-Encoding:
@@ -20,37 +31,40 @@ http_interactions:
20
31
  Connection:
21
32
  - keep-alive
22
33
  Set-Cookie:
23
- - __cfduid=d2936097f4b45fff147030c15439c297f1387763172302; expires=Mon, 23-Dec-2019
34
+ - __cfduid=d30db8f3bcc83e9b0563ae4d4f50c56b11406308786628; expires=Mon, 23-Dec-2019
24
35
  23:50:00 GMT; path=/; domain=.coinbase.com; HttpOnly
36
+ - _coinbase=BAh7B0kiD3Nlc3Npb25faWQGOgZFVEkiJTQyYjg4MWExNTQ2NjhhZmI3NzAxMzQ1OTkxMDY3Yzk1BjsAVEkiC2RldmljZQY7AEZJIhxENHNXcWZZbW9hM2dEaVh2RlZNamNkZAY7AFQ%3D--e363bc50346974c49cea60d18eb631ac2798fb83;
37
+ path=/; expires=Mon, 25-Jul-2016 17:19:46 GMT; secure; HttpOnly
25
38
  - request_method=GET; path=/; secure
39
+ Cache-Control:
40
+ - no-cache, no-store, max-age=0, must-revalidate
41
+ Expires:
42
+ - '-1'
43
+ Pragma:
44
+ - no-cache
26
45
  Status:
27
46
  - 200 OK
28
47
  Strict-Transport-Security:
29
48
  - max-age=31536000
30
- - max-age=31536000
31
- X-Ua-Compatible:
32
- - IE=Edge,chrome=1
33
- Etag:
34
- - '"f6ca8cefd54471be46d774df727e0885"'
35
- Cache-Control:
36
- - max-age=0, private, must-revalidate
37
- X-Request-Id:
38
- - 5780757a2e6a97f8de4347b0a7d38234
39
- X-Runtime:
40
- - '0.264541'
41
- X-Frame-Options:
42
- - SAMEORIGIN
49
+ Vary:
50
+ - Accept-Encoding
43
51
  X-Content-Type-Options:
44
52
  - nosniff
53
+ X-Frame-Options:
54
+ - SAMEORIGIN
45
55
  X-Rack-Cache:
46
56
  - miss
47
- Vary:
48
- - Accept-Encoding
57
+ X-Request-Id:
58
+ - 04ca0107-2aae-4345-8170-67a30073db54
59
+ X-Runtime:
60
+ - '0.201177'
61
+ X-Ua-Compatible:
62
+ - IE=Edge,chrome=1
49
63
  Cf-Ray:
50
- - e11607274740296
64
+ - 14fa063c6335051a-SEA
51
65
  body:
52
66
  encoding: UTF-8
53
- string: '{"subtotal":{"amount":"629.48","currency":"USD"},"fees":[{"coinbase":{"amount":"6.29","currency":"USD"}},{"bank":{"amount":"0.15","currency":"USD"}}],"total":{"amount":"623.04","currency":"USD"},"amount":"623.04","currency":"USD"}'
67
+ string: '{"subtotal":{"amount":"601.08","currency":"USD"},"fees":[{"coinbase":{"amount":"6.01","currency":"USD"}},{"bank":{"amount":"0.15","currency":"USD"}}],"total":{"amount":"594.92","currency":"USD"},"amount":"594.92","currency":"USD"}'
54
68
  http_version:
55
- recorded_at: Mon, 23 Dec 2013 01:46:12 GMT
69
+ recorded_at: Fri, 25 Jul 2014 17:19:46 GMT
56
70
  recorded_with: VCR 2.8.0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbtc_arbitrage
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hank Stoever
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-15 00:00:00.000000000 Z
11
+ date: 2014-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - '='
116
116
  - !ruby/object:Gem::Version
117
- version: 1.3.0
117
+ version: 2.1.0
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - '='
123
123
  - !ruby/object:Gem::Version
124
- version: 1.3.0
124
+ version: 2.1.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: pony
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -159,7 +159,6 @@ extensions: []
159
159
  extra_rdoc_files: []
160
160
  files:
161
161
  - .gitignore
162
- - .gitmodules
163
162
  - .rspec
164
163
  - .travis.yml
165
164
  - CONTRIBUTING.md
@@ -171,40 +170,6 @@ files:
171
170
  - README.md
172
171
  - Rakefile
173
172
  - bin/rbtc
174
- - bitstamp/.gitignore
175
- - bitstamp/.rspec
176
- - bitstamp/.ruby-gemset
177
- - bitstamp/.ruby-version
178
- - bitstamp/Gemfile
179
- - bitstamp/Gemfile.lock
180
- - bitstamp/LICENSE.txt
181
- - bitstamp/README.md
182
- - bitstamp/Rakefile
183
- - bitstamp/VERSION
184
- - bitstamp/bitstamp.gemspec
185
- - bitstamp/lib/bitstamp.rb
186
- - bitstamp/lib/bitstamp/collection.rb
187
- - bitstamp/lib/bitstamp/helper.rb
188
- - bitstamp/lib/bitstamp/model.rb
189
- - bitstamp/lib/bitstamp/net.rb
190
- - bitstamp/lib/bitstamp/orders.rb
191
- - bitstamp/lib/bitstamp/ticker.rb
192
- - bitstamp/lib/bitstamp/transactions.rb
193
- - bitstamp/spec/bitstamp_spec.rb
194
- - bitstamp/spec/collection_spec.rb
195
- - bitstamp/spec/fixtures/vcr_cassettes/bitstamp/balance.yml
196
- - bitstamp/spec/fixtures/vcr_cassettes/bitstamp/order_book.yml
197
- - bitstamp/spec/fixtures/vcr_cassettes/bitstamp/orders/all.yml
198
- - bitstamp/spec/fixtures/vcr_cassettes/bitstamp/orders/buy.yml
199
- - bitstamp/spec/fixtures/vcr_cassettes/bitstamp/orders/sell/failure.yml
200
- - bitstamp/spec/fixtures/vcr_cassettes/bitstamp/ticker.yml
201
- - bitstamp/spec/fixtures/vcr_cassettes/bitstamp/transactions.yml
202
- - bitstamp/spec/fixtures/vcr_cassettes/bitstamp/user_transactions/all.yml
203
- - bitstamp/spec/orders_spec.rb
204
- - bitstamp/spec/spec_helper.rb
205
- - bitstamp/spec/support/bitstamp_setup.rb
206
- - bitstamp/spec/support/vcr.rb
207
- - bitstamp/spec/transactions_spec.rb
208
173
  - dummy_web_server.rb
209
174
  - lib/rbtc_arbitrage.rb
210
175
  - lib/rbtc_arbitrage/campbx.rb
@@ -240,7 +205,6 @@ files:
240
205
  - spec/support/cassettes/RbtcArbitrage_Clients_CampbxClient/_balance/fetches_the_balance_correctly.yml
241
206
  - spec/support/cassettes/RbtcArbitrage_Clients_CampbxClient/_price/fetches_price_for_buy_correctly.yml
242
207
  - spec/support/cassettes/RbtcArbitrage_Clients_CampbxClient/_price/fetches_price_for_sell_correctly.yml
243
- - spec/support/cassettes/RbtcArbitrage_Clients_CoinbaseClient/_balance/fetches_the_balance_correctly.yml
244
208
  - spec/support/cassettes/RbtcArbitrage_Clients_CoinbaseClient/_price/calls_coinbase.yml
245
209
  - spec/support/cassettes/RbtcArbitrage_Clients_CoinbaseClient/_price/fetches_price_for_buy_correctly.yml
246
210
  - spec/support/cassettes/RbtcArbitrage_Clients_CoinbaseClient/_price/fetches_price_for_sell_correctly.yml
@@ -297,7 +261,6 @@ test_files:
297
261
  - spec/support/cassettes/RbtcArbitrage_Clients_CampbxClient/_balance/fetches_the_balance_correctly.yml
298
262
  - spec/support/cassettes/RbtcArbitrage_Clients_CampbxClient/_price/fetches_price_for_buy_correctly.yml
299
263
  - spec/support/cassettes/RbtcArbitrage_Clients_CampbxClient/_price/fetches_price_for_sell_correctly.yml
300
- - spec/support/cassettes/RbtcArbitrage_Clients_CoinbaseClient/_balance/fetches_the_balance_correctly.yml
301
264
  - spec/support/cassettes/RbtcArbitrage_Clients_CoinbaseClient/_price/calls_coinbase.yml
302
265
  - spec/support/cassettes/RbtcArbitrage_Clients_CoinbaseClient/_price/fetches_price_for_buy_correctly.yml
303
266
  - spec/support/cassettes/RbtcArbitrage_Clients_CoinbaseClient/_price/fetches_price_for_sell_correctly.yml
data/.gitmodules DELETED
@@ -1,3 +0,0 @@
1
- [submodule "bitstamp"]
2
- path = bitstamp
3
- url = https://github.com/kojnapp/bitstamp.git
data/bitstamp/.gitignore DELETED
@@ -1,21 +0,0 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- bit_stamp_details.yml
6
- coverage
7
- InstalledFiles
8
- lib/bundler/man
9
- pkg
10
- rdoc
11
- spec/reports
12
- test/tmp
13
- test/version_tmp
14
- tmp
15
-
16
- # YARD artifacts
17
- .yardoc
18
- _yardoc
19
- doc/
20
- */**/*un~
21
- .*un~
data/bitstamp/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --color
2
- --format progress
@@ -1 +0,0 @@
1
- bitstamp
@@ -1 +0,0 @@
1
- ruby-1.9.3
data/bitstamp/Gemfile DELETED
@@ -1,24 +0,0 @@
1
- ruby '1.9.3'
2
-
3
- source "http://rubygems.org"
4
- # Add dependencies required to use your gem here.
5
- # Example:
6
- # gem "activesupport", ">= 2.3.5"
7
- gem "activemodel", ">= 3.1"
8
- gem "activesupport", ">= 3.1"
9
- gem 'curb', '> 0.8.1'
10
- gem "ruby-hmac", "0.4.0"
11
-
12
- # Add dependencies to develop your gem here.
13
- # Include everything needed to run rake, tests, features, etc.
14
- group :development do
15
- gem "rspec", ">= 0"
16
- gem "rdoc", "~> 3.12"
17
- gem "bundler", "~> 1.3.5"
18
- gem "jeweler", "~> 1.8.4"
19
- end
20
-
21
- group :test do
22
- gem "vcr", "2.6.0"
23
- gem "webmock", "1.13.0"
24
- end
@@ -1,64 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- activemodel (4.0.0.beta1)
5
- activesupport (= 4.0.0.beta1)
6
- builder (~> 3.1.0)
7
- activesupport (4.0.0.beta1)
8
- i18n (~> 0.6.2)
9
- minitest (~> 4.2)
10
- multi_json (~> 1.3)
11
- thread_safe (~> 0.1)
12
- tzinfo (~> 0.3.33)
13
- addressable (2.3.5)
14
- atomic (1.1.7)
15
- builder (3.1.4)
16
- crack (0.4.1)
17
- safe_yaml (~> 0.9.0)
18
- curb (0.8.3)
19
- diff-lcs (1.2.4)
20
- git (1.2.5)
21
- i18n (0.6.4)
22
- jeweler (1.8.4)
23
- bundler (~> 1.0)
24
- git (>= 1.2.5)
25
- rake
26
- rdoc
27
- json (1.7.7)
28
- minitest (4.7.1)
29
- multi_json (1.7.2)
30
- rake (10.0.4)
31
- rdoc (3.12.2)
32
- json (~> 1.4)
33
- rspec (2.13.0)
34
- rspec-core (~> 2.13.0)
35
- rspec-expectations (~> 2.13.0)
36
- rspec-mocks (~> 2.13.0)
37
- rspec-core (2.13.1)
38
- rspec-expectations (2.13.0)
39
- diff-lcs (>= 1.1.3, < 2.0)
40
- rspec-mocks (2.13.1)
41
- ruby-hmac (0.4.0)
42
- safe_yaml (0.9.7)
43
- thread_safe (0.1.0)
44
- atomic
45
- tzinfo (0.3.37)
46
- vcr (2.6.0)
47
- webmock (1.13.0)
48
- addressable (>= 2.2.7)
49
- crack (>= 0.3.2)
50
-
51
- PLATFORMS
52
- ruby
53
-
54
- DEPENDENCIES
55
- activemodel (>= 3.1)
56
- activesupport (>= 3.1)
57
- bundler (~> 1.3.5)
58
- curb (> 0.8.1)
59
- jeweler (~> 1.8.4)
60
- rdoc (~> 3.12)
61
- rspec
62
- ruby-hmac (= 0.4.0)
63
- vcr (= 2.6.0)
64
- webmock (= 1.13.0)
data/bitstamp/LICENSE.txt DELETED
@@ -1,20 +0,0 @@
1
- Copyright (c) 2013 Kojn
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/bitstamp/README.md DELETED
@@ -1,96 +0,0 @@
1
- # Bitstamp Ruby API
2
-
3
- Feel free to fork, modify & redistribute under the MIT license.
4
-
5
- ## Installation
6
-
7
- Add this line to your application's Gemfile:
8
-
9
- gem 'bitstamp'
10
-
11
- ## Create API Key
12
-
13
- More info at: [https://www.bitstamp.net/article/api-key-implementation/](https://www.bitstamp.net/article/api-key-implementation/)
14
-
15
- ## Setup
16
-
17
- ```ruby
18
- Bitstamp.setup do |config|
19
- config.key = YOUR_API_KEY
20
- config.secret = YOUR_API_SECRET
21
- config.client_id = YOUR_BITSTAMP_USERNAME
22
- end
23
- ```
24
-
25
- If you fail to set your `key` or `secret` or `client_id` a `MissingConfigExeception`
26
- will be raised.
27
-
28
- ## Bitstamp ticker
29
-
30
- The bitstamp ticker. Returns `last`, `high`, `low`, `volume`, `bid` and `ask`
31
-
32
- ```ruby
33
- Bitstamp.ticker
34
- ```
35
-
36
- It's also possible to query through the `Bitstamp::Ticker` object with
37
- each individual method.
38
-
39
- ```ruby
40
- Bitstamp::Ticker.low # => "109.00"
41
- ```
42
-
43
- ## Fetch your open order
44
-
45
- Returns an array with your open orders.
46
-
47
- ```ruby
48
- Bitstamp.orders.all
49
- ```
50
-
51
- ## Create a sell order
52
-
53
- Returns an `Order` object.
54
-
55
- ```ruby
56
- Bitstamp.orders.sell(amount: 1.0, price: 111)
57
- ```
58
-
59
- ## Create a buy order
60
-
61
- Returns an `Order` object.
62
-
63
- ```ruby
64
- Bitstamp.orders.buy(amount: 1.0, price: 111)
65
- ```
66
-
67
- ## Fetch your transactions
68
-
69
- Returns an `Array` of `UserTransaction`.
70
-
71
- ```ruby
72
- Bitstamp.user_transactions.all
73
- ```
74
-
75
- *To be continued!**
76
-
77
- # Tests
78
-
79
- If you'd like to run the tests you need to set the following environment variables:
80
-
81
- ```
82
- export BITSTAMP_KEY=xxx
83
- export BITSTAMP_SECRET=yyy
84
- export BITSTAMP_CLIENT_ID=zzz
85
- ```
86
-
87
- ## Contributing
88
-
89
- 1. Fork it
90
- 2. Create your feature branch (`git checkout -b
91
- my-new-feature`)
92
- 3. Commit your changes (`git commit -am 'Add some feature'`)
93
- 4. Push to the branch (`git push origin my-new-feature`)
94
- 5. Create new Pull Request
95
-
96
-