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
|
@@ -78,7 +78,7 @@ class whitebit extends whitebit$1["default"] {
|
|
|
78
78
|
}
|
|
79
79
|
const market = this.market(symbol);
|
|
80
80
|
symbol = market['symbol'];
|
|
81
|
-
const timeframes = this.
|
|
81
|
+
const timeframes = this.safeDict(this.options, 'timeframes', {});
|
|
82
82
|
const interval = this.safeInteger(timeframes, timeframe);
|
|
83
83
|
const marketId = market['id'];
|
|
84
84
|
// currently there is no way of knowing
|
|
@@ -157,7 +157,7 @@ class whitebit extends whitebit$1["default"] {
|
|
|
157
157
|
}
|
|
158
158
|
const messageHash = 'orderbook' + ':' + market['symbol'];
|
|
159
159
|
const method = 'depth_subscribe';
|
|
160
|
-
const options = this.
|
|
160
|
+
const options = this.safeDict(this.options, 'watchOrderBook', {});
|
|
161
161
|
const defaultPriceInterval = this.safeString(options, 'priceInterval', '0');
|
|
162
162
|
const priceInterval = this.safeString(params, 'priceInterval', defaultPriceInterval);
|
|
163
163
|
params = this.omit(params, 'priceInterval');
|
|
@@ -208,12 +208,12 @@ class whitebit extends whitebit$1["default"] {
|
|
|
208
208
|
// "id":null
|
|
209
209
|
// }
|
|
210
210
|
//
|
|
211
|
-
const params = this.
|
|
211
|
+
const params = this.safeList(message, 'params', []);
|
|
212
212
|
const isSnapshot = this.safeValue(params, 0);
|
|
213
213
|
const marketId = this.safeString(params, 2);
|
|
214
214
|
const market = this.safeMarket(marketId);
|
|
215
215
|
const symbol = market['symbol'];
|
|
216
|
-
const data = this.
|
|
216
|
+
const data = this.safeDict(params, 1);
|
|
217
217
|
const timestamp = this.safeTimestamp(data, 'timestamp');
|
|
218
218
|
if (!(symbol in this.orderbooks)) {
|
|
219
219
|
const ob = this.orderBook();
|
|
@@ -227,8 +227,8 @@ class whitebit extends whitebit$1["default"] {
|
|
|
227
227
|
orderbook.reset(snapshot);
|
|
228
228
|
}
|
|
229
229
|
else {
|
|
230
|
-
const asks = this.
|
|
231
|
-
const bids = this.
|
|
230
|
+
const asks = this.safeList(data, 'asks', []);
|
|
231
|
+
const bids = this.safeList(data, 'bids', []);
|
|
232
232
|
this.handleDeltas(orderbook['asks'], asks);
|
|
233
233
|
this.handleDeltas(orderbook['bids'], bids);
|
|
234
234
|
}
|
|
@@ -317,11 +317,11 @@ class whitebit extends whitebit$1["default"] {
|
|
|
317
317
|
// "id": null
|
|
318
318
|
// }
|
|
319
319
|
//
|
|
320
|
-
const tickers = this.
|
|
320
|
+
const tickers = this.safeList(message, 'params', []);
|
|
321
321
|
const marketId = this.safeString(tickers, 0);
|
|
322
322
|
const market = this.safeMarket(marketId);
|
|
323
323
|
const symbol = market['symbol'];
|
|
324
|
-
const rawTicker = this.
|
|
324
|
+
const rawTicker = this.safeDict(tickers, 1, {});
|
|
325
325
|
const messageHash = 'ticker' + ':' + symbol;
|
|
326
326
|
const ticker = this.parseTicker(rawTicker, market);
|
|
327
327
|
this.tickers[symbol] = ticker;
|
|
@@ -397,7 +397,7 @@ class whitebit extends whitebit$1["default"] {
|
|
|
397
397
|
// ]
|
|
398
398
|
// }
|
|
399
399
|
//
|
|
400
|
-
const params = this.
|
|
400
|
+
const params = this.safeList(message, 'params', []);
|
|
401
401
|
const marketId = this.safeString(params, 0);
|
|
402
402
|
const market = this.safeMarket(marketId);
|
|
403
403
|
const symbol = market['symbol'];
|
|
@@ -407,7 +407,7 @@ class whitebit extends whitebit$1["default"] {
|
|
|
407
407
|
stored = new Cache.ArrayCache(limit);
|
|
408
408
|
this.trades[symbol] = stored;
|
|
409
409
|
}
|
|
410
|
-
const data = this.
|
|
410
|
+
const data = this.safeList(params, 1, []);
|
|
411
411
|
const parsedTrades = this.parseTrades(data, market);
|
|
412
412
|
for (let j = 0; j < parsedTrades.length; j++) {
|
|
413
413
|
stored.append(parsedTrades[j]);
|
|
@@ -597,8 +597,8 @@ class whitebit extends whitebit$1["default"] {
|
|
|
597
597
|
// "id": null
|
|
598
598
|
// }
|
|
599
599
|
//
|
|
600
|
-
const params = this.
|
|
601
|
-
const data = this.
|
|
600
|
+
const params = this.safeList(message, 'params', []);
|
|
601
|
+
const data = this.safeDict(params, 1);
|
|
602
602
|
if (this.orders === undefined) {
|
|
603
603
|
const limit = this.safeInteger(this.options, 'ordersLimit', 1000);
|
|
604
604
|
this.orders = new Cache.ArrayCacheBySymbolById(limit);
|
package/dist/cjs/src/pro/woo.js
CHANGED
|
@@ -76,7 +76,7 @@ class woo extends woo$1["default"] {
|
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
requestId(url) {
|
|
79
|
-
const options = this.
|
|
79
|
+
const options = this.safeDict(this.options, 'requestId', {});
|
|
80
80
|
const previousValue = this.safeInteger(options, url, 0);
|
|
81
81
|
const newValue = this.sum(previousValue, 1);
|
|
82
82
|
this.options['requestId'][url] = newValue;
|
|
@@ -275,7 +275,7 @@ class woo extends woo$1["default"] {
|
|
|
275
275
|
const limit = this.safeInteger(subscription, 'limit', defaultLimit);
|
|
276
276
|
const params = this.safeValue(subscription, 'params');
|
|
277
277
|
const snapshot = await this.fetchRestOrderBookSafe(symbol, limit, params);
|
|
278
|
-
if (this.
|
|
278
|
+
if (this.safeDict(this.orderbooks, symbol) === undefined) {
|
|
279
279
|
// if the orderbook is dropped before the snapshot is received
|
|
280
280
|
return;
|
|
281
281
|
}
|
|
@@ -309,8 +309,8 @@ class woo extends woo$1["default"] {
|
|
|
309
309
|
}
|
|
310
310
|
handleOrderBookMessage(client, message, orderbook) {
|
|
311
311
|
const data = this.safeDict(message, 'data');
|
|
312
|
-
this.handleDeltas(orderbook['asks'], this.
|
|
313
|
-
this.handleDeltas(orderbook['bids'], this.
|
|
312
|
+
this.handleDeltas(orderbook['asks'], this.safeList(data, 'asks', []));
|
|
313
|
+
this.handleDeltas(orderbook['bids'], this.safeList(data, 'bids', []));
|
|
314
314
|
const timestamp = this.safeInteger(message, 'ts');
|
|
315
315
|
orderbook['timestamp'] = timestamp;
|
|
316
316
|
orderbook['datetime'] = this.iso8601(timestamp);
|
|
@@ -696,7 +696,7 @@ class woo extends woo$1["default"] {
|
|
|
696
696
|
// }
|
|
697
697
|
// }
|
|
698
698
|
//
|
|
699
|
-
const data = this.
|
|
699
|
+
const data = this.safeDict(message, 'data');
|
|
700
700
|
const topic = this.safeValue(message, 'topic');
|
|
701
701
|
const marketId = this.safeString(data, 'symbol');
|
|
702
702
|
const market = this.safeMarket(marketId);
|
|
@@ -711,8 +711,8 @@ class woo extends woo$1["default"] {
|
|
|
711
711
|
this.safeFloat(data, 'close'),
|
|
712
712
|
this.safeFloat(data, 'volume'),
|
|
713
713
|
];
|
|
714
|
-
this.ohlcvs[symbol] = this.
|
|
715
|
-
let stored = this.safeValue(this.
|
|
714
|
+
this.ohlcvs[symbol] = this.safeDict(this.ohlcvs, symbol, {});
|
|
715
|
+
let stored = this.safeValue(this.safeDict(this.ohlcvs, symbol), timeframe);
|
|
716
716
|
if (stored === undefined) {
|
|
717
717
|
const limit = this.safeInteger(this.options, 'OHLCVLimit', 1000);
|
|
718
718
|
stored = new Cache.ArrayCacheByTimestamp(limit);
|
|
@@ -786,7 +786,7 @@ class woo extends woo$1["default"] {
|
|
|
786
786
|
//
|
|
787
787
|
const topic = this.safeString(message, 'topic');
|
|
788
788
|
const timestamp = this.safeInteger(message, 'ts');
|
|
789
|
-
const data = this.
|
|
789
|
+
const data = this.safeDict(message, 'data');
|
|
790
790
|
const marketId = this.safeString(data, 'symbol');
|
|
791
791
|
const market = this.safeMarket(marketId);
|
|
792
792
|
const symbol = market['symbol'];
|
|
@@ -1188,8 +1188,8 @@ class woo extends woo$1["default"] {
|
|
|
1188
1188
|
this.orders = new Cache.ArrayCacheBySymbolById(limit);
|
|
1189
1189
|
}
|
|
1190
1190
|
const cachedOrders = this.orders;
|
|
1191
|
-
const orders = this.
|
|
1192
|
-
const order = this.
|
|
1191
|
+
const orders = this.safeDict(cachedOrders.hashmap, symbol, {});
|
|
1192
|
+
const order = this.safeDict(orders, orderId);
|
|
1193
1193
|
if (order !== undefined) {
|
|
1194
1194
|
const fee = this.safeValue(order, 'fee');
|
|
1195
1195
|
if (fee !== undefined) {
|
|
@@ -1360,7 +1360,7 @@ class woo extends woo$1["default"] {
|
|
|
1360
1360
|
// }
|
|
1361
1361
|
// }
|
|
1362
1362
|
//
|
|
1363
|
-
const data = this.
|
|
1363
|
+
const data = this.safeDict(message, 'data', {});
|
|
1364
1364
|
const rawPositions = this.safeDict(data, 'positions', {});
|
|
1365
1365
|
const postitionsIds = Object.keys(rawPositions);
|
|
1366
1366
|
if (this.positions === undefined) {
|
|
@@ -1642,7 +1642,7 @@ class woo extends woo$1["default"] {
|
|
|
1642
1642
|
//
|
|
1643
1643
|
const id = this.safeString(message, 'id');
|
|
1644
1644
|
const subscriptionsById = this.indexBy(client.subscriptions, 'id');
|
|
1645
|
-
const subscription = this.
|
|
1645
|
+
const subscription = this.safeDict(subscriptionsById, id, {});
|
|
1646
1646
|
const method = this.safeValue(subscription, 'method');
|
|
1647
1647
|
if (method !== undefined) {
|
|
1648
1648
|
method.call(this, client, message, subscription);
|
|
@@ -1658,7 +1658,7 @@ class woo extends woo$1["default"] {
|
|
|
1658
1658
|
// }
|
|
1659
1659
|
//
|
|
1660
1660
|
const messageHash = 'authenticated';
|
|
1661
|
-
const success = this.
|
|
1661
|
+
const success = this.safeBool(message, 'success');
|
|
1662
1662
|
if (success === true) {
|
|
1663
1663
|
// client.resolve (message, messageHash);
|
|
1664
1664
|
const future = this.safeValue(client.futures, 'authenticated');
|
|
@@ -434,8 +434,8 @@ class woofipro extends woofipro$1["default"] {
|
|
|
434
434
|
this.safeNumber(data, 'close'),
|
|
435
435
|
this.safeNumber(data, 'volume'),
|
|
436
436
|
];
|
|
437
|
-
this.ohlcvs[symbol] = this.
|
|
438
|
-
let stored = this.safeValue(this.
|
|
437
|
+
this.ohlcvs[symbol] = this.safeDict(this.ohlcvs, symbol, {});
|
|
438
|
+
let stored = this.safeValue(this.safeDict(this.ohlcvs, symbol), timeframe);
|
|
439
439
|
if (stored === undefined) {
|
|
440
440
|
const limit = this.safeInteger(this.options, 'OHLCVLimit', 1000);
|
|
441
441
|
stored = new Cache.ArrayCacheByTimestamp(limit);
|
|
@@ -588,7 +588,7 @@ class woofipro extends woofipro$1["default"] {
|
|
|
588
588
|
// }
|
|
589
589
|
//
|
|
590
590
|
const messageHash = 'authenticated';
|
|
591
|
-
const success = this.
|
|
591
|
+
const success = this.safeBool(message, 'success');
|
|
592
592
|
if (success === true) {
|
|
593
593
|
// client.resolve (message, messageHash);
|
|
594
594
|
const future = this.safeValue(client.futures, 'authenticated');
|
package/dist/cjs/src/pro/xt.js
CHANGED
|
@@ -146,7 +146,7 @@ class xt extends xt$1["default"] {
|
|
|
146
146
|
getCacheIndex(orderbook, cache) {
|
|
147
147
|
// return the first index of the cache that can be applied to the orderbook or -1 if not possible
|
|
148
148
|
const nonce = this.safeInteger(orderbook, 'nonce');
|
|
149
|
-
const firstDelta = this.
|
|
149
|
+
const firstDelta = this.safeDict(cache, 0);
|
|
150
150
|
const firstDeltaNonce = this.safeInteger2(firstDelta, 'i', 'u');
|
|
151
151
|
if ((nonce !== undefined) && (firstDeltaNonce !== undefined) && (nonce < firstDeltaNonce - 1)) {
|
|
152
152
|
return -1;
|
|
@@ -861,7 +861,7 @@ class xt extends xt$1["default"] {
|
|
|
861
861
|
// }
|
|
862
862
|
// }
|
|
863
863
|
//
|
|
864
|
-
const data = this.safeDict(message, 'data');
|
|
864
|
+
const data = this.safeDict(message, 'data', {});
|
|
865
865
|
const marketId = this.safeString(data, 's');
|
|
866
866
|
if (marketId !== undefined) {
|
|
867
867
|
const cv = this.safeString(data, 'cv');
|
|
@@ -1068,7 +1068,7 @@ class xt extends xt$1["default"] {
|
|
|
1068
1068
|
// }
|
|
1069
1069
|
// }
|
|
1070
1070
|
//
|
|
1071
|
-
const data = this.safeDict(message, 'data');
|
|
1071
|
+
const data = this.safeDict(message, 'data', {});
|
|
1072
1072
|
const marketId = this.safeStringLower(data, 's');
|
|
1073
1073
|
if (marketId !== undefined) {
|
|
1074
1074
|
const trade = this.parseTrade(data);
|
|
@@ -775,7 +775,7 @@ class tokocrypto extends tokocrypto$1["default"] {
|
|
|
775
775
|
if (this.options['adjustForTimeDifference'] === true) {
|
|
776
776
|
await this.loadTimeDifference();
|
|
777
777
|
}
|
|
778
|
-
const data = this.
|
|
778
|
+
const data = this.safeDict(response, 'data', {});
|
|
779
779
|
const list = this.safeList(data, 'list', []);
|
|
780
780
|
const result = [];
|
|
781
781
|
for (let i = 0; i < list.length; i++) {
|
|
@@ -789,7 +789,7 @@ class tokocrypto extends tokocrypto$1["default"] {
|
|
|
789
789
|
const quote = this.safeCurrencyCode(quoteId);
|
|
790
790
|
const settle = this.safeCurrencyCode(settleId);
|
|
791
791
|
const symbol = base + '/' + quote;
|
|
792
|
-
const filters = this.
|
|
792
|
+
const filters = this.safeList(market, 'filters', []);
|
|
793
793
|
const filtersByType = this.indexBy(filters, 'filterType');
|
|
794
794
|
const status = this.safeString(market, 'spotTradingEnable');
|
|
795
795
|
let active = (status === '1');
|
|
@@ -867,7 +867,7 @@ class tokocrypto extends tokocrypto$1["default"] {
|
|
|
867
867
|
entry['precision']['price'] = filter['tickSize'];
|
|
868
868
|
}
|
|
869
869
|
if ('LOT_SIZE' in filtersByType) {
|
|
870
|
-
const filter = this.
|
|
870
|
+
const filter = this.safeDict(filtersByType, 'LOT_SIZE', {});
|
|
871
871
|
entry['precision']['amount'] = this.safeNumber(filter, 'stepSize');
|
|
872
872
|
entry['limits']['amount'] = {
|
|
873
873
|
'min': this.safeNumber(filter, 'minQty'),
|
|
@@ -875,14 +875,14 @@ class tokocrypto extends tokocrypto$1["default"] {
|
|
|
875
875
|
};
|
|
876
876
|
}
|
|
877
877
|
if ('MARKET_LOT_SIZE' in filtersByType) {
|
|
878
|
-
const filter = this.
|
|
878
|
+
const filter = this.safeDict(filtersByType, 'MARKET_LOT_SIZE', {});
|
|
879
879
|
entry['limits']['market'] = {
|
|
880
880
|
'min': this.safeNumber(filter, 'minQty'),
|
|
881
881
|
'max': this.safeNumber(filter, 'maxQty'),
|
|
882
882
|
};
|
|
883
883
|
}
|
|
884
884
|
if ('MIN_NOTIONAL' in filtersByType) {
|
|
885
|
-
const filter = this.
|
|
885
|
+
const filter = this.safeDict(filtersByType, 'MIN_NOTIONAL', {});
|
|
886
886
|
entry['limits']['cost']['min'] = this.safeNumber2(filter, 'minNotional', 'notional');
|
|
887
887
|
}
|
|
888
888
|
result.push(entry);
|
|
@@ -946,7 +946,7 @@ class tokocrypto extends tokocrypto$1["default"] {
|
|
|
946
946
|
// },
|
|
947
947
|
// "timestamp":1692262634599
|
|
948
948
|
// }
|
|
949
|
-
const data = this.
|
|
949
|
+
const data = this.safeDict(response, 'data', response);
|
|
950
950
|
const timestamp = this.safeInteger2(response, 'T', 'timestamp');
|
|
951
951
|
const orderbook = this.parseOrderBook(data, symbol, timestamp);
|
|
952
952
|
orderbook['nonce'] = this.safeInteger(data, 'lastUpdateId');
|
|
@@ -1056,7 +1056,7 @@ class tokocrypto extends tokocrypto$1["default"] {
|
|
|
1056
1056
|
id = this.safeString2(trade, 'id', 'tradeId', id);
|
|
1057
1057
|
let side = undefined;
|
|
1058
1058
|
const orderId = this.safeString(trade, 'orderId');
|
|
1059
|
-
const buyerMaker = this.
|
|
1059
|
+
const buyerMaker = this.safeBool2(trade, 'm', 'isBuyerMaker');
|
|
1060
1060
|
let takerOrMaker = undefined;
|
|
1061
1061
|
if (buyerMaker !== undefined) {
|
|
1062
1062
|
side = (buyerMaker === true) ? 'sell' : 'buy'; // this is reversed intentionally
|
|
@@ -1596,7 +1596,7 @@ class tokocrypto extends tokocrypto$1["default"] {
|
|
|
1596
1596
|
'timestamp': timestamp,
|
|
1597
1597
|
'datetime': this.iso8601(timestamp),
|
|
1598
1598
|
};
|
|
1599
|
-
const data = this.
|
|
1599
|
+
const data = this.safeDict(response, 'data', {});
|
|
1600
1600
|
const balances = this.safeList(data, 'accountAssets', []);
|
|
1601
1601
|
for (let i = 0; i < balances.length; i++) {
|
|
1602
1602
|
const balance = balances[i];
|
|
@@ -1750,7 +1750,7 @@ class tokocrypto extends tokocrypto$1["default"] {
|
|
|
1750
1750
|
else if (side === '1') {
|
|
1751
1751
|
side = 'sell';
|
|
1752
1752
|
}
|
|
1753
|
-
const fills = this.
|
|
1753
|
+
const fills = this.safeList(order, 'fills', []);
|
|
1754
1754
|
const clientOrderId = this.safeString2(order, 'clientOrderId', 'clientId');
|
|
1755
1755
|
let timeInForce = this.safeString(order, 'timeInForce');
|
|
1756
1756
|
if (timeInForce === 'GTX') {
|
|
@@ -1860,7 +1860,7 @@ class tokocrypto extends tokocrypto$1["default"] {
|
|
|
1860
1860
|
request['side'] = 1;
|
|
1861
1861
|
}
|
|
1862
1862
|
if (clientOrderId === undefined) {
|
|
1863
|
-
const broker = this.
|
|
1863
|
+
const broker = this.safeDict(this.options, 'broker');
|
|
1864
1864
|
if (broker !== undefined) {
|
|
1865
1865
|
const brokerId = this.safeString(broker, 'marketType');
|
|
1866
1866
|
if (brokerId !== undefined) {
|
|
@@ -2030,8 +2030,8 @@ class tokocrypto extends tokocrypto$1["default"] {
|
|
|
2030
2030
|
// "timestamp": 1662710056523
|
|
2031
2031
|
// }
|
|
2032
2032
|
//
|
|
2033
|
-
const data = this.
|
|
2034
|
-
const list = this.
|
|
2033
|
+
const data = this.safeDict(response, 'data', {});
|
|
2034
|
+
const list = this.safeList(data, 'list', []);
|
|
2035
2035
|
const rawOrder = this.safeDict(list, 0, {});
|
|
2036
2036
|
return this.parseOrder(rawOrder);
|
|
2037
2037
|
}
|
|
@@ -2104,7 +2104,7 @@ class tokocrypto extends tokocrypto$1["default"] {
|
|
|
2104
2104
|
// "timestamp": 1572860756458
|
|
2105
2105
|
// }
|
|
2106
2106
|
//
|
|
2107
|
-
const data = this.
|
|
2107
|
+
const data = this.safeDict(response, 'data', {});
|
|
2108
2108
|
const orders = this.safeList(data, 'list', []);
|
|
2109
2109
|
return this.parseOrders(orders, market, since, limit);
|
|
2110
2110
|
}
|
|
@@ -2242,7 +2242,7 @@ class tokocrypto extends tokocrypto$1["default"] {
|
|
|
2242
2242
|
// "timestamp": 1573723498893
|
|
2243
2243
|
// }
|
|
2244
2244
|
//
|
|
2245
|
-
const data = this.
|
|
2245
|
+
const data = this.safeDict(response, 'data', {});
|
|
2246
2246
|
const trades = this.safeList(data, 'list', []);
|
|
2247
2247
|
return this.parseTrades(trades, market, since, limit);
|
|
2248
2248
|
}
|
|
@@ -2264,7 +2264,7 @@ class tokocrypto extends tokocrypto$1["default"] {
|
|
|
2264
2264
|
'asset': currency['id'],
|
|
2265
2265
|
// 'network': 'ETH', // 'BSC', 'XMR', you can get network and isDefault in networkList in the response of sapiGetCapitalConfigDetail
|
|
2266
2266
|
};
|
|
2267
|
-
const networks = this.
|
|
2267
|
+
const networks = this.safeDict(this.options, 'networks', {});
|
|
2268
2268
|
let network = this.safeStringUpper(params, 'network'); // this line allows the user to specify either ERC20 or ETH
|
|
2269
2269
|
network = this.safeString(networks, network, network); // handle ERC20>ETH alias
|
|
2270
2270
|
if (network !== undefined) {
|
|
@@ -2289,7 +2289,7 @@ class tokocrypto extends tokocrypto$1["default"] {
|
|
|
2289
2289
|
// "timestamp":1660685915746
|
|
2290
2290
|
// }
|
|
2291
2291
|
//
|
|
2292
|
-
const data = this.
|
|
2292
|
+
const data = this.safeDict(response, 'data', {});
|
|
2293
2293
|
const address = this.safeString(data, 'address');
|
|
2294
2294
|
let tag = this.safeString(data, 'addressTag', '');
|
|
2295
2295
|
if (tag.length === 0) {
|
|
@@ -2363,7 +2363,7 @@ class tokocrypto extends tokocrypto$1["default"] {
|
|
|
2363
2363
|
// "timestamp":1659758865998
|
|
2364
2364
|
// }
|
|
2365
2365
|
//
|
|
2366
|
-
const data = this.
|
|
2366
|
+
const data = this.safeDict(response, 'data', {});
|
|
2367
2367
|
const deposits = this.safeList(data, 'list', []);
|
|
2368
2368
|
return this.parseTransactions(deposits, currency, since, limit);
|
|
2369
2369
|
}
|
|
@@ -2422,7 +2422,7 @@ class tokocrypto extends tokocrypto$1["default"] {
|
|
|
2422
2422
|
// "timestamp":1659759062187
|
|
2423
2423
|
// }
|
|
2424
2424
|
//
|
|
2425
|
-
const data = this.
|
|
2425
|
+
const data = this.safeDict(response, 'data', {});
|
|
2426
2426
|
const withdrawals = this.safeList(data, 'list', []);
|
|
2427
2427
|
return this.parseTransactions(withdrawals, currency, since, limit);
|
|
2428
2428
|
}
|
|
@@ -2442,7 +2442,7 @@ class tokocrypto extends tokocrypto$1["default"] {
|
|
|
2442
2442
|
'10': 'ok', // Completed
|
|
2443
2443
|
},
|
|
2444
2444
|
};
|
|
2445
|
-
const statuses = this.
|
|
2445
|
+
const statuses = this.safeDict(statusesByType, type, {});
|
|
2446
2446
|
return this.safeString(statuses, status, status);
|
|
2447
2447
|
}
|
|
2448
2448
|
parseTransaction(transaction, currency = undefined) {
|
|
@@ -2534,7 +2534,7 @@ class tokocrypto extends tokocrypto$1["default"] {
|
|
|
2534
2534
|
}
|
|
2535
2535
|
let id = this.safeString(transaction, 'id');
|
|
2536
2536
|
if (id === undefined) {
|
|
2537
|
-
const data = this.
|
|
2537
|
+
const data = this.safeDict(transaction, 'data', {});
|
|
2538
2538
|
id = this.safeString(data, 'withdrawId');
|
|
2539
2539
|
type = 'withdrawal';
|
|
2540
2540
|
}
|
package/dist/cjs/src/upbit.js
CHANGED
|
@@ -343,13 +343,13 @@ class upbit extends upbit$1["default"] {
|
|
|
343
343
|
// }
|
|
344
344
|
// }
|
|
345
345
|
//
|
|
346
|
-
const memberInfo = this.
|
|
347
|
-
const currencyInfo = this.
|
|
348
|
-
const withdrawLimits = this.
|
|
349
|
-
const canWithdraw = this.
|
|
346
|
+
const memberInfo = this.safeDict(response, 'member_level', {});
|
|
347
|
+
const currencyInfo = this.safeDict(response, 'currency', {});
|
|
348
|
+
const withdrawLimits = this.safeDict(response, 'withdraw_limit', {});
|
|
349
|
+
const canWithdraw = this.safeBool(withdrawLimits, 'can_withdraw');
|
|
350
350
|
const walletState = this.safeString(currencyInfo, 'wallet_state');
|
|
351
|
-
const walletLocked = this.
|
|
352
|
-
const locked = this.
|
|
351
|
+
const walletLocked = this.safeBool(memberInfo, 'wallet_locked');
|
|
352
|
+
const locked = this.safeBool(memberInfo, 'locked');
|
|
353
353
|
let active = true;
|
|
354
354
|
if ((canWithdraw !== undefined) && (canWithdraw !== true)) {
|
|
355
355
|
active = false;
|
|
@@ -439,9 +439,9 @@ class upbit extends upbit$1["default"] {
|
|
|
439
439
|
// }
|
|
440
440
|
// }
|
|
441
441
|
//
|
|
442
|
-
const marketInfo = this.
|
|
443
|
-
const bid = this.
|
|
444
|
-
const ask = this.
|
|
442
|
+
const marketInfo = this.safeDict(response, 'market');
|
|
443
|
+
const bid = this.safeDict(marketInfo, 'bid');
|
|
444
|
+
const ask = this.safeDict(marketInfo, 'ask');
|
|
445
445
|
const marketId = this.safeString(marketInfo, 'id');
|
|
446
446
|
const baseId = this.safeString(ask, 'currency');
|
|
447
447
|
const quoteId = this.safeString(bid, 'currency');
|
|
@@ -1222,7 +1222,7 @@ class upbit extends upbit$1["default"] {
|
|
|
1222
1222
|
}
|
|
1223
1223
|
calcOrderPrice(symbol, amount, price = undefined, params = {}) {
|
|
1224
1224
|
let quoteAmount = undefined;
|
|
1225
|
-
const createMarketBuyOrderRequiresPrice = this.
|
|
1225
|
+
const createMarketBuyOrderRequiresPrice = this.safeBool(this.options, 'createMarketBuyOrderRequiresPrice');
|
|
1226
1226
|
const cost = this.safeString(params, 'cost');
|
|
1227
1227
|
if (cost !== undefined) {
|
|
1228
1228
|
quoteAmount = this.costToPrecision(symbol, cost);
|
|
@@ -1944,7 +1944,7 @@ class upbit extends upbit$1["default"] {
|
|
|
1944
1944
|
const trade = trades[i];
|
|
1945
1945
|
cost = Precise["default"].stringAdd(cost, this.safeString(trade, 'cost'));
|
|
1946
1946
|
if (getFeesFromTrades) {
|
|
1947
|
-
const tradeFee = this.
|
|
1947
|
+
const tradeFee = this.safeDict(trades[i], 'fee', {});
|
|
1948
1948
|
const tradeFeeCost = this.safeString(tradeFee, 'cost');
|
|
1949
1949
|
if (tradeFeeCost !== undefined) {
|
|
1950
1950
|
feeCost = Precise["default"].stringAdd(feeCost, tradeFeeCost);
|
|
@@ -2464,7 +2464,7 @@ class upbit extends upbit$1["default"] {
|
|
|
2464
2464
|
// { 'error': { 'message': "잘못된 엑세스 키입니다.", 'name': "invalid_access_key" } },
|
|
2465
2465
|
// { 'error': { 'message': "Jwt 토큰 검증에 실패했습니다.", 'name': "jwt_verification" } }
|
|
2466
2466
|
//
|
|
2467
|
-
const error = this.
|
|
2467
|
+
const error = this.safeDict(response, 'error');
|
|
2468
2468
|
if (error !== undefined) {
|
|
2469
2469
|
const message = this.safeString(error, 'message');
|
|
2470
2470
|
const name = this.safeString(error, 'name');
|
package/dist/cjs/src/whitebit.js
CHANGED
|
@@ -514,8 +514,8 @@ class whitebit extends whitebit$1["default"] {
|
|
|
514
514
|
quoteId = (quoteId === 'PERP') ? 'USDT' : quoteId;
|
|
515
515
|
const base = this.safeCurrencyCode(baseId);
|
|
516
516
|
const quote = this.safeCurrencyCode(quoteId);
|
|
517
|
-
const active = this.
|
|
518
|
-
const isCollateral = this.
|
|
517
|
+
const active = this.safeBool(market, 'tradesEnabled');
|
|
518
|
+
const isCollateral = this.safeBool(market, 'isCollateral');
|
|
519
519
|
const typeId = this.safeString(market, 'type');
|
|
520
520
|
let type;
|
|
521
521
|
let settle = undefined;
|
|
@@ -789,11 +789,11 @@ class whitebit extends whitebit$1["default"] {
|
|
|
789
789
|
const currency = currenciesIds[i];
|
|
790
790
|
const data = this.safeDict(response, currency, {});
|
|
791
791
|
const code = this.safeCurrencyCode(currency);
|
|
792
|
-
const withdraw = this.
|
|
792
|
+
const withdraw = this.safeDict(data, 'withdraw', {});
|
|
793
793
|
if (code !== undefined) {
|
|
794
794
|
withdrawFees[code] = this.safeString(withdraw, 'fixed');
|
|
795
795
|
}
|
|
796
|
-
const deposit = this.
|
|
796
|
+
const deposit = this.safeDict(data, 'deposit', {});
|
|
797
797
|
if (code !== undefined) {
|
|
798
798
|
depositFees[code] = this.safeString(deposit, 'fixed');
|
|
799
799
|
}
|
|
@@ -915,14 +915,14 @@ class whitebit extends whitebit$1["default"] {
|
|
|
915
915
|
const feeInfo = response[entry];
|
|
916
916
|
const code = this.safeCurrencyCode(currencyId);
|
|
917
917
|
if ((code !== undefined) && ((codes === undefined) || (this.inArray(code, codes)))) {
|
|
918
|
-
const depositWithdrawFee = this.
|
|
918
|
+
const depositWithdrawFee = this.safeDict(depositWithdrawFees, code);
|
|
919
919
|
if (depositWithdrawFee === undefined) {
|
|
920
920
|
depositWithdrawFees[code] = this.depositWithdrawFee({});
|
|
921
921
|
}
|
|
922
922
|
depositWithdrawFees[code]['info'][entry] = feeInfo;
|
|
923
923
|
let networkId = this.safeString(splitEntry, 1);
|
|
924
|
-
const withdraw = this.
|
|
925
|
-
const deposit = this.
|
|
924
|
+
const withdraw = this.safeDict(feeInfo, 'withdraw');
|
|
925
|
+
const deposit = this.safeDict(feeInfo, 'deposit');
|
|
926
926
|
const withdrawFee = this.safeNumber(withdraw, 'fixed');
|
|
927
927
|
const depositFee = this.safeNumber(deposit, 'fixed');
|
|
928
928
|
const withdrawResult = {
|
|
@@ -993,7 +993,7 @@ class whitebit extends whitebit$1["default"] {
|
|
|
993
993
|
for (let i = 0; i < symbols.length; i++) {
|
|
994
994
|
const symbol = symbols[i];
|
|
995
995
|
const market = this.market(symbol);
|
|
996
|
-
const fee = this.
|
|
996
|
+
const fee = this.safeDict(response, market['baseId'], {});
|
|
997
997
|
let makerFee = this.safeString(fee, 'maker_fee');
|
|
998
998
|
let takerFee = this.safeString(fee, 'taker_fee');
|
|
999
999
|
makerFee = Precise["default"].stringDiv(makerFee, '100');
|
|
@@ -1774,7 +1774,7 @@ class whitebit extends whitebit$1["default"] {
|
|
|
1774
1774
|
for (let i = 0; i < keys.length; i++) {
|
|
1775
1775
|
const marketId = keys[i];
|
|
1776
1776
|
const marketNew = this.safeMarket(marketId, undefined, '_');
|
|
1777
|
-
const rawTrades = this.
|
|
1777
|
+
const rawTrades = this.safeList(response, marketId, []);
|
|
1778
1778
|
const parsed = this.parseTrades(rawTrades, marketNew, since, limit);
|
|
1779
1779
|
results = this.arrayConcat(results, parsed);
|
|
1780
1780
|
}
|
|
@@ -2413,7 +2413,7 @@ class whitebit extends whitebit$1["default"] {
|
|
|
2413
2413
|
response = await this.v4PrivatePostCollateralAccountBalance(params);
|
|
2414
2414
|
}
|
|
2415
2415
|
else {
|
|
2416
|
-
const options = this.
|
|
2416
|
+
const options = this.safeDict(this.options, 'fetchBalance', {});
|
|
2417
2417
|
const defaultAccount = this.safeString(options, 'account');
|
|
2418
2418
|
const account = this.safeString2(params, 'account', 'type', defaultAccount);
|
|
2419
2419
|
params = this.omit(params, ['account', 'type']);
|
|
@@ -2913,7 +2913,7 @@ class whitebit extends whitebit$1["default"] {
|
|
|
2913
2913
|
// }
|
|
2914
2914
|
//
|
|
2915
2915
|
const url = this.safeString(response, 'url');
|
|
2916
|
-
const account = this.
|
|
2916
|
+
const account = this.safeDict(response, 'account', {});
|
|
2917
2917
|
const address = this.safeString(account, 'address', url);
|
|
2918
2918
|
const tag = this.safeString(account, 'memo');
|
|
2919
2919
|
this.checkAddress(address);
|
|
@@ -3073,7 +3073,7 @@ class whitebit extends whitebit$1["default"] {
|
|
|
3073
3073
|
await this.loadMarkets();
|
|
3074
3074
|
}
|
|
3075
3075
|
const currency = this.currency(code);
|
|
3076
|
-
const accountsByType = this.
|
|
3076
|
+
const accountsByType = this.safeDict(this.options, 'accountsByType');
|
|
3077
3077
|
const fromAccountId = this.safeString(accountsByType, fromAccount, fromAccount);
|
|
3078
3078
|
const toAccountId = this.safeString(accountsByType, toAccount, toAccount);
|
|
3079
3079
|
const amountString = this.currencyToPrecision(code, amount);
|
|
@@ -3299,7 +3299,7 @@ class whitebit extends whitebit$1["default"] {
|
|
|
3299
3299
|
// "total": 300 // total number of transactions, use this for calculating ‘limit’ and ‘offset'
|
|
3300
3300
|
// }
|
|
3301
3301
|
//
|
|
3302
|
-
const records = this.
|
|
3302
|
+
const records = this.safeList(response, 'records', []);
|
|
3303
3303
|
const first = this.safeDict(records, 0, {});
|
|
3304
3304
|
return this.parseTransaction(first, currency);
|
|
3305
3305
|
}
|
|
@@ -4158,7 +4158,7 @@ class whitebit extends whitebit$1["default"] {
|
|
|
4158
4158
|
});
|
|
4159
4159
|
}
|
|
4160
4160
|
isFiat(currency) {
|
|
4161
|
-
const fiatCurrencies = this.
|
|
4161
|
+
const fiatCurrencies = this.safeList(this.options, 'fiatCurrencies', []);
|
|
4162
4162
|
return this.inArray(currency, fiatCurrencies);
|
|
4163
4163
|
}
|
|
4164
4164
|
/**
|
|
@@ -4270,7 +4270,7 @@ class whitebit extends whitebit$1["default"] {
|
|
|
4270
4270
|
// For cases where we have a meaningful status
|
|
4271
4271
|
// {"response":null,"status":422,"errors":{"orderId":["Finished order id 435453454535 not found on your account"]},"notification":null,"warning":"Finished order id 435453454535 not found on your account","_token":null}
|
|
4272
4272
|
const status = this.safeString(response, 'status');
|
|
4273
|
-
const errors$1 = this.
|
|
4273
|
+
const errors$1 = this.safeDict(response, 'errors');
|
|
4274
4274
|
// {"code":10,"message":"Unauthorized request."}
|
|
4275
4275
|
const message = this.safeString(response, 'message');
|
|
4276
4276
|
// For these cases where we have a generic code variable error key
|
package/dist/cjs/src/woo.js
CHANGED
|
@@ -2052,7 +2052,7 @@ class woo extends woo$1["default"] {
|
|
|
2052
2052
|
// }
|
|
2053
2053
|
//
|
|
2054
2054
|
}
|
|
2055
|
-
const data = this.
|
|
2055
|
+
const data = this.safeDict(response, 'data', {});
|
|
2056
2056
|
const orders = this.safeList(data, 'rows', []);
|
|
2057
2057
|
return this.parseOrders(orders, market, since, limit);
|
|
2058
2058
|
}
|
|
@@ -2216,7 +2216,7 @@ class woo extends woo$1["default"] {
|
|
|
2216
2216
|
const amount = this.safeString(order, 'quantity'); // This is base amount
|
|
2217
2217
|
const cost = this.safeString(order, 'amount'); // This is quote amount
|
|
2218
2218
|
const orderType = this.safeStringLower(order, 'type');
|
|
2219
|
-
const status = this.
|
|
2219
|
+
const status = this.safeString2(order, 'status', 'algoStatus');
|
|
2220
2220
|
const side = this.safeStringLower(order, 'side');
|
|
2221
2221
|
const filled = this.safeString2(order, 'executed', 'totalExecutedQuantity');
|
|
2222
2222
|
const average = this.omitZero(this.safeString(order, 'averageExecutedPrice'));
|
|
@@ -4738,7 +4738,7 @@ class woo extends woo$1["default"] {
|
|
|
4738
4738
|
}
|
|
4739
4739
|
}
|
|
4740
4740
|
// if it was not returned according to above options, then return the first network of currency
|
|
4741
|
-
return this.
|
|
4741
|
+
return this.safeString(networkKeys, 0);
|
|
4742
4742
|
}
|
|
4743
4743
|
setSandboxMode(enable) {
|
|
4744
4744
|
super.setSandboxMode(enable);
|