okx: REST orderbook depth fix (#1228)

* orderbook depth fix

* more data, more power

* fx splln misteaks
This commit is contained in:
Scott
2023-06-15 10:19:44 +10:00
committed by GitHub
parent 1f89048ddb
commit 698b6716ea
4 changed files with 4 additions and 3 deletions

View File

@@ -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"

View File

@@ -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)
}

View File

@@ -63,7 +63,7 @@ const (
operationLogin = "login"
)
// Market Data Endoints
// Market Data Endpoints
// TickerResponse represents the market data endpoint ticker detail
type TickerResponse struct {

View File

@@ -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
}