-
Notifications
You must be signed in to change notification settings - Fork 263
Feat/binance exchange ws get trade history/get latest trade cursor #719
base: master
Are you sure you want to change the base?
Changes from 1 commit
44de487
2dfbd2d
1a5cfb3
af75622
9518463
f4e975a
a35faa3
a75195e
2616502
df8c006
ac093cb
0c41ff3
17a422b
65443c6
91837ec
2f5963a
88d2b24
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,11 @@ func Test_createStateEvents(t *testing.T) { | |
} | ||
|
||
func Test_binanceExchangeWs_GetTickerPrice(t *testing.T) { | ||
|
||
if testing.Short() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm a little confused about this, why did we add this back? some context: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PS: If the reason is that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, I will see how I can make some refactor to use these tests in CI pipeline |
||
return | ||
} | ||
|
||
pair := model.TradingPair{Base: model.XLM, Quote: model.BTC} | ||
pairs := []model.TradingPair{pair} | ||
|
||
|
@@ -56,6 +61,10 @@ func Test_binanceExchangeWs_GetTickerPrice(t *testing.T) { | |
|
||
func Test_binanceExchangeWs_GetOrderBook(t *testing.T) { | ||
|
||
if testing.Short() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. here too, I think we don't need this, see above |
||
return | ||
} | ||
|
||
testBinanceExchangeWs, e := makeBinanceWs(emptyAPIKeyBinance) | ||
if !assert.NoError(t, e) { | ||
return | ||
|
@@ -96,6 +105,11 @@ func Test_binanceExchangeWs_GetOrderBook(t *testing.T) { | |
} | ||
|
||
func Test_binanceExchangeWs_GetLatestTradeCursor(t *testing.T) { | ||
|
||
if testing.Short() { | ||
return | ||
} | ||
|
||
startIntervalSecs := time.Now().Unix() | ||
|
||
testBinanceExchangeWs, err := makeBinanceWs(emptyAPIKeyBinance) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does this test pass without using valid API keys? -- I think this test should fail without valid keys but I'm not sure (see comment above about throwing an error when we can't open up the cursor stream) |
||
|
@@ -130,6 +144,10 @@ func Test_binanceExchangeWs_GetLatestTradeCursor(t *testing.T) { | |
|
||
func Test_binanceExchangeWs_GetTradeHistory(t *testing.T) { | ||
|
||
if testing.Short() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. makes sense to put this here because we can't run this in the CI pipeline since it needs API keys were you able to test this with your own binance API keys? |
||
return | ||
} | ||
|
||
testBinanceExchangeWs, err := makeBinanceWs(emptyAPIKeyBinance) | ||
|
||
if !assert.NoError(t, err) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍