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/bitget.js
CHANGED
|
@@ -73,7 +73,7 @@ class bitget extends bitget$1["default"] {
|
|
|
73
73
|
'fetchCrossBorrowRate': true,
|
|
74
74
|
'fetchCrossBorrowRates': false,
|
|
75
75
|
'fetchCurrencies': true,
|
|
76
|
-
'fetchDeposit':
|
|
76
|
+
'fetchDeposit': true,
|
|
77
77
|
'fetchDepositAddress': true,
|
|
78
78
|
'fetchDepositAddresses': false,
|
|
79
79
|
'fetchDepositAddressesByNetwork': false,
|
|
@@ -131,7 +131,7 @@ class bitget extends bitget$1["default"] {
|
|
|
131
131
|
'fetchTransfer': false,
|
|
132
132
|
'fetchTransfers': true,
|
|
133
133
|
'fetchWithdrawAddresses': false,
|
|
134
|
-
'fetchWithdrawal':
|
|
134
|
+
'fetchWithdrawal': true,
|
|
135
135
|
'fetchWithdrawals': true,
|
|
136
136
|
'reduceMargin': true,
|
|
137
137
|
'repayCrossMargin': true,
|
|
@@ -2125,7 +2125,7 @@ class bitget extends bitget$1["default"] {
|
|
|
2125
2125
|
// }
|
|
2126
2126
|
// }
|
|
2127
2127
|
//
|
|
2128
|
-
const data = this.
|
|
2128
|
+
const data = this.safeDict(response, 'data', {});
|
|
2129
2129
|
return this.safeInteger(data, 'serverTime');
|
|
2130
2130
|
}
|
|
2131
2131
|
/**
|
|
@@ -2284,7 +2284,7 @@ class bitget extends bitget$1["default"] {
|
|
|
2284
2284
|
const baseId = this.safeString(market, 'baseCoin');
|
|
2285
2285
|
const quote = this.safeCurrencyCode(quoteId);
|
|
2286
2286
|
const base = this.safeCurrencyCode(baseId);
|
|
2287
|
-
const supportMarginCoins = this.
|
|
2287
|
+
const supportMarginCoins = this.safeList(market, 'supportMarginCoins', []);
|
|
2288
2288
|
let settleId = undefined;
|
|
2289
2289
|
if (this.inArray(baseId, supportMarginCoins)) {
|
|
2290
2290
|
settleId = baseId;
|
|
@@ -2725,7 +2725,7 @@ class bitget extends bitget$1["default"] {
|
|
|
2725
2725
|
// },
|
|
2726
2726
|
// ...
|
|
2727
2727
|
//
|
|
2728
|
-
const data = this.
|
|
2728
|
+
const data = this.safeList(response, 'data', []);
|
|
2729
2729
|
return this.parseCurrencies(data);
|
|
2730
2730
|
}
|
|
2731
2731
|
parseCurrency(rawCurrency) {
|
|
@@ -2941,7 +2941,7 @@ class bitget extends bitget$1["default"] {
|
|
|
2941
2941
|
// ]
|
|
2942
2942
|
// }
|
|
2943
2943
|
//
|
|
2944
|
-
const result = this.
|
|
2944
|
+
const result = this.safeList(response, 'data', []);
|
|
2945
2945
|
return this.parseMarketLeverageTiers(result, market);
|
|
2946
2946
|
}
|
|
2947
2947
|
parseMarketLeverageTiers(info, market = undefined) {
|
|
@@ -3126,6 +3126,24 @@ class bitget extends bitget$1["default"] {
|
|
|
3126
3126
|
const rawTransactions = this.safeList(response, 'data', []);
|
|
3127
3127
|
return this.parseTransactions(rawTransactions, undefined, since, limit);
|
|
3128
3128
|
}
|
|
3129
|
+
/**
|
|
3130
|
+
* @method
|
|
3131
|
+
* @name bitget#fetchDeposit
|
|
3132
|
+
* @description fetch data on a currency deposit via the deposit id, looks back 30 days for uta accounts and 90 days otherwise
|
|
3133
|
+
* @see https://www.bitget.com/docs/catalog/account/deposit-withdrawal#get-deposit-records
|
|
3134
|
+
* @param {string} id deposit id
|
|
3135
|
+
* @param {string} [code] unified currency code
|
|
3136
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3137
|
+
* @param {boolean} [params.uta] set to true for the unified trading account (uta), defaults to false
|
|
3138
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/?id=transaction-structure}
|
|
3139
|
+
*/
|
|
3140
|
+
async fetchDeposit(id, code = undefined, params = {}) {
|
|
3141
|
+
const request = {
|
|
3142
|
+
'orderId': id,
|
|
3143
|
+
};
|
|
3144
|
+
const deposits = await this.fetchDeposits(code, undefined, undefined, this.extend(request, params));
|
|
3145
|
+
return this.safeDict(deposits, 0, {});
|
|
3146
|
+
}
|
|
3129
3147
|
/**
|
|
3130
3148
|
* @method
|
|
3131
3149
|
* @name bitget#withdraw
|
|
@@ -3183,10 +3201,10 @@ class bitget extends bitget$1["default"] {
|
|
|
3183
3201
|
// }
|
|
3184
3202
|
// }
|
|
3185
3203
|
//
|
|
3186
|
-
const data = this.
|
|
3204
|
+
const data = this.safeDict(response, 'data', {});
|
|
3187
3205
|
const result = this.parseTransaction(data, currency);
|
|
3188
3206
|
result['type'] = 'withdrawal';
|
|
3189
|
-
const withdrawOptions = this.
|
|
3207
|
+
const withdrawOptions = this.safeDict(this.options, 'withdraw', {});
|
|
3190
3208
|
const fillResponseFromRequest = this.safeBool(withdrawOptions, 'fillResponseFromRequest', true);
|
|
3191
3209
|
if (fillResponseFromRequest === true) {
|
|
3192
3210
|
result['currency'] = code;
|
|
@@ -3314,6 +3332,24 @@ class bitget extends bitget$1["default"] {
|
|
|
3314
3332
|
const rawTransactions = this.safeList(response, 'data', []);
|
|
3315
3333
|
return this.parseTransactions(rawTransactions, currency, since, limit);
|
|
3316
3334
|
}
|
|
3335
|
+
/**
|
|
3336
|
+
* @method
|
|
3337
|
+
* @name bitget#fetchWithdrawal
|
|
3338
|
+
* @description fetch data on a currency withdrawal via the withdrawal id, looks back 30 days for uta accounts and 90 days otherwise
|
|
3339
|
+
* @see https://www.bitget.com/docs/catalog/account/deposit-withdrawal#get-withdrawal-records
|
|
3340
|
+
* @param {string} id withdrawal id
|
|
3341
|
+
* @param {string} [code] unified currency code
|
|
3342
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3343
|
+
* @param {boolean} [params.uta] set to true for the unified trading account (uta), defaults to false
|
|
3344
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/?id=transaction-structure}
|
|
3345
|
+
*/
|
|
3346
|
+
async fetchWithdrawal(id, code = undefined, params = {}) {
|
|
3347
|
+
const request = {
|
|
3348
|
+
'orderId': id,
|
|
3349
|
+
};
|
|
3350
|
+
const withdrawals = await this.fetchWithdrawals(code, undefined, undefined, this.extend(request, params));
|
|
3351
|
+
return this.safeDict(withdrawals, 0, {});
|
|
3352
|
+
}
|
|
3317
3353
|
parseTransaction(transaction, currency = undefined) {
|
|
3318
3354
|
//
|
|
3319
3355
|
// fetchDeposits
|
|
@@ -3356,7 +3392,7 @@ class bitget extends bitget$1["default"] {
|
|
|
3356
3392
|
// fetchDeposits & fetchWithdrawals uta rows use the same fields, except
|
|
3357
3393
|
//
|
|
3358
3394
|
// {
|
|
3359
|
-
// "recordId": "
|
|
3395
|
+
// "recordId": "0999e9fc8dfa7d65e5a9e3d7b9c9c9cf7c283621442dd0be6feb502b89545e95",
|
|
3360
3396
|
// "createdTime": "1787913850359",
|
|
3361
3397
|
// "updatedTime": "1787913880178"
|
|
3362
3398
|
// }
|
|
@@ -3567,7 +3603,7 @@ class bitget extends bitget$1["default"] {
|
|
|
3567
3603
|
// }
|
|
3568
3604
|
// }
|
|
3569
3605
|
//
|
|
3570
|
-
const data = this.
|
|
3606
|
+
const data = this.safeDict(response, 'data', {});
|
|
3571
3607
|
const bidsKey = (uta === true) ? 'b' : 'bids';
|
|
3572
3608
|
const asksKey = (uta === true) ? 'a' : 'asks';
|
|
3573
3609
|
const timestamp = this.safeInteger(data, 'ts');
|
|
@@ -3928,7 +3964,7 @@ class bitget extends bitget$1["default"] {
|
|
|
3928
3964
|
}
|
|
3929
3965
|
let market = undefined;
|
|
3930
3966
|
if (symbols !== undefined) {
|
|
3931
|
-
const symbol = this.
|
|
3967
|
+
const symbol = this.safeString(symbols, 0);
|
|
3932
3968
|
market = this.market(symbol);
|
|
3933
3969
|
}
|
|
3934
3970
|
let response = undefined;
|
|
@@ -4278,7 +4314,7 @@ class bitget extends bitget$1["default"] {
|
|
|
4278
4314
|
request['limit'] = limit;
|
|
4279
4315
|
}
|
|
4280
4316
|
}
|
|
4281
|
-
const options = this.
|
|
4317
|
+
const options = this.safeDict(this.options, 'fetchTrades', {});
|
|
4282
4318
|
let response = undefined;
|
|
4283
4319
|
let productType = undefined;
|
|
4284
4320
|
[productType, params] = this.handleProductTypeAndParams(market, params);
|
|
@@ -4294,7 +4330,7 @@ class bitget extends bitget$1["default"] {
|
|
|
4294
4330
|
response = await this.publicUtaGetV3MarketFills(this.extend(request, params));
|
|
4295
4331
|
}
|
|
4296
4332
|
else if (market['spot'] === true) {
|
|
4297
|
-
const spotOptions = this.
|
|
4333
|
+
const spotOptions = this.safeDict(options, 'spot', {});
|
|
4298
4334
|
const defaultSpotMethod = this.safeString(spotOptions, 'method', 'publicSpotGetV2SpotMarketFillsHistory');
|
|
4299
4335
|
const spotMethod = this.safeString(params, 'method', defaultSpotMethod);
|
|
4300
4336
|
params = this.omit(params, 'method');
|
|
@@ -4310,7 +4346,7 @@ class bitget extends bitget$1["default"] {
|
|
|
4310
4346
|
}
|
|
4311
4347
|
}
|
|
4312
4348
|
else {
|
|
4313
|
-
const swapOptions = this.
|
|
4349
|
+
const swapOptions = this.safeDict(options, 'swap', {});
|
|
4314
4350
|
const defaultSwapMethod = this.safeString(swapOptions, 'method', 'publicMixGetV2MixMarketFillsHistory');
|
|
4315
4351
|
const swapMethod = this.safeString(params, 'method', defaultSwapMethod);
|
|
4316
4352
|
params = this.omit(params, 'method');
|
|
@@ -4449,7 +4485,7 @@ class bitget extends bitget$1["default"] {
|
|
|
4449
4485
|
// }
|
|
4450
4486
|
// }
|
|
4451
4487
|
//
|
|
4452
|
-
const data = this.
|
|
4488
|
+
const data = this.safeDict(response, 'data', {});
|
|
4453
4489
|
return this.parseTradingFee(data, market);
|
|
4454
4490
|
}
|
|
4455
4491
|
/**
|
|
@@ -5066,7 +5102,7 @@ class bitget extends bitget$1["default"] {
|
|
|
5066
5102
|
// ]
|
|
5067
5103
|
// }
|
|
5068
5104
|
//
|
|
5069
|
-
const data = this.
|
|
5105
|
+
const data = this.safeList(response, 'data', []);
|
|
5070
5106
|
return this.parseBalance(data);
|
|
5071
5107
|
}
|
|
5072
5108
|
parseUtaBalance(balance) {
|
|
@@ -5635,9 +5671,9 @@ class bitget extends bitget$1["default"] {
|
|
|
5635
5671
|
const market = this.market(symbol);
|
|
5636
5672
|
const marginParams = this.handleMarginModeAndParams('createOrder', params);
|
|
5637
5673
|
const marginMode = marginParams[0];
|
|
5638
|
-
const triggerPrice = this.
|
|
5639
|
-
const stopLossTriggerPrice = this.
|
|
5640
|
-
const takeProfitTriggerPrice = this.
|
|
5674
|
+
const triggerPrice = this.safeNumber2(params, 'stopPrice', 'triggerPrice');
|
|
5675
|
+
const stopLossTriggerPrice = this.safeNumber(params, 'stopLossPrice');
|
|
5676
|
+
const takeProfitTriggerPrice = this.safeNumber(params, 'takeProfitPrice');
|
|
5641
5677
|
const trailingPercent = this.safeString2(params, 'trailingPercent', 'callbackRatio');
|
|
5642
5678
|
const isTrailingPercentOrder = trailingPercent !== undefined;
|
|
5643
5679
|
const isTriggerOrder = triggerPrice !== undefined;
|
|
@@ -5728,8 +5764,8 @@ class bitget extends bitget$1["default"] {
|
|
|
5728
5764
|
}
|
|
5729
5765
|
const stopLossTriggerPrice = this.safeNumber(params, 'stopLossPrice');
|
|
5730
5766
|
const takeProfitTriggerPrice = this.safeNumber(params, 'takeProfitPrice');
|
|
5731
|
-
const stopLoss = this.
|
|
5732
|
-
const takeProfit = this.
|
|
5767
|
+
const stopLoss = this.safeDict(params, 'stopLoss');
|
|
5768
|
+
const takeProfit = this.safeDict(params, 'takeProfit');
|
|
5733
5769
|
const hasStopLoss = stopLoss !== undefined;
|
|
5734
5770
|
const hasTakeProfit = takeProfit !== undefined;
|
|
5735
5771
|
const isStopLossTrigger = stopLossTriggerPrice !== undefined;
|
|
@@ -5859,11 +5895,11 @@ class bitget extends bitget$1["default"] {
|
|
|
5859
5895
|
hedged = !oneWayMode;
|
|
5860
5896
|
}
|
|
5861
5897
|
const isMarketOrder = type === 'market';
|
|
5862
|
-
const triggerPrice = this.
|
|
5863
|
-
const stopLossTriggerPrice = this.
|
|
5864
|
-
const takeProfitTriggerPrice = this.
|
|
5865
|
-
const stopLoss = this.
|
|
5866
|
-
const takeProfit = this.
|
|
5898
|
+
const triggerPrice = this.safeNumber2(params, 'stopPrice', 'triggerPrice');
|
|
5899
|
+
const stopLossTriggerPrice = this.safeNumber(params, 'stopLossPrice');
|
|
5900
|
+
const takeProfitTriggerPrice = this.safeNumber(params, 'takeProfitPrice');
|
|
5901
|
+
const stopLoss = this.safeDict(params, 'stopLoss');
|
|
5902
|
+
const takeProfit = this.safeDict(params, 'takeProfit');
|
|
5867
5903
|
const isTriggerOrder = triggerPrice !== undefined;
|
|
5868
5904
|
const isStopLossTriggerOrder = stopLossTriggerPrice !== undefined;
|
|
5869
5905
|
const isTakeProfitTriggerOrder = takeProfitTriggerPrice !== undefined;
|
|
@@ -5981,12 +6017,12 @@ class bitget extends bitget$1["default"] {
|
|
|
5981
6017
|
}
|
|
5982
6018
|
else {
|
|
5983
6019
|
if (hasStopLoss) {
|
|
5984
|
-
const slTriggerPrice = this.
|
|
6020
|
+
const slTriggerPrice = this.safeNumber2(stopLoss, 'triggerPrice', 'stopPrice');
|
|
5985
6021
|
if (slTriggerPrice === undefined) {
|
|
5986
6022
|
throw new errors.ArgumentsRequired(this.id + ' createOrder() requires a triggerPrice or a stopPrice inside the stopLoss parameter');
|
|
5987
6023
|
}
|
|
5988
6024
|
request['presetStopLossPrice'] = this.priceToPrecision(symbol, slTriggerPrice);
|
|
5989
|
-
const slLimitPrice = this.
|
|
6025
|
+
const slLimitPrice = this.safeNumber(stopLoss, 'price');
|
|
5990
6026
|
if (slLimitPrice !== undefined) {
|
|
5991
6027
|
// without the execute price the exchange fills the attached stop loss
|
|
5992
6028
|
// at the market price, see https://github.com/ccxt/ccxt/issues/23459
|
|
@@ -5994,12 +6030,12 @@ class bitget extends bitget$1["default"] {
|
|
|
5994
6030
|
}
|
|
5995
6031
|
}
|
|
5996
6032
|
if (hasTakeProfit) {
|
|
5997
|
-
const tpTriggerPrice = this.
|
|
6033
|
+
const tpTriggerPrice = this.safeNumber2(takeProfit, 'triggerPrice', 'stopPrice');
|
|
5998
6034
|
if (tpTriggerPrice === undefined) {
|
|
5999
6035
|
throw new errors.ArgumentsRequired(this.id + ' createOrder() requires a triggerPrice or a stopPrice inside the takeProfit parameter');
|
|
6000
6036
|
}
|
|
6001
6037
|
request['presetStopSurplusPrice'] = this.priceToPrecision(symbol, tpTriggerPrice);
|
|
6002
|
-
const tpLimitPrice = this.
|
|
6038
|
+
const tpLimitPrice = this.safeNumber(takeProfit, 'price');
|
|
6003
6039
|
if (tpLimitPrice !== undefined) {
|
|
6004
6040
|
request['presetStopSurplusExecutePrice'] = this.priceToPrecision(symbol, tpLimitPrice);
|
|
6005
6041
|
}
|
|
@@ -6116,9 +6152,9 @@ class bitget extends bitget$1["default"] {
|
|
|
6116
6152
|
}
|
|
6117
6153
|
const type = this.safeString(rawOrder, 'type');
|
|
6118
6154
|
const side = this.safeString(rawOrder, 'side');
|
|
6119
|
-
const amount = this.
|
|
6120
|
-
const price = this.
|
|
6121
|
-
const orderParams = this.
|
|
6155
|
+
const amount = this.safeNumber(rawOrder, 'amount');
|
|
6156
|
+
const price = this.safeNumber(rawOrder, 'price');
|
|
6157
|
+
const orderParams = this.safeDict(rawOrder, 'params', {});
|
|
6122
6158
|
const marginResult = this.handleMarginModeAndParams('createOrders', orderParams);
|
|
6123
6159
|
const currentMarginMode = marginResult[0];
|
|
6124
6160
|
if (currentMarginMode !== undefined) {
|
|
@@ -6191,9 +6227,9 @@ class bitget extends bitget$1["default"] {
|
|
|
6191
6227
|
}
|
|
6192
6228
|
const type = this.safeString(rawOrder, 'type');
|
|
6193
6229
|
const side = this.safeString(rawOrder, 'side');
|
|
6194
|
-
const amount = this.
|
|
6195
|
-
const price = this.
|
|
6196
|
-
const orderParams = this.
|
|
6230
|
+
const amount = this.safeNumber(rawOrder, 'amount');
|
|
6231
|
+
const price = this.safeNumber(rawOrder, 'price');
|
|
6232
|
+
const orderParams = this.safeDict(rawOrder, 'params', {});
|
|
6197
6233
|
const marginResult = this.handleMarginModeAndParams('createOrders', orderParams);
|
|
6198
6234
|
const currentMarginMode = marginResult[0];
|
|
6199
6235
|
if (currentMarginMode !== undefined) {
|
|
@@ -6259,9 +6295,9 @@ class bitget extends bitget$1["default"] {
|
|
|
6259
6295
|
// }
|
|
6260
6296
|
// }
|
|
6261
6297
|
//
|
|
6262
|
-
const data = this.
|
|
6263
|
-
const failure = this.
|
|
6264
|
-
const orderInfo = this.
|
|
6298
|
+
const data = this.safeDict(response, 'data', {});
|
|
6299
|
+
const failure = this.safeList(data, 'failureList', []);
|
|
6300
|
+
const orderInfo = this.safeList(data, 'successList', []);
|
|
6265
6301
|
const both = this.arrayConcat(orderInfo, failure);
|
|
6266
6302
|
return this.parseOrders(both, market);
|
|
6267
6303
|
}
|
|
@@ -6317,14 +6353,14 @@ class bitget extends bitget$1["default"] {
|
|
|
6317
6353
|
request['orderId'] = id;
|
|
6318
6354
|
}
|
|
6319
6355
|
const isMarketOrder = type === 'market';
|
|
6320
|
-
const triggerPrice = this.
|
|
6356
|
+
const triggerPrice = this.safeNumber2(params, 'stopPrice', 'triggerPrice');
|
|
6321
6357
|
const isTriggerOrder = triggerPrice !== undefined;
|
|
6322
|
-
const stopLossPrice = this.
|
|
6358
|
+
const stopLossPrice = this.safeNumber(params, 'stopLossPrice');
|
|
6323
6359
|
const isStopLossOrder = stopLossPrice !== undefined;
|
|
6324
|
-
const takeProfitPrice = this.
|
|
6360
|
+
const takeProfitPrice = this.safeNumber(params, 'takeProfitPrice');
|
|
6325
6361
|
const isTakeProfitOrder = takeProfitPrice !== undefined;
|
|
6326
|
-
const stopLoss = this.
|
|
6327
|
-
const takeProfit = this.
|
|
6362
|
+
const stopLoss = this.safeDict(params, 'stopLoss');
|
|
6363
|
+
const takeProfit = this.safeDict(params, 'takeProfit');
|
|
6328
6364
|
const hasStopLoss = stopLoss !== undefined;
|
|
6329
6365
|
const hasTakeProfit = takeProfit !== undefined;
|
|
6330
6366
|
const trailingTriggerPrice = this.safeString(params, 'trailingTriggerPrice', this.numberToString(price));
|
|
@@ -6486,11 +6522,11 @@ class bitget extends bitget$1["default"] {
|
|
|
6486
6522
|
params = this.omit(params, 'newClientOrderId');
|
|
6487
6523
|
request['newClientOid'] = newClientOrderId;
|
|
6488
6524
|
if (hasStopLoss) {
|
|
6489
|
-
const slTriggerPrice = this.
|
|
6525
|
+
const slTriggerPrice = this.safeNumber2(stopLoss, 'triggerPrice', 'stopPrice');
|
|
6490
6526
|
request['newPresetStopLossPrice'] = this.priceToPrecision(symbol, slTriggerPrice);
|
|
6491
6527
|
}
|
|
6492
6528
|
if (hasTakeProfit) {
|
|
6493
|
-
const tpTriggerPrice = this.
|
|
6529
|
+
const tpTriggerPrice = this.safeNumber2(takeProfit, 'triggerPrice', 'stopPrice');
|
|
6494
6530
|
request['newPresetStopSurplusPrice'] = this.priceToPrecision(symbol, tpTriggerPrice);
|
|
6495
6531
|
}
|
|
6496
6532
|
response = await this.privateMixPostV2MixOrderModifyOrder(this.extend(request, params));
|
|
@@ -6545,8 +6581,8 @@ class bitget extends bitget$1["default"] {
|
|
|
6545
6581
|
let response = {};
|
|
6546
6582
|
[marginMode, params] = this.handleMarginModeAndParams('cancelOrder', params);
|
|
6547
6583
|
const request = {};
|
|
6548
|
-
const trailing = this.
|
|
6549
|
-
const trigger = this.
|
|
6584
|
+
const trailing = this.safeBool(params, 'trailing');
|
|
6585
|
+
const trigger = this.safeBool2(params, 'stop', 'trigger');
|
|
6550
6586
|
params = this.omit(params, ['stop', 'trigger', 'trailing']);
|
|
6551
6587
|
if (!((market['spot'] === true) && (trigger === true))) {
|
|
6552
6588
|
request['symbol'] = market['id'];
|
|
@@ -6674,10 +6710,10 @@ class bitget extends bitget$1["default"] {
|
|
|
6674
6710
|
// "data": null
|
|
6675
6711
|
// }
|
|
6676
6712
|
//
|
|
6677
|
-
const data = this.
|
|
6713
|
+
const data = this.safeDict(response, 'data', {});
|
|
6678
6714
|
let order = {};
|
|
6679
6715
|
if (isContractTriggerEndpoint) {
|
|
6680
|
-
const orderInfo = this.
|
|
6716
|
+
const orderInfo = this.safeList(data, 'successList', []);
|
|
6681
6717
|
order = this.safeDict(orderInfo, 0, {});
|
|
6682
6718
|
}
|
|
6683
6719
|
else {
|
|
@@ -6760,7 +6796,7 @@ class bitget extends bitget$1["default"] {
|
|
|
6760
6796
|
}
|
|
6761
6797
|
let marginMode = undefined;
|
|
6762
6798
|
[marginMode, params] = this.handleMarginModeAndParams('cancelOrders', params);
|
|
6763
|
-
const trigger = this.
|
|
6799
|
+
const trigger = this.safeBool2(params, 'stop', 'trigger');
|
|
6764
6800
|
params = this.omit(params, ['stop', 'trigger']);
|
|
6765
6801
|
const orderIdList = [];
|
|
6766
6802
|
for (let i = 0; i < ids.length; i++) {
|
|
@@ -6820,7 +6856,7 @@ class bitget extends bitget$1["default"] {
|
|
|
6820
6856
|
// }
|
|
6821
6857
|
// }
|
|
6822
6858
|
//
|
|
6823
|
-
const data = this.
|
|
6859
|
+
const data = this.safeDict(response, 'data', {});
|
|
6824
6860
|
const orders = this.safeList(data, 'successList', []);
|
|
6825
6861
|
return this.parseOrders(orders, market);
|
|
6826
6862
|
}
|
|
@@ -7923,14 +7959,14 @@ class bitget extends bitget$1["default"] {
|
|
|
7923
7959
|
// }
|
|
7924
7960
|
// }
|
|
7925
7961
|
//
|
|
7926
|
-
const data = this.
|
|
7962
|
+
const data = this.safeDict(response, 'data', {});
|
|
7927
7963
|
if (marketType === 'spot') {
|
|
7928
7964
|
if ((marginMode !== undefined) || (trigger === true)) {
|
|
7929
|
-
return this.parseOrders(this.
|
|
7965
|
+
return this.parseOrders(this.safeList(data, 'orderList'), market, since, limit);
|
|
7930
7966
|
}
|
|
7931
7967
|
}
|
|
7932
7968
|
else {
|
|
7933
|
-
return this.parseOrders(this.
|
|
7969
|
+
return this.parseOrders(this.safeList(data, 'entrustedList'), market, since, limit);
|
|
7934
7970
|
}
|
|
7935
7971
|
if (typeof response === 'string') {
|
|
7936
7972
|
response = JSON.parse(response);
|
|
@@ -8269,7 +8305,7 @@ class bitget extends bitget$1["default"] {
|
|
|
8269
8305
|
//
|
|
8270
8306
|
const data = this.safeValue(response, 'data');
|
|
8271
8307
|
if ((marketType === 'swap') || (marketType === 'future')) {
|
|
8272
|
-
const bills = this.
|
|
8308
|
+
const bills = this.safeList(data, 'bills', []);
|
|
8273
8309
|
return this.parseLedger(bills, currency, since, limit);
|
|
8274
8310
|
}
|
|
8275
8311
|
return this.parseLedger(data, currency, since, limit);
|
|
@@ -9264,7 +9300,7 @@ class bitget extends bitget$1["default"] {
|
|
|
9264
9300
|
}
|
|
9265
9301
|
const side = this.safeString2(position, 'holdSide', 'posSide');
|
|
9266
9302
|
const leverage = this.safeString(position, 'leverage');
|
|
9267
|
-
const contractSizeNumber = this.
|
|
9303
|
+
const contractSizeNumber = this.safeNumber(market, 'contractSize');
|
|
9268
9304
|
const contractSize = this.numberToString(contractSizeNumber);
|
|
9269
9305
|
const baseAmount = this.safeString2(position, 'total', 'openTotalPos');
|
|
9270
9306
|
const entryPrice = this.safeStringN(position, ['openPriceAvg', 'openAvgPrice', 'avgPrice']);
|
|
@@ -9546,7 +9582,7 @@ class bitget extends bitget$1["default"] {
|
|
|
9546
9582
|
}
|
|
9547
9583
|
let market = undefined;
|
|
9548
9584
|
if (symbols !== undefined) {
|
|
9549
|
-
const symbol = this.
|
|
9585
|
+
const symbol = this.safeString(symbols, 0);
|
|
9550
9586
|
market = this.market(symbol);
|
|
9551
9587
|
}
|
|
9552
9588
|
const request = {};
|
|
@@ -9823,7 +9859,7 @@ class bitget extends bitget$1["default"] {
|
|
|
9823
9859
|
// }
|
|
9824
9860
|
//
|
|
9825
9861
|
}
|
|
9826
|
-
const data = this.
|
|
9862
|
+
const data = this.safeDict(response, 'data', {});
|
|
9827
9863
|
let bills = this.safeList2(data, 'bills', 'list', []);
|
|
9828
9864
|
if (uta === true) {
|
|
9829
9865
|
bills = this.filterByArray(bills, 'type', ['CONTRACT_MAIN_SETTLE_FEE_USER_IN', 'CONTRACT_MAIN_SETTLE_FEE_USER_OUT'], false);
|
|
@@ -10355,7 +10391,7 @@ class bitget extends bitget$1["default"] {
|
|
|
10355
10391
|
[type, params] = this.handleMarketTypeAndParams('fetchTransfers', undefined, params);
|
|
10356
10392
|
const fromAccount = this.safeString(params, 'fromAccount', type);
|
|
10357
10393
|
params = this.omit(params, 'fromAccount');
|
|
10358
|
-
const accountsByType = this.
|
|
10394
|
+
const accountsByType = this.safeDict(this.options, 'accountsByType', {});
|
|
10359
10395
|
type = this.safeString(accountsByType, fromAccount);
|
|
10360
10396
|
const currency = this.currency(code);
|
|
10361
10397
|
let request = {
|
|
@@ -10417,7 +10453,7 @@ class bitget extends bitget$1["default"] {
|
|
|
10417
10453
|
let uta = undefined;
|
|
10418
10454
|
[uta, params] = await this.handleUTAAndParams(params, 'transfer', false);
|
|
10419
10455
|
const currency = this.currency(code);
|
|
10420
|
-
const accountsByType = this.
|
|
10456
|
+
const accountsByType = this.safeDict(this.options, 'accountsByType', {});
|
|
10421
10457
|
const fromType = this.safeString(accountsByType, fromAccount);
|
|
10422
10458
|
const toType = this.safeString(accountsByType, toAccount);
|
|
10423
10459
|
const request = {
|
|
@@ -10484,7 +10520,7 @@ class bitget extends bitget$1["default"] {
|
|
|
10484
10520
|
const status = this.safeStringLower(transfer, 'status');
|
|
10485
10521
|
const currencyId = this.safeString(transfer, 'coin');
|
|
10486
10522
|
const fromAccountRaw = this.safeString(transfer, 'fromType');
|
|
10487
|
-
const accountsById = this.
|
|
10523
|
+
const accountsById = this.safeDict(this.options, 'accountsById', {});
|
|
10488
10524
|
const fromAccount = this.safeString(accountsById, fromAccountRaw, fromAccountRaw);
|
|
10489
10525
|
const toAccountRaw = this.safeString(transfer, 'toType');
|
|
10490
10526
|
const toAccount = this.safeString(accountsById, toAccountRaw, toAccountRaw);
|
|
@@ -10639,7 +10675,7 @@ class bitget extends bitget$1["default"] {
|
|
|
10639
10675
|
// }
|
|
10640
10676
|
// }
|
|
10641
10677
|
//
|
|
10642
|
-
const data = this.
|
|
10678
|
+
const data = this.safeDict(response, 'data', {});
|
|
10643
10679
|
return this.parseMarginLoan(data, currency);
|
|
10644
10680
|
}
|
|
10645
10681
|
/**
|
|
@@ -10678,7 +10714,7 @@ class bitget extends bitget$1["default"] {
|
|
|
10678
10714
|
// }
|
|
10679
10715
|
// }
|
|
10680
10716
|
//
|
|
10681
|
-
const data = this.
|
|
10717
|
+
const data = this.safeDict(response, 'data', {});
|
|
10682
10718
|
return this.parseMarginLoan(data, currency, market);
|
|
10683
10719
|
}
|
|
10684
10720
|
/**
|
|
@@ -10718,7 +10754,7 @@ class bitget extends bitget$1["default"] {
|
|
|
10718
10754
|
// }
|
|
10719
10755
|
// }
|
|
10720
10756
|
//
|
|
10721
|
-
const data = this.
|
|
10757
|
+
const data = this.safeDict(response, 'data', {});
|
|
10722
10758
|
return this.parseMarginLoan(data, currency, market);
|
|
10723
10759
|
}
|
|
10724
10760
|
/**
|
|
@@ -10754,7 +10790,7 @@ class bitget extends bitget$1["default"] {
|
|
|
10754
10790
|
// }
|
|
10755
10791
|
// }
|
|
10756
10792
|
//
|
|
10757
|
-
const data = this.
|
|
10793
|
+
const data = this.safeDict(response, 'data', {});
|
|
10758
10794
|
return this.parseMarginLoan(data, currency);
|
|
10759
10795
|
}
|
|
10760
10796
|
parseMarginLoan(info, currency = undefined, market = undefined) {
|
|
@@ -10920,7 +10956,7 @@ class bitget extends bitget$1["default"] {
|
|
|
10920
10956
|
// }
|
|
10921
10957
|
// }
|
|
10922
10958
|
//
|
|
10923
|
-
const data = this.
|
|
10959
|
+
const data = this.safeDict(response, 'data', {});
|
|
10924
10960
|
const liquidations = this.safeList(data, 'resultList', []);
|
|
10925
10961
|
return this.parseLiquidations(liquidations, market, since, limit);
|
|
10926
10962
|
}
|
|
@@ -11032,7 +11068,7 @@ class bitget extends bitget$1["default"] {
|
|
|
11032
11068
|
// }
|
|
11033
11069
|
//
|
|
11034
11070
|
const timestamp = this.safeInteger(response, 'requestTime');
|
|
11035
|
-
const data = this.
|
|
11071
|
+
const data = this.safeList(response, 'data', []);
|
|
11036
11072
|
const first = this.safeDict(data, 0, {});
|
|
11037
11073
|
first['timestamp'] = timestamp;
|
|
11038
11074
|
return this.parseIsolatedBorrowRate(first, market);
|
|
@@ -11156,7 +11192,7 @@ class bitget extends bitget$1["default"] {
|
|
|
11156
11192
|
// ]
|
|
11157
11193
|
// }
|
|
11158
11194
|
//
|
|
11159
|
-
const data = this.
|
|
11195
|
+
const data = this.safeList(response, 'data', []);
|
|
11160
11196
|
result = this.safeDict(data, 0, {});
|
|
11161
11197
|
}
|
|
11162
11198
|
const timestamp = this.safeInteger(response, 'requestTime');
|
|
@@ -11309,8 +11345,8 @@ class bitget extends bitget$1["default"] {
|
|
|
11309
11345
|
// }
|
|
11310
11346
|
// }
|
|
11311
11347
|
//
|
|
11312
|
-
const data = this.
|
|
11313
|
-
const rows = this.
|
|
11348
|
+
const data = this.safeDict(response, 'data', {});
|
|
11349
|
+
const rows = this.safeList(data, 'resultList', []);
|
|
11314
11350
|
const interest = this.parseBorrowInterests(rows, market);
|
|
11315
11351
|
return this.filterByCurrencySinceLimit(interest, code, since, limit);
|
|
11316
11352
|
}
|
|
@@ -11430,7 +11466,7 @@ class bitget extends bitget$1["default"] {
|
|
|
11430
11466
|
// }
|
|
11431
11467
|
//
|
|
11432
11468
|
}
|
|
11433
|
-
const data = this.
|
|
11469
|
+
const data = this.safeDict(response, 'data', {});
|
|
11434
11470
|
const order = this.safeList2(data, 'successList', 'list', []);
|
|
11435
11471
|
return this.parseOrder(order[0], market);
|
|
11436
11472
|
}
|
|
@@ -11495,7 +11531,7 @@ class bitget extends bitget$1["default"] {
|
|
|
11495
11531
|
// }
|
|
11496
11532
|
//
|
|
11497
11533
|
}
|
|
11498
|
-
const data = this.
|
|
11534
|
+
const data = this.safeDict(response, 'data', {});
|
|
11499
11535
|
const orderInfo = this.safeList2(data, 'successList', 'list', []);
|
|
11500
11536
|
return this.parsePositions(orderInfo, undefined, params);
|
|
11501
11537
|
}
|
package/dist/cjs/src/bitmex.js
CHANGED
|
@@ -554,7 +554,7 @@ class bitmex extends bitmex$1["default"] {
|
|
|
554
554
|
};
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
|
-
const currencyEnabled = this.
|
|
557
|
+
const currencyEnabled = this.safeBool(currency, 'enabled');
|
|
558
558
|
const currencyActive = (currencyEnabled === true) || (depositEnabled || withdrawEnabled);
|
|
559
559
|
const minWithdrawalString = this.safeString(currency, 'minWithdrawalAmount');
|
|
560
560
|
const minWithdrawal = this.parseNumber(Precise["default"].stringMul(minWithdrawalString, precisionString));
|
|
@@ -612,14 +612,14 @@ class bitmex extends bitmex$1["default"] {
|
|
|
612
612
|
amountToPrecision(symbol, amount) {
|
|
613
613
|
symbol = this.safeSymbol(symbol);
|
|
614
614
|
const market = this.market(symbol);
|
|
615
|
-
const oldPrecision = this.
|
|
615
|
+
const oldPrecision = this.safeBool(this.options, 'oldPrecision');
|
|
616
616
|
if ((market['spot'] === true) && (oldPrecision !== true)) {
|
|
617
617
|
amount = this.convertFromRealAmount(market['base'], amount);
|
|
618
618
|
}
|
|
619
619
|
return super.amountToPrecision(symbol, amount);
|
|
620
620
|
}
|
|
621
621
|
convertFromRawQuantity(symbol, rawQuantity, currencySide = 'base') {
|
|
622
|
-
if (this.
|
|
622
|
+
if (this.safeBool(this.options, 'oldPrecision') === true) {
|
|
623
623
|
return this.parseNumber(rawQuantity);
|
|
624
624
|
}
|
|
625
625
|
symbol = this.safeSymbol(symbol);
|
|
@@ -1655,7 +1655,7 @@ class bitmex extends bitmex$1["default"] {
|
|
|
1655
1655
|
'symbol': market['id'],
|
|
1656
1656
|
};
|
|
1657
1657
|
const response = await this.publicGetInstrument(this.extend(request, params));
|
|
1658
|
-
const ticker = this.
|
|
1658
|
+
const ticker = this.safeDict(response, 0);
|
|
1659
1659
|
if (ticker === undefined) {
|
|
1660
1660
|
throw new errors.BadSymbol(this.id + ' fetchTicker() symbol ' + symbol + ' not found');
|
|
1661
1661
|
}
|
|
@@ -2336,7 +2336,7 @@ class bitmex extends bitmex$1["default"] {
|
|
|
2336
2336
|
params = this.omit(params, ['clOrdID', 'clientOrderId']);
|
|
2337
2337
|
}
|
|
2338
2338
|
const response = await this.privateDeleteOrder(this.extend(request, params));
|
|
2339
|
-
const order = this.
|
|
2339
|
+
const order = this.safeDict(response, 0, {});
|
|
2340
2340
|
const error = this.safeString(order, 'error');
|
|
2341
2341
|
if (error !== undefined) {
|
|
2342
2342
|
if (error.indexOf('Unable to cancel order due to existing state') >= 0) {
|
|
@@ -2701,7 +2701,7 @@ class bitmex extends bitmex$1["default"] {
|
|
|
2701
2701
|
market = this.safeMarket(this.safeString(position, 'symbol'), market);
|
|
2702
2702
|
const symbol = market['symbol'];
|
|
2703
2703
|
const datetime = this.safeString(position, 'timestamp');
|
|
2704
|
-
const crossMargin = this.
|
|
2704
|
+
const crossMargin = this.safeBool(position, 'crossMargin');
|
|
2705
2705
|
const marginMode = (crossMargin === true) ? 'cross' : 'isolated';
|
|
2706
2706
|
const notionalString = Precise["default"].stringAbs(this.safeString2(position, 'foreignNotional', 'homeNotional'));
|
|
2707
2707
|
const settleCurrencyCode = this.safeString(market, 'settle');
|
|
@@ -3716,7 +3716,7 @@ class bitmex extends bitmex$1["default"] {
|
|
|
3716
3716
|
throw new errors.DDoSProtection(this.id + ' ' + body);
|
|
3717
3717
|
}
|
|
3718
3718
|
if (code >= 400) {
|
|
3719
|
-
const error = this.
|
|
3719
|
+
const error = this.safeDict(response, 'error', {});
|
|
3720
3720
|
const message = this.safeString(error, 'message');
|
|
3721
3721
|
const feedback = this.id + ' ' + body;
|
|
3722
3722
|
this.throwExactlyMatchedException(this.exceptions['exact'], message, feedback);
|
package/dist/cjs/src/bitopro.js
CHANGED
|
@@ -784,7 +784,7 @@ class bitopro extends bitopro$1["default"] {
|
|
|
784
784
|
}
|
|
785
785
|
const response = await this.publicGetProvisioningLimitationsAndFees(params);
|
|
786
786
|
const tradingFeeRate = this.safeDict(response, 'tradingFeeRate', {});
|
|
787
|
-
const first = this.
|
|
787
|
+
const first = this.safeDict(tradingFeeRate, 0);
|
|
788
788
|
//
|
|
789
789
|
// {
|
|
790
790
|
// "tradingFeeRate":[
|
|
@@ -1167,7 +1167,7 @@ class bitopro extends bitopro$1["default"] {
|
|
|
1167
1167
|
}
|
|
1168
1168
|
if (orderType === 'STOP_LIMIT') {
|
|
1169
1169
|
request['price'] = this.priceToPrecision(symbol, price);
|
|
1170
|
-
const triggerPrice = this.
|
|
1170
|
+
const triggerPrice = this.safeString2(params, 'triggerPrice', 'stopPrice');
|
|
1171
1171
|
params = this.omit(params, ['triggerPrice', 'stopPrice']);
|
|
1172
1172
|
if (triggerPrice === undefined) {
|
|
1173
1173
|
throw new errors.InvalidOrder(this.id + ' createOrder() requires a triggerPrice parameter for ' + orderType + ' orders');
|