ccxt 4.5.82 → 4.5.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +3 -1
- package/dist/cjs/src/abstract/prediction/sxbet.js +11 -0
- package/dist/cjs/src/apex.js +1 -0
- package/dist/cjs/src/aster.js +2 -2
- package/dist/cjs/src/base/Exchange.js +1 -1
- package/dist/cjs/src/bigone.js +2 -2
- package/dist/cjs/src/binance.js +10 -10
- package/dist/cjs/src/bingx.js +3 -3
- package/dist/cjs/src/bit2c.js +4 -4
- package/dist/cjs/src/bitbank.js +15 -15
- package/dist/cjs/src/bitfinex.js +15 -15
- package/dist/cjs/src/bitget.js +109 -73
- package/dist/cjs/src/bitmex.js +7 -7
- package/dist/cjs/src/bitopro.js +2 -2
- package/dist/cjs/src/bitrue.js +6 -6
- package/dist/cjs/src/bitso.js +18 -18
- package/dist/cjs/src/bitstamp.js +5 -5
- package/dist/cjs/src/bitteam.js +32 -32
- package/dist/cjs/src/bittrade.js +10 -10
- package/dist/cjs/src/bitvavo.js +9 -9
- package/dist/cjs/src/blockchaincom.js +2 -2
- package/dist/cjs/src/btcbox.js +2 -2
- package/dist/cjs/src/btcmarkets.js +2 -2
- package/dist/cjs/src/btcturk.js +2 -2
- package/dist/cjs/src/btse.js +2 -2
- package/dist/cjs/src/bybitid.js +4 -0
- package/dist/cjs/src/coinbase.js +1 -1
- package/dist/cjs/src/coinbaseexchange.js +13 -13
- package/dist/cjs/src/coincheck.js +4 -4
- package/dist/cjs/src/coinex.js +10 -10
- package/dist/cjs/src/coinmate.js +4 -4
- package/dist/cjs/src/coinone.js +4 -4
- package/dist/cjs/src/coinsph.js +5 -5
- package/dist/cjs/src/cryptocom.js +5 -5
- package/dist/cjs/src/deribit.js +31 -31
- package/dist/cjs/src/derive.js +1 -1
- package/dist/cjs/src/digifinex.js +31 -31
- package/dist/cjs/src/gate.js +25 -25
- package/dist/cjs/src/gemini.js +5 -5
- package/dist/cjs/src/grvt.js +1 -1
- package/dist/cjs/src/hibachi.js +5 -5
- package/dist/cjs/src/hitbtc.js +15 -15
- package/dist/cjs/src/hollaex.js +15 -15
- package/dist/cjs/src/htx.js +52 -52
- package/dist/cjs/src/hyperliquid.js +2 -2
- package/dist/cjs/src/independentreserve.js +2 -2
- package/dist/cjs/src/indodax.js +8 -8
- package/dist/cjs/src/kraken.js +29 -29
- package/dist/cjs/src/krakenfutures.js +16 -16
- package/dist/cjs/src/kucoin.js +15 -15
- package/dist/cjs/src/latoken.js +8 -8
- package/dist/cjs/src/lbank.js +31 -31
- package/dist/cjs/src/lighter.js +2 -2
- package/dist/cjs/src/luno.js +2 -2
- package/dist/cjs/src/mercado.js +12 -12
- package/dist/cjs/src/mexc.js +27 -27
- package/dist/cjs/src/modetrade.js +10 -10
- package/dist/cjs/src/ndax.js +4 -4
- package/dist/cjs/src/okx.js +19 -20
- package/dist/cjs/src/onetrading.js +7 -7
- package/dist/cjs/src/p2b.js +8 -8
- package/dist/cjs/src/pacifica.js +9 -3
- package/dist/cjs/src/paymium.js +2 -2
- package/dist/cjs/src/phemex.js +37 -37
- package/dist/cjs/src/poloniex.js +14 -14
- package/dist/cjs/src/prediction/sxbet.js +2710 -0
- package/dist/cjs/src/pro/alpaca.js +5 -5
- package/dist/cjs/src/pro/apex.js +6 -6
- package/dist/cjs/src/pro/aster.js +8 -8
- package/dist/cjs/src/pro/backpack.js +1 -1
- package/dist/cjs/src/pro/binance.js +26 -26
- package/dist/cjs/src/pro/bingx.js +11 -11
- package/dist/cjs/src/pro/bitfinex.js +11 -11
- package/dist/cjs/src/pro/bitget.js +20 -20
- package/dist/cjs/src/pro/bithumb.js +1 -1
- package/dist/cjs/src/pro/bitmex.js +12 -12
- package/dist/cjs/src/pro/bitopro.js +5 -5
- package/dist/cjs/src/pro/bitrue.js +7 -7
- package/dist/cjs/src/pro/bitstamp.js +5 -5
- package/dist/cjs/src/pro/bittrade.js +11 -11
- package/dist/cjs/src/pro/bitvavo.js +16 -16
- package/dist/cjs/src/pro/blockchaincom.js +5 -5
- package/dist/cjs/src/pro/blofin.js +2 -2
- package/dist/cjs/src/pro/bybit.js +21 -21
- package/dist/cjs/src/pro/bydfi.js +2 -2
- package/dist/cjs/src/pro/cex.js +19 -19
- package/dist/cjs/src/pro/coinbase.js +2 -2
- package/dist/cjs/src/pro/coinbaseexchange.js +9 -9
- package/dist/cjs/src/pro/coinbaseinternational.js +2 -2
- package/dist/cjs/src/pro/coincheck.js +2 -2
- package/dist/cjs/src/pro/coinex.js +3 -3
- package/dist/cjs/src/pro/coinone.js +6 -6
- package/dist/cjs/src/pro/cryptocom.js +10 -10
- package/dist/cjs/src/pro/deribit.js +13 -13
- package/dist/cjs/src/pro/derive.js +4 -4
- package/dist/cjs/src/pro/dydx.js +1 -1
- package/dist/cjs/src/pro/extended.js +16 -10
- package/dist/cjs/src/pro/gate.js +10 -10
- package/dist/cjs/src/pro/gemini.js +3 -3
- package/dist/cjs/src/pro/grvt.js +2 -2
- package/dist/cjs/src/pro/hashkey.js +2 -2
- package/dist/cjs/src/pro/hitbtc.js +6 -6
- package/dist/cjs/src/pro/hollaex.js +3 -3
- package/dist/cjs/src/pro/htx.js +28 -28
- package/dist/cjs/src/pro/hyperliquid.js +1 -1
- package/dist/cjs/src/pro/independentreserve.js +2 -2
- package/dist/cjs/src/pro/kraken.js +7 -7
- package/dist/cjs/src/pro/krakenfutures.js +12 -12
- package/dist/cjs/src/pro/kucoin.js +12 -12
- package/dist/cjs/src/pro/lbank.js +16 -16
- package/dist/cjs/src/pro/luno.js +2 -2
- package/dist/cjs/src/pro/mexc.js +8 -8
- package/dist/cjs/src/pro/modetrade.js +3 -3
- package/dist/cjs/src/pro/mudrex.js +2 -2
- package/dist/cjs/src/pro/nado.js +3 -3
- package/dist/cjs/src/pro/ndax.js +6 -6
- package/dist/cjs/src/pro/okx.js +20 -20
- package/dist/cjs/src/pro/onetrading.js +14 -14
- package/dist/cjs/src/pro/p2b.js +5 -5
- package/dist/cjs/src/pro/pacifica.js +1 -1
- package/dist/cjs/src/pro/paradex.js +1 -1
- package/dist/cjs/src/pro/phemex.js +13 -13
- package/dist/cjs/src/pro/poloniex.js +17 -17
- package/dist/cjs/src/pro/toobit.js +2 -2
- package/dist/cjs/src/pro/upbit.js +4 -4
- package/dist/cjs/src/pro/weex.js +2 -2
- package/dist/cjs/src/pro/whitebit.js +12 -12
- package/dist/cjs/src/pro/woo.js +13 -13
- package/dist/cjs/src/pro/woofipro.js +3 -3
- package/dist/cjs/src/pro/xt.js +3 -3
- package/dist/cjs/src/tokocrypto.js +20 -20
- package/dist/cjs/src/upbit.js +12 -12
- package/dist/cjs/src/whitebit.js +15 -15
- package/dist/cjs/src/woo.js +3 -3
- package/dist/cjs/src/woofipro.js +14 -14
- package/dist/cjs/src/zaif.js +9 -3
- package/dist/cjs/src/zebpay.js +1 -1
- package/js/ccxt.d.ts +4 -1
- package/js/ccxt.js +3 -1
- package/js/src/abstract/prediction/sxbet.d.ts +41 -0
- package/js/src/abstract/prediction/sxbet.js +11 -0
- package/js/src/alpaca.d.ts +28 -33
- package/js/src/apex.d.ts +28 -42
- package/js/src/apex.js +1 -0
- package/js/src/aster.d.ts +58 -108
- package/js/src/aster.js +2 -2
- package/js/src/backpack.d.ts +34 -48
- package/js/src/base/Exchange.d.ts +304 -320
- package/js/src/base/Exchange.js +1 -1
- package/js/src/bigone.d.ts +24 -29
- package/js/src/bigone.js +2 -2
- package/js/src/binance.d.ts +112 -138
- package/js/src/binance.js +10 -10
- package/js/src/binancecoinm.d.ts +3 -2
- package/js/src/binanceusdm.d.ts +3 -2
- package/js/src/bingx.d.ts +65 -84
- package/js/src/bingx.js +3 -3
- package/js/src/bit2c.d.ts +13 -18
- package/js/src/bit2c.js +4 -4
- package/js/src/bitbank.d.ts +16 -21
- package/js/src/bitbank.js +15 -15
- package/js/src/bitbns.d.ts +15 -20
- package/js/src/bitfinex.d.ts +46 -51
- package/js/src/bitfinex.js +15 -15
- package/js/src/bitflyer.d.ts +20 -25
- package/js/src/bitget.d.ts +105 -93
- package/js/src/bitget.js +109 -73
- package/js/src/bithumb.d.ts +26 -31
- package/js/src/bitmex.d.ts +48 -65
- package/js/src/bitmex.js +7 -7
- package/js/src/bitopro.d.ts +25 -41
- package/js/src/bitopro.js +2 -2
- package/js/src/bitrue.d.ts +30 -45
- package/js/src/bitrue.js +6 -6
- package/js/src/bitso.d.ts +24 -29
- package/js/src/bitso.js +18 -18
- package/js/src/bitstamp.d.ts +36 -47
- package/js/src/bitstamp.js +5 -5
- package/js/src/bitteam.d.ts +22 -27
- package/js/src/bitteam.js +32 -32
- package/js/src/bittrade.d.ts +35 -46
- package/js/src/bittrade.js +10 -10
- package/js/src/bitvavo.d.ts +43 -48
- package/js/src/bitvavo.js +9 -9
- package/js/src/blockchaincom.d.ts +26 -31
- package/js/src/blockchaincom.js +2 -2
- package/js/src/blofin.d.ts +38 -43
- package/js/src/btcbox.d.ts +14 -19
- package/js/src/btcbox.js +2 -2
- package/js/src/btcmarkets.d.ts +25 -30
- package/js/src/btcmarkets.js +2 -2
- package/js/src/btcturk.d.ts +13 -18
- package/js/src/btcturk.js +2 -2
- package/js/src/btse.d.ts +44 -50
- package/js/src/btse.js +2 -2
- package/js/src/bullish.d.ts +35 -57
- package/js/src/bybit.d.ts +95 -106
- package/js/src/bybitid.js +4 -0
- package/js/src/bydfi.d.ts +37 -48
- package/js/src/cex.d.ts +29 -34
- package/js/src/coinbase.d.ts +66 -82
- package/js/src/coinbase.js +1 -1
- package/js/src/coinbaseexchange.d.ts +33 -43
- package/js/src/coinbaseexchange.js +13 -13
- package/js/src/coinbaseinternational.d.ts +34 -73
- package/js/src/coincheck.d.ts +13 -18
- package/js/src/coincheck.js +4 -4
- package/js/src/coinex.d.ts +63 -68
- package/js/src/coinex.js +10 -10
- package/js/src/coinmate.d.ts +15 -20
- package/js/src/coinmate.js +4 -4
- package/js/src/coinone.d.ts +14 -19
- package/js/src/coinone.js +4 -4
- package/js/src/coinsph.d.ts +32 -37
- package/js/src/coinsph.js +5 -5
- package/js/src/coinspot.d.ts +10 -15
- package/js/src/cryptocom.d.ts +48 -64
- package/js/src/cryptocom.js +5 -5
- package/js/src/cryptomus.d.ts +15 -23
- package/js/src/deepcoin.d.ts +43 -48
- package/js/src/delta.d.ts +43 -54
- package/js/src/deribit.d.ts +48 -69
- package/js/src/deribit.js +31 -31
- package/js/src/derive.d.ts +28 -42
- package/js/src/derive.js +1 -1
- package/js/src/digifinex.d.ts +54 -67
- package/js/src/digifinex.js +31 -31
- package/js/src/dydx.d.ts +26 -31
- package/js/src/extended.d.ts +51 -56
- package/js/src/foxbit.d.ts +34 -64
- package/js/src/gate.d.ts +94 -162
- package/js/src/gate.js +25 -25
- package/js/src/gemini.d.ts +33 -43
- package/js/src/gemini.js +5 -5
- package/js/src/grvt.d.ts +36 -47
- package/js/src/grvt.js +1 -1
- package/js/src/hashkey.d.ts +58 -78
- package/js/src/hibachi.d.ts +42 -52
- package/js/src/hibachi.js +5 -5
- package/js/src/hitbtc.d.ts +49 -56
- package/js/src/hitbtc.js +15 -15
- package/js/src/hollaex.d.ts +26 -31
- package/js/src/hollaex.js +15 -15
- package/js/src/htx.d.ts +80 -121
- package/js/src/htx.js +52 -52
- package/js/src/hyperliquid.d.ts +77 -127
- package/js/src/hyperliquid.js +2 -2
- package/js/src/independentreserve.d.ts +15 -20
- package/js/src/independentreserve.js +2 -2
- package/js/src/indodax.d.ts +19 -24
- package/js/src/indodax.js +8 -8
- package/js/src/kraken.d.ts +43 -55
- package/js/src/kraken.js +29 -29
- package/js/src/krakenfutures.d.ts +34 -39
- package/js/src/krakenfutures.js +16 -16
- package/js/src/kucoin.d.ts +121 -132
- package/js/src/kucoin.js +15 -15
- package/js/src/kucoinfutures.d.ts +4 -4
- package/js/src/latoken.d.ts +24 -29
- package/js/src/latoken.js +8 -8
- package/js/src/lbank.d.ts +40 -53
- package/js/src/lbank.js +31 -31
- package/js/src/lighter.d.ts +40 -45
- package/js/src/lighter.js +2 -2
- package/js/src/luno.d.ts +25 -30
- package/js/src/luno.js +2 -2
- package/js/src/mercado.d.ts +15 -20
- package/js/src/mercado.js +12 -12
- package/js/src/mexc.d.ts +70 -83
- package/js/src/mexc.js +27 -27
- package/js/src/modetrade.d.ts +43 -57
- package/js/src/modetrade.js +10 -10
- package/js/src/mudrex.d.ts +25 -35
- package/js/src/nado.d.ts +45 -50
- package/js/src/ndax.d.ts +27 -32
- package/js/src/ndax.js +4 -4
- package/js/src/okx.d.ts +97 -108
- package/js/src/okx.js +19 -20
- package/js/src/onetrading.d.ts +23 -31
- package/js/src/onetrading.js +7 -7
- package/js/src/p2b.d.ts +17 -22
- package/js/src/p2b.js +8 -8
- package/js/src/pacifica.d.ts +55 -73
- package/js/src/pacifica.js +9 -3
- package/js/src/paradex.d.ts +47 -68
- package/js/src/paymium.d.ts +12 -17
- package/js/src/paymium.js +2 -2
- package/js/src/phemex.d.ts +47 -52
- package/js/src/phemex.js +37 -37
- package/js/src/poloniex.d.ts +45 -50
- package/js/src/poloniex.js +14 -14
- package/js/src/prediction/sxbet.d.ts +595 -0
- package/js/src/prediction/sxbet.js +2708 -0
- package/js/src/pro/alpaca.d.ts +23 -23
- package/js/src/pro/alpaca.js +5 -5
- package/js/src/pro/apex.d.ts +28 -28
- package/js/src/pro/apex.js +6 -6
- package/js/src/pro/aster.d.ts +33 -33
- package/js/src/pro/aster.js +8 -8
- package/js/src/pro/backpack.d.ts +28 -28
- package/js/src/pro/backpack.js +1 -1
- package/js/src/pro/binance.d.ts +57 -57
- package/js/src/pro/binance.js +26 -26
- package/js/src/pro/bingx.d.ts +26 -26
- package/js/src/pro/bingx.js +11 -11
- package/js/src/pro/bitfinex.d.ts +25 -25
- package/js/src/pro/bitfinex.js +11 -11
- package/js/src/pro/bitget.d.ts +41 -41
- package/js/src/pro/bitget.js +20 -20
- package/js/src/pro/bithumb.d.ts +15 -15
- package/js/src/pro/bithumb.js +1 -1
- package/js/src/pro/bitmex.d.ts +29 -29
- package/js/src/pro/bitmex.js +12 -12
- package/js/src/pro/bitopro.d.ts +13 -13
- package/js/src/pro/bitopro.js +5 -5
- package/js/src/pro/bitrue.d.ts +25 -25
- package/js/src/pro/bitrue.js +7 -7
- package/js/src/pro/bitstamp.d.ts +21 -21
- package/js/src/pro/bitstamp.js +5 -5
- package/js/src/pro/bittrade.d.ts +19 -19
- package/js/src/pro/bittrade.js +11 -11
- package/js/src/pro/bitvavo.d.ts +62 -62
- package/js/src/pro/bitvavo.js +16 -16
- package/js/src/pro/blockchaincom.d.ts +19 -19
- package/js/src/pro/blockchaincom.js +5 -5
- package/js/src/pro/blofin.d.ts +23 -23
- package/js/src/pro/blofin.js +2 -2
- package/js/src/pro/bullish.d.ts +19 -25
- package/js/src/pro/bybit.d.ts +42 -45
- package/js/src/pro/bybit.js +21 -21
- package/js/src/pro/bydfi.d.ts +24 -24
- package/js/src/pro/bydfi.js +2 -2
- package/js/src/pro/cex.d.ts +37 -37
- package/js/src/pro/cex.js +19 -19
- package/js/src/pro/coinbase.d.ts +19 -19
- package/js/src/pro/coinbase.js +2 -2
- package/js/src/pro/coinbaseexchange.d.ts +25 -25
- package/js/src/pro/coinbaseexchange.js +9 -9
- package/js/src/pro/coinbaseinternational.d.ts +20 -20
- package/js/src/pro/coinbaseinternational.js +2 -2
- package/js/src/pro/coincheck.d.ts +5 -5
- package/js/src/pro/coincheck.js +2 -2
- package/js/src/pro/coinex.d.ts +24 -24
- package/js/src/pro/coinex.js +3 -3
- package/js/src/pro/coinone.d.ts +9 -11
- package/js/src/pro/coinone.js +6 -6
- package/js/src/pro/cryptocom.d.ts +40 -40
- package/js/src/pro/cryptocom.js +10 -10
- package/js/src/pro/deepcoin.d.ts +24 -32
- package/js/src/pro/deribit.d.ts +24 -24
- package/js/src/pro/deribit.js +13 -13
- package/js/src/pro/derive.d.ts +22 -22
- package/js/src/pro/derive.js +4 -4
- package/js/src/pro/dydx.d.ts +9 -9
- package/js/src/pro/dydx.js +1 -1
- package/js/src/pro/extended.d.ts +22 -22
- package/js/src/pro/extended.js +16 -10
- package/js/src/pro/gate.d.ts +50 -50
- package/js/src/pro/gate.js +10 -10
- package/js/src/pro/gemini.d.ts +26 -26
- package/js/src/pro/gemini.js +3 -3
- package/js/src/pro/grvt.d.ts +22 -22
- package/js/src/pro/grvt.js +2 -2
- package/js/src/pro/hashkey.d.ts +19 -19
- package/js/src/pro/hashkey.js +2 -2
- package/js/src/pro/hitbtc.d.ts +32 -32
- package/js/src/pro/hitbtc.js +6 -6
- package/js/src/pro/hollaex.d.ts +15 -17
- package/js/src/pro/hollaex.js +3 -3
- package/js/src/pro/htx.d.ts +36 -36
- package/js/src/pro/htx.js +28 -28
- package/js/src/pro/hyperliquid.d.ts +29 -31
- package/js/src/pro/hyperliquid.js +1 -1
- package/js/src/pro/independentreserve.d.ts +10 -10
- package/js/src/pro/independentreserve.js +2 -2
- package/js/src/pro/kraken.d.ts +41 -55
- package/js/src/pro/kraken.js +7 -7
- package/js/src/pro/krakenfutures.d.ts +32 -32
- package/js/src/pro/krakenfutures.js +12 -12
- package/js/src/pro/kucoin.d.ts +69 -72
- package/js/src/pro/kucoin.js +12 -12
- package/js/src/pro/kucoinfutures.d.ts +4 -4
- package/js/src/pro/lbank.d.ts +22 -22
- package/js/src/pro/lbank.js +16 -16
- package/js/src/pro/lighter.d.ts +27 -27
- package/js/src/pro/luno.d.ts +8 -8
- package/js/src/pro/luno.js +2 -2
- package/js/src/pro/mexc.d.ts +33 -33
- package/js/src/pro/mexc.js +8 -8
- package/js/src/pro/modetrade.d.ts +37 -39
- package/js/src/pro/modetrade.js +3 -3
- package/js/src/pro/mudrex.d.ts +8 -8
- package/js/src/pro/mudrex.js +2 -2
- package/js/src/pro/nado.d.ts +42 -46
- package/js/src/pro/nado.js +3 -3
- package/js/src/pro/ndax.d.ts +12 -12
- package/js/src/pro/ndax.js +6 -6
- package/js/src/pro/okx.d.ts +49 -49
- package/js/src/pro/okx.js +20 -20
- package/js/src/pro/onetrading.d.ts +28 -28
- package/js/src/pro/onetrading.js +14 -14
- package/js/src/pro/p2b.d.ts +15 -19
- package/js/src/pro/p2b.js +5 -5
- package/js/src/pro/pacifica.d.ts +22 -22
- package/js/src/pro/pacifica.js +1 -1
- package/js/src/pro/paradex.d.ts +18 -18
- package/js/src/pro/paradex.js +1 -1
- package/js/src/pro/phemex.d.ts +25 -25
- package/js/src/pro/phemex.js +13 -13
- package/js/src/pro/poloniex.d.ts +30 -32
- package/js/src/pro/poloniex.js +17 -17
- package/js/src/pro/toobit.d.ts +31 -31
- package/js/src/pro/toobit.js +2 -2
- package/js/src/pro/upbit.d.ts +24 -24
- package/js/src/pro/upbit.js +4 -4
- package/js/src/pro/weex.d.ts +39 -39
- package/js/src/pro/weex.js +2 -2
- package/js/src/pro/whitebit.d.ts +26 -30
- package/js/src/pro/whitebit.js +12 -12
- package/js/src/pro/woo.d.ts +44 -46
- package/js/src/pro/woo.js +13 -13
- package/js/src/pro/woofipro.d.ts +39 -41
- package/js/src/pro/woofipro.js +3 -3
- package/js/src/pro/xt.d.ts +20 -20
- package/js/src/pro/xt.js +3 -3
- package/js/src/revolutx.d.ts +17 -17
- package/js/src/tokocrypto.d.ts +25 -30
- package/js/src/tokocrypto.js +20 -20
- package/js/src/toobit.d.ts +45 -79
- package/js/src/upbit.d.ts +28 -61
- package/js/src/upbit.js +12 -12
- package/js/src/weex.d.ts +57 -68
- package/js/src/whitebit.d.ts +53 -64
- package/js/src/whitebit.js +15 -15
- package/js/src/woo.d.ts +61 -75
- package/js/src/woo.js +3 -3
- package/js/src/woofipro.d.ts +53 -67
- package/js/src/woofipro.js +14 -14
- package/js/src/xt.d.ts +57 -67
- package/js/src/zaif.d.ts +11 -16
- package/js/src/zaif.js +9 -3
- package/js/src/zebpay.d.ts +32 -37
- package/js/src/zebpay.js +1 -1
- package/package.json +2 -2
|
@@ -389,7 +389,7 @@ class bybit extends bybit$1["default"] {
|
|
|
389
389
|
const messageHash = 'ticker:' + symbol;
|
|
390
390
|
const url = await this.getUrlByMarketType(symbol, false, 'watchTicker', params);
|
|
391
391
|
params = this.cleanParams(params);
|
|
392
|
-
const options = this.
|
|
392
|
+
const options = this.safeDict(this.options, 'watchTicker', {});
|
|
393
393
|
let topic = this.safeString(options, 'name', 'tickers');
|
|
394
394
|
if ((market['spot'] !== true) && topic !== 'tickers') {
|
|
395
395
|
throw new errors.BadRequest(this.id + ' watchTicker() only supports name tickers for contract markets');
|
|
@@ -416,7 +416,7 @@ class bybit extends bybit$1["default"] {
|
|
|
416
416
|
const messageHashes = [];
|
|
417
417
|
const url = await this.getUrlByMarketType(symbols[0], false, 'watchTickers', params);
|
|
418
418
|
params = this.cleanParams(params);
|
|
419
|
-
const options = this.
|
|
419
|
+
const options = this.safeDict(this.options, 'watchTickers', {});
|
|
420
420
|
const topic = this.safeString(options, 'name', 'tickers');
|
|
421
421
|
const marketIds = this.marketIds(symbols);
|
|
422
422
|
const topics = [];
|
|
@@ -448,7 +448,7 @@ class bybit extends bybit$1["default"] {
|
|
|
448
448
|
await this.loadMarkets();
|
|
449
449
|
}
|
|
450
450
|
symbols = this.marketSymbols(symbols, undefined, false);
|
|
451
|
-
const options = this.
|
|
451
|
+
const options = this.safeDict(this.options, 'watchTickers', {});
|
|
452
452
|
const topic = this.safeString(options, 'name', 'tickers');
|
|
453
453
|
const messageHashes = [];
|
|
454
454
|
const subMessageHashes = [];
|
|
@@ -817,7 +817,7 @@ class bybit extends bybit$1["default"] {
|
|
|
817
817
|
const marketType = isSpot ? 'spot' : 'contract';
|
|
818
818
|
const market = this.safeMarket(marketId, undefined, undefined, marketType);
|
|
819
819
|
const symbol = market['symbol'];
|
|
820
|
-
const ohlcvsByTimeframe = this.
|
|
820
|
+
const ohlcvsByTimeframe = this.safeDict(this.ohlcvs, symbol);
|
|
821
821
|
if (ohlcvsByTimeframe === undefined) {
|
|
822
822
|
this.ohlcvs[symbol] = {};
|
|
823
823
|
}
|
|
@@ -1109,7 +1109,7 @@ class bybit extends bybit$1["default"] {
|
|
|
1109
1109
|
}
|
|
1110
1110
|
const trades = await this.watchTopics(url, messageHashes, topics, params);
|
|
1111
1111
|
if (this.newUpdates) {
|
|
1112
|
-
const first = this.
|
|
1112
|
+
const first = this.safeDict(trades, 0);
|
|
1113
1113
|
const tradeSymbol = this.safeString(first, 'symbol');
|
|
1114
1114
|
limit = trades.getLimit(tradeSymbol, limit);
|
|
1115
1115
|
}
|
|
@@ -1311,7 +1311,7 @@ class bybit extends bybit$1["default"] {
|
|
|
1311
1311
|
'unified': 'execution',
|
|
1312
1312
|
'usdc': 'user.openapi.perp.trade',
|
|
1313
1313
|
};
|
|
1314
|
-
let topic = this.
|
|
1314
|
+
let topic = this.safeString(topicByMarket, this.getPrivateType(url));
|
|
1315
1315
|
let executionFast = false;
|
|
1316
1316
|
[executionFast, params] = this.handleOptionAndParams(params, 'watchMyTrades', 'executionFast', false);
|
|
1317
1317
|
if (executionFast) {
|
|
@@ -1352,7 +1352,7 @@ class bybit extends bybit$1["default"] {
|
|
|
1352
1352
|
'unified': 'execution',
|
|
1353
1353
|
'usdc': 'user.openapi.perp.trade',
|
|
1354
1354
|
};
|
|
1355
|
-
let topic = this.
|
|
1355
|
+
let topic = this.safeString(topicByMarket, this.getPrivateType(url));
|
|
1356
1356
|
let executionFast = false;
|
|
1357
1357
|
[executionFast, params] = this.handleOptionAndParams(params, 'watchMyTrades', 'executionFast', false);
|
|
1358
1358
|
if (executionFast) {
|
|
@@ -1448,7 +1448,7 @@ class bybit extends bybit$1["default"] {
|
|
|
1448
1448
|
const topic = this.safeString(message, 'topic', '');
|
|
1449
1449
|
const spot = topic === 'ticketInfo';
|
|
1450
1450
|
const executionFast = topic === 'execution.fast';
|
|
1451
|
-
let data = this.
|
|
1451
|
+
let data = this.safeList(message, 'data', []);
|
|
1452
1452
|
if (!Array.isArray(data)) {
|
|
1453
1453
|
data = this.safeList(data, 'result', []);
|
|
1454
1454
|
}
|
|
@@ -1848,7 +1848,7 @@ class bybit extends bybit$1["default"] {
|
|
|
1848
1848
|
'unified': ['order'],
|
|
1849
1849
|
'usdc': ['user.openapi.perp.order'],
|
|
1850
1850
|
};
|
|
1851
|
-
const topics = this.
|
|
1851
|
+
const topics = this.safeList(topicsByMarket, this.getPrivateType(url));
|
|
1852
1852
|
const orders = await this.watchTopics(url, [messageHash], topics, params);
|
|
1853
1853
|
if (this.newUpdates) {
|
|
1854
1854
|
limit = orders.getLimit(symbol, limit);
|
|
@@ -1882,7 +1882,7 @@ class bybit extends bybit$1["default"] {
|
|
|
1882
1882
|
'unified': ['order'],
|
|
1883
1883
|
'usdc': ['user.openapi.perp.order'],
|
|
1884
1884
|
};
|
|
1885
|
-
const topics = this.
|
|
1885
|
+
const topics = this.safeList(topicsByMarket, this.getPrivateType(url));
|
|
1886
1886
|
return await this.unWatchTopics(url, 'orders', [], [messageHash], [subHash], topics, params);
|
|
1887
1887
|
}
|
|
1888
1888
|
handleOrderWs(client, message) {
|
|
@@ -2001,7 +2001,7 @@ class bybit extends bybit$1["default"] {
|
|
|
2001
2001
|
}
|
|
2002
2002
|
const orders = this.orders;
|
|
2003
2003
|
let rawOrders = this.safeList(message, 'data', []);
|
|
2004
|
-
const first = this.
|
|
2004
|
+
const first = this.safeDict(rawOrders, 0, {});
|
|
2005
2005
|
const category = this.safeString(first, 'category');
|
|
2006
2006
|
const isSpot = category === 'spot';
|
|
2007
2007
|
if (!isSpot) {
|
|
@@ -2089,7 +2089,7 @@ class bybit extends bybit$1["default"] {
|
|
|
2089
2089
|
}
|
|
2090
2090
|
}
|
|
2091
2091
|
}
|
|
2092
|
-
const topics = [this.
|
|
2092
|
+
const topics = [this.safeString(topicByMarket, this.getPrivateType(url))];
|
|
2093
2093
|
return await this.watchTopics(url, [messageHash], topics, params);
|
|
2094
2094
|
}
|
|
2095
2095
|
handleBalance(client, message) {
|
|
@@ -2239,7 +2239,7 @@ class bybit extends bybit$1["default"] {
|
|
|
2239
2239
|
this.balance = {};
|
|
2240
2240
|
}
|
|
2241
2241
|
let messageHash = 'balance';
|
|
2242
|
-
const topic = this.
|
|
2242
|
+
const topic = this.safeString(message, 'topic');
|
|
2243
2243
|
let info = undefined;
|
|
2244
2244
|
let rawBalances = [];
|
|
2245
2245
|
let account = undefined;
|
|
@@ -2247,7 +2247,7 @@ class bybit extends bybit$1["default"] {
|
|
|
2247
2247
|
account = 'spot';
|
|
2248
2248
|
const data = this.safeList(message, 'data', []);
|
|
2249
2249
|
for (let i = 0; i < data.length; i++) {
|
|
2250
|
-
const B = this.
|
|
2250
|
+
const B = this.safeList(data[i], 'B', []);
|
|
2251
2251
|
rawBalances = this.arrayConcat(rawBalances, B);
|
|
2252
2252
|
}
|
|
2253
2253
|
info = rawBalances;
|
|
@@ -2255,9 +2255,9 @@ class bybit extends bybit$1["default"] {
|
|
|
2255
2255
|
if (topic === 'wallet') {
|
|
2256
2256
|
const data = this.safeValue(message, 'data', {});
|
|
2257
2257
|
for (let i = 0; i < data.length; i++) {
|
|
2258
|
-
const result = this.
|
|
2258
|
+
const result = this.safeDict(data, 0, {});
|
|
2259
2259
|
account = this.safeStringLower(result, 'accountType');
|
|
2260
|
-
rawBalances = this.arrayConcat(rawBalances, this.
|
|
2260
|
+
rawBalances = this.arrayConcat(rawBalances, this.safeList(result, 'coin', []));
|
|
2261
2261
|
}
|
|
2262
2262
|
info = data;
|
|
2263
2263
|
}
|
|
@@ -2265,7 +2265,7 @@ class bybit extends bybit$1["default"] {
|
|
|
2265
2265
|
this.parseWsBalance(rawBalances[i], account);
|
|
2266
2266
|
}
|
|
2267
2267
|
if (account !== undefined) {
|
|
2268
|
-
if (this.
|
|
2268
|
+
if (this.safeDict(this.balance, account) === undefined) {
|
|
2269
2269
|
this.balance[account] = {};
|
|
2270
2270
|
}
|
|
2271
2271
|
this.balance[account]['info'] = info;
|
|
@@ -2333,7 +2333,7 @@ class bybit extends bybit$1["default"] {
|
|
|
2333
2333
|
// is the consistent total, the spot rows fall back to the wallet balance
|
|
2334
2334
|
account['total'] = this.safeString2(balance, 'equity', 'walletBalance');
|
|
2335
2335
|
if (accountType !== undefined) {
|
|
2336
|
-
if (this.
|
|
2336
|
+
if (this.safeDict(this.balance, accountType) === undefined) {
|
|
2337
2337
|
this.balance[accountType] = {};
|
|
2338
2338
|
}
|
|
2339
2339
|
if ((accountType !== undefined) && (code !== undefined)) {
|
|
@@ -2491,10 +2491,10 @@ class bybit extends bybit$1["default"] {
|
|
|
2491
2491
|
this.throwBroadlyMatchedException(this.exceptions['broad'], msg, feedback);
|
|
2492
2492
|
throw new errors.ExchangeError(feedback);
|
|
2493
2493
|
}
|
|
2494
|
-
const success = this.
|
|
2494
|
+
const success = this.safeBool(message, 'success');
|
|
2495
2495
|
if ((success !== undefined) && (success !== true)) {
|
|
2496
2496
|
const ret_msg = this.safeString(message, 'ret_msg');
|
|
2497
|
-
const request = this.
|
|
2497
|
+
const request = this.safeDict(message, 'request', {});
|
|
2498
2498
|
const op = this.safeString(request, 'op');
|
|
2499
2499
|
if (op === 'auth') {
|
|
2500
2500
|
throw new errors.AuthenticationError('Authentication failed: ' + ret_msg);
|
|
@@ -2680,7 +2680,7 @@ class bybit extends bybit$1["default"] {
|
|
|
2680
2680
|
// "conn_id": "d266o6hqo29sqmnq4vk0-1yus1"
|
|
2681
2681
|
// }
|
|
2682
2682
|
//
|
|
2683
|
-
const success = this.
|
|
2683
|
+
const success = this.safeBool(message, 'success');
|
|
2684
2684
|
const code = this.safeInteger(message, 'retCode');
|
|
2685
2685
|
const messageHash = 'authenticated';
|
|
2686
2686
|
if ((success === true) || (code === 0)) {
|
|
@@ -588,7 +588,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
588
588
|
}
|
|
589
589
|
const orders = await this.watchPrivate(messageHashes, params);
|
|
590
590
|
if (this.newUpdates) {
|
|
591
|
-
const first = this.
|
|
591
|
+
const first = this.safeDict(orders, 0);
|
|
592
592
|
const tradeSymbol = this.safeString(first, 'symbol');
|
|
593
593
|
limit = orders.getLimit(tradeSymbol, limit);
|
|
594
594
|
}
|
|
@@ -885,7 +885,7 @@ class bydfi extends bydfi$1["default"] {
|
|
|
885
885
|
return await this.watchPrivate([messageHash], params);
|
|
886
886
|
}
|
|
887
887
|
fetchBalanceSnapshot(client) {
|
|
888
|
-
const options = this.
|
|
888
|
+
const options = this.safeDict(this.options, 'watchBalance');
|
|
889
889
|
const fetchBalanceSnapshot = this.safeBool(options, 'fetchBalanceSnapshot', false);
|
|
890
890
|
if (fetchBalanceSnapshot === true) {
|
|
891
891
|
const messageHash = 'fetchBalanceSnapshot';
|
package/dist/cjs/src/pro/cex.js
CHANGED
|
@@ -97,9 +97,9 @@ class cex extends cex$1["default"] {
|
|
|
97
97
|
// "ok": "ok"
|
|
98
98
|
// }
|
|
99
99
|
//
|
|
100
|
-
const data = this.
|
|
100
|
+
const data = this.safeDict(message, 'data', {});
|
|
101
101
|
const freeBalance = this.safeDict(data, 'balance', {});
|
|
102
|
-
const usedBalance = this.
|
|
102
|
+
const usedBalance = this.safeDict(data, 'obalance', {});
|
|
103
103
|
const result = {
|
|
104
104
|
'info': data,
|
|
105
105
|
};
|
|
@@ -356,7 +356,7 @@ class cex extends cex$1["default"] {
|
|
|
356
356
|
// }
|
|
357
357
|
// }
|
|
358
358
|
//
|
|
359
|
-
const data = this.
|
|
359
|
+
const data = this.safeDict(message, 'data', {});
|
|
360
360
|
const ticker = this.parseWsTicker(data);
|
|
361
361
|
const symbol = ticker['symbol'];
|
|
362
362
|
if (symbol === undefined) {
|
|
@@ -395,7 +395,7 @@ class cex extends cex$1["default"] {
|
|
|
395
395
|
// "priceChangePercentage": "0.23",
|
|
396
396
|
// "pair": ["BTC", "USDT"]
|
|
397
397
|
// }
|
|
398
|
-
const pair = this.
|
|
398
|
+
const pair = this.safeList(ticker, 'pair', []);
|
|
399
399
|
let baseId = this.safeString(ticker, 'symbol1');
|
|
400
400
|
if (baseId === undefined) {
|
|
401
401
|
baseId = this.safeString(pair, 0);
|
|
@@ -533,7 +533,7 @@ class cex extends cex$1["default"] {
|
|
|
533
533
|
return this.filterBySymbolSinceLimit(orders, market['symbol'], since, limit);
|
|
534
534
|
}
|
|
535
535
|
handleTransaction(client, message) {
|
|
536
|
-
const data = this.
|
|
536
|
+
const data = this.safeDict(message, 'data');
|
|
537
537
|
const symbol2 = this.safeString(data, 'symbol2');
|
|
538
538
|
if (symbol2 === undefined) {
|
|
539
539
|
return;
|
|
@@ -584,7 +584,7 @@ class cex extends cex$1["default"] {
|
|
|
584
584
|
// "id": "59091012962"
|
|
585
585
|
// }
|
|
586
586
|
// }
|
|
587
|
-
const data = this.
|
|
587
|
+
const data = this.safeDict(message, 'data', {});
|
|
588
588
|
let stored = this.myTrades;
|
|
589
589
|
if (stored === undefined) {
|
|
590
590
|
const limit = this.safeInteger(this.options, 'tradesLimit', 1000);
|
|
@@ -727,13 +727,13 @@ class cex extends cex$1["default"] {
|
|
|
727
727
|
// }
|
|
728
728
|
// }
|
|
729
729
|
//
|
|
730
|
-
const data = this.
|
|
730
|
+
const data = this.safeDict(message, 'data', {});
|
|
731
731
|
const isTransaction = this.safeString(message, 'e') === 'tx';
|
|
732
732
|
const orderId = this.safeString2(data, 'id', 'order');
|
|
733
733
|
let remains = this.safeString(data, 'remains');
|
|
734
734
|
let baseId = this.safeString(data, 'symbol');
|
|
735
735
|
let quoteId = this.safeString(data, 'symbol2');
|
|
736
|
-
const pair = this.
|
|
736
|
+
const pair = this.safeDict(data, 'pair');
|
|
737
737
|
if (pair !== undefined) {
|
|
738
738
|
baseId = this.safeString(pair, 'symbol1');
|
|
739
739
|
quoteId = this.safeString(pair, 'symbol2');
|
|
@@ -748,7 +748,7 @@ class cex extends cex$1["default"] {
|
|
|
748
748
|
this.orders = new Cache.ArrayCacheBySymbolById(limit);
|
|
749
749
|
}
|
|
750
750
|
const storedOrders = this.orders;
|
|
751
|
-
const ordersBySymbol = this.
|
|
751
|
+
const ordersBySymbol = this.safeDict(storedOrders.hashmap, symbol, {});
|
|
752
752
|
let order = this.safeValue(ordersBySymbol, orderId);
|
|
753
753
|
if (order === undefined) {
|
|
754
754
|
order = this.parseWsOrderUpdate(data, market);
|
|
@@ -814,7 +814,7 @@ class cex extends cex$1["default"] {
|
|
|
814
814
|
// "id": "59425993020"
|
|
815
815
|
// }
|
|
816
816
|
//
|
|
817
|
-
const isTransaction = this.
|
|
817
|
+
const isTransaction = this.safeString(order, 'd') !== undefined;
|
|
818
818
|
const remainsPrecision = this.safeString(order, 'remains');
|
|
819
819
|
let remaining = undefined;
|
|
820
820
|
if (remainsPrecision !== undefined) {
|
|
@@ -832,7 +832,7 @@ class cex extends cex$1["default"] {
|
|
|
832
832
|
}
|
|
833
833
|
let baseId = this.safeString(order, 'symbol');
|
|
834
834
|
let quoteId = this.safeString(order, 'symbol2');
|
|
835
|
-
const pair = this.
|
|
835
|
+
const pair = this.safeDict(order, 'pair');
|
|
836
836
|
if (pair !== undefined) {
|
|
837
837
|
baseId = this.safeString(order, 'symbol1');
|
|
838
838
|
quoteId = this.safeString(order, 'symbol2');
|
|
@@ -999,7 +999,7 @@ class cex extends cex$1["default"] {
|
|
|
999
999
|
// "ok": "ok"
|
|
1000
1000
|
// }
|
|
1001
1001
|
//
|
|
1002
|
-
const data = this.
|
|
1002
|
+
const data = this.safeDict(message, 'data', {});
|
|
1003
1003
|
const pair = this.safeString(data, 'pair');
|
|
1004
1004
|
const symbol = this.pairToSymbol(pair);
|
|
1005
1005
|
const messageHash = 'orderbook:' + symbol;
|
|
@@ -1039,7 +1039,7 @@ class cex extends cex$1["default"] {
|
|
|
1039
1039
|
// }
|
|
1040
1040
|
// }
|
|
1041
1041
|
//
|
|
1042
|
-
const data = this.
|
|
1042
|
+
const data = this.safeDict(message, 'data', {});
|
|
1043
1043
|
const incrementalId = this.safeInteger(data, 'id');
|
|
1044
1044
|
const pair = this.safeString(data, 'pair', '');
|
|
1045
1045
|
const symbol = this.pairToSymbol(pair);
|
|
@@ -1051,8 +1051,8 @@ class cex extends cex$1["default"] {
|
|
|
1051
1051
|
return;
|
|
1052
1052
|
}
|
|
1053
1053
|
const timestamp = this.safeInteger(data, 'time');
|
|
1054
|
-
const asks = this.
|
|
1055
|
-
const bids = this.
|
|
1054
|
+
const asks = this.safeList(data, 'asks', []);
|
|
1055
|
+
const bids = this.safeList(data, 'bids', []);
|
|
1056
1056
|
this.handleDeltas(storedOrderBook['asks'], asks);
|
|
1057
1057
|
this.handleDeltas(storedOrderBook['bids'], bids);
|
|
1058
1058
|
storedOrderBook['timestamp'] = timestamp;
|
|
@@ -1132,7 +1132,7 @@ class cex extends cex$1["default"] {
|
|
|
1132
1132
|
const symbol = base + '/' + quote;
|
|
1133
1133
|
const market = this.safeMarket(symbol);
|
|
1134
1134
|
const messageHash = 'ohlcv:' + symbol;
|
|
1135
|
-
const data = this.
|
|
1135
|
+
const data = this.safeList(message, 'data', []);
|
|
1136
1136
|
const limit = this.safeInteger(this.options, 'OHLCVLimit', 1000);
|
|
1137
1137
|
const stored = new Cache.ArrayCacheByTimestamp(limit);
|
|
1138
1138
|
const sorted = this.sortBy(data, 0);
|
|
@@ -1171,7 +1171,7 @@ class cex extends cex$1["default"] {
|
|
|
1171
1171
|
// }
|
|
1172
1172
|
// }
|
|
1173
1173
|
//
|
|
1174
|
-
const data = this.
|
|
1174
|
+
const data = this.safeDict(message, 'data', {});
|
|
1175
1175
|
const pair = this.safeString(data, 'pair');
|
|
1176
1176
|
const symbol = this.pairToSymbol(pair);
|
|
1177
1177
|
const messageHash = 'ohlcv:' + symbol;
|
|
@@ -1437,7 +1437,7 @@ class cex extends cex$1["default"] {
|
|
|
1437
1437
|
// "placed-cancelled": []
|
|
1438
1438
|
// }
|
|
1439
1439
|
//
|
|
1440
|
-
const canceledOrders = this.
|
|
1440
|
+
const canceledOrders = this.safeList(response, 'cancel-orders');
|
|
1441
1441
|
return this.parseOrders(canceledOrders, undefined, undefined, undefined, params);
|
|
1442
1442
|
}
|
|
1443
1443
|
resolveData(client, message) {
|
|
@@ -1480,7 +1480,7 @@ class cex extends cex$1["default"] {
|
|
|
1480
1480
|
// }
|
|
1481
1481
|
//
|
|
1482
1482
|
try {
|
|
1483
|
-
const data = this.
|
|
1483
|
+
const data = this.safeDict(message, 'data', {});
|
|
1484
1484
|
const error = this.safeString(data, 'error');
|
|
1485
1485
|
const event = this.safeString(message, 'e', '');
|
|
1486
1486
|
const feedback = this.id + ' ' + event + ' ' + error;
|
|
@@ -722,7 +722,7 @@ class coinbase extends coinbase$1["default"] {
|
|
|
722
722
|
if (events === undefined) {
|
|
723
723
|
return;
|
|
724
724
|
}
|
|
725
|
-
const event = this.
|
|
725
|
+
const event = this.safeDict(events, 0);
|
|
726
726
|
const trades = this.safeList(event, 'trades');
|
|
727
727
|
const trade = this.safeDict(trades, 0);
|
|
728
728
|
const marketId = this.safeString(trade, 'product_id');
|
|
@@ -919,7 +919,7 @@ class coinbase extends coinbase$1["default"] {
|
|
|
919
919
|
const market = this.safeMarket(marketId);
|
|
920
920
|
const symbol = market['symbol'];
|
|
921
921
|
const messageHash = 'level2::' + symbol;
|
|
922
|
-
const subscription = this.
|
|
922
|
+
const subscription = this.safeDict(client.subscriptions, messageHash, {});
|
|
923
923
|
const limit = this.safeInteger(subscription, 'limit');
|
|
924
924
|
const type = this.safeString(event, 'type');
|
|
925
925
|
if (type === 'snapshot') {
|
|
@@ -199,7 +199,7 @@ class coinbaseexchange extends coinbaseexchange$1["default"] {
|
|
|
199
199
|
const name = 'matches';
|
|
200
200
|
const trades = await this.subscribeMultiple(name, symbols, name, params);
|
|
201
201
|
if (this.newUpdates) {
|
|
202
|
-
const first = this.
|
|
202
|
+
const first = this.safeDict(trades, 0);
|
|
203
203
|
const tradeSymbol = this.safeString(first, 'symbol');
|
|
204
204
|
limit = trades.getLimit(tradeSymbol, limit);
|
|
205
205
|
}
|
|
@@ -252,7 +252,7 @@ class coinbaseexchange extends coinbaseexchange$1["default"] {
|
|
|
252
252
|
const authentication = this.authenticate();
|
|
253
253
|
const trades = await this.subscribeMultiple(name, symbols, messageHash, this.extend(params, authentication));
|
|
254
254
|
if (this.newUpdates) {
|
|
255
|
-
const first = this.
|
|
255
|
+
const first = this.safeDict(trades, 0);
|
|
256
256
|
const tradeSymbol = this.safeString(first, 'symbol');
|
|
257
257
|
limit = trades.getLimit(tradeSymbol, limit);
|
|
258
258
|
}
|
|
@@ -278,7 +278,7 @@ class coinbaseexchange extends coinbaseexchange$1["default"] {
|
|
|
278
278
|
const authentication = this.authenticate();
|
|
279
279
|
const orders = await this.subscribeMultiple(name, symbols, messageHash, this.extend(params, authentication));
|
|
280
280
|
if (this.newUpdates) {
|
|
281
|
-
const first = this.
|
|
281
|
+
const first = this.safeDict(orders, 0);
|
|
282
282
|
const tradeSymbol = this.safeString(first, 'symbol');
|
|
283
283
|
limit = orders.getLimit(tradeSymbol, limit);
|
|
284
284
|
}
|
|
@@ -637,8 +637,8 @@ class coinbaseexchange extends coinbaseexchange$1["default"] {
|
|
|
637
637
|
if (orders === undefined) {
|
|
638
638
|
return;
|
|
639
639
|
}
|
|
640
|
-
const previousOrders = this.
|
|
641
|
-
let previousOrder = this.
|
|
640
|
+
const previousOrders = this.safeDict(orders.hashmap, symbol, {});
|
|
641
|
+
let previousOrder = this.safeDict(previousOrders, orderId);
|
|
642
642
|
if (previousOrder === undefined) {
|
|
643
643
|
previousOrder = this.safeValue2(previousOrders, makerOrderId, takerOrderId);
|
|
644
644
|
}
|
|
@@ -652,7 +652,7 @@ class coinbaseexchange extends coinbaseexchange$1["default"] {
|
|
|
652
652
|
if (sequence === undefined) {
|
|
653
653
|
return;
|
|
654
654
|
}
|
|
655
|
-
const previousInfo = this.
|
|
655
|
+
const previousInfo = this.safeDict(previousOrder, 'info', {});
|
|
656
656
|
const previousSequence = this.safeInteger(previousInfo, 'sequence');
|
|
657
657
|
if ((previousSequence === undefined) || (sequence > previousSequence)) {
|
|
658
658
|
if (type === 'match') {
|
|
@@ -898,13 +898,13 @@ class coinbaseexchange extends coinbaseexchange$1["default"] {
|
|
|
898
898
|
const symbol = market['symbol'];
|
|
899
899
|
const name = 'level2';
|
|
900
900
|
const messageHash = name + ':' + marketId;
|
|
901
|
-
const subscription = this.
|
|
901
|
+
const subscription = this.safeDict(client.subscriptions, messageHash, {});
|
|
902
902
|
const limit = this.safeInteger(subscription, 'limit');
|
|
903
903
|
if (type === 'snapshot') {
|
|
904
904
|
this.orderbooks[symbol] = this.orderBook({}, limit);
|
|
905
905
|
const orderbook = this.orderbooks[symbol];
|
|
906
|
-
this.handleDeltas(orderbook['asks'], this.
|
|
907
|
-
this.handleDeltas(orderbook['bids'], this.
|
|
906
|
+
this.handleDeltas(orderbook['asks'], this.safeList(message, 'asks', []));
|
|
907
|
+
this.handleDeltas(orderbook['bids'], this.safeList(message, 'bids', []));
|
|
908
908
|
orderbook['timestamp'] = undefined;
|
|
909
909
|
orderbook['datetime'] = undefined;
|
|
910
910
|
orderbook['symbol'] = symbol;
|
|
@@ -496,8 +496,8 @@ class coinbaseinternational extends coinbaseinternational$1["default"] {
|
|
|
496
496
|
const market = this.safeMarket(marketId);
|
|
497
497
|
const symbol = market['symbol'];
|
|
498
498
|
const timeframe = this.findTimeframe(messageHash);
|
|
499
|
-
this.ohlcvs[symbol] = this.
|
|
500
|
-
if (this.
|
|
499
|
+
this.ohlcvs[symbol] = this.safeDict(this.ohlcvs, symbol, {});
|
|
500
|
+
if (this.safeDict(this.ohlcvs[symbol], timeframe) === undefined) {
|
|
501
501
|
const limit = this.safeInteger(this.options, 'OHLCVLimit', 1000);
|
|
502
502
|
this.ohlcvs[symbol][timeframe] = new Cache.ArrayCacheByTimestamp(limit);
|
|
503
503
|
}
|
|
@@ -91,7 +91,7 @@ class coincheck extends coincheck$1["default"] {
|
|
|
91
91
|
// ]
|
|
92
92
|
//
|
|
93
93
|
const symbol = this.symbol(this.safeString(message, 0));
|
|
94
|
-
const data = this.
|
|
94
|
+
const data = this.safeDict(message, 1, {});
|
|
95
95
|
const timestamp = this.safeTimestamp(data, 'last_update_at');
|
|
96
96
|
const snapshot = this.parseOrderBook(data, symbol, timestamp);
|
|
97
97
|
let orderbook = this.safeValue(this.orderbooks, symbol);
|
|
@@ -151,7 +151,7 @@ class coincheck extends coincheck$1["default"] {
|
|
|
151
151
|
// ]
|
|
152
152
|
// ]
|
|
153
153
|
//
|
|
154
|
-
const first = this.
|
|
154
|
+
const first = this.safeList(message, 0, []);
|
|
155
155
|
const symbol = this.symbol(this.safeString(first, 2));
|
|
156
156
|
let stored = this.safeValue(this.trades, symbol);
|
|
157
157
|
if (stored === undefined) {
|
|
@@ -354,7 +354,7 @@ class coinex extends coinex$1["default"] {
|
|
|
354
354
|
}
|
|
355
355
|
let messageHash = undefined;
|
|
356
356
|
if (account !== undefined) {
|
|
357
|
-
if (this.
|
|
357
|
+
if (this.safeDict(this.balance, account) === undefined) {
|
|
358
358
|
this.balance[account] = {};
|
|
359
359
|
}
|
|
360
360
|
this.balance[account]['info'] = info;
|
|
@@ -393,7 +393,7 @@ class coinex extends coinex$1["default"] {
|
|
|
393
393
|
account['free'] = this.safeString(balance, 'available');
|
|
394
394
|
account['used'] = this.safeString(balance, 'frozen');
|
|
395
395
|
if (accountType !== undefined) {
|
|
396
|
-
if (this.
|
|
396
|
+
if (this.safeDict(this.balance, accountType) === undefined) {
|
|
397
397
|
this.balance[accountType] = {};
|
|
398
398
|
}
|
|
399
399
|
if ((accountType !== undefined) && (code !== undefined)) {
|
|
@@ -1408,7 +1408,7 @@ class coinex extends coinex$1["default"] {
|
|
|
1408
1408
|
}
|
|
1409
1409
|
handleSubscriptionStatus(client, message) {
|
|
1410
1410
|
const id = this.safeInteger(message, 'id');
|
|
1411
|
-
const subscription = this.
|
|
1411
|
+
const subscription = this.safeDict(client.subscriptions, id);
|
|
1412
1412
|
if (subscription !== undefined) {
|
|
1413
1413
|
const futureIndex = this.safeString(subscription, 'future');
|
|
1414
1414
|
const future = this.safeValue(client.futures, futureIndex);
|
|
@@ -102,7 +102,7 @@ class coinone extends coinone$1["default"] {
|
|
|
102
102
|
// }
|
|
103
103
|
// }
|
|
104
104
|
//
|
|
105
|
-
const data = this.
|
|
105
|
+
const data = this.safeDict(message, 'data', {});
|
|
106
106
|
const baseId = this.safeStringUpper(data, 'target_currency');
|
|
107
107
|
const quoteId = this.safeStringUpper(data, 'quote_currency');
|
|
108
108
|
const base = this.safeCurrencyCode(baseId);
|
|
@@ -117,8 +117,8 @@ class coinone extends coinone$1["default"] {
|
|
|
117
117
|
orderbook.reset();
|
|
118
118
|
}
|
|
119
119
|
orderbook['symbol'] = symbol;
|
|
120
|
-
const asks = this.
|
|
121
|
-
const bids = this.
|
|
120
|
+
const asks = this.safeList(data, 'asks', []);
|
|
121
|
+
const bids = this.safeList(data, 'bids', []);
|
|
122
122
|
this.handleDeltas(orderbook['asks'], asks);
|
|
123
123
|
this.handleDeltas(orderbook['bids'], bids);
|
|
124
124
|
orderbook['timestamp'] = timestamp;
|
|
@@ -188,7 +188,7 @@ class coinone extends coinone$1["default"] {
|
|
|
188
188
|
// }
|
|
189
189
|
// }
|
|
190
190
|
//
|
|
191
|
-
const data = this.
|
|
191
|
+
const data = this.safeDict(message, 'data', {});
|
|
192
192
|
const ticker = this.parseWsTicker(data);
|
|
193
193
|
const symbol = ticker['symbol'];
|
|
194
194
|
this.tickers[symbol] = ticker;
|
|
@@ -300,7 +300,7 @@ class coinone extends coinone$1["default"] {
|
|
|
300
300
|
// }
|
|
301
301
|
// }
|
|
302
302
|
//
|
|
303
|
-
const data = this.
|
|
303
|
+
const data = this.safeDict(message, 'data', {});
|
|
304
304
|
const trade = this.parseWsTrade(data);
|
|
305
305
|
const symbol = trade['symbol'];
|
|
306
306
|
let stored = this.safeValue(this.trades, symbol);
|
|
@@ -332,7 +332,7 @@ class coinone extends coinone$1["default"] {
|
|
|
332
332
|
const symbol = base + '/' + quote;
|
|
333
333
|
const timestamp = this.safeInteger(trade, 'timestamp');
|
|
334
334
|
market = this.safeMarket(symbol, market);
|
|
335
|
-
const isSellerMaker = this.
|
|
335
|
+
const isSellerMaker = this.safeBool(trade, 'is_seller_maker');
|
|
336
336
|
let side = undefined;
|
|
337
337
|
if (isSellerMaker !== undefined) {
|
|
338
338
|
side = (isSellerMaker === true) ? 'sell' : 'buy';
|
|
@@ -266,7 +266,7 @@ class cryptocom extends cryptocom$1["default"] {
|
|
|
266
266
|
const market = this.safeMarket(marketId);
|
|
267
267
|
const symbol = market['symbol'];
|
|
268
268
|
let data = this.safeValue(message, 'data');
|
|
269
|
-
data = this.
|
|
269
|
+
data = this.safeDict(data, 0);
|
|
270
270
|
const timestamp = this.safeInteger(data, 't');
|
|
271
271
|
if (!(symbol in this.orderbooks)) {
|
|
272
272
|
const limit = this.safeInteger(message, 'depth');
|
|
@@ -284,7 +284,7 @@ class cryptocom extends cryptocom$1["default"] {
|
|
|
284
284
|
orderbook['nonce'] = nonce;
|
|
285
285
|
}
|
|
286
286
|
else {
|
|
287
|
-
books = this.
|
|
287
|
+
books = this.safeDict(data, 'update', {});
|
|
288
288
|
const previousNonce = this.safeInteger(data, 'pu');
|
|
289
289
|
const currentNonce = orderbook['nonce'];
|
|
290
290
|
if (currentNonce !== previousNonce) {
|
|
@@ -294,8 +294,8 @@ class cryptocom extends cryptocom$1["default"] {
|
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
|
-
this.handleDeltas(orderbook['asks'], this.
|
|
298
|
-
this.handleDeltas(orderbook['bids'], this.
|
|
297
|
+
this.handleDeltas(orderbook['asks'], this.safeList(books, 'asks', []));
|
|
298
|
+
this.handleDeltas(orderbook['bids'], this.safeList(books, 'bids', []));
|
|
299
299
|
orderbook['nonce'] = nonce;
|
|
300
300
|
this.orderbooks[symbol] = orderbook;
|
|
301
301
|
const messageHash = 'orderbook:' + symbol;
|
|
@@ -352,7 +352,7 @@ class cryptocom extends cryptocom$1["default"] {
|
|
|
352
352
|
}
|
|
353
353
|
const trades = await this.watchPublicMultiple(topics, topics, params);
|
|
354
354
|
if (this.newUpdates) {
|
|
355
|
-
const first = this.
|
|
355
|
+
const first = this.safeDict(trades, 0);
|
|
356
356
|
const tradeSymbol = this.safeString(first, 'symbol');
|
|
357
357
|
limit = trades.getLimit(tradeSymbol, limit);
|
|
358
358
|
}
|
|
@@ -777,7 +777,7 @@ class cryptocom extends cryptocom$1["default"] {
|
|
|
777
777
|
const symbol = market['symbol'];
|
|
778
778
|
const interval = this.safeString(message, 'interval');
|
|
779
779
|
const timeframe = this.findTimeframe(interval);
|
|
780
|
-
this.ohlcvs[symbol] = this.
|
|
780
|
+
this.ohlcvs[symbol] = this.safeDict(this.ohlcvs, symbol, {});
|
|
781
781
|
let stored = this.safeValue(this.safeValue(this.ohlcvs, symbol), timeframe);
|
|
782
782
|
if (stored === undefined) {
|
|
783
783
|
const limit = this.safeInteger(this.options, 'OHLCVLimit', 1000);
|
|
@@ -978,8 +978,8 @@ class cryptocom extends cryptocom$1["default"] {
|
|
|
978
978
|
//
|
|
979
979
|
// each account is connected to a different endpoint
|
|
980
980
|
// and has exactly one subscriptionhash which is the account type
|
|
981
|
-
const data = this.
|
|
982
|
-
const firstData = this.
|
|
981
|
+
const data = this.safeList(message, 'data', []);
|
|
982
|
+
const firstData = this.safeDict(data, 0, {});
|
|
983
983
|
const rawPositions = this.safeList(firstData, 'positions', []);
|
|
984
984
|
if (this.positions === undefined) {
|
|
985
985
|
this.positions = new Cache.ArrayCacheBySymbolBySide();
|
|
@@ -1150,7 +1150,7 @@ class cryptocom extends cryptocom$1["default"] {
|
|
|
1150
1150
|
// }
|
|
1151
1151
|
//
|
|
1152
1152
|
const messageHash = this.safeString(message, 'id');
|
|
1153
|
-
const rawOrder = this.
|
|
1153
|
+
const rawOrder = this.safeDict(message, 'result', {});
|
|
1154
1154
|
const order = this.parseOrder(rawOrder);
|
|
1155
1155
|
client.resolve(order, messageHash);
|
|
1156
1156
|
}
|
|
@@ -1300,7 +1300,7 @@ class cryptocom extends cryptocom$1["default"] {
|
|
|
1300
1300
|
if ((errorCode !== undefined && errorCode !== '') && errorCode !== '0') {
|
|
1301
1301
|
const feedback = this.id + ' ' + this.json(message);
|
|
1302
1302
|
this.throwExactlyMatchedException(this.exceptions['exact'], errorCode, feedback);
|
|
1303
|
-
const messageString = this.
|
|
1303
|
+
const messageString = this.safeString(message, 'message');
|
|
1304
1304
|
if (messageString !== undefined) {
|
|
1305
1305
|
this.throwBroadlyMatchedException(this.exceptions['broad'], messageString, feedback);
|
|
1306
1306
|
}
|