bitex_bot 0.6.1 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -3
- data/Gemfile +3 -1
- data/bitex_bot.gemspec +5 -2
- data/lib/bitex_bot/database.rb +2 -2
- data/lib/bitex_bot/models/api_wrappers/api_wrapper.rb +47 -35
- data/lib/bitex_bot/models/api_wrappers/bitex/bitex_api_wrapper.rb +178 -0
- data/lib/bitex_bot/models/api_wrappers/bitstamp/bitstamp_api_wrapper.rb +62 -45
- data/lib/bitex_bot/models/api_wrappers/itbit/itbit_api_wrapper.rb +52 -28
- data/lib/bitex_bot/models/api_wrappers/kraken/kraken_api_wrapper.rb +61 -28
- data/lib/bitex_bot/models/api_wrappers/kraken/kraken_order.rb +12 -6
- data/lib/bitex_bot/models/buy_closing_flow.rb +3 -2
- data/lib/bitex_bot/models/buy_opening_flow.rb +31 -6
- data/lib/bitex_bot/models/closing_flow.rb +37 -22
- data/lib/bitex_bot/models/open_buy.rb +1 -3
- data/lib/bitex_bot/models/open_sell.rb +1 -3
- data/lib/bitex_bot/models/opening_flow.rb +42 -28
- data/lib/bitex_bot/models/order_book_simulator.rb +14 -13
- data/lib/bitex_bot/models/sell_closing_flow.rb +3 -2
- data/lib/bitex_bot/models/sell_opening_flow.rb +29 -4
- data/lib/bitex_bot/robot.rb +28 -43
- data/lib/bitex_bot/settings.rb +2 -0
- data/lib/bitex_bot/version.rb +1 -1
- data/settings.rb.sample +23 -5
- data/spec/bitex_bot/settings_spec.rb +13 -6
- data/spec/factories/bitex_ask.rb +14 -0
- data/spec/factories/bitex_bid.rb +14 -0
- data/spec/factories/bitex_buy.rb +7 -7
- data/spec/factories/bitex_sell.rb +7 -7
- data/spec/factories/buy_opening_flow.rb +10 -10
- data/spec/factories/open_buy.rb +8 -8
- data/spec/factories/open_sell.rb +8 -8
- data/spec/factories/sell_opening_flow.rb +10 -10
- data/spec/fixtures/bitstamp/balance.yml +63 -0
- data/spec/fixtures/bitstamp/order_book.yml +60 -0
- data/spec/fixtures/bitstamp/orders/all.yml +62 -0
- data/spec/fixtures/bitstamp/orders/failure_sell.yml +60 -0
- data/spec/fixtures/bitstamp/orders/successful_buy.yml +62 -0
- data/spec/fixtures/bitstamp/transactions.yml +244 -0
- data/spec/fixtures/bitstamp/user_transactions.yml +223 -0
- data/spec/models/api_wrappers/bitex_api_wrapper_spec.rb +147 -0
- data/spec/models/api_wrappers/bitstamp_api_wrapper_spec.rb +134 -140
- data/spec/models/api_wrappers/itbit_api_wrapper_spec.rb +9 -3
- data/spec/models/api_wrappers/kraken_api_wrapper_spec.rb +142 -73
- data/spec/models/bitex_api_spec.rb +4 -4
- data/spec/models/buy_closing_flow_spec.rb +19 -24
- data/spec/models/buy_opening_flow_spec.rb +102 -83
- data/spec/models/order_book_simulator_spec.rb +5 -0
- data/spec/models/robot_spec.rb +7 -4
- data/spec/models/sell_closing_flow_spec.rb +21 -25
- data/spec/models/sell_opening_flow_spec.rb +100 -80
- data/spec/spec_helper.rb +3 -1
- data/spec/support/bitex_stubs.rb +80 -40
- data/spec/support/bitstamp/bitstamp_api_wrapper_stubs.rb +2 -2
- data/spec/support/bitstamp/bitstamp_stubs.rb +3 -3
- data/spec/support/vcr.rb +8 -0
- data/spec/support/webmock.rb +8 -0
- metadata +77 -10
@@ -0,0 +1,244 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://www.bitstamp.net/api/v2/transactions/btcusd/
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers: {}
|
10
|
+
response:
|
11
|
+
status:
|
12
|
+
code: 200
|
13
|
+
message: !binary |-
|
14
|
+
T0s=
|
15
|
+
headers:
|
16
|
+
!binary "U2VydmVy":
|
17
|
+
- !binary |-
|
18
|
+
Y2xvdWRmbGFyZS1uZ2lueA==
|
19
|
+
!binary "RGF0ZQ==":
|
20
|
+
- !binary |-
|
21
|
+
VHVlLCAwMSBPY3QgMjAxMyAxNzozNjoxMCBHTVQ=
|
22
|
+
!binary "Q29udGVudC1UeXBl":
|
23
|
+
- !binary |-
|
24
|
+
YXBwbGljYXRpb24vanNvbg==
|
25
|
+
!binary "VHJhbnNmZXItRW5jb2Rpbmc=":
|
26
|
+
- !binary |-
|
27
|
+
Y2h1bmtlZA==
|
28
|
+
!binary "Q29ubmVjdGlvbg==":
|
29
|
+
- !binary |-
|
30
|
+
a2VlcC1hbGl2ZQ==
|
31
|
+
!binary "U2V0LUNvb2tpZQ==":
|
32
|
+
- !binary |-
|
33
|
+
X19jZmR1aWQ9ZDQ2ZmM2NDlhYzM0MmVkNDliZWExODAwNTg4NzQ4NGQ3MTM4
|
34
|
+
MDY0ODk2OTQwODsgZXhwaXJlcz1Nb24sIDIzLURlYy0yMDE5IDIzOjUwOjAw
|
35
|
+
IEdNVDsgcGF0aD0vOyBkb21haW49LmJpdHN0YW1wLm5ldA==
|
36
|
+
!binary "Q29udGVudC1MYW5ndWFnZQ==":
|
37
|
+
- !binary |-
|
38
|
+
ZW4=
|
39
|
+
!binary "RXhwaXJlcw==":
|
40
|
+
- !binary |-
|
41
|
+
VHVlLCAwMSBPY3QgMjAxMyAxNzozNjowOSBHTVQ=
|
42
|
+
!binary "VmFyeQ==":
|
43
|
+
- !binary |-
|
44
|
+
QWNjZXB0LUxhbmd1YWdl
|
45
|
+
!binary "Q2FjaGUtQ29udHJvbA==":
|
46
|
+
- !binary |-
|
47
|
+
bWF4LWFnZT0w
|
48
|
+
!binary "TGFzdC1Nb2RpZmllZA==":
|
49
|
+
- !binary |-
|
50
|
+
VHVlLCAwMSBPY3QgMjAxMyAxNzozNjowOSBHTVQ=
|
51
|
+
!binary "Q2YtUmF5":
|
52
|
+
- !binary |-
|
53
|
+
YjZhZTlkYWM1NTgwMTAz
|
54
|
+
body:
|
55
|
+
encoding: ASCII-8BIT
|
56
|
+
string: !binary |-
|
57
|
+
W3siZGF0ZSI6ICIxMzgwNjQ4OTUx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|
+
recorded_with: VCR 2.6.0
|
@@ -0,0 +1,223 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://www.bitstamp.net/api/v2/user_transactions/btcusd/
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: key=BITSTAMP_KEY&nonce=1380238185&signature=7CBA96CEB133CF1E40EB223B8EE85696D75FFFB2AF8DFF9052F9F6651F829C2A&timedelta=3600
|
9
|
+
headers: {}
|
10
|
+
response:
|
11
|
+
status:
|
12
|
+
code: 200
|
13
|
+
message: !binary |-
|
14
|
+
T0s=
|
15
|
+
headers:
|
16
|
+
!binary "U2VydmVy":
|
17
|
+
- !binary |-
|
18
|
+
Y2xvdWRmbGFyZS1uZ2lueA==
|
19
|
+
!binary "RGF0ZQ==":
|
20
|
+
- !binary |-
|
21
|
+
VGh1LCAyNiBTZXAgMjAxMyAyMzoyOTo0NiBHTVQ=
|
22
|
+
!binary "Q29udGVudC1UeXBl":
|
23
|
+
- !binary |-
|
24
|
+
YXBwbGljYXRpb24vanNvbg==
|
25
|
+
!binary "VHJhbnNmZXItRW5jb2Rpbmc=":
|
26
|
+
- !binary |-
|
27
|
+
Y2h1bmtlZA==
|
28
|
+
!binary "Q29ubmVjdGlvbg==":
|
29
|
+
- !binary |-
|
30
|
+
a2VlcC1hbGl2ZQ==
|
31
|
+
!binary "U2V0LUNvb2tpZQ==":
|
32
|
+
- !binary |-
|
33
|
+
X19jZmR1aWQ9ZDg0ODRmMzI3NTJiOTlmMGMzNzI0YWE1YjNkYjczNjA2MTM4
|
34
|
+
MDIzODE4NTY4MzsgZXhwaXJlcz1Nb24sIDIzLURlYy0yMDE5IDIzOjUwOjAw
|
35
|
+
IEdNVDsgcGF0aD0vOyBkb21haW49LmJpdHN0YW1wLm5ldA==
|
36
|
+
!binary "Q29udGVudC1MYW5ndWFnZQ==":
|
37
|
+
- !binary |-
|
38
|
+
ZW4=
|
39
|
+
!binary "RXhwaXJlcw==":
|
40
|
+
- !binary |-
|
41
|
+
VGh1LCAyNiBTZXAgMjAxMyAyMzoyOTo0NiBHTVQ=
|
42
|
+
!binary "VmFyeQ==":
|
43
|
+
- !binary |-
|
44
|
+
QWNjZXB0LUxhbmd1YWdl
|
45
|
+
!binary "Q2FjaGUtQ29udHJvbA==":
|
46
|
+
- !binary |-
|
47
|
+
bWF4LWFnZT0w
|
48
|
+
!binary "TGFzdC1Nb2RpZmllZA==":
|
49
|
+
- !binary |-
|
50
|
+
VGh1LCAyNiBTZXAgMjAxMyAyMzoyOTo0NiBHTVQ=
|
51
|
+
!binary "Q2YtUmF5":
|
52
|
+
- !binary |-
|
53
|
+
YjQzYmNmNDg0NjQwMzIw
|
54
|
+
body:
|
55
|
+
encoding: ASCII-8BIT
|
56
|
+
string: !binary |-
|
57
|
+
W3sidXNkIjogIjAuMDAiLCAiYnRjIjogIi0zLjAwNzgxMTI0IiwgImJ0Y191
|
58
|
+
c2QiOiAiMC4wMCIsICJvcmRlcl9pZCI6IG51bGwsICJmZWUiOiAiMC4wMCIs
|
59
|
+
ICJ0eXBlIjogMSwgImlkIjogMTQ0NDQ3NiwgImRhdGV0aW1lIjogIjIwMTMt
|
60
|
+
MDktMjYgMTM6NDY6NTkifSwgeyJ1c2QiOiAiLTM3My41MSIsICJidGMiOiAi
|
61
|
+
My4wMDc4MTEyNCIsICJidGNfdXNkIjogIjEyNC4xOCIsICJvcmRlcl9pZCI6
|
62
|
+
IDc2MjM5NDIsICJmZWUiOiAiMS41MCIsICJ0eXBlIjogMiwgImlkIjogMTQ0
|
63
|
+
NDQwNCwgImRhdGV0aW1lIjogIjIwMTMtMDktMjYgMTM6Mjg6NTUifSwgeyJ1
|
64
|
+
c2QiOiAiNDUwMC4wMCIsICJidGMiOiAiMC4wMDAwMDAwMCIsICJidGNfdXNk
|
65
|
+
IjogIjAuMDAiLCAib3JkZXJfaWQiOiBudWxsLCAiZmVlIjogIjE1LjAwIiwg
|
66
|
+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
221
|
+
http_version:
|
222
|
+
recorded_at: Thu, 26 Sep 2013 23:29:46 GMT
|
223
|
+
recorded_with: VCR 2.6.0
|
@@ -0,0 +1,147 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe BitexApiWrapper do
|
4
|
+
let(:taker_settings) do
|
5
|
+
BitexBot::SettingsClass.new(
|
6
|
+
bitex: {
|
7
|
+
api_key: 'taker_api_key',
|
8
|
+
ssl_version: nil,
|
9
|
+
debug: false,
|
10
|
+
sandbox: false,
|
11
|
+
order_book: 'btc_usd'
|
12
|
+
}
|
13
|
+
)
|
14
|
+
end
|
15
|
+
|
16
|
+
before(:each) do
|
17
|
+
BitexBot::Settings.stub(taker: taker_settings)
|
18
|
+
BitexBot::Robot.setup
|
19
|
+
end
|
20
|
+
|
21
|
+
let(:api_wrapper) { BitexBot::Robot.taker }
|
22
|
+
|
23
|
+
it 'Sends User-Agent header' do
|
24
|
+
url = "https://bitex.la/api-v1/rest/private/profile?api_key=#{BitexBot::Robot.taker.api_key}"
|
25
|
+
stub_stuff = stub_request(:get, url).with(headers: { 'User-Agent': BitexBot.user_agent })
|
26
|
+
|
27
|
+
# we don't care about the response
|
28
|
+
api_wrapper.balance rescue nil
|
29
|
+
|
30
|
+
expect(stub_stuff).to have_been_requested
|
31
|
+
end
|
32
|
+
|
33
|
+
it '#base_quote' do
|
34
|
+
expect(api_wrapper.base_quote).to eq('btc_usd')
|
35
|
+
end
|
36
|
+
|
37
|
+
it '#base' do
|
38
|
+
expect(api_wrapper.base).to eq('btc')
|
39
|
+
end
|
40
|
+
|
41
|
+
it '#quote' do
|
42
|
+
expect(api_wrapper.quote).to eq('usd')
|
43
|
+
end
|
44
|
+
|
45
|
+
it '#balance' do
|
46
|
+
stub_bitex_balance
|
47
|
+
|
48
|
+
balance = api_wrapper.balance
|
49
|
+
balance.should be_a(ApiWrapper::BalanceSummary)
|
50
|
+
balance.crypto.should be_a(ApiWrapper::Balance)
|
51
|
+
balance.fiat.should be_a(ApiWrapper::Balance)
|
52
|
+
|
53
|
+
crypto = balance.crypto
|
54
|
+
crypto.total.should be_a(BigDecimal)
|
55
|
+
crypto.reserved.should be_a(BigDecimal)
|
56
|
+
crypto.available.should be_a(BigDecimal)
|
57
|
+
|
58
|
+
fiat = balance.fiat
|
59
|
+
fiat.total.should be_a(BigDecimal)
|
60
|
+
fiat.reserved.should be_a(BigDecimal)
|
61
|
+
fiat.available.should be_a(BigDecimal)
|
62
|
+
|
63
|
+
balance.fee.should be_a(BigDecimal)
|
64
|
+
end
|
65
|
+
|
66
|
+
it '#cancel' do
|
67
|
+
stub_bitex_orders
|
68
|
+
|
69
|
+
expect(api_wrapper.orders.sample).to respond_to(:cancel!)
|
70
|
+
end
|
71
|
+
|
72
|
+
it '#order_book' do
|
73
|
+
stub_bitex_order_book
|
74
|
+
|
75
|
+
order_book = api_wrapper.order_book
|
76
|
+
order_book.should be_a(ApiWrapper::OrderBook)
|
77
|
+
order_book.bids.all? { |bid| bid.should be_a(ApiWrapper::OrderSummary) }
|
78
|
+
order_book.asks.all? { |ask| ask.should be_a(ApiWrapper::OrderSummary) }
|
79
|
+
order_book.timestamp.should be_a(Integer)
|
80
|
+
|
81
|
+
bid = order_book.bids.sample
|
82
|
+
bid.price.should be_a(BigDecimal)
|
83
|
+
bid.quantity.should be_a(BigDecimal)
|
84
|
+
|
85
|
+
ask = order_book.asks.sample
|
86
|
+
ask.price.should be_a(BigDecimal)
|
87
|
+
ask.quantity.should be_a(BigDecimal)
|
88
|
+
end
|
89
|
+
|
90
|
+
it '#orders' do
|
91
|
+
stub_bitex_orders
|
92
|
+
|
93
|
+
api_wrapper.orders.all? { |o| o.should be_a(BitexApiWrapper::Order) }
|
94
|
+
|
95
|
+
order = api_wrapper.orders.sample
|
96
|
+
order.id.should be_a(String)
|
97
|
+
order.type.should be_a(Symbol)
|
98
|
+
order.price.should be_a(BigDecimal)
|
99
|
+
order.amount.should be_a(BigDecimal)
|
100
|
+
order.timestamp.should be_a(Integer)
|
101
|
+
end
|
102
|
+
|
103
|
+
context '#place_order' do
|
104
|
+
it 'raises OrderNotFound error on Bitex errors' do
|
105
|
+
Bitex::Bid.stub(create!: nil)
|
106
|
+
Bitex::Ask.stub(create!: nil)
|
107
|
+
api_wrapper.stub(find_lost: nil)
|
108
|
+
|
109
|
+
expect { api_wrapper.place_order(:buy, 10, 100) }.to raise_exception(OrderNotFound)
|
110
|
+
expect { api_wrapper.place_order(:sell, 10, 100) }.to raise_exception(OrderNotFound)
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
it '#transactions' do
|
115
|
+
stub_bitex_transactions
|
116
|
+
|
117
|
+
api_wrapper.transactions.all? { |o| o.should be_a(ApiWrapper::Transaction) }
|
118
|
+
|
119
|
+
transaction = api_wrapper.transactions.sample
|
120
|
+
transaction.id.should be_a(Integer)
|
121
|
+
transaction.price.should be_a(BigDecimal)
|
122
|
+
transaction.amount.should be_a(BigDecimal)
|
123
|
+
transaction.timestamp.should be_a(Integer)
|
124
|
+
end
|
125
|
+
|
126
|
+
it '#user_transaction' do
|
127
|
+
stub_bitex_trades
|
128
|
+
|
129
|
+
api_wrapper.user_transactions.should be_a(Array)
|
130
|
+
api_wrapper.user_transactions.all? { |o| o.should be_a(ApiWrapper::UserTransaction) }
|
131
|
+
|
132
|
+
user_transaction = api_wrapper.user_transactions.sample
|
133
|
+
user_transaction.order_id.should be_a(Integer)
|
134
|
+
user_transaction.fiat.should be_a(BigDecimal)
|
135
|
+
user_transaction.crypto.should be_a(BigDecimal)
|
136
|
+
user_transaction.crypto_fiat.should be_a(BigDecimal)
|
137
|
+
user_transaction.fee.should be_a(BigDecimal)
|
138
|
+
user_transaction.type.should be_a(Integer)
|
139
|
+
user_transaction.timestamp.should be_a(Integer)
|
140
|
+
end
|
141
|
+
|
142
|
+
it '#find_lost' do
|
143
|
+
stub_bitex_orders
|
144
|
+
|
145
|
+
api_wrapper.orders.all? { |o| api_wrapper.find_lost(o.type, o.price, o.amount).present? }
|
146
|
+
end
|
147
|
+
end
|