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
package/dist/cjs/src/kraken.js
CHANGED
|
@@ -684,7 +684,7 @@ class kraken extends kraken$1["default"] {
|
|
|
684
684
|
throw new errors.ExchangeError(this.id + ' method() missing base');
|
|
685
685
|
}
|
|
686
686
|
if ((base in cachedCurrencies)) {
|
|
687
|
-
const currency = this.
|
|
687
|
+
const currency = this.safeDict(cachedCurrencies, base);
|
|
688
688
|
const currencyPrecision = this.safeNumber(currency, 'precision');
|
|
689
689
|
// if currency precision is greater (e.g. 0.01) than market precision (e.g. 0.001)
|
|
690
690
|
if (currencyPrecision === undefined) {
|
|
@@ -976,14 +976,14 @@ class kraken extends kraken$1["default"] {
|
|
|
976
976
|
// }
|
|
977
977
|
// }
|
|
978
978
|
//
|
|
979
|
-
const result = this.
|
|
979
|
+
const result = this.safeDict(response, 'result', {});
|
|
980
980
|
return this.parseTradingFee(result, market);
|
|
981
981
|
}
|
|
982
982
|
parseTradingFee(response, market) {
|
|
983
|
-
const makerFees = this.
|
|
984
|
-
const takerFees = this.
|
|
985
|
-
const symbolMakerFee = this.
|
|
986
|
-
const symbolTakerFee = this.
|
|
983
|
+
const makerFees = this.safeDict(response, 'fees_maker', {});
|
|
984
|
+
const takerFees = this.safeDict(response, 'fees', {});
|
|
985
|
+
const symbolMakerFee = this.safeDict(makerFees, market['id'], {});
|
|
986
|
+
const symbolTakerFee = this.safeDict(takerFees, market['id'], {});
|
|
987
987
|
return {
|
|
988
988
|
'info': response,
|
|
989
989
|
'symbol': market['symbol'],
|
|
@@ -1040,12 +1040,12 @@ class kraken extends kraken$1["default"] {
|
|
|
1040
1040
|
// }
|
|
1041
1041
|
// }
|
|
1042
1042
|
//
|
|
1043
|
-
const result = this.
|
|
1043
|
+
const result = this.safeDict(response, 'result', {});
|
|
1044
1044
|
let orderbook = this.safeValue(result, market['id']);
|
|
1045
1045
|
// sometimes kraken returns wsname instead of market id
|
|
1046
1046
|
// https://github.com/ccxt/ccxt/issues/8662
|
|
1047
|
-
const marketInfo = this.
|
|
1048
|
-
const wsName = this.
|
|
1047
|
+
const marketInfo = this.safeDict(market, 'info', {});
|
|
1048
|
+
const wsName = this.safeString(marketInfo, 'wsname');
|
|
1049
1049
|
if (wsName !== undefined) {
|
|
1050
1050
|
orderbook = this.safeValue(result, wsName, orderbook);
|
|
1051
1051
|
}
|
|
@@ -1066,17 +1066,17 @@ class kraken extends kraken$1["default"] {
|
|
|
1066
1066
|
// }
|
|
1067
1067
|
//
|
|
1068
1068
|
const symbol = this.safeSymbol(undefined, market);
|
|
1069
|
-
const v = this.
|
|
1069
|
+
const v = this.safeList(ticker, 'v', []);
|
|
1070
1070
|
const baseVolume = this.safeString(v, 1);
|
|
1071
|
-
const p = this.
|
|
1071
|
+
const p = this.safeList(ticker, 'p', []);
|
|
1072
1072
|
const vwap = this.safeString(p, 1);
|
|
1073
1073
|
const quoteVolume = Precise["default"].stringMul(baseVolume, vwap);
|
|
1074
|
-
const c = this.
|
|
1074
|
+
const c = this.safeList(ticker, 'c', []);
|
|
1075
1075
|
const last = this.safeString(c, 0);
|
|
1076
|
-
const high = this.
|
|
1077
|
-
const low = this.
|
|
1078
|
-
const bid = this.
|
|
1079
|
-
const ask = this.
|
|
1076
|
+
const high = this.safeList(ticker, 'h', []);
|
|
1077
|
+
const low = this.safeList(ticker, 'l', []);
|
|
1078
|
+
const bid = this.safeList(ticker, 'b', []);
|
|
1079
|
+
const ask = this.safeList(ticker, 'a', []);
|
|
1080
1080
|
return this.safeTicker({
|
|
1081
1081
|
'symbol': symbol,
|
|
1082
1082
|
'timestamp': undefined,
|
|
@@ -1238,7 +1238,7 @@ class kraken extends kraken$1["default"] {
|
|
|
1238
1238
|
// "last":1591517580
|
|
1239
1239
|
// }
|
|
1240
1240
|
// }
|
|
1241
|
-
const result = this.
|
|
1241
|
+
const result = this.safeDict(response, 'result', {});
|
|
1242
1242
|
const ohlcvs = this.safeList(result, market['id'], []);
|
|
1243
1243
|
return this.parseOHLCVs(ohlcvs, market, timeframe, since, limit);
|
|
1244
1244
|
}
|
|
@@ -1350,7 +1350,7 @@ class kraken extends kraken$1["default"] {
|
|
|
1350
1350
|
// "amount": "-0.2805800000",
|
|
1351
1351
|
// "fee": "0.0050000000",
|
|
1352
1352
|
// "balance": "0.0000051000" },
|
|
1353
|
-
const result = this.
|
|
1353
|
+
const result = this.safeDict(response, 'result', {});
|
|
1354
1354
|
const ledger = this.safeDict(result, 'ledger', {});
|
|
1355
1355
|
const keys = Object.keys(ledger);
|
|
1356
1356
|
const items = [];
|
|
@@ -1615,7 +1615,7 @@ class kraken extends kraken$1["default"] {
|
|
|
1615
1615
|
for (let i = 0; i < currencyIds.length; i++) {
|
|
1616
1616
|
const currencyId = currencyIds[i];
|
|
1617
1617
|
const code = this.safeCurrencyCode(currencyId);
|
|
1618
|
-
const balance = this.
|
|
1618
|
+
const balance = this.safeDict(balances, currencyId, {});
|
|
1619
1619
|
const account = this.account();
|
|
1620
1620
|
account['used'] = this.safeString(balance, 'hold_trade');
|
|
1621
1621
|
account['total'] = this.safeString(balance, 'balance');
|
|
@@ -2432,7 +2432,7 @@ class kraken extends kraken$1["default"] {
|
|
|
2432
2432
|
// }
|
|
2433
2433
|
// }
|
|
2434
2434
|
//
|
|
2435
|
-
const result = this.
|
|
2435
|
+
const result = this.safeDict(response, 'result', []);
|
|
2436
2436
|
if (!(id in result)) {
|
|
2437
2437
|
throw new errors.OrderNotFound(this.id + ' fetchOrder() could not find order id ' + id);
|
|
2438
2438
|
}
|
|
@@ -2473,7 +2473,7 @@ class kraken extends kraken$1["default"] {
|
|
|
2473
2473
|
if (symbol !== undefined) {
|
|
2474
2474
|
symbol = this.symbol(symbol);
|
|
2475
2475
|
}
|
|
2476
|
-
const options = this.
|
|
2476
|
+
const options = this.safeDict(this.options, 'fetchOrderTrades', {});
|
|
2477
2477
|
const batchSize = this.safeInteger(options, 'batchSize', 20);
|
|
2478
2478
|
const numTradeIds = tradeIds.length;
|
|
2479
2479
|
let numBatches = this.parseToInt(numTradeIds / batchSize);
|
|
@@ -2957,7 +2957,7 @@ class kraken extends kraken$1["default"] {
|
|
|
2957
2957
|
return this.safeString(statuses, status, status);
|
|
2958
2958
|
}
|
|
2959
2959
|
parseNetwork(network) {
|
|
2960
|
-
const withdrawMethods = this.
|
|
2960
|
+
const withdrawMethods = this.safeDict(this.options, 'withdrawMethods', {});
|
|
2961
2961
|
return this.safeString(withdrawMethods, network, network);
|
|
2962
2962
|
}
|
|
2963
2963
|
parseTransaction(transaction, currency = undefined) {
|
|
@@ -3149,7 +3149,7 @@ class kraken extends kraken$1["default"] {
|
|
|
3149
3149
|
// }
|
|
3150
3150
|
// }
|
|
3151
3151
|
//
|
|
3152
|
-
const result = this.
|
|
3152
|
+
const result = this.safeDict(response, 'result', {});
|
|
3153
3153
|
return this.safeTimestamp(result, 'unixtime');
|
|
3154
3154
|
}
|
|
3155
3155
|
/**
|
|
@@ -3324,13 +3324,13 @@ class kraken extends kraken$1["default"] {
|
|
|
3324
3324
|
}
|
|
3325
3325
|
const currency = this.currency(code);
|
|
3326
3326
|
let network = this.safeStringUpper(params, 'network');
|
|
3327
|
-
const networks = this.
|
|
3327
|
+
const networks = this.safeDict(this.options, 'networks', {});
|
|
3328
3328
|
network = this.safeString(networks, network, network); // support ETH > ERC20 aliases
|
|
3329
3329
|
params = this.omit(params, 'network');
|
|
3330
3330
|
if ((code === 'USDT') && (network === 'TRC20')) {
|
|
3331
3331
|
code = code + '-' + network;
|
|
3332
3332
|
}
|
|
3333
|
-
const defaultDepositMethods = this.
|
|
3333
|
+
const defaultDepositMethods = this.safeDict(this.options, 'depositMethods', {});
|
|
3334
3334
|
const defaultDepositMethod = this.safeString(defaultDepositMethods, code);
|
|
3335
3335
|
let depositMethod = this.safeString(params, 'method', defaultDepositMethod);
|
|
3336
3336
|
// if the user has specified an exchange-specific method in params
|
|
@@ -3352,7 +3352,7 @@ class kraken extends kraken$1["default"] {
|
|
|
3352
3352
|
}
|
|
3353
3353
|
// if depositMethod was not specified, fallback to the first available deposit method
|
|
3354
3354
|
if (depositMethod === undefined) {
|
|
3355
|
-
const firstDepositMethod = this.
|
|
3355
|
+
const firstDepositMethod = this.safeDict(depositMethods, 0, {});
|
|
3356
3356
|
depositMethod = this.safeString(firstDepositMethod, 'method');
|
|
3357
3357
|
}
|
|
3358
3358
|
}
|
|
@@ -3369,8 +3369,8 @@ class kraken extends kraken$1["default"] {
|
|
|
3369
3369
|
// ]
|
|
3370
3370
|
// }
|
|
3371
3371
|
//
|
|
3372
|
-
const result = this.
|
|
3373
|
-
const firstResult = this.
|
|
3372
|
+
const result = this.safeList(response, 'result', []);
|
|
3373
|
+
const firstResult = this.safeDict(result, 0, {});
|
|
3374
3374
|
if (firstResult === undefined) {
|
|
3375
3375
|
throw new errors.InvalidAddress(this.id + ' privatePostDepositAddresses() returned no addresses for ' + code);
|
|
3376
3376
|
}
|
|
@@ -3631,7 +3631,7 @@ class kraken extends kraken$1["default"] {
|
|
|
3631
3631
|
// }
|
|
3632
3632
|
// }
|
|
3633
3633
|
//
|
|
3634
|
-
const result = this.
|
|
3634
|
+
const result = this.safeDict(transfer, 'result', {});
|
|
3635
3635
|
const refid = this.safeString(result, 'refid');
|
|
3636
3636
|
return {
|
|
3637
3637
|
'info': transfer,
|
|
@@ -1186,8 +1186,8 @@ class krakenfutures extends krakenfutures$1["default"] {
|
|
|
1186
1186
|
let marketId = this.safeString(trade, 'symbol');
|
|
1187
1187
|
let side = this.safeString(trade, 'side');
|
|
1188
1188
|
let type = undefined;
|
|
1189
|
-
const priorEdit = this.
|
|
1190
|
-
const priorExecution = this.
|
|
1189
|
+
const priorEdit = this.safeDict(trade, 'orderPriorEdit');
|
|
1190
|
+
const priorExecution = this.safeDict(trade, 'orderPriorExecution');
|
|
1191
1191
|
if (priorExecution !== undefined) {
|
|
1192
1192
|
order = this.safeString(priorExecution, 'orderId');
|
|
1193
1193
|
marketId = this.safeString(priorExecution, 'symbol');
|
|
@@ -1462,7 +1462,7 @@ class krakenfutures extends krakenfutures$1["default"] {
|
|
|
1462
1462
|
const side = this.safeString(rawOrder, 'side');
|
|
1463
1463
|
const amount = this.safeValue(rawOrder, 'amount');
|
|
1464
1464
|
const price = this.safeValue(rawOrder, 'price');
|
|
1465
|
-
const orderParams = this.
|
|
1465
|
+
const orderParams = this.safeDict(rawOrder, 'params', {});
|
|
1466
1466
|
const extendedParams = this.extend(orderParams, params); // the request does not accept extra params since it's a list, so we're extending each order with the common params
|
|
1467
1467
|
if (!('order_tag' in extendedParams)) {
|
|
1468
1468
|
// order tag is mandatory so we will generate one if not provided
|
|
@@ -1545,7 +1545,7 @@ class krakenfutures extends krakenfutures$1["default"] {
|
|
|
1545
1545
|
await this.loadMarkets();
|
|
1546
1546
|
}
|
|
1547
1547
|
const response = await this.privatePostCancelorder(this.extend({ 'order_id': id }, params));
|
|
1548
|
-
const status = this.safeString(this.
|
|
1548
|
+
const status = this.safeString(this.safeDict(response, 'cancelStatus', {}), 'status');
|
|
1549
1549
|
this.verifyOrderActionSuccess(status, 'cancelOrder');
|
|
1550
1550
|
let order = {};
|
|
1551
1551
|
if ('cancelStatus' in response) {
|
|
@@ -2342,7 +2342,7 @@ class krakenfutures extends krakenfutures$1["default"] {
|
|
|
2342
2342
|
}
|
|
2343
2343
|
else if (!fixed) {
|
|
2344
2344
|
const executedPrice = this.safeString(item, 'price');
|
|
2345
|
-
const orderPriorExecution = this.
|
|
2345
|
+
const orderPriorExecution = this.safeDict(item, 'orderPriorExecution');
|
|
2346
2346
|
details = this.safeValue2(item, 'orderPriorExecution', 'orderPriorEdit');
|
|
2347
2347
|
if (executedPrice === undefined) {
|
|
2348
2348
|
price = this.safeString(orderPriorExecution, 'limitPrice');
|
|
@@ -2903,8 +2903,8 @@ class krakenfutures extends krakenfutures$1["default"] {
|
|
|
2903
2903
|
type = (symbol === undefined) ? 'flex' : symbol;
|
|
2904
2904
|
}
|
|
2905
2905
|
const accountName = this.parseAccount(type);
|
|
2906
|
-
const accounts = this.
|
|
2907
|
-
const account = this.
|
|
2906
|
+
const accounts = this.safeDict(response, 'accounts');
|
|
2907
|
+
const account = this.safeDict(accounts, accountName);
|
|
2908
2908
|
if (account === undefined) {
|
|
2909
2909
|
type = (type === undefined) ? '' : type;
|
|
2910
2910
|
symbol = (symbol === undefined) ? '' : symbol;
|
|
@@ -3007,7 +3007,7 @@ class krakenfutures extends krakenfutures$1["default"] {
|
|
|
3007
3007
|
account['total'] = balance;
|
|
3008
3008
|
}
|
|
3009
3009
|
else {
|
|
3010
|
-
const auxiliary = this.
|
|
3010
|
+
const auxiliary = this.safeDict(response, 'auxiliary');
|
|
3011
3011
|
account['free'] = this.safeString(auxiliary, 'af');
|
|
3012
3012
|
account['total'] = this.safeString(auxiliary, 'pv');
|
|
3013
3013
|
}
|
|
@@ -3036,7 +3036,7 @@ class krakenfutures extends krakenfutures$1["default"] {
|
|
|
3036
3036
|
const fundingRates = [];
|
|
3037
3037
|
for (let i = 0; i < tickers.length; i++) {
|
|
3038
3038
|
const entry = tickers[i];
|
|
3039
|
-
const entry_symbol = this.
|
|
3039
|
+
const entry_symbol = this.safeString(entry, 'symbol');
|
|
3040
3040
|
if (marketIds !== undefined) {
|
|
3041
3041
|
if (!this.inArray(entry_symbol, marketIds)) {
|
|
3042
3042
|
continue;
|
|
@@ -3524,7 +3524,7 @@ class krakenfutures extends krakenfutures$1["default"] {
|
|
|
3524
3524
|
// "tags": [],
|
|
3525
3525
|
// }
|
|
3526
3526
|
//
|
|
3527
|
-
const marginLevels = this.
|
|
3527
|
+
const marginLevels = this.safeList(info, 'marginLevels');
|
|
3528
3528
|
const marketId = this.safeString(info, 'symbol');
|
|
3529
3529
|
market = this.safeMarket(marketId, market);
|
|
3530
3530
|
const tiers = [];
|
|
@@ -3780,8 +3780,8 @@ class krakenfutures extends krakenfutures$1["default"] {
|
|
|
3780
3780
|
if (code === 429) {
|
|
3781
3781
|
throw new errors.DDoSProtection(this.id + ' ' + body);
|
|
3782
3782
|
}
|
|
3783
|
-
const errors$1 = this.
|
|
3784
|
-
const firstError = this.
|
|
3783
|
+
const errors$1 = this.safeList(response, 'errors');
|
|
3784
|
+
const firstError = this.safeDict(errors$1, 0);
|
|
3785
3785
|
const firtErrorMessage = this.safeString(firstError, 'message');
|
|
3786
3786
|
const message = this.safeString(response, 'error', firtErrorMessage);
|
|
3787
3787
|
if (message === undefined) {
|
|
@@ -3796,13 +3796,13 @@ class krakenfutures extends krakenfutures$1["default"] {
|
|
|
3796
3796
|
throw new errors.ExchangeError(feedback); // unknown message
|
|
3797
3797
|
}
|
|
3798
3798
|
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
|
3799
|
-
const apiVersions = this.
|
|
3800
|
-
const methodVersions = this.
|
|
3799
|
+
const apiVersions = this.safeDict(this.options['versions'], api, {});
|
|
3800
|
+
const methodVersions = this.safeDict(apiVersions, method, {});
|
|
3801
3801
|
const defaultVersion = this.safeString(methodVersions, path, this.version);
|
|
3802
3802
|
const version = this.safeString(params, 'version', defaultVersion);
|
|
3803
3803
|
params = this.omit(params, 'version');
|
|
3804
|
-
const apiAccess = this.
|
|
3805
|
-
const methodAccess = this.
|
|
3804
|
+
const apiAccess = this.safeDict(this.options['access'], api, {});
|
|
3805
|
+
const methodAccess = this.safeDict(apiAccess, method, {});
|
|
3806
3806
|
const access = this.safeString(methodAccess, path, 'public');
|
|
3807
3807
|
const endpoint = version + '/' + this.implodeParams(path, params);
|
|
3808
3808
|
params = this.omit(params, this.extractParams(path));
|
package/dist/cjs/src/kucoin.js
CHANGED
|
@@ -3652,7 +3652,7 @@ class kucoin extends kucoin$1["default"] {
|
|
|
3652
3652
|
// BCH {"code":"200000","data":{"address":"bitcoincash:qza3m4nj9rx7l9r0cdadfqxts6f92shvhvr5ls4q7z","memo":""}}
|
|
3653
3653
|
// BTC {"code":"200000","data":{"address":"36SjucKqQpQSvsak9A7h6qzFjrVXpRNZhE","memo":""}}
|
|
3654
3654
|
this.options['versions']['private']['GET']['deposit-addresses'] = version;
|
|
3655
|
-
const data = this.
|
|
3655
|
+
const data = this.safeDict(response, 'data');
|
|
3656
3656
|
if (data === undefined) {
|
|
3657
3657
|
throw new errors.ExchangeError(this.id + ' fetchDepositAddress() returned an empty response, you might try to run createDepositAddress() first and try again');
|
|
3658
3658
|
}
|
|
@@ -3964,9 +3964,9 @@ class kucoin extends kucoin$1["default"] {
|
|
|
3964
3964
|
return orderbook;
|
|
3965
3965
|
}
|
|
3966
3966
|
handleTriggerPrices(params) {
|
|
3967
|
-
const triggerPrice = this.
|
|
3968
|
-
const stopLossPrice = this.
|
|
3969
|
-
const takeProfitPrice = this.
|
|
3967
|
+
const triggerPrice = this.safeNumber2(params, 'triggerPrice', 'stopPrice');
|
|
3968
|
+
const stopLossPrice = this.safeNumber(params, 'stopLossPrice');
|
|
3969
|
+
const takeProfitPrice = this.safeNumber(params, 'takeProfitPrice');
|
|
3970
3970
|
const isStopLoss = stopLossPrice !== undefined;
|
|
3971
3971
|
const isTakeProfit = takeProfitPrice !== undefined;
|
|
3972
3972
|
if ((isStopLoss && isTakeProfit) || ((triggerPrice !== undefined) && (stopLossPrice !== undefined)) || ((triggerPrice !== undefined) && isTakeProfit)) {
|
|
@@ -4784,7 +4784,7 @@ class kucoin extends kucoin$1["default"] {
|
|
|
4784
4784
|
const side = this.safeString(rawOrder, 'side');
|
|
4785
4785
|
const amount = this.safeValue(rawOrder, 'amount');
|
|
4786
4786
|
const price = this.safeValue(rawOrder, 'price');
|
|
4787
|
-
const orderParams = this.
|
|
4787
|
+
const orderParams = this.safeDict(rawOrder, 'params', {});
|
|
4788
4788
|
const orderRequest = this.createSpotOrderRequest(marketId, type, side, amount, price, orderParams);
|
|
4789
4789
|
ordersRequests.push(orderRequest);
|
|
4790
4790
|
}
|
|
@@ -4868,7 +4868,7 @@ class kucoin extends kucoin$1["default"] {
|
|
|
4868
4868
|
const side = this.safeString(rawOrder, 'side');
|
|
4869
4869
|
const amount = this.safeValue(rawOrder, 'amount');
|
|
4870
4870
|
const price = this.safeValue(rawOrder, 'price');
|
|
4871
|
-
const orderParams = this.
|
|
4871
|
+
const orderParams = this.safeDict(rawOrder, 'params', {});
|
|
4872
4872
|
const orderRequest = this.createContractOrderRequest(symbol, type, side, amount, price, orderParams);
|
|
4873
4873
|
ordersRequests.push(orderRequest);
|
|
4874
4874
|
}
|
|
@@ -6430,7 +6430,7 @@ class kucoin extends kucoin$1["default"] {
|
|
|
6430
6430
|
// precision reported by their api is 8 d.p.
|
|
6431
6431
|
// const average = Precise.stringDiv (cost, Precise.stringMul (filled, market['contractSize']));
|
|
6432
6432
|
// bool
|
|
6433
|
-
const isActive = this.
|
|
6433
|
+
const isActive = this.safeBool(order, 'isActive');
|
|
6434
6434
|
const cancelExist = this.safeBool(order, 'cancelExist', false);
|
|
6435
6435
|
let status = undefined;
|
|
6436
6436
|
if (isActive !== undefined) {
|
|
@@ -6446,8 +6446,8 @@ class kucoin extends kucoin$1["default"] {
|
|
|
6446
6446
|
}
|
|
6447
6447
|
const clientOrderId = this.safeString(order, 'clientOid');
|
|
6448
6448
|
const timeInForce = this.safeString(order, 'timeInForce');
|
|
6449
|
-
const postOnly = this.
|
|
6450
|
-
const reduceOnly = this.
|
|
6449
|
+
const postOnly = this.safeBool(order, 'postOnly');
|
|
6450
|
+
const reduceOnly = this.safeBool(order, 'reduceOnly');
|
|
6451
6451
|
const lastUpdateTimestamp = this.safeInteger(order, 'updatedAt');
|
|
6452
6452
|
return this.safeOrder({
|
|
6453
6453
|
'id': orderId,
|
|
@@ -8414,7 +8414,7 @@ class kucoin extends kucoin$1["default"] {
|
|
|
8414
8414
|
}
|
|
8415
8415
|
// only fetches one balance at a time
|
|
8416
8416
|
let defaultCode = this.safeString(this.options, 'code');
|
|
8417
|
-
const fetchBalanceOptions = this.
|
|
8417
|
+
const fetchBalanceOptions = this.safeDict(this.options, 'fetchBalance', {});
|
|
8418
8418
|
defaultCode = this.safeString(fetchBalanceOptions, 'code', defaultCode);
|
|
8419
8419
|
const code = this.safeString(params, 'code', defaultCode);
|
|
8420
8420
|
if (code === undefined) {
|
|
@@ -8445,7 +8445,7 @@ class kucoin extends kucoin$1["default"] {
|
|
|
8445
8445
|
'timestamp': undefined,
|
|
8446
8446
|
'datetime': undefined,
|
|
8447
8447
|
};
|
|
8448
|
-
const data = this.
|
|
8448
|
+
const data = this.safeDict(response, 'data');
|
|
8449
8449
|
const currencyId = this.safeString(data, 'currency');
|
|
8450
8450
|
const currencyCode = this.safeCurrencyCode(currencyId, currency);
|
|
8451
8451
|
const account = this.account();
|
|
@@ -10466,7 +10466,7 @@ class kucoin extends kucoin$1["default"] {
|
|
|
10466
10466
|
// }
|
|
10467
10467
|
// }
|
|
10468
10468
|
//
|
|
10469
|
-
const data = this.
|
|
10469
|
+
const data = this.safeDict(response, 'data');
|
|
10470
10470
|
dataList = this.safeList(data, 'dataList', []);
|
|
10471
10471
|
}
|
|
10472
10472
|
const fees = [];
|
|
@@ -10935,7 +10935,7 @@ class kucoin extends kucoin$1["default"] {
|
|
|
10935
10935
|
const initialMarginPercentage = Precise["default"].stringDiv(initialMargin, notional);
|
|
10936
10936
|
// const marginRatio = Precise.stringDiv (maintenanceRate, collateral);
|
|
10937
10937
|
const unrealisedPnl = this.safeString2(position, 'unrealisedPnl', 'unrealizedPnL');
|
|
10938
|
-
const crossMode = this.
|
|
10938
|
+
const crossMode = this.safeBool(position, 'crossMode');
|
|
10939
10939
|
// currently crossMode is always set to false and only isolated positions are supported
|
|
10940
10940
|
let marginMode = this.safeStringLower(position, 'marginMode');
|
|
10941
10941
|
if (crossMode !== undefined) {
|
|
@@ -11156,7 +11156,7 @@ class kucoin extends kucoin$1["default"] {
|
|
|
11156
11156
|
// "msg":"Position does not exist"
|
|
11157
11157
|
// }
|
|
11158
11158
|
//
|
|
11159
|
-
const data = this.
|
|
11159
|
+
const data = this.safeDict(response, 'data', {});
|
|
11160
11160
|
return this.extend(this.parseMarginModification(data, market), {
|
|
11161
11161
|
'amount': this.amountToPrecision(symbol, amount),
|
|
11162
11162
|
'direction': 'in',
|
|
@@ -11254,7 +11254,7 @@ class kucoin extends kucoin$1["default"] {
|
|
|
11254
11254
|
const id = this.safeString(info, 'id');
|
|
11255
11255
|
market = this.safeMarket(id, market);
|
|
11256
11256
|
const currencyId = this.safeString(info, 'settleCurrency');
|
|
11257
|
-
const crossMode = this.
|
|
11257
|
+
const crossMode = this.safeBool(info, 'crossMode');
|
|
11258
11258
|
const mode = (crossMode === true) ? 'cross' : 'isolated';
|
|
11259
11259
|
const marketId = this.safeString(market, 'symbol');
|
|
11260
11260
|
const timestamp = this.safeInteger(info, 'currentTimestamp');
|
package/dist/cjs/src/latoken.js
CHANGED
|
@@ -600,7 +600,7 @@ class latoken extends latoken$1["default"] {
|
|
|
600
600
|
let maxTimestamp = undefined;
|
|
601
601
|
const defaultType = this.safeString2(this.options, 'fetchBalance', 'defaultType', 'spot');
|
|
602
602
|
const type = this.safeString(params, 'type', defaultType);
|
|
603
|
-
const types = this.
|
|
603
|
+
const types = this.safeDict(this.options, 'types', {});
|
|
604
604
|
const accountType = this.safeString(types, type, type);
|
|
605
605
|
const balancesByType = this.groupBy(response, 'type');
|
|
606
606
|
const balances = this.safeList(balancesByType, accountType, []);
|
|
@@ -860,7 +860,7 @@ class latoken extends latoken$1["default"] {
|
|
|
860
860
|
const priceString = this.safeString(trade, 'price');
|
|
861
861
|
const amountString = this.safeString(trade, 'quantity');
|
|
862
862
|
const costString = this.safeString(trade, 'cost');
|
|
863
|
-
const makerBuyer = this.
|
|
863
|
+
const makerBuyer = this.safeBool(trade, 'makerBuyer');
|
|
864
864
|
let side = this.safeString(trade, 'direction');
|
|
865
865
|
if (side === undefined) {
|
|
866
866
|
side = (makerBuyer === true) ? 'sell' : 'buy';
|
|
@@ -956,7 +956,7 @@ class latoken extends latoken$1["default"] {
|
|
|
956
956
|
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/?id=fee-structure}
|
|
957
957
|
*/
|
|
958
958
|
async fetchTradingFee(symbol, params = {}) {
|
|
959
|
-
const options = this.
|
|
959
|
+
const options = this.safeDict(this.options, 'fetchTradingFee', {});
|
|
960
960
|
const defaultMethod = this.safeString(options, 'method', 'fetchPrivateTradingFee');
|
|
961
961
|
const method = this.safeString(params, 'method', defaultMethod);
|
|
962
962
|
params = this.omit(params, 'method');
|
|
@@ -1229,7 +1229,7 @@ class latoken extends latoken$1["default"] {
|
|
|
1229
1229
|
await this.loadMarkets();
|
|
1230
1230
|
}
|
|
1231
1231
|
let response;
|
|
1232
|
-
const isTrigger = this.
|
|
1232
|
+
const isTrigger = this.safeBool2(params, 'trigger', 'stop');
|
|
1233
1233
|
params = this.omit(params, 'stop');
|
|
1234
1234
|
// privateGetAuthOrderActive doesn't work even though its listed at https://api.latoken.com/doc/v2/#tag/Order/operation/getMyActiveOrders
|
|
1235
1235
|
const market = this.market(symbol);
|
|
@@ -1293,7 +1293,7 @@ class latoken extends latoken$1["default"] {
|
|
|
1293
1293
|
// 'limit': limit, // default '100'
|
|
1294
1294
|
};
|
|
1295
1295
|
let market = undefined;
|
|
1296
|
-
const isTrigger = this.
|
|
1296
|
+
const isTrigger = this.safeBool2(params, 'trigger', 'stop');
|
|
1297
1297
|
params = this.omit(params, ['stop', 'trigger']);
|
|
1298
1298
|
if (limit !== undefined) {
|
|
1299
1299
|
request['limit'] = limit; // default 100
|
|
@@ -1361,7 +1361,7 @@ class latoken extends latoken$1["default"] {
|
|
|
1361
1361
|
const request = {
|
|
1362
1362
|
'id': id,
|
|
1363
1363
|
};
|
|
1364
|
-
const isTrigger = this.
|
|
1364
|
+
const isTrigger = this.safeBool2(params, 'trigger', 'stop');
|
|
1365
1365
|
params = this.omit(params, ['stop', 'trigger']);
|
|
1366
1366
|
let response;
|
|
1367
1367
|
if (isTrigger === true) {
|
|
@@ -1478,7 +1478,7 @@ class latoken extends latoken$1["default"] {
|
|
|
1478
1478
|
const request = {
|
|
1479
1479
|
'id': id,
|
|
1480
1480
|
};
|
|
1481
|
-
const isTrigger = this.
|
|
1481
|
+
const isTrigger = this.safeBool2(params, 'trigger', 'stop');
|
|
1482
1482
|
params = this.omit(params, ['stop', 'trigger']);
|
|
1483
1483
|
let response;
|
|
1484
1484
|
if (isTrigger === true) {
|
|
@@ -1518,7 +1518,7 @@ class latoken extends latoken$1["default"] {
|
|
|
1518
1518
|
// 'quote': market['quoteId'],
|
|
1519
1519
|
};
|
|
1520
1520
|
let market = undefined;
|
|
1521
|
-
const isTrigger = this.
|
|
1521
|
+
const isTrigger = this.safeBool2(params, 'trigger', 'stop');
|
|
1522
1522
|
params = this.omit(params, ['stop', 'trigger']);
|
|
1523
1523
|
let response;
|
|
1524
1524
|
if (symbol !== undefined) {
|