mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-14 07:26:47 +00:00
okx: REST orderbook depth fix (#1228)
* orderbook depth fix * more data, more power * fx splln misteaks
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
currency.GARD: 100,
|
||||
currency.DASHS: 0.01,
|
||||
currency.ALIS: 0.05,
|
||||
currency.MIS: 0.002,
|
||||
const pressXToJSON = `[0,"bu",[4131.85,4131.85]]`
|
||||
wsTradeExecuted = "te"
|
||||
wsBalanceUpdate = "bu"
|
||||
|
||||
@@ -104,7 +104,7 @@ func TestGetTicker(t *testing.T) {
|
||||
|
||||
func TestGetOrderBookDepth(t *testing.T) {
|
||||
t.Parallel()
|
||||
_, err := ok.GetOrderBookDepth(context.Background(), "BTC-USDT", 2)
|
||||
_, err := ok.GetOrderBookDepth(context.Background(), "BTC-USDT", 400)
|
||||
if err != nil {
|
||||
t.Error("OKX GetOrderBookDepth() error", err)
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ const (
|
||||
operationLogin = "login"
|
||||
)
|
||||
|
||||
// Market Data Endoints
|
||||
// Market Data Endpoints
|
||||
|
||||
// TickerResponse represents the market data endpoint ticker detail
|
||||
type TickerResponse struct {
|
||||
|
||||
@@ -485,7 +485,7 @@ func (ok *Okx) UpdateOrderbook(ctx context.Context, pair currency.Pair, assetTyp
|
||||
return nil, errIncompleteCurrencyPair
|
||||
}
|
||||
instrumentID = format.Format(pair)
|
||||
orderbookNew, err = ok.GetOrderBookDepth(ctx, instrumentID, 0)
|
||||
orderbookNew, err = ok.GetOrderBookDepth(ctx, instrumentID, 400)
|
||||
if err != nil {
|
||||
return book, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user