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/js/src/bitget.js
CHANGED
|
@@ -74,7 +74,7 @@ export default class bitget extends Exchange {
|
|
|
74
74
|
'fetchCrossBorrowRate': true,
|
|
75
75
|
'fetchCrossBorrowRates': false,
|
|
76
76
|
'fetchCurrencies': true,
|
|
77
|
-
'fetchDeposit':
|
|
77
|
+
'fetchDeposit': true,
|
|
78
78
|
'fetchDepositAddress': true,
|
|
79
79
|
'fetchDepositAddresses': false,
|
|
80
80
|
'fetchDepositAddressesByNetwork': false,
|
|
@@ -132,7 +132,7 @@ export default class bitget extends Exchange {
|
|
|
132
132
|
'fetchTransfer': false,
|
|
133
133
|
'fetchTransfers': true,
|
|
134
134
|
'fetchWithdrawAddresses': false,
|
|
135
|
-
'fetchWithdrawal':
|
|
135
|
+
'fetchWithdrawal': true,
|
|
136
136
|
'fetchWithdrawals': true,
|
|
137
137
|
'reduceMargin': true,
|
|
138
138
|
'repayCrossMargin': true,
|
|
@@ -2126,7 +2126,7 @@ export default class bitget extends Exchange {
|
|
|
2126
2126
|
// }
|
|
2127
2127
|
// }
|
|
2128
2128
|
//
|
|
2129
|
-
const data = this.
|
|
2129
|
+
const data = this.safeDict(response, 'data', {});
|
|
2130
2130
|
return this.safeInteger(data, 'serverTime');
|
|
2131
2131
|
}
|
|
2132
2132
|
/**
|
|
@@ -2285,7 +2285,7 @@ export default class bitget extends Exchange {
|
|
|
2285
2285
|
const baseId = this.safeString(market, 'baseCoin');
|
|
2286
2286
|
const quote = this.safeCurrencyCode(quoteId);
|
|
2287
2287
|
const base = this.safeCurrencyCode(baseId);
|
|
2288
|
-
const supportMarginCoins = this.
|
|
2288
|
+
const supportMarginCoins = this.safeList(market, 'supportMarginCoins', []);
|
|
2289
2289
|
let settleId = undefined;
|
|
2290
2290
|
if (this.inArray(baseId, supportMarginCoins)) {
|
|
2291
2291
|
settleId = baseId;
|
|
@@ -2726,7 +2726,7 @@ export default class bitget extends Exchange {
|
|
|
2726
2726
|
// },
|
|
2727
2727
|
// ...
|
|
2728
2728
|
//
|
|
2729
|
-
const data = this.
|
|
2729
|
+
const data = this.safeList(response, 'data', []);
|
|
2730
2730
|
return this.parseCurrencies(data);
|
|
2731
2731
|
}
|
|
2732
2732
|
parseCurrency(rawCurrency) {
|
|
@@ -2942,7 +2942,7 @@ export default class bitget extends Exchange {
|
|
|
2942
2942
|
// ]
|
|
2943
2943
|
// }
|
|
2944
2944
|
//
|
|
2945
|
-
const result = this.
|
|
2945
|
+
const result = this.safeList(response, 'data', []);
|
|
2946
2946
|
return this.parseMarketLeverageTiers(result, market);
|
|
2947
2947
|
}
|
|
2948
2948
|
parseMarketLeverageTiers(info, market = undefined) {
|
|
@@ -3127,6 +3127,24 @@ export default class bitget extends Exchange {
|
|
|
3127
3127
|
const rawTransactions = this.safeList(response, 'data', []);
|
|
3128
3128
|
return this.parseTransactions(rawTransactions, undefined, since, limit);
|
|
3129
3129
|
}
|
|
3130
|
+
/**
|
|
3131
|
+
* @method
|
|
3132
|
+
* @name bitget#fetchDeposit
|
|
3133
|
+
* @description fetch data on a currency deposit via the deposit id, looks back 30 days for uta accounts and 90 days otherwise
|
|
3134
|
+
* @see https://www.bitget.com/docs/catalog/account/deposit-withdrawal#get-deposit-records
|
|
3135
|
+
* @param {string} id deposit id
|
|
3136
|
+
* @param {string} [code] unified currency code
|
|
3137
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3138
|
+
* @param {boolean} [params.uta] set to true for the unified trading account (uta), defaults to false
|
|
3139
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/?id=transaction-structure}
|
|
3140
|
+
*/
|
|
3141
|
+
async fetchDeposit(id, code = undefined, params = {}) {
|
|
3142
|
+
const request = {
|
|
3143
|
+
'orderId': id,
|
|
3144
|
+
};
|
|
3145
|
+
const deposits = await this.fetchDeposits(code, undefined, undefined, this.extend(request, params));
|
|
3146
|
+
return this.safeDict(deposits, 0, {});
|
|
3147
|
+
}
|
|
3130
3148
|
/**
|
|
3131
3149
|
* @method
|
|
3132
3150
|
* @name bitget#withdraw
|
|
@@ -3184,10 +3202,10 @@ export default class bitget extends Exchange {
|
|
|
3184
3202
|
// }
|
|
3185
3203
|
// }
|
|
3186
3204
|
//
|
|
3187
|
-
const data = this.
|
|
3205
|
+
const data = this.safeDict(response, 'data', {});
|
|
3188
3206
|
const result = this.parseTransaction(data, currency);
|
|
3189
3207
|
result['type'] = 'withdrawal';
|
|
3190
|
-
const withdrawOptions = this.
|
|
3208
|
+
const withdrawOptions = this.safeDict(this.options, 'withdraw', {});
|
|
3191
3209
|
const fillResponseFromRequest = this.safeBool(withdrawOptions, 'fillResponseFromRequest', true);
|
|
3192
3210
|
if (fillResponseFromRequest === true) {
|
|
3193
3211
|
result['currency'] = code;
|
|
@@ -3315,6 +3333,24 @@ export default class bitget extends Exchange {
|
|
|
3315
3333
|
const rawTransactions = this.safeList(response, 'data', []);
|
|
3316
3334
|
return this.parseTransactions(rawTransactions, currency, since, limit);
|
|
3317
3335
|
}
|
|
3336
|
+
/**
|
|
3337
|
+
* @method
|
|
3338
|
+
* @name bitget#fetchWithdrawal
|
|
3339
|
+
* @description fetch data on a currency withdrawal via the withdrawal id, looks back 30 days for uta accounts and 90 days otherwise
|
|
3340
|
+
* @see https://www.bitget.com/docs/catalog/account/deposit-withdrawal#get-withdrawal-records
|
|
3341
|
+
* @param {string} id withdrawal id
|
|
3342
|
+
* @param {string} [code] unified currency code
|
|
3343
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3344
|
+
* @param {boolean} [params.uta] set to true for the unified trading account (uta), defaults to false
|
|
3345
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/?id=transaction-structure}
|
|
3346
|
+
*/
|
|
3347
|
+
async fetchWithdrawal(id, code = undefined, params = {}) {
|
|
3348
|
+
const request = {
|
|
3349
|
+
'orderId': id,
|
|
3350
|
+
};
|
|
3351
|
+
const withdrawals = await this.fetchWithdrawals(code, undefined, undefined, this.extend(request, params));
|
|
3352
|
+
return this.safeDict(withdrawals, 0, {});
|
|
3353
|
+
}
|
|
3318
3354
|
parseTransaction(transaction, currency = undefined) {
|
|
3319
3355
|
//
|
|
3320
3356
|
// fetchDeposits
|
|
@@ -3357,7 +3393,7 @@ export default class bitget extends Exchange {
|
|
|
3357
3393
|
// fetchDeposits & fetchWithdrawals uta rows use the same fields, except
|
|
3358
3394
|
//
|
|
3359
3395
|
// {
|
|
3360
|
-
// "recordId": "
|
|
3396
|
+
// "recordId": "0999e9fc8dfa7d65e5a9e3d7b9c9c9cf7c283621442dd0be6feb502b89545e95",
|
|
3361
3397
|
// "createdTime": "1787913850359",
|
|
3362
3398
|
// "updatedTime": "1787913880178"
|
|
3363
3399
|
// }
|
|
@@ -3568,7 +3604,7 @@ export default class bitget extends Exchange {
|
|
|
3568
3604
|
// }
|
|
3569
3605
|
// }
|
|
3570
3606
|
//
|
|
3571
|
-
const data = this.
|
|
3607
|
+
const data = this.safeDict(response, 'data', {});
|
|
3572
3608
|
const bidsKey = (uta === true) ? 'b' : 'bids';
|
|
3573
3609
|
const asksKey = (uta === true) ? 'a' : 'asks';
|
|
3574
3610
|
const timestamp = this.safeInteger(data, 'ts');
|
|
@@ -3929,7 +3965,7 @@ export default class bitget extends Exchange {
|
|
|
3929
3965
|
}
|
|
3930
3966
|
let market = undefined;
|
|
3931
3967
|
if (symbols !== undefined) {
|
|
3932
|
-
const symbol = this.
|
|
3968
|
+
const symbol = this.safeString(symbols, 0);
|
|
3933
3969
|
market = this.market(symbol);
|
|
3934
3970
|
}
|
|
3935
3971
|
let response = undefined;
|
|
@@ -4279,7 +4315,7 @@ export default class bitget extends Exchange {
|
|
|
4279
4315
|
request['limit'] = limit;
|
|
4280
4316
|
}
|
|
4281
4317
|
}
|
|
4282
|
-
const options = this.
|
|
4318
|
+
const options = this.safeDict(this.options, 'fetchTrades', {});
|
|
4283
4319
|
let response = undefined;
|
|
4284
4320
|
let productType = undefined;
|
|
4285
4321
|
[productType, params] = this.handleProductTypeAndParams(market, params);
|
|
@@ -4295,7 +4331,7 @@ export default class bitget extends Exchange {
|
|
|
4295
4331
|
response = await this.publicUtaGetV3MarketFills(this.extend(request, params));
|
|
4296
4332
|
}
|
|
4297
4333
|
else if (market['spot'] === true) {
|
|
4298
|
-
const spotOptions = this.
|
|
4334
|
+
const spotOptions = this.safeDict(options, 'spot', {});
|
|
4299
4335
|
const defaultSpotMethod = this.safeString(spotOptions, 'method', 'publicSpotGetV2SpotMarketFillsHistory');
|
|
4300
4336
|
const spotMethod = this.safeString(params, 'method', defaultSpotMethod);
|
|
4301
4337
|
params = this.omit(params, 'method');
|
|
@@ -4311,7 +4347,7 @@ export default class bitget extends Exchange {
|
|
|
4311
4347
|
}
|
|
4312
4348
|
}
|
|
4313
4349
|
else {
|
|
4314
|
-
const swapOptions = this.
|
|
4350
|
+
const swapOptions = this.safeDict(options, 'swap', {});
|
|
4315
4351
|
const defaultSwapMethod = this.safeString(swapOptions, 'method', 'publicMixGetV2MixMarketFillsHistory');
|
|
4316
4352
|
const swapMethod = this.safeString(params, 'method', defaultSwapMethod);
|
|
4317
4353
|
params = this.omit(params, 'method');
|
|
@@ -4450,7 +4486,7 @@ export default class bitget extends Exchange {
|
|
|
4450
4486
|
// }
|
|
4451
4487
|
// }
|
|
4452
4488
|
//
|
|
4453
|
-
const data = this.
|
|
4489
|
+
const data = this.safeDict(response, 'data', {});
|
|
4454
4490
|
return this.parseTradingFee(data, market);
|
|
4455
4491
|
}
|
|
4456
4492
|
/**
|
|
@@ -5067,7 +5103,7 @@ export default class bitget extends Exchange {
|
|
|
5067
5103
|
// ]
|
|
5068
5104
|
// }
|
|
5069
5105
|
//
|
|
5070
|
-
const data = this.
|
|
5106
|
+
const data = this.safeList(response, 'data', []);
|
|
5071
5107
|
return this.parseBalance(data);
|
|
5072
5108
|
}
|
|
5073
5109
|
parseUtaBalance(balance) {
|
|
@@ -5636,9 +5672,9 @@ export default class bitget extends Exchange {
|
|
|
5636
5672
|
const market = this.market(symbol);
|
|
5637
5673
|
const marginParams = this.handleMarginModeAndParams('createOrder', params);
|
|
5638
5674
|
const marginMode = marginParams[0];
|
|
5639
|
-
const triggerPrice = this.
|
|
5640
|
-
const stopLossTriggerPrice = this.
|
|
5641
|
-
const takeProfitTriggerPrice = this.
|
|
5675
|
+
const triggerPrice = this.safeNumber2(params, 'stopPrice', 'triggerPrice');
|
|
5676
|
+
const stopLossTriggerPrice = this.safeNumber(params, 'stopLossPrice');
|
|
5677
|
+
const takeProfitTriggerPrice = this.safeNumber(params, 'takeProfitPrice');
|
|
5642
5678
|
const trailingPercent = this.safeString2(params, 'trailingPercent', 'callbackRatio');
|
|
5643
5679
|
const isTrailingPercentOrder = trailingPercent !== undefined;
|
|
5644
5680
|
const isTriggerOrder = triggerPrice !== undefined;
|
|
@@ -5729,8 +5765,8 @@ export default class bitget extends Exchange {
|
|
|
5729
5765
|
}
|
|
5730
5766
|
const stopLossTriggerPrice = this.safeNumber(params, 'stopLossPrice');
|
|
5731
5767
|
const takeProfitTriggerPrice = this.safeNumber(params, 'takeProfitPrice');
|
|
5732
|
-
const stopLoss = this.
|
|
5733
|
-
const takeProfit = this.
|
|
5768
|
+
const stopLoss = this.safeDict(params, 'stopLoss');
|
|
5769
|
+
const takeProfit = this.safeDict(params, 'takeProfit');
|
|
5734
5770
|
const hasStopLoss = stopLoss !== undefined;
|
|
5735
5771
|
const hasTakeProfit = takeProfit !== undefined;
|
|
5736
5772
|
const isStopLossTrigger = stopLossTriggerPrice !== undefined;
|
|
@@ -5860,11 +5896,11 @@ export default class bitget extends Exchange {
|
|
|
5860
5896
|
hedged = !oneWayMode;
|
|
5861
5897
|
}
|
|
5862
5898
|
const isMarketOrder = type === 'market';
|
|
5863
|
-
const triggerPrice = this.
|
|
5864
|
-
const stopLossTriggerPrice = this.
|
|
5865
|
-
const takeProfitTriggerPrice = this.
|
|
5866
|
-
const stopLoss = this.
|
|
5867
|
-
const takeProfit = this.
|
|
5899
|
+
const triggerPrice = this.safeNumber2(params, 'stopPrice', 'triggerPrice');
|
|
5900
|
+
const stopLossTriggerPrice = this.safeNumber(params, 'stopLossPrice');
|
|
5901
|
+
const takeProfitTriggerPrice = this.safeNumber(params, 'takeProfitPrice');
|
|
5902
|
+
const stopLoss = this.safeDict(params, 'stopLoss');
|
|
5903
|
+
const takeProfit = this.safeDict(params, 'takeProfit');
|
|
5868
5904
|
const isTriggerOrder = triggerPrice !== undefined;
|
|
5869
5905
|
const isStopLossTriggerOrder = stopLossTriggerPrice !== undefined;
|
|
5870
5906
|
const isTakeProfitTriggerOrder = takeProfitTriggerPrice !== undefined;
|
|
@@ -5982,12 +6018,12 @@ export default class bitget extends Exchange {
|
|
|
5982
6018
|
}
|
|
5983
6019
|
else {
|
|
5984
6020
|
if (hasStopLoss) {
|
|
5985
|
-
const slTriggerPrice = this.
|
|
6021
|
+
const slTriggerPrice = this.safeNumber2(stopLoss, 'triggerPrice', 'stopPrice');
|
|
5986
6022
|
if (slTriggerPrice === undefined) {
|
|
5987
6023
|
throw new ArgumentsRequired(this.id + ' createOrder() requires a triggerPrice or a stopPrice inside the stopLoss parameter');
|
|
5988
6024
|
}
|
|
5989
6025
|
request['presetStopLossPrice'] = this.priceToPrecision(symbol, slTriggerPrice);
|
|
5990
|
-
const slLimitPrice = this.
|
|
6026
|
+
const slLimitPrice = this.safeNumber(stopLoss, 'price');
|
|
5991
6027
|
if (slLimitPrice !== undefined) {
|
|
5992
6028
|
// without the execute price the exchange fills the attached stop loss
|
|
5993
6029
|
// at the market price, see https://github.com/ccxt/ccxt/issues/23459
|
|
@@ -5995,12 +6031,12 @@ export default class bitget extends Exchange {
|
|
|
5995
6031
|
}
|
|
5996
6032
|
}
|
|
5997
6033
|
if (hasTakeProfit) {
|
|
5998
|
-
const tpTriggerPrice = this.
|
|
6034
|
+
const tpTriggerPrice = this.safeNumber2(takeProfit, 'triggerPrice', 'stopPrice');
|
|
5999
6035
|
if (tpTriggerPrice === undefined) {
|
|
6000
6036
|
throw new ArgumentsRequired(this.id + ' createOrder() requires a triggerPrice or a stopPrice inside the takeProfit parameter');
|
|
6001
6037
|
}
|
|
6002
6038
|
request['presetStopSurplusPrice'] = this.priceToPrecision(symbol, tpTriggerPrice);
|
|
6003
|
-
const tpLimitPrice = this.
|
|
6039
|
+
const tpLimitPrice = this.safeNumber(takeProfit, 'price');
|
|
6004
6040
|
if (tpLimitPrice !== undefined) {
|
|
6005
6041
|
request['presetStopSurplusExecutePrice'] = this.priceToPrecision(symbol, tpLimitPrice);
|
|
6006
6042
|
}
|
|
@@ -6117,9 +6153,9 @@ export default class bitget extends Exchange {
|
|
|
6117
6153
|
}
|
|
6118
6154
|
const type = this.safeString(rawOrder, 'type');
|
|
6119
6155
|
const side = this.safeString(rawOrder, 'side');
|
|
6120
|
-
const amount = this.
|
|
6121
|
-
const price = this.
|
|
6122
|
-
const orderParams = this.
|
|
6156
|
+
const amount = this.safeNumber(rawOrder, 'amount');
|
|
6157
|
+
const price = this.safeNumber(rawOrder, 'price');
|
|
6158
|
+
const orderParams = this.safeDict(rawOrder, 'params', {});
|
|
6123
6159
|
const marginResult = this.handleMarginModeAndParams('createOrders', orderParams);
|
|
6124
6160
|
const currentMarginMode = marginResult[0];
|
|
6125
6161
|
if (currentMarginMode !== undefined) {
|
|
@@ -6192,9 +6228,9 @@ export default class bitget extends Exchange {
|
|
|
6192
6228
|
}
|
|
6193
6229
|
const type = this.safeString(rawOrder, 'type');
|
|
6194
6230
|
const side = this.safeString(rawOrder, 'side');
|
|
6195
|
-
const amount = this.
|
|
6196
|
-
const price = this.
|
|
6197
|
-
const orderParams = this.
|
|
6231
|
+
const amount = this.safeNumber(rawOrder, 'amount');
|
|
6232
|
+
const price = this.safeNumber(rawOrder, 'price');
|
|
6233
|
+
const orderParams = this.safeDict(rawOrder, 'params', {});
|
|
6198
6234
|
const marginResult = this.handleMarginModeAndParams('createOrders', orderParams);
|
|
6199
6235
|
const currentMarginMode = marginResult[0];
|
|
6200
6236
|
if (currentMarginMode !== undefined) {
|
|
@@ -6260,9 +6296,9 @@ export default class bitget extends Exchange {
|
|
|
6260
6296
|
// }
|
|
6261
6297
|
// }
|
|
6262
6298
|
//
|
|
6263
|
-
const data = this.
|
|
6264
|
-
const failure = this.
|
|
6265
|
-
const orderInfo = this.
|
|
6299
|
+
const data = this.safeDict(response, 'data', {});
|
|
6300
|
+
const failure = this.safeList(data, 'failureList', []);
|
|
6301
|
+
const orderInfo = this.safeList(data, 'successList', []);
|
|
6266
6302
|
const both = this.arrayConcat(orderInfo, failure);
|
|
6267
6303
|
return this.parseOrders(both, market);
|
|
6268
6304
|
}
|
|
@@ -6318,14 +6354,14 @@ export default class bitget extends Exchange {
|
|
|
6318
6354
|
request['orderId'] = id;
|
|
6319
6355
|
}
|
|
6320
6356
|
const isMarketOrder = type === 'market';
|
|
6321
|
-
const triggerPrice = this.
|
|
6357
|
+
const triggerPrice = this.safeNumber2(params, 'stopPrice', 'triggerPrice');
|
|
6322
6358
|
const isTriggerOrder = triggerPrice !== undefined;
|
|
6323
|
-
const stopLossPrice = this.
|
|
6359
|
+
const stopLossPrice = this.safeNumber(params, 'stopLossPrice');
|
|
6324
6360
|
const isStopLossOrder = stopLossPrice !== undefined;
|
|
6325
|
-
const takeProfitPrice = this.
|
|
6361
|
+
const takeProfitPrice = this.safeNumber(params, 'takeProfitPrice');
|
|
6326
6362
|
const isTakeProfitOrder = takeProfitPrice !== undefined;
|
|
6327
|
-
const stopLoss = this.
|
|
6328
|
-
const takeProfit = this.
|
|
6363
|
+
const stopLoss = this.safeDict(params, 'stopLoss');
|
|
6364
|
+
const takeProfit = this.safeDict(params, 'takeProfit');
|
|
6329
6365
|
const hasStopLoss = stopLoss !== undefined;
|
|
6330
6366
|
const hasTakeProfit = takeProfit !== undefined;
|
|
6331
6367
|
const trailingTriggerPrice = this.safeString(params, 'trailingTriggerPrice', this.numberToString(price));
|
|
@@ -6487,11 +6523,11 @@ export default class bitget extends Exchange {
|
|
|
6487
6523
|
params = this.omit(params, 'newClientOrderId');
|
|
6488
6524
|
request['newClientOid'] = newClientOrderId;
|
|
6489
6525
|
if (hasStopLoss) {
|
|
6490
|
-
const slTriggerPrice = this.
|
|
6526
|
+
const slTriggerPrice = this.safeNumber2(stopLoss, 'triggerPrice', 'stopPrice');
|
|
6491
6527
|
request['newPresetStopLossPrice'] = this.priceToPrecision(symbol, slTriggerPrice);
|
|
6492
6528
|
}
|
|
6493
6529
|
if (hasTakeProfit) {
|
|
6494
|
-
const tpTriggerPrice = this.
|
|
6530
|
+
const tpTriggerPrice = this.safeNumber2(takeProfit, 'triggerPrice', 'stopPrice');
|
|
6495
6531
|
request['newPresetStopSurplusPrice'] = this.priceToPrecision(symbol, tpTriggerPrice);
|
|
6496
6532
|
}
|
|
6497
6533
|
response = await this.privateMixPostV2MixOrderModifyOrder(this.extend(request, params));
|
|
@@ -6546,8 +6582,8 @@ export default class bitget extends Exchange {
|
|
|
6546
6582
|
let response = {};
|
|
6547
6583
|
[marginMode, params] = this.handleMarginModeAndParams('cancelOrder', params);
|
|
6548
6584
|
const request = {};
|
|
6549
|
-
const trailing = this.
|
|
6550
|
-
const trigger = this.
|
|
6585
|
+
const trailing = this.safeBool(params, 'trailing');
|
|
6586
|
+
const trigger = this.safeBool2(params, 'stop', 'trigger');
|
|
6551
6587
|
params = this.omit(params, ['stop', 'trigger', 'trailing']);
|
|
6552
6588
|
if (!((market['spot'] === true) && (trigger === true))) {
|
|
6553
6589
|
request['symbol'] = market['id'];
|
|
@@ -6675,10 +6711,10 @@ export default class bitget extends Exchange {
|
|
|
6675
6711
|
// "data": null
|
|
6676
6712
|
// }
|
|
6677
6713
|
//
|
|
6678
|
-
const data = this.
|
|
6714
|
+
const data = this.safeDict(response, 'data', {});
|
|
6679
6715
|
let order = {};
|
|
6680
6716
|
if (isContractTriggerEndpoint) {
|
|
6681
|
-
const orderInfo = this.
|
|
6717
|
+
const orderInfo = this.safeList(data, 'successList', []);
|
|
6682
6718
|
order = this.safeDict(orderInfo, 0, {});
|
|
6683
6719
|
}
|
|
6684
6720
|
else {
|
|
@@ -6761,7 +6797,7 @@ export default class bitget extends Exchange {
|
|
|
6761
6797
|
}
|
|
6762
6798
|
let marginMode = undefined;
|
|
6763
6799
|
[marginMode, params] = this.handleMarginModeAndParams('cancelOrders', params);
|
|
6764
|
-
const trigger = this.
|
|
6800
|
+
const trigger = this.safeBool2(params, 'stop', 'trigger');
|
|
6765
6801
|
params = this.omit(params, ['stop', 'trigger']);
|
|
6766
6802
|
const orderIdList = [];
|
|
6767
6803
|
for (let i = 0; i < ids.length; i++) {
|
|
@@ -6821,7 +6857,7 @@ export default class bitget extends Exchange {
|
|
|
6821
6857
|
// }
|
|
6822
6858
|
// }
|
|
6823
6859
|
//
|
|
6824
|
-
const data = this.
|
|
6860
|
+
const data = this.safeDict(response, 'data', {});
|
|
6825
6861
|
const orders = this.safeList(data, 'successList', []);
|
|
6826
6862
|
return this.parseOrders(orders, market);
|
|
6827
6863
|
}
|
|
@@ -7924,14 +7960,14 @@ export default class bitget extends Exchange {
|
|
|
7924
7960
|
// }
|
|
7925
7961
|
// }
|
|
7926
7962
|
//
|
|
7927
|
-
const data = this.
|
|
7963
|
+
const data = this.safeDict(response, 'data', {});
|
|
7928
7964
|
if (marketType === 'spot') {
|
|
7929
7965
|
if ((marginMode !== undefined) || (trigger === true)) {
|
|
7930
|
-
return this.parseOrders(this.
|
|
7966
|
+
return this.parseOrders(this.safeList(data, 'orderList'), market, since, limit);
|
|
7931
7967
|
}
|
|
7932
7968
|
}
|
|
7933
7969
|
else {
|
|
7934
|
-
return this.parseOrders(this.
|
|
7970
|
+
return this.parseOrders(this.safeList(data, 'entrustedList'), market, since, limit);
|
|
7935
7971
|
}
|
|
7936
7972
|
if (typeof response === 'string') {
|
|
7937
7973
|
response = JSON.parse(response);
|
|
@@ -8270,7 +8306,7 @@ export default class bitget extends Exchange {
|
|
|
8270
8306
|
//
|
|
8271
8307
|
const data = this.safeValue(response, 'data');
|
|
8272
8308
|
if ((marketType === 'swap') || (marketType === 'future')) {
|
|
8273
|
-
const bills = this.
|
|
8309
|
+
const bills = this.safeList(data, 'bills', []);
|
|
8274
8310
|
return this.parseLedger(bills, currency, since, limit);
|
|
8275
8311
|
}
|
|
8276
8312
|
return this.parseLedger(data, currency, since, limit);
|
|
@@ -9265,7 +9301,7 @@ export default class bitget extends Exchange {
|
|
|
9265
9301
|
}
|
|
9266
9302
|
const side = this.safeString2(position, 'holdSide', 'posSide');
|
|
9267
9303
|
const leverage = this.safeString(position, 'leverage');
|
|
9268
|
-
const contractSizeNumber = this.
|
|
9304
|
+
const contractSizeNumber = this.safeNumber(market, 'contractSize');
|
|
9269
9305
|
const contractSize = this.numberToString(contractSizeNumber);
|
|
9270
9306
|
const baseAmount = this.safeString2(position, 'total', 'openTotalPos');
|
|
9271
9307
|
const entryPrice = this.safeStringN(position, ['openPriceAvg', 'openAvgPrice', 'avgPrice']);
|
|
@@ -9547,7 +9583,7 @@ export default class bitget extends Exchange {
|
|
|
9547
9583
|
}
|
|
9548
9584
|
let market = undefined;
|
|
9549
9585
|
if (symbols !== undefined) {
|
|
9550
|
-
const symbol = this.
|
|
9586
|
+
const symbol = this.safeString(symbols, 0);
|
|
9551
9587
|
market = this.market(symbol);
|
|
9552
9588
|
}
|
|
9553
9589
|
const request = {};
|
|
@@ -9824,7 +9860,7 @@ export default class bitget extends Exchange {
|
|
|
9824
9860
|
// }
|
|
9825
9861
|
//
|
|
9826
9862
|
}
|
|
9827
|
-
const data = this.
|
|
9863
|
+
const data = this.safeDict(response, 'data', {});
|
|
9828
9864
|
let bills = this.safeList2(data, 'bills', 'list', []);
|
|
9829
9865
|
if (uta === true) {
|
|
9830
9866
|
bills = this.filterByArray(bills, 'type', ['CONTRACT_MAIN_SETTLE_FEE_USER_IN', 'CONTRACT_MAIN_SETTLE_FEE_USER_OUT'], false);
|
|
@@ -10356,7 +10392,7 @@ export default class bitget extends Exchange {
|
|
|
10356
10392
|
[type, params] = this.handleMarketTypeAndParams('fetchTransfers', undefined, params);
|
|
10357
10393
|
const fromAccount = this.safeString(params, 'fromAccount', type);
|
|
10358
10394
|
params = this.omit(params, 'fromAccount');
|
|
10359
|
-
const accountsByType = this.
|
|
10395
|
+
const accountsByType = this.safeDict(this.options, 'accountsByType', {});
|
|
10360
10396
|
type = this.safeString(accountsByType, fromAccount);
|
|
10361
10397
|
const currency = this.currency(code);
|
|
10362
10398
|
let request = {
|
|
@@ -10418,7 +10454,7 @@ export default class bitget extends Exchange {
|
|
|
10418
10454
|
let uta = undefined;
|
|
10419
10455
|
[uta, params] = await this.handleUTAAndParams(params, 'transfer', false);
|
|
10420
10456
|
const currency = this.currency(code);
|
|
10421
|
-
const accountsByType = this.
|
|
10457
|
+
const accountsByType = this.safeDict(this.options, 'accountsByType', {});
|
|
10422
10458
|
const fromType = this.safeString(accountsByType, fromAccount);
|
|
10423
10459
|
const toType = this.safeString(accountsByType, toAccount);
|
|
10424
10460
|
const request = {
|
|
@@ -10485,7 +10521,7 @@ export default class bitget extends Exchange {
|
|
|
10485
10521
|
const status = this.safeStringLower(transfer, 'status');
|
|
10486
10522
|
const currencyId = this.safeString(transfer, 'coin');
|
|
10487
10523
|
const fromAccountRaw = this.safeString(transfer, 'fromType');
|
|
10488
|
-
const accountsById = this.
|
|
10524
|
+
const accountsById = this.safeDict(this.options, 'accountsById', {});
|
|
10489
10525
|
const fromAccount = this.safeString(accountsById, fromAccountRaw, fromAccountRaw);
|
|
10490
10526
|
const toAccountRaw = this.safeString(transfer, 'toType');
|
|
10491
10527
|
const toAccount = this.safeString(accountsById, toAccountRaw, toAccountRaw);
|
|
@@ -10640,7 +10676,7 @@ export default class bitget extends Exchange {
|
|
|
10640
10676
|
// }
|
|
10641
10677
|
// }
|
|
10642
10678
|
//
|
|
10643
|
-
const data = this.
|
|
10679
|
+
const data = this.safeDict(response, 'data', {});
|
|
10644
10680
|
return this.parseMarginLoan(data, currency);
|
|
10645
10681
|
}
|
|
10646
10682
|
/**
|
|
@@ -10679,7 +10715,7 @@ export default class bitget extends Exchange {
|
|
|
10679
10715
|
// }
|
|
10680
10716
|
// }
|
|
10681
10717
|
//
|
|
10682
|
-
const data = this.
|
|
10718
|
+
const data = this.safeDict(response, 'data', {});
|
|
10683
10719
|
return this.parseMarginLoan(data, currency, market);
|
|
10684
10720
|
}
|
|
10685
10721
|
/**
|
|
@@ -10719,7 +10755,7 @@ export default class bitget extends Exchange {
|
|
|
10719
10755
|
// }
|
|
10720
10756
|
// }
|
|
10721
10757
|
//
|
|
10722
|
-
const data = this.
|
|
10758
|
+
const data = this.safeDict(response, 'data', {});
|
|
10723
10759
|
return this.parseMarginLoan(data, currency, market);
|
|
10724
10760
|
}
|
|
10725
10761
|
/**
|
|
@@ -10755,7 +10791,7 @@ export default class bitget extends Exchange {
|
|
|
10755
10791
|
// }
|
|
10756
10792
|
// }
|
|
10757
10793
|
//
|
|
10758
|
-
const data = this.
|
|
10794
|
+
const data = this.safeDict(response, 'data', {});
|
|
10759
10795
|
return this.parseMarginLoan(data, currency);
|
|
10760
10796
|
}
|
|
10761
10797
|
parseMarginLoan(info, currency = undefined, market = undefined) {
|
|
@@ -10921,7 +10957,7 @@ export default class bitget extends Exchange {
|
|
|
10921
10957
|
// }
|
|
10922
10958
|
// }
|
|
10923
10959
|
//
|
|
10924
|
-
const data = this.
|
|
10960
|
+
const data = this.safeDict(response, 'data', {});
|
|
10925
10961
|
const liquidations = this.safeList(data, 'resultList', []);
|
|
10926
10962
|
return this.parseLiquidations(liquidations, market, since, limit);
|
|
10927
10963
|
}
|
|
@@ -11033,7 +11069,7 @@ export default class bitget extends Exchange {
|
|
|
11033
11069
|
// }
|
|
11034
11070
|
//
|
|
11035
11071
|
const timestamp = this.safeInteger(response, 'requestTime');
|
|
11036
|
-
const data = this.
|
|
11072
|
+
const data = this.safeList(response, 'data', []);
|
|
11037
11073
|
const first = this.safeDict(data, 0, {});
|
|
11038
11074
|
first['timestamp'] = timestamp;
|
|
11039
11075
|
return this.parseIsolatedBorrowRate(first, market);
|
|
@@ -11157,7 +11193,7 @@ export default class bitget extends Exchange {
|
|
|
11157
11193
|
// ]
|
|
11158
11194
|
// }
|
|
11159
11195
|
//
|
|
11160
|
-
const data = this.
|
|
11196
|
+
const data = this.safeList(response, 'data', []);
|
|
11161
11197
|
result = this.safeDict(data, 0, {});
|
|
11162
11198
|
}
|
|
11163
11199
|
const timestamp = this.safeInteger(response, 'requestTime');
|
|
@@ -11310,8 +11346,8 @@ export default class bitget extends Exchange {
|
|
|
11310
11346
|
// }
|
|
11311
11347
|
// }
|
|
11312
11348
|
//
|
|
11313
|
-
const data = this.
|
|
11314
|
-
const rows = this.
|
|
11349
|
+
const data = this.safeDict(response, 'data', {});
|
|
11350
|
+
const rows = this.safeList(data, 'resultList', []);
|
|
11315
11351
|
const interest = this.parseBorrowInterests(rows, market);
|
|
11316
11352
|
return this.filterByCurrencySinceLimit(interest, code, since, limit);
|
|
11317
11353
|
}
|
|
@@ -11431,7 +11467,7 @@ export default class bitget extends Exchange {
|
|
|
11431
11467
|
// }
|
|
11432
11468
|
//
|
|
11433
11469
|
}
|
|
11434
|
-
const data = this.
|
|
11470
|
+
const data = this.safeDict(response, 'data', {});
|
|
11435
11471
|
const order = this.safeList2(data, 'successList', 'list', []);
|
|
11436
11472
|
return this.parseOrder(order[0], market);
|
|
11437
11473
|
}
|
|
@@ -11496,7 +11532,7 @@ export default class bitget extends Exchange {
|
|
|
11496
11532
|
// }
|
|
11497
11533
|
//
|
|
11498
11534
|
}
|
|
11499
|
-
const data = this.
|
|
11535
|
+
const data = this.safeDict(response, 'data', {});
|
|
11500
11536
|
const orderInfo = this.safeList2(data, 'successList', 'list', []);
|
|
11501
11537
|
return this.parsePositions(orderInfo, undefined, params);
|
|
11502
11538
|
}
|