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
|
@@ -574,7 +574,7 @@ class digifinex extends digifinex$1["default"] {
|
|
|
574
574
|
* @returns {object[]} an array of objects representing market data
|
|
575
575
|
*/
|
|
576
576
|
async fetchMarkets(params = {}) {
|
|
577
|
-
const options = this.
|
|
577
|
+
const options = this.safeDict(this.options, 'fetchMarkets', {});
|
|
578
578
|
const method = this.safeString(options, 'method', 'fetch_markets_v2');
|
|
579
579
|
if (method === 'fetch_markets_v2') {
|
|
580
580
|
return await this.fetchMarketsV2(params);
|
|
@@ -647,8 +647,8 @@ class digifinex extends digifinex$1["default"] {
|
|
|
647
647
|
// ]
|
|
648
648
|
// }
|
|
649
649
|
//
|
|
650
|
-
const spotData = this.
|
|
651
|
-
const swapData = this.
|
|
650
|
+
const spotData = this.safeList(spotMarkets, 'symbol_list', []);
|
|
651
|
+
const swapData = this.safeList(swapMarkets, 'data', []);
|
|
652
652
|
const response = this.arrayConcat(spotData, swapData);
|
|
653
653
|
const result = [];
|
|
654
654
|
for (let i = 0; i < response.length; i++) {
|
|
@@ -681,9 +681,9 @@ class digifinex extends digifinex$1["default"] {
|
|
|
681
681
|
if (swap) {
|
|
682
682
|
type = 'swap';
|
|
683
683
|
symbol = base + '/' + quote + ':' + settle;
|
|
684
|
-
isInverse = this.
|
|
684
|
+
isInverse = this.safeBool(market, 'is_inverse');
|
|
685
685
|
isLinear = (isInverse !== true) ? true : false;
|
|
686
|
-
const isTrading = this.
|
|
686
|
+
const isTrading = this.safeBool(market, 'isTrading');
|
|
687
687
|
if (isTrading === true) {
|
|
688
688
|
isAllowed = 1;
|
|
689
689
|
}
|
|
@@ -930,7 +930,7 @@ class digifinex extends digifinex$1["default"] {
|
|
|
930
930
|
// }
|
|
931
931
|
//
|
|
932
932
|
const balanceRequest = (marketType === 'swap') ? 'data' : 'list';
|
|
933
|
-
const balances = this.
|
|
933
|
+
const balances = this.safeList(response, balanceRequest, []);
|
|
934
934
|
return this.parseBalance(balances);
|
|
935
935
|
}
|
|
936
936
|
/**
|
|
@@ -1004,7 +1004,7 @@ class digifinex extends digifinex$1["default"] {
|
|
|
1004
1004
|
let timestamp = undefined;
|
|
1005
1005
|
let orderBook = undefined;
|
|
1006
1006
|
if (marketType === 'swap') {
|
|
1007
|
-
orderBook = this.
|
|
1007
|
+
orderBook = this.safeDict(response, 'data', {});
|
|
1008
1008
|
timestamp = this.safeInteger(orderBook, 'timestamp');
|
|
1009
1009
|
}
|
|
1010
1010
|
else {
|
|
@@ -1177,9 +1177,9 @@ class digifinex extends digifinex$1["default"] {
|
|
|
1177
1177
|
// }
|
|
1178
1178
|
//
|
|
1179
1179
|
const date = this.safeInteger(response, 'date');
|
|
1180
|
-
const tickers = this.
|
|
1181
|
-
const data = this.
|
|
1182
|
-
const firstTicker = this.
|
|
1180
|
+
const tickers = this.safeList(response, 'ticker', []);
|
|
1181
|
+
const data = this.safeDict(response, 'data', {});
|
|
1182
|
+
const firstTicker = this.safeDict(tickers, 0, {});
|
|
1183
1183
|
let result = undefined;
|
|
1184
1184
|
if (market['swap'] === true) {
|
|
1185
1185
|
result = data;
|
|
@@ -1385,7 +1385,7 @@ class digifinex extends digifinex$1["default"] {
|
|
|
1385
1385
|
if (type === undefined) {
|
|
1386
1386
|
type = 'limit';
|
|
1387
1387
|
}
|
|
1388
|
-
const isMaker = this.
|
|
1388
|
+
const isMaker = this.safeBool(trade, 'is_maker');
|
|
1389
1389
|
takerOrMaker = (isMaker === true) ? 'maker' : 'taker';
|
|
1390
1390
|
}
|
|
1391
1391
|
let fee = undefined;
|
|
@@ -1663,11 +1663,11 @@ class digifinex extends digifinex$1["default"] {
|
|
|
1663
1663
|
//
|
|
1664
1664
|
let candles = undefined;
|
|
1665
1665
|
if (market['swap'] === true) {
|
|
1666
|
-
const data = this.
|
|
1667
|
-
candles = this.
|
|
1666
|
+
const data = this.safeDict(response, 'data', {});
|
|
1667
|
+
candles = this.safeList(data, 'candles', []);
|
|
1668
1668
|
}
|
|
1669
1669
|
else {
|
|
1670
|
-
candles = this.
|
|
1670
|
+
candles = this.safeList(response, 'data', []);
|
|
1671
1671
|
}
|
|
1672
1672
|
return this.parseOHLCVs(candles, market, timeframe, since, limit);
|
|
1673
1673
|
}
|
|
@@ -1768,7 +1768,7 @@ class digifinex extends digifinex$1["default"] {
|
|
|
1768
1768
|
const side = this.safeString(rawOrder, 'side');
|
|
1769
1769
|
const amount = this.safeValue(rawOrder, 'amount');
|
|
1770
1770
|
const price = this.safeValue(rawOrder, 'price');
|
|
1771
|
-
const orderParams = this.
|
|
1771
|
+
const orderParams = this.safeDict(rawOrder, 'params', {});
|
|
1772
1772
|
const marginResult = this.handleMarginModeAndParams('createOrders', orderParams);
|
|
1773
1773
|
const currentMarginMode = marginResult[0];
|
|
1774
1774
|
if (currentMarginMode !== undefined) {
|
|
@@ -1819,10 +1819,10 @@ class digifinex extends digifinex$1["default"] {
|
|
|
1819
1819
|
//
|
|
1820
1820
|
let data = [];
|
|
1821
1821
|
if (market['swap'] === true) {
|
|
1822
|
-
data = this.
|
|
1822
|
+
data = this.safeList(response, 'data', []);
|
|
1823
1823
|
}
|
|
1824
1824
|
else {
|
|
1825
|
-
data = this.
|
|
1825
|
+
data = this.safeList(response, 'order_ids', []);
|
|
1826
1826
|
}
|
|
1827
1827
|
const result = [];
|
|
1828
1828
|
for (let i = 0; i < orders.length; i++) {
|
|
@@ -2848,11 +2848,11 @@ class digifinex extends digifinex$1["default"] {
|
|
|
2848
2848
|
//
|
|
2849
2849
|
let ledger = undefined;
|
|
2850
2850
|
if (marketType === 'swap') {
|
|
2851
|
-
ledger = this.
|
|
2851
|
+
ledger = this.safeList(response, 'data', []);
|
|
2852
2852
|
}
|
|
2853
2853
|
else {
|
|
2854
|
-
const data = this.
|
|
2855
|
-
ledger = this.
|
|
2854
|
+
const data = this.safeDict(response, 'data', {});
|
|
2855
|
+
ledger = this.safeList(data, 'finance', []);
|
|
2856
2856
|
}
|
|
2857
2857
|
return this.parseLedger(ledger, currency, since, limit);
|
|
2858
2858
|
}
|
|
@@ -2908,9 +2908,9 @@ class digifinex extends digifinex$1["default"] {
|
|
|
2908
2908
|
// "code":200
|
|
2909
2909
|
// }
|
|
2910
2910
|
//
|
|
2911
|
-
const data = this.
|
|
2911
|
+
const data = this.safeList(response, 'data', []);
|
|
2912
2912
|
const addresses = this.parseDepositAddresses(data, [currency['code']]);
|
|
2913
|
-
const address = this.
|
|
2913
|
+
const address = this.safeDict(addresses, code);
|
|
2914
2914
|
if (address === undefined) {
|
|
2915
2915
|
throw new errors.InvalidAddress(this.id + ' fetchDepositAddress() did not return an address for ' + code + ' - create the deposit address in the user settings on the exchange website first.');
|
|
2916
2916
|
}
|
|
@@ -3146,7 +3146,7 @@ class digifinex extends digifinex$1["default"] {
|
|
|
3146
3146
|
}
|
|
3147
3147
|
const currency = this.currency(code);
|
|
3148
3148
|
const currencyId = currency['id'];
|
|
3149
|
-
const accountsByType = this.
|
|
3149
|
+
const accountsByType = this.safeDict(this.options, 'accountsByType', {});
|
|
3150
3150
|
const fromId = this.safeString(accountsByType, fromAccount, fromAccount);
|
|
3151
3151
|
const toId = this.safeString(accountsByType, toAccount, toAccount);
|
|
3152
3152
|
const request = {};
|
|
@@ -3258,7 +3258,7 @@ class digifinex extends digifinex$1["default"] {
|
|
|
3258
3258
|
// "unrealized_pnl": "-0.049158102631998504"
|
|
3259
3259
|
// }
|
|
3260
3260
|
//
|
|
3261
|
-
const rows = this.
|
|
3261
|
+
const rows = this.safeList(response, 'positions');
|
|
3262
3262
|
const interest = this.parseBorrowInterests(rows, market);
|
|
3263
3263
|
return this.filterByCurrencySinceLimit(interest, code, since, limit);
|
|
3264
3264
|
}
|
|
@@ -3368,7 +3368,7 @@ class digifinex extends digifinex$1["default"] {
|
|
|
3368
3368
|
// "equity": 45.133305540922
|
|
3369
3369
|
// }
|
|
3370
3370
|
//
|
|
3371
|
-
const result = this.
|
|
3371
|
+
const result = this.safeList(response, 'list', []);
|
|
3372
3372
|
return this.parseBorrowRates(result, 'currency');
|
|
3373
3373
|
}
|
|
3374
3374
|
parseBorrowRate(info, currency = undefined) {
|
|
@@ -3553,7 +3553,7 @@ class digifinex extends digifinex$1["default"] {
|
|
|
3553
3553
|
// }
|
|
3554
3554
|
// }
|
|
3555
3555
|
//
|
|
3556
|
-
const data = this.
|
|
3556
|
+
const data = this.safeDict(response, 'data', {});
|
|
3557
3557
|
const result = this.safeList(data, 'funding_rates', []);
|
|
3558
3558
|
const rates = [];
|
|
3559
3559
|
for (let i = 0; i < result.length; i++) {
|
|
@@ -3603,7 +3603,7 @@ class digifinex extends digifinex$1["default"] {
|
|
|
3603
3603
|
// }
|
|
3604
3604
|
// }
|
|
3605
3605
|
//
|
|
3606
|
-
const data = this.
|
|
3606
|
+
const data = this.safeDict(response, 'data', {});
|
|
3607
3607
|
return this.parseTradingFee(data, market);
|
|
3608
3608
|
}
|
|
3609
3609
|
parseTradingFee(fee, market = undefined) {
|
|
@@ -4071,7 +4071,7 @@ class digifinex extends digifinex$1["default"] {
|
|
|
4071
4071
|
// ]
|
|
4072
4072
|
// }
|
|
4073
4073
|
//
|
|
4074
|
-
const data = this.
|
|
4074
|
+
const data = this.safeList(response, 'data', []);
|
|
4075
4075
|
symbols = this.marketSymbols(symbols);
|
|
4076
4076
|
return this.parseLeverageTiers(data, symbols, 'instrument_id');
|
|
4077
4077
|
}
|
|
@@ -4123,7 +4123,7 @@ class digifinex extends digifinex$1["default"] {
|
|
|
4123
4123
|
// }
|
|
4124
4124
|
// }
|
|
4125
4125
|
//
|
|
4126
|
-
const data = this.
|
|
4126
|
+
const data = this.safeDict(response, 'data', {});
|
|
4127
4127
|
return this.parseMarketLeverageTiers(data, market);
|
|
4128
4128
|
}
|
|
4129
4129
|
parseMarketLeverageTiers(info, market = undefined) {
|
|
@@ -4274,7 +4274,7 @@ class digifinex extends digifinex$1["default"] {
|
|
|
4274
4274
|
const currencyId = this.safeString(entry, 'currency');
|
|
4275
4275
|
const code = this.safeCurrencyCode(currencyId);
|
|
4276
4276
|
if ((code !== undefined) && ((codes === undefined) || (this.inArray(code, codes)))) {
|
|
4277
|
-
const depositWithdrawFee = this.
|
|
4277
|
+
const depositWithdrawFee = this.safeDict(depositWithdrawFees, code);
|
|
4278
4278
|
if (depositWithdrawFee === undefined) {
|
|
4279
4279
|
depositWithdrawFees[code] = this.depositWithdrawFee({});
|
|
4280
4280
|
depositWithdrawFees[code]['info'] = [];
|
|
@@ -4372,7 +4372,7 @@ class digifinex extends digifinex$1["default"] {
|
|
|
4372
4372
|
//
|
|
4373
4373
|
const code = this.safeInteger(response, 'code');
|
|
4374
4374
|
const status = (code === 0) ? 'ok' : 'failed';
|
|
4375
|
-
const data = this.
|
|
4375
|
+
const data = this.safeDict(response, 'data', {});
|
|
4376
4376
|
return this.extend(this.parseMarginModification(data, market), {
|
|
4377
4377
|
'status': status,
|
|
4378
4378
|
});
|
package/dist/cjs/src/gate.js
CHANGED
|
@@ -1454,7 +1454,7 @@ class gate extends gate$1["default"] {
|
|
|
1454
1454
|
for (let i = 0; i < spotMarketsResponse.length; i++) {
|
|
1455
1455
|
const spotMarket = this.safeDict(spotMarketsResponse, i, {});
|
|
1456
1456
|
const id = this.safeString(spotMarket, 'id');
|
|
1457
|
-
const marginMarket = this.
|
|
1457
|
+
const marginMarket = this.safeDict(marginMarkets, id);
|
|
1458
1458
|
const market = this.deepExtend(marginMarket, spotMarket);
|
|
1459
1459
|
const [baseId, quoteId] = id.split('_');
|
|
1460
1460
|
const base = this.safeCurrencyCode(baseId);
|
|
@@ -1808,7 +1808,7 @@ class gate extends gate$1["default"] {
|
|
|
1808
1808
|
let symbol = base + '/' + quote;
|
|
1809
1809
|
const expiry = this.safeTimestamp(market, 'expiration_time');
|
|
1810
1810
|
const strike = this.safeString(market, 'strike_price');
|
|
1811
|
-
const isCall = this.
|
|
1811
|
+
const isCall = this.safeBool(market, 'is_call');
|
|
1812
1812
|
const optionLetter = (isCall === true) ? 'C' : 'P';
|
|
1813
1813
|
const optionType = (isCall === true) ? 'call' : 'put';
|
|
1814
1814
|
symbol = symbol + ':' + quote + '-' + this.yymmdd(expiry) + '-' + strike + '-' + optionLetter;
|
|
@@ -2021,10 +2021,10 @@ class gate extends gate$1["default"] {
|
|
|
2021
2021
|
return [marginMode, params];
|
|
2022
2022
|
}
|
|
2023
2023
|
getSettlementCurrencies(type, method) {
|
|
2024
|
-
const options = this.
|
|
2025
|
-
const fetchMarketsContractOptions = this.
|
|
2024
|
+
const options = this.safeDict(this.options, type, {}); // [ 'BTC', 'USDT' ] unified codes
|
|
2025
|
+
const fetchMarketsContractOptions = this.safeDict(options, method, {});
|
|
2026
2026
|
const defaultSettle = (type === 'swap') ? ['usdt'] : ['btc'];
|
|
2027
|
-
return this.
|
|
2027
|
+
return this.safeList(fetchMarketsContractOptions, 'settlementCurrencies', defaultSettle);
|
|
2028
2028
|
}
|
|
2029
2029
|
/**
|
|
2030
2030
|
* @method
|
|
@@ -2036,7 +2036,7 @@ class gate extends gate$1["default"] {
|
|
|
2036
2036
|
*/
|
|
2037
2037
|
async fetchCurrencies(params = {}) {
|
|
2038
2038
|
// sandbox/testnet only supports future markets
|
|
2039
|
-
const apiBackup = this.
|
|
2039
|
+
const apiBackup = this.safeDict(this.urls, 'apiBackup');
|
|
2040
2040
|
if (apiBackup !== undefined) {
|
|
2041
2041
|
return {};
|
|
2042
2042
|
}
|
|
@@ -2403,7 +2403,7 @@ class gate extends gate$1["default"] {
|
|
|
2403
2403
|
'currency': currency['id'],
|
|
2404
2404
|
};
|
|
2405
2405
|
const response = await this.privateWalletGetDepositAddress(this.extend(request, params));
|
|
2406
|
-
const chains = this.
|
|
2406
|
+
const chains = this.safeList(response, 'multichain_addresses', []);
|
|
2407
2407
|
const currencyId = this.safeString(response, 'currency');
|
|
2408
2408
|
currency = this.safeCurrency(currencyId, currency);
|
|
2409
2409
|
const parsed = this.parseDepositAddresses(chains, undefined, false);
|
|
@@ -2539,10 +2539,10 @@ class gate extends gate$1["default"] {
|
|
|
2539
2539
|
// "futures_maker_fee": "0"
|
|
2540
2540
|
// }
|
|
2541
2541
|
//
|
|
2542
|
-
const gtDiscount = this.
|
|
2542
|
+
const gtDiscount = this.safeBool(info, 'gt_discount');
|
|
2543
2543
|
const taker = (gtDiscount === true) ? 'gt_taker_fee' : 'taker_fee';
|
|
2544
2544
|
const maker = (gtDiscount === true) ? 'gt_maker_fee' : 'maker_fee';
|
|
2545
|
-
const contract = this.
|
|
2545
|
+
const contract = this.safeBool(market, 'contract');
|
|
2546
2546
|
const takerKey = (contract === true) ? 'futures_taker_fee' : taker;
|
|
2547
2547
|
const makerKey = (contract === true) ? 'futures_maker_fee' : maker;
|
|
2548
2548
|
return {
|
|
@@ -2596,7 +2596,7 @@ class gate extends gate$1["default"] {
|
|
|
2596
2596
|
if ((codes !== undefined) && !this.inArray(code, codes)) {
|
|
2597
2597
|
continue;
|
|
2598
2598
|
}
|
|
2599
|
-
const withdrawFixOnChains = this.
|
|
2599
|
+
const withdrawFixOnChains = this.safeDict(entry, 'withdraw_fix_on_chains');
|
|
2600
2600
|
if (withdrawFixOnChains === undefined) {
|
|
2601
2601
|
withdrawFees = this.safeNumber(entry, 'withdraw_fix');
|
|
2602
2602
|
}
|
|
@@ -2671,7 +2671,7 @@ class gate extends gate$1["default"] {
|
|
|
2671
2671
|
// }
|
|
2672
2672
|
// }
|
|
2673
2673
|
//
|
|
2674
|
-
const withdrawFixOnChains = this.
|
|
2674
|
+
const withdrawFixOnChains = this.safeDict(fee, 'withdraw_fix_on_chains');
|
|
2675
2675
|
const result = {
|
|
2676
2676
|
'info': fee,
|
|
2677
2677
|
'withdraw': {
|
|
@@ -2977,7 +2977,7 @@ class gate extends gate$1["default"] {
|
|
|
2977
2977
|
}
|
|
2978
2978
|
}
|
|
2979
2979
|
else {
|
|
2980
|
-
ticker = this.
|
|
2980
|
+
ticker = this.safeDict(response, 0);
|
|
2981
2981
|
}
|
|
2982
2982
|
if (ticker === undefined) {
|
|
2983
2983
|
throw new errors.NullResponse(this.id + ' fetchTicker() returned empty response');
|
|
@@ -3440,8 +3440,8 @@ class gate extends gate$1["default"] {
|
|
|
3440
3440
|
for (let i = 0; i < data.length; i++) {
|
|
3441
3441
|
const entry = data[i];
|
|
3442
3442
|
if (isolated) {
|
|
3443
|
-
const base = this.
|
|
3444
|
-
const quote = this.
|
|
3443
|
+
const base = this.safeDict(entry, 'base', {});
|
|
3444
|
+
const quote = this.safeDict(entry, 'quote', {});
|
|
3445
3445
|
const baseCode = this.safeCurrencyCode(this.safeString(base, 'currency'));
|
|
3446
3446
|
const quoteCode = this.safeCurrencyCode(this.safeString(quote, 'currency'));
|
|
3447
3447
|
result = this.mergeBalanceAccount(result, baseCode, this.parseBalanceHelper(base));
|
|
@@ -4559,7 +4559,7 @@ class gate extends gate$1["default"] {
|
|
|
4559
4559
|
const side = this.safeString(rawOrder, 'side');
|
|
4560
4560
|
const amount = this.safeValue(rawOrder, 'amount');
|
|
4561
4561
|
const price = this.safeValue(rawOrder, 'price');
|
|
4562
|
-
const orderParams = this.
|
|
4562
|
+
const orderParams = this.safeDict(rawOrder, 'params', {});
|
|
4563
4563
|
const extendedParams = this.extend(orderParams, params); // the request does not accept extra params since it's a list, so we're extending each order with the common params
|
|
4564
4564
|
const triggerValue = this.safeValueN(orderParams, ['triggerPrice', 'stopPrice', 'takeProfitPrice', 'stopLossPrice']);
|
|
4565
4565
|
if (triggerValue !== undefined) {
|
|
@@ -4830,7 +4830,7 @@ class gate extends gate$1["default"] {
|
|
|
4830
4830
|
}
|
|
4831
4831
|
else {
|
|
4832
4832
|
// spot conditional order
|
|
4833
|
-
const options = this.
|
|
4833
|
+
const options = this.safeDict(this.options, 'createOrder', {});
|
|
4834
4834
|
let marginMode = undefined;
|
|
4835
4835
|
[marginMode, params] = this.getMarginMode(true, params);
|
|
4836
4836
|
if (timeInForce === undefined) {
|
|
@@ -5228,8 +5228,8 @@ class gate extends gate$1["default"] {
|
|
|
5228
5228
|
'id': this.safeString(order, 'id'),
|
|
5229
5229
|
});
|
|
5230
5230
|
}
|
|
5231
|
-
const put = this.
|
|
5232
|
-
const trigger = this.
|
|
5231
|
+
const put = this.safeDict2(order, 'put', 'initial', {});
|
|
5232
|
+
const trigger = this.safeDict(order, 'trigger', {});
|
|
5233
5233
|
let contract = this.safeString(put, 'contract');
|
|
5234
5234
|
let type = this.safeString(put, 'type');
|
|
5235
5235
|
let timeInForce = this.safeStringUpper2(put, 'time_in_force', 'tif');
|
|
@@ -5372,7 +5372,7 @@ class gate extends gate$1["default"] {
|
|
|
5372
5372
|
'cost': Precise["default"].stringAbs(cost),
|
|
5373
5373
|
'filled': undefined,
|
|
5374
5374
|
'remaining': remaining,
|
|
5375
|
-
'fee': multipleFeeCurrencies ? undefined : this.
|
|
5375
|
+
'fee': multipleFeeCurrencies ? undefined : this.safeDict(fees, 0),
|
|
5376
5376
|
'fees': multipleFeeCurrencies ? fees : [],
|
|
5377
5377
|
'trades': undefined,
|
|
5378
5378
|
'info': order,
|
|
@@ -7200,7 +7200,7 @@ class gate extends gate$1["default"] {
|
|
|
7200
7200
|
// endpoints like createOrders use an array instead of an object
|
|
7201
7201
|
// so we infer the settle from one of the elements
|
|
7202
7202
|
// they have to be all the same so relying on the first one is fine
|
|
7203
|
-
const first = this.
|
|
7203
|
+
const first = this.safeDict(params, 0, {});
|
|
7204
7204
|
path = this.implodeParams(path, first);
|
|
7205
7205
|
}
|
|
7206
7206
|
else {
|
|
@@ -7333,7 +7333,7 @@ class gate extends gate$1["default"] {
|
|
|
7333
7333
|
'marginMode': 'isolated',
|
|
7334
7334
|
'amount': undefined,
|
|
7335
7335
|
'total': total,
|
|
7336
|
-
'code': this.
|
|
7336
|
+
'code': this.safeString(market, 'quote'),
|
|
7337
7337
|
'status': 'ok',
|
|
7338
7338
|
'timestamp': undefined,
|
|
7339
7339
|
'datetime': undefined,
|
|
@@ -7592,13 +7592,13 @@ class gate extends gate$1["default"] {
|
|
|
7592
7592
|
//
|
|
7593
7593
|
response = await this.privateOptionsGetMySettlements(this.extend(request, params));
|
|
7594
7594
|
}
|
|
7595
|
-
const result = this.
|
|
7596
|
-
const data = this.
|
|
7595
|
+
const result = this.safeDict(response, 'result', {});
|
|
7596
|
+
const data = this.safeList(result, 'list', []);
|
|
7597
7597
|
const settlements = this.parseSettlements(data, market);
|
|
7598
7598
|
const sorted = this.sortBy(settlements, 'timestamp');
|
|
7599
7599
|
return this.filterBySymbolSinceLimit(sorted, symbol, since, limit);
|
|
7600
7600
|
}
|
|
7601
|
-
parseSettlement(settlement, market) {
|
|
7601
|
+
parseSettlement(settlement, market = undefined) {
|
|
7602
7602
|
//
|
|
7603
7603
|
// fetchSettlementHistory
|
|
7604
7604
|
//
|
|
@@ -7648,7 +7648,7 @@ class gate extends gate$1["default"] {
|
|
|
7648
7648
|
'datetime': this.iso8601(timestamp),
|
|
7649
7649
|
};
|
|
7650
7650
|
}
|
|
7651
|
-
parseSettlements(settlements, market) {
|
|
7651
|
+
parseSettlements(settlements, market = undefined) {
|
|
7652
7652
|
//
|
|
7653
7653
|
// fetchSettlementHistory
|
|
7654
7654
|
//
|
package/dist/cjs/src/gemini.js
CHANGED
|
@@ -479,7 +479,7 @@ class gemini extends gemini$1["default"] {
|
|
|
479
479
|
// }
|
|
480
480
|
//
|
|
481
481
|
this.options['tradingPairs'] = this.safeList(data, 'tradingPairs');
|
|
482
|
-
const currenciesArray = this.
|
|
482
|
+
const currenciesArray = this.safeList(data, 'currencies', []);
|
|
483
483
|
return this.parseCurrencies(currenciesArray);
|
|
484
484
|
}
|
|
485
485
|
parseCurrency(rawCurrency) {
|
|
@@ -550,7 +550,7 @@ class gemini extends gemini$1["default"] {
|
|
|
550
550
|
* @returns {object[]} an array of objects representing market data
|
|
551
551
|
*/
|
|
552
552
|
async fetchMarkets(params = {}) {
|
|
553
|
-
const method = this.
|
|
553
|
+
const method = this.safeString(this.options, 'fetchMarketsMethod', 'fetch_markets_from_api');
|
|
554
554
|
if (method === 'fetch_markets_from_web') {
|
|
555
555
|
const promises = [];
|
|
556
556
|
promises.push(this.fetchMarketsFromWeb(params)); // get usd markets
|
|
@@ -1018,7 +1018,7 @@ class gemini extends gemini$1["default"] {
|
|
|
1018
1018
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
|
|
1019
1019
|
*/
|
|
1020
1020
|
async fetchTicker(symbol, params = {}) {
|
|
1021
|
-
const method = this.
|
|
1021
|
+
const method = this.safeString(this.options, 'fetchTickerMethod', 'fetchTickerV1');
|
|
1022
1022
|
if (method === 'fetchTickerV1') {
|
|
1023
1023
|
return await this.fetchTickerV1(symbol, params);
|
|
1024
1024
|
}
|
|
@@ -1064,7 +1064,7 @@ class gemini extends gemini$1["default"] {
|
|
|
1064
1064
|
// "ask":"9115.87"
|
|
1065
1065
|
// }
|
|
1066
1066
|
//
|
|
1067
|
-
const volume = this.
|
|
1067
|
+
const volume = this.safeDict(ticker, 'volume', {});
|
|
1068
1068
|
const timestamp = this.safeInteger(volume, 'timestamp');
|
|
1069
1069
|
let symbol = undefined;
|
|
1070
1070
|
const marketId = this.safeStringLower(ticker, 'pair');
|
|
@@ -1477,7 +1477,7 @@ class gemini extends gemini$1["default"] {
|
|
|
1477
1477
|
const id = this.safeString(order, 'order_id');
|
|
1478
1478
|
const side = this.safeStringLower(order, 'side');
|
|
1479
1479
|
const clientOrderId = this.safeString(order, 'client_order_id');
|
|
1480
|
-
const optionsArray = this.
|
|
1480
|
+
const optionsArray = this.safeList(order, 'options', []);
|
|
1481
1481
|
const option = this.safeString(optionsArray, 0);
|
|
1482
1482
|
let timeInForce = 'GTC';
|
|
1483
1483
|
let postOnly = false;
|
package/dist/cjs/src/grvt.js
CHANGED
|
@@ -3252,7 +3252,7 @@ class grvt extends grvt$1["default"] {
|
|
|
3252
3252
|
'chain_id': this.isSandboxModeEnabled ? '326' : '325',
|
|
3253
3253
|
};
|
|
3254
3254
|
}
|
|
3255
|
-
handleUntilOptionString(key, request, params, multiplier = 1) {
|
|
3255
|
+
handleUntilOptionString(key, request, params = undefined, multiplier = 1) {
|
|
3256
3256
|
const until = this.safeInteger2(params, 'until', 'till');
|
|
3257
3257
|
if (until !== undefined) {
|
|
3258
3258
|
request[key] = this.numberToString(this.parseToInt(until * multiplier));
|
package/dist/cjs/src/hibachi.js
CHANGED
|
@@ -711,7 +711,7 @@ class hibachi extends hibachi$1["default"] {
|
|
|
711
711
|
remainingString = Precise["default"].stringSub(totalQuantity, filled);
|
|
712
712
|
}
|
|
713
713
|
let timeInForce = 'GTC';
|
|
714
|
-
const orderFlags = this.
|
|
714
|
+
const orderFlags = this.safeString(order, 'orderFlags');
|
|
715
715
|
let postOnly = false;
|
|
716
716
|
let reduceOnly = false;
|
|
717
717
|
if (orderFlags === 'POST_ONLY') {
|
|
@@ -978,8 +978,8 @@ class hibachi extends hibachi$1["default"] {
|
|
|
978
978
|
const symbol = this.safeString(rawOrder, 'symbol');
|
|
979
979
|
const type = this.safeString(rawOrder, 'type');
|
|
980
980
|
const side = this.safeString(rawOrder, 'side');
|
|
981
|
-
const amount = this.
|
|
982
|
-
const price = this.
|
|
981
|
+
const amount = this.safeNumber(rawOrder, 'amount');
|
|
982
|
+
const price = this.safeNumber(rawOrder, 'price');
|
|
983
983
|
const orderParams = this.safeDict(rawOrder, 'params', {});
|
|
984
984
|
const orderRequest = this.createOrderRequest(nonce + i, symbol, type, side, amount, price, orderParams);
|
|
985
985
|
orderRequest['action'] = 'place';
|
|
@@ -1082,8 +1082,8 @@ class hibachi extends hibachi$1["default"] {
|
|
|
1082
1082
|
const symbol = this.safeString(rawOrder, 'symbol');
|
|
1083
1083
|
const type = this.safeString(rawOrder, 'type');
|
|
1084
1084
|
const side = this.safeString(rawOrder, 'side');
|
|
1085
|
-
const amount = this.
|
|
1086
|
-
const price = this.
|
|
1085
|
+
const amount = this.safeNumber(rawOrder, 'amount');
|
|
1086
|
+
const price = this.safeNumber(rawOrder, 'price');
|
|
1087
1087
|
const orderParams = this.safeDict(rawOrder, 'params', {});
|
|
1088
1088
|
const orderRequest = this.editOrderRequest(nonce + i, id, symbol, type, side, amount, price, orderParams);
|
|
1089
1089
|
orderRequest['action'] = 'modify';
|
package/dist/cjs/src/hitbtc.js
CHANGED
|
@@ -1044,7 +1044,7 @@ class hitbtc extends hitbtc$1["default"] {
|
|
|
1044
1044
|
};
|
|
1045
1045
|
const network = this.safeStringUpper(params, 'network');
|
|
1046
1046
|
if ((network !== undefined) && (code === 'USDT')) {
|
|
1047
|
-
const networks = this.
|
|
1047
|
+
const networks = this.safeDict(this.options, 'networks');
|
|
1048
1048
|
const parsedNetwork = this.safeString(networks, network);
|
|
1049
1049
|
if (parsedNetwork !== undefined) {
|
|
1050
1050
|
request['currency'] = parsedNetwork;
|
|
@@ -1083,7 +1083,7 @@ class hitbtc extends hitbtc$1["default"] {
|
|
|
1083
1083
|
};
|
|
1084
1084
|
const network = this.safeStringUpper(params, 'network');
|
|
1085
1085
|
if ((network !== undefined) && (code === 'USDT')) {
|
|
1086
|
-
const networks = this.
|
|
1086
|
+
const networks = this.safeDict(this.options, 'networks');
|
|
1087
1087
|
const parsedNetwork = this.safeString(networks, network);
|
|
1088
1088
|
if (parsedNetwork !== undefined) {
|
|
1089
1089
|
request['currency'] = parsedNetwork;
|
|
@@ -1094,7 +1094,7 @@ class hitbtc extends hitbtc$1["default"] {
|
|
|
1094
1094
|
//
|
|
1095
1095
|
// [{"currency":"ETH","address":"0xd0d9aea60c41988c3e68417e2616065617b7afd3"}]
|
|
1096
1096
|
//
|
|
1097
|
-
const firstAddress = this.
|
|
1097
|
+
const firstAddress = this.safeDict(response, 0);
|
|
1098
1098
|
const address = this.safeString(firstAddress, 'address');
|
|
1099
1099
|
const currencyId = this.safeString(firstAddress, 'currency');
|
|
1100
1100
|
const tag = this.safeString(firstAddress, 'payment_id');
|
|
@@ -1447,7 +1447,7 @@ class hitbtc extends hitbtc$1["default"] {
|
|
|
1447
1447
|
const symbol = market['symbol'];
|
|
1448
1448
|
let fee = undefined;
|
|
1449
1449
|
const feeCostString = this.safeString(trade, 'fee');
|
|
1450
|
-
const taker = this.
|
|
1450
|
+
const taker = this.safeBool(trade, 'taker');
|
|
1451
1451
|
let takerOrMaker;
|
|
1452
1452
|
if (taker !== undefined) {
|
|
1453
1453
|
takerOrMaker = (taker === true) ? 'taker' : 'maker';
|
|
@@ -1456,7 +1456,7 @@ class hitbtc extends hitbtc$1["default"] {
|
|
|
1456
1456
|
takerOrMaker = 'taker'; // the only case when `taker` field is missing, is public fetchTrades and it must be taker
|
|
1457
1457
|
}
|
|
1458
1458
|
if (feeCostString !== undefined) {
|
|
1459
|
-
const info = this.
|
|
1459
|
+
const info = this.safeDict(market, 'info', {});
|
|
1460
1460
|
const feeCurrency = this.safeString(info, 'fee_currency');
|
|
1461
1461
|
const feeCurrencyCode = this.safeCurrencyCode(feeCurrency);
|
|
1462
1462
|
fee = {
|
|
@@ -1591,7 +1591,7 @@ class hitbtc extends hitbtc$1["default"] {
|
|
|
1591
1591
|
const updated = this.parse8601(this.safeString(transaction, 'updated_at'));
|
|
1592
1592
|
const type = this.parseTransactionType(this.safeString(transaction, 'type'));
|
|
1593
1593
|
const status = this.parseTransactionStatus(this.safeString(transaction, 'status'));
|
|
1594
|
-
const native = this.
|
|
1594
|
+
const native = this.safeDict(transaction, 'native', {});
|
|
1595
1595
|
const currencyId = this.safeString(native, 'currency');
|
|
1596
1596
|
const code = this.safeCurrencyCode(currencyId);
|
|
1597
1597
|
const txhash = this.safeString(native, 'hash');
|
|
@@ -2477,7 +2477,7 @@ class hitbtc extends hitbtc$1["default"] {
|
|
|
2477
2477
|
}
|
|
2478
2478
|
createOrderRequest(market, marketType, type, side, amount, price = undefined, marginMode = undefined, params = {}) {
|
|
2479
2479
|
const isLimit = (type === 'limit');
|
|
2480
|
-
const reduceOnly = this.
|
|
2480
|
+
const reduceOnly = this.safeBool(params, 'reduceOnly');
|
|
2481
2481
|
const timeInForce = this.safeString(params, 'timeInForce');
|
|
2482
2482
|
const triggerPrice = this.safeNumberN(params, ['triggerPrice', 'stopPrice', 'stop_price']);
|
|
2483
2483
|
const isPostOnly = this.isPostOnly(type === 'market', undefined, params);
|
|
@@ -2773,7 +2773,7 @@ class hitbtc extends hitbtc$1["default"] {
|
|
|
2773
2773
|
}
|
|
2774
2774
|
const currency = this.currency(code);
|
|
2775
2775
|
const requestAmount = this.currencyToPrecision(code, amount);
|
|
2776
|
-
const accountsByType = this.
|
|
2776
|
+
const accountsByType = this.safeDict(this.options, 'accountsByType', {});
|
|
2777
2777
|
fromAccount = fromAccount.toLowerCase();
|
|
2778
2778
|
toAccount = toAccount.toLowerCase();
|
|
2779
2779
|
const fromId = this.safeString(accountsByType, fromAccount, fromAccount);
|
|
@@ -2815,7 +2815,7 @@ class hitbtc extends hitbtc$1["default"] {
|
|
|
2815
2815
|
'info': transfer,
|
|
2816
2816
|
};
|
|
2817
2817
|
}
|
|
2818
|
-
async convertCurrencyNetwork(code, amount, fromNetwork, toNetwork, params) {
|
|
2818
|
+
async convertCurrencyNetwork(code, amount, fromNetwork, toNetwork, params = {}) {
|
|
2819
2819
|
if (this.markets === undefined) {
|
|
2820
2820
|
await this.loadMarkets();
|
|
2821
2821
|
}
|
|
@@ -2872,7 +2872,7 @@ class hitbtc extends hitbtc$1["default"] {
|
|
|
2872
2872
|
if (tag !== undefined) {
|
|
2873
2873
|
request['payment_id'] = tag;
|
|
2874
2874
|
}
|
|
2875
|
-
const networks = this.
|
|
2875
|
+
const networks = this.safeDict(this.options, 'networks', {});
|
|
2876
2876
|
const network = this.safeStringUpper(params, 'network');
|
|
2877
2877
|
if ((network !== undefined) && (code === 'USDT')) {
|
|
2878
2878
|
const parsedNetwork = this.safeString(networks, network);
|
|
@@ -2881,7 +2881,7 @@ class hitbtc extends hitbtc$1["default"] {
|
|
|
2881
2881
|
}
|
|
2882
2882
|
params = this.omit(params, 'network');
|
|
2883
2883
|
}
|
|
2884
|
-
const withdrawOptions = this.
|
|
2884
|
+
const withdrawOptions = this.safeDict(this.options, 'withdraw', {});
|
|
2885
2885
|
const includeFee = this.safeBool(withdrawOptions, 'includeFee', false);
|
|
2886
2886
|
if (includeFee === true) {
|
|
2887
2887
|
request['include_fee'] = true;
|
|
@@ -3550,8 +3550,8 @@ class hitbtc extends hitbtc$1["default"] {
|
|
|
3550
3550
|
// "positions": null
|
|
3551
3551
|
// }
|
|
3552
3552
|
//
|
|
3553
|
-
const currencies = this.
|
|
3554
|
-
const currencyInfo = this.
|
|
3553
|
+
const currencies = this.safeList(data, 'currencies', []);
|
|
3554
|
+
const currencyInfo = this.safeDict(currencies, 0);
|
|
3555
3555
|
const datetime = this.safeString(data, 'updated_at');
|
|
3556
3556
|
return {
|
|
3557
3557
|
'info': data,
|
|
@@ -3796,7 +3796,7 @@ class hitbtc extends hitbtc$1["default"] {
|
|
|
3796
3796
|
let networkCode = this.networkIdToCode(networkId, code);
|
|
3797
3797
|
networkCode = (networkCode !== undefined) ? networkCode.toUpperCase() : undefined;
|
|
3798
3798
|
const withdrawFee = this.safeNumber(networkEntry, 'payout_fee');
|
|
3799
|
-
const isDefault = this.
|
|
3799
|
+
const isDefault = this.safeBool(networkEntry, 'default');
|
|
3800
3800
|
const withdrawResult = {
|
|
3801
3801
|
'fee': withdrawFee,
|
|
3802
3802
|
'percentage': (withdrawFee !== undefined) ? false : undefined,
|
|
@@ -3893,7 +3893,7 @@ class hitbtc extends hitbtc$1["default"] {
|
|
|
3893
3893
|
// }
|
|
3894
3894
|
// }
|
|
3895
3895
|
//
|
|
3896
|
-
const error = this.
|
|
3896
|
+
const error = this.safeDict(response, 'error');
|
|
3897
3897
|
const errorCode = this.safeString(error, 'code');
|
|
3898
3898
|
if (errorCode !== undefined) {
|
|
3899
3899
|
const feedback = this.id + ' ' + body;
|