ccxt 4.5.82 → 4.5.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +3 -1
- package/dist/cjs/src/abstract/prediction/sxbet.js +11 -0
- package/dist/cjs/src/apex.js +1 -0
- package/dist/cjs/src/aster.js +2 -2
- package/dist/cjs/src/base/Exchange.js +1 -1
- package/dist/cjs/src/bigone.js +2 -2
- package/dist/cjs/src/binance.js +10 -10
- package/dist/cjs/src/bingx.js +3 -3
- package/dist/cjs/src/bit2c.js +4 -4
- package/dist/cjs/src/bitbank.js +15 -15
- package/dist/cjs/src/bitfinex.js +15 -15
- package/dist/cjs/src/bitget.js +109 -73
- package/dist/cjs/src/bitmex.js +7 -7
- package/dist/cjs/src/bitopro.js +2 -2
- package/dist/cjs/src/bitrue.js +6 -6
- package/dist/cjs/src/bitso.js +18 -18
- package/dist/cjs/src/bitstamp.js +5 -5
- package/dist/cjs/src/bitteam.js +32 -32
- package/dist/cjs/src/bittrade.js +10 -10
- package/dist/cjs/src/bitvavo.js +9 -9
- package/dist/cjs/src/blockchaincom.js +2 -2
- package/dist/cjs/src/btcbox.js +2 -2
- package/dist/cjs/src/btcmarkets.js +2 -2
- package/dist/cjs/src/btcturk.js +2 -2
- package/dist/cjs/src/btse.js +2 -2
- package/dist/cjs/src/bybitid.js +4 -0
- package/dist/cjs/src/coinbase.js +1 -1
- package/dist/cjs/src/coinbaseexchange.js +13 -13
- package/dist/cjs/src/coincheck.js +4 -4
- package/dist/cjs/src/coinex.js +10 -10
- package/dist/cjs/src/coinmate.js +4 -4
- package/dist/cjs/src/coinone.js +4 -4
- package/dist/cjs/src/coinsph.js +5 -5
- package/dist/cjs/src/cryptocom.js +5 -5
- package/dist/cjs/src/deribit.js +31 -31
- package/dist/cjs/src/derive.js +1 -1
- package/dist/cjs/src/digifinex.js +31 -31
- package/dist/cjs/src/gate.js +25 -25
- package/dist/cjs/src/gemini.js +5 -5
- package/dist/cjs/src/grvt.js +1 -1
- package/dist/cjs/src/hibachi.js +5 -5
- package/dist/cjs/src/hitbtc.js +15 -15
- package/dist/cjs/src/hollaex.js +15 -15
- package/dist/cjs/src/htx.js +52 -52
- package/dist/cjs/src/hyperliquid.js +2 -2
- package/dist/cjs/src/independentreserve.js +2 -2
- package/dist/cjs/src/indodax.js +8 -8
- package/dist/cjs/src/kraken.js +29 -29
- package/dist/cjs/src/krakenfutures.js +16 -16
- package/dist/cjs/src/kucoin.js +15 -15
- package/dist/cjs/src/latoken.js +8 -8
- package/dist/cjs/src/lbank.js +31 -31
- package/dist/cjs/src/lighter.js +2 -2
- package/dist/cjs/src/luno.js +2 -2
- package/dist/cjs/src/mercado.js +12 -12
- package/dist/cjs/src/mexc.js +27 -27
- package/dist/cjs/src/modetrade.js +10 -10
- package/dist/cjs/src/ndax.js +4 -4
- package/dist/cjs/src/okx.js +19 -20
- package/dist/cjs/src/onetrading.js +7 -7
- package/dist/cjs/src/p2b.js +8 -8
- package/dist/cjs/src/pacifica.js +9 -3
- package/dist/cjs/src/paymium.js +2 -2
- package/dist/cjs/src/phemex.js +37 -37
- package/dist/cjs/src/poloniex.js +14 -14
- package/dist/cjs/src/prediction/sxbet.js +2710 -0
- package/dist/cjs/src/pro/alpaca.js +5 -5
- package/dist/cjs/src/pro/apex.js +6 -6
- package/dist/cjs/src/pro/aster.js +8 -8
- package/dist/cjs/src/pro/backpack.js +1 -1
- package/dist/cjs/src/pro/binance.js +26 -26
- package/dist/cjs/src/pro/bingx.js +11 -11
- package/dist/cjs/src/pro/bitfinex.js +11 -11
- package/dist/cjs/src/pro/bitget.js +20 -20
- package/dist/cjs/src/pro/bithumb.js +1 -1
- package/dist/cjs/src/pro/bitmex.js +12 -12
- package/dist/cjs/src/pro/bitopro.js +5 -5
- package/dist/cjs/src/pro/bitrue.js +7 -7
- package/dist/cjs/src/pro/bitstamp.js +5 -5
- package/dist/cjs/src/pro/bittrade.js +11 -11
- package/dist/cjs/src/pro/bitvavo.js +16 -16
- package/dist/cjs/src/pro/blockchaincom.js +5 -5
- package/dist/cjs/src/pro/blofin.js +2 -2
- package/dist/cjs/src/pro/bybit.js +21 -21
- package/dist/cjs/src/pro/bydfi.js +2 -2
- package/dist/cjs/src/pro/cex.js +19 -19
- package/dist/cjs/src/pro/coinbase.js +2 -2
- package/dist/cjs/src/pro/coinbaseexchange.js +9 -9
- package/dist/cjs/src/pro/coinbaseinternational.js +2 -2
- package/dist/cjs/src/pro/coincheck.js +2 -2
- package/dist/cjs/src/pro/coinex.js +3 -3
- package/dist/cjs/src/pro/coinone.js +6 -6
- package/dist/cjs/src/pro/cryptocom.js +10 -10
- package/dist/cjs/src/pro/deribit.js +13 -13
- package/dist/cjs/src/pro/derive.js +4 -4
- package/dist/cjs/src/pro/dydx.js +1 -1
- package/dist/cjs/src/pro/extended.js +16 -10
- package/dist/cjs/src/pro/gate.js +10 -10
- package/dist/cjs/src/pro/gemini.js +3 -3
- package/dist/cjs/src/pro/grvt.js +2 -2
- package/dist/cjs/src/pro/hashkey.js +2 -2
- package/dist/cjs/src/pro/hitbtc.js +6 -6
- package/dist/cjs/src/pro/hollaex.js +3 -3
- package/dist/cjs/src/pro/htx.js +28 -28
- package/dist/cjs/src/pro/hyperliquid.js +1 -1
- package/dist/cjs/src/pro/independentreserve.js +2 -2
- package/dist/cjs/src/pro/kraken.js +7 -7
- package/dist/cjs/src/pro/krakenfutures.js +12 -12
- package/dist/cjs/src/pro/kucoin.js +12 -12
- package/dist/cjs/src/pro/lbank.js +16 -16
- package/dist/cjs/src/pro/luno.js +2 -2
- package/dist/cjs/src/pro/mexc.js +8 -8
- package/dist/cjs/src/pro/modetrade.js +3 -3
- package/dist/cjs/src/pro/mudrex.js +2 -2
- package/dist/cjs/src/pro/nado.js +3 -3
- package/dist/cjs/src/pro/ndax.js +6 -6
- package/dist/cjs/src/pro/okx.js +20 -20
- package/dist/cjs/src/pro/onetrading.js +14 -14
- package/dist/cjs/src/pro/p2b.js +5 -5
- package/dist/cjs/src/pro/pacifica.js +1 -1
- package/dist/cjs/src/pro/paradex.js +1 -1
- package/dist/cjs/src/pro/phemex.js +13 -13
- package/dist/cjs/src/pro/poloniex.js +17 -17
- package/dist/cjs/src/pro/toobit.js +2 -2
- package/dist/cjs/src/pro/upbit.js +4 -4
- package/dist/cjs/src/pro/weex.js +2 -2
- package/dist/cjs/src/pro/whitebit.js +12 -12
- package/dist/cjs/src/pro/woo.js +13 -13
- package/dist/cjs/src/pro/woofipro.js +3 -3
- package/dist/cjs/src/pro/xt.js +3 -3
- package/dist/cjs/src/tokocrypto.js +20 -20
- package/dist/cjs/src/upbit.js +12 -12
- package/dist/cjs/src/whitebit.js +15 -15
- package/dist/cjs/src/woo.js +3 -3
- package/dist/cjs/src/woofipro.js +14 -14
- package/dist/cjs/src/zaif.js +9 -3
- package/dist/cjs/src/zebpay.js +1 -1
- package/js/ccxt.d.ts +4 -1
- package/js/ccxt.js +3 -1
- package/js/src/abstract/prediction/sxbet.d.ts +41 -0
- package/js/src/abstract/prediction/sxbet.js +11 -0
- package/js/src/alpaca.d.ts +28 -33
- package/js/src/apex.d.ts +28 -42
- package/js/src/apex.js +1 -0
- package/js/src/aster.d.ts +58 -108
- package/js/src/aster.js +2 -2
- package/js/src/backpack.d.ts +34 -48
- package/js/src/base/Exchange.d.ts +304 -320
- package/js/src/base/Exchange.js +1 -1
- package/js/src/bigone.d.ts +24 -29
- package/js/src/bigone.js +2 -2
- package/js/src/binance.d.ts +112 -138
- package/js/src/binance.js +10 -10
- package/js/src/binancecoinm.d.ts +3 -2
- package/js/src/binanceusdm.d.ts +3 -2
- package/js/src/bingx.d.ts +65 -84
- package/js/src/bingx.js +3 -3
- package/js/src/bit2c.d.ts +13 -18
- package/js/src/bit2c.js +4 -4
- package/js/src/bitbank.d.ts +16 -21
- package/js/src/bitbank.js +15 -15
- package/js/src/bitbns.d.ts +15 -20
- package/js/src/bitfinex.d.ts +46 -51
- package/js/src/bitfinex.js +15 -15
- package/js/src/bitflyer.d.ts +20 -25
- package/js/src/bitget.d.ts +105 -93
- package/js/src/bitget.js +109 -73
- package/js/src/bithumb.d.ts +26 -31
- package/js/src/bitmex.d.ts +48 -65
- package/js/src/bitmex.js +7 -7
- package/js/src/bitopro.d.ts +25 -41
- package/js/src/bitopro.js +2 -2
- package/js/src/bitrue.d.ts +30 -45
- package/js/src/bitrue.js +6 -6
- package/js/src/bitso.d.ts +24 -29
- package/js/src/bitso.js +18 -18
- package/js/src/bitstamp.d.ts +36 -47
- package/js/src/bitstamp.js +5 -5
- package/js/src/bitteam.d.ts +22 -27
- package/js/src/bitteam.js +32 -32
- package/js/src/bittrade.d.ts +35 -46
- package/js/src/bittrade.js +10 -10
- package/js/src/bitvavo.d.ts +43 -48
- package/js/src/bitvavo.js +9 -9
- package/js/src/blockchaincom.d.ts +26 -31
- package/js/src/blockchaincom.js +2 -2
- package/js/src/blofin.d.ts +38 -43
- package/js/src/btcbox.d.ts +14 -19
- package/js/src/btcbox.js +2 -2
- package/js/src/btcmarkets.d.ts +25 -30
- package/js/src/btcmarkets.js +2 -2
- package/js/src/btcturk.d.ts +13 -18
- package/js/src/btcturk.js +2 -2
- package/js/src/btse.d.ts +44 -50
- package/js/src/btse.js +2 -2
- package/js/src/bullish.d.ts +35 -57
- package/js/src/bybit.d.ts +95 -106
- package/js/src/bybitid.js +4 -0
- package/js/src/bydfi.d.ts +37 -48
- package/js/src/cex.d.ts +29 -34
- package/js/src/coinbase.d.ts +66 -82
- package/js/src/coinbase.js +1 -1
- package/js/src/coinbaseexchange.d.ts +33 -43
- package/js/src/coinbaseexchange.js +13 -13
- package/js/src/coinbaseinternational.d.ts +34 -73
- package/js/src/coincheck.d.ts +13 -18
- package/js/src/coincheck.js +4 -4
- package/js/src/coinex.d.ts +63 -68
- package/js/src/coinex.js +10 -10
- package/js/src/coinmate.d.ts +15 -20
- package/js/src/coinmate.js +4 -4
- package/js/src/coinone.d.ts +14 -19
- package/js/src/coinone.js +4 -4
- package/js/src/coinsph.d.ts +32 -37
- package/js/src/coinsph.js +5 -5
- package/js/src/coinspot.d.ts +10 -15
- package/js/src/cryptocom.d.ts +48 -64
- package/js/src/cryptocom.js +5 -5
- package/js/src/cryptomus.d.ts +15 -23
- package/js/src/deepcoin.d.ts +43 -48
- package/js/src/delta.d.ts +43 -54
- package/js/src/deribit.d.ts +48 -69
- package/js/src/deribit.js +31 -31
- package/js/src/derive.d.ts +28 -42
- package/js/src/derive.js +1 -1
- package/js/src/digifinex.d.ts +54 -67
- package/js/src/digifinex.js +31 -31
- package/js/src/dydx.d.ts +26 -31
- package/js/src/extended.d.ts +51 -56
- package/js/src/foxbit.d.ts +34 -64
- package/js/src/gate.d.ts +94 -162
- package/js/src/gate.js +25 -25
- package/js/src/gemini.d.ts +33 -43
- package/js/src/gemini.js +5 -5
- package/js/src/grvt.d.ts +36 -47
- package/js/src/grvt.js +1 -1
- package/js/src/hashkey.d.ts +58 -78
- package/js/src/hibachi.d.ts +42 -52
- package/js/src/hibachi.js +5 -5
- package/js/src/hitbtc.d.ts +49 -56
- package/js/src/hitbtc.js +15 -15
- package/js/src/hollaex.d.ts +26 -31
- package/js/src/hollaex.js +15 -15
- package/js/src/htx.d.ts +80 -121
- package/js/src/htx.js +52 -52
- package/js/src/hyperliquid.d.ts +77 -127
- package/js/src/hyperliquid.js +2 -2
- package/js/src/independentreserve.d.ts +15 -20
- package/js/src/independentreserve.js +2 -2
- package/js/src/indodax.d.ts +19 -24
- package/js/src/indodax.js +8 -8
- package/js/src/kraken.d.ts +43 -55
- package/js/src/kraken.js +29 -29
- package/js/src/krakenfutures.d.ts +34 -39
- package/js/src/krakenfutures.js +16 -16
- package/js/src/kucoin.d.ts +121 -132
- package/js/src/kucoin.js +15 -15
- package/js/src/kucoinfutures.d.ts +4 -4
- package/js/src/latoken.d.ts +24 -29
- package/js/src/latoken.js +8 -8
- package/js/src/lbank.d.ts +40 -53
- package/js/src/lbank.js +31 -31
- package/js/src/lighter.d.ts +40 -45
- package/js/src/lighter.js +2 -2
- package/js/src/luno.d.ts +25 -30
- package/js/src/luno.js +2 -2
- package/js/src/mercado.d.ts +15 -20
- package/js/src/mercado.js +12 -12
- package/js/src/mexc.d.ts +70 -83
- package/js/src/mexc.js +27 -27
- package/js/src/modetrade.d.ts +43 -57
- package/js/src/modetrade.js +10 -10
- package/js/src/mudrex.d.ts +25 -35
- package/js/src/nado.d.ts +45 -50
- package/js/src/ndax.d.ts +27 -32
- package/js/src/ndax.js +4 -4
- package/js/src/okx.d.ts +97 -108
- package/js/src/okx.js +19 -20
- package/js/src/onetrading.d.ts +23 -31
- package/js/src/onetrading.js +7 -7
- package/js/src/p2b.d.ts +17 -22
- package/js/src/p2b.js +8 -8
- package/js/src/pacifica.d.ts +55 -73
- package/js/src/pacifica.js +9 -3
- package/js/src/paradex.d.ts +47 -68
- package/js/src/paymium.d.ts +12 -17
- package/js/src/paymium.js +2 -2
- package/js/src/phemex.d.ts +47 -52
- package/js/src/phemex.js +37 -37
- package/js/src/poloniex.d.ts +45 -50
- package/js/src/poloniex.js +14 -14
- package/js/src/prediction/sxbet.d.ts +595 -0
- package/js/src/prediction/sxbet.js +2708 -0
- package/js/src/pro/alpaca.d.ts +23 -23
- package/js/src/pro/alpaca.js +5 -5
- package/js/src/pro/apex.d.ts +28 -28
- package/js/src/pro/apex.js +6 -6
- package/js/src/pro/aster.d.ts +33 -33
- package/js/src/pro/aster.js +8 -8
- package/js/src/pro/backpack.d.ts +28 -28
- package/js/src/pro/backpack.js +1 -1
- package/js/src/pro/binance.d.ts +57 -57
- package/js/src/pro/binance.js +26 -26
- package/js/src/pro/bingx.d.ts +26 -26
- package/js/src/pro/bingx.js +11 -11
- package/js/src/pro/bitfinex.d.ts +25 -25
- package/js/src/pro/bitfinex.js +11 -11
- package/js/src/pro/bitget.d.ts +41 -41
- package/js/src/pro/bitget.js +20 -20
- package/js/src/pro/bithumb.d.ts +15 -15
- package/js/src/pro/bithumb.js +1 -1
- package/js/src/pro/bitmex.d.ts +29 -29
- package/js/src/pro/bitmex.js +12 -12
- package/js/src/pro/bitopro.d.ts +13 -13
- package/js/src/pro/bitopro.js +5 -5
- package/js/src/pro/bitrue.d.ts +25 -25
- package/js/src/pro/bitrue.js +7 -7
- package/js/src/pro/bitstamp.d.ts +21 -21
- package/js/src/pro/bitstamp.js +5 -5
- package/js/src/pro/bittrade.d.ts +19 -19
- package/js/src/pro/bittrade.js +11 -11
- package/js/src/pro/bitvavo.d.ts +62 -62
- package/js/src/pro/bitvavo.js +16 -16
- package/js/src/pro/blockchaincom.d.ts +19 -19
- package/js/src/pro/blockchaincom.js +5 -5
- package/js/src/pro/blofin.d.ts +23 -23
- package/js/src/pro/blofin.js +2 -2
- package/js/src/pro/bullish.d.ts +19 -25
- package/js/src/pro/bybit.d.ts +42 -45
- package/js/src/pro/bybit.js +21 -21
- package/js/src/pro/bydfi.d.ts +24 -24
- package/js/src/pro/bydfi.js +2 -2
- package/js/src/pro/cex.d.ts +37 -37
- package/js/src/pro/cex.js +19 -19
- package/js/src/pro/coinbase.d.ts +19 -19
- package/js/src/pro/coinbase.js +2 -2
- package/js/src/pro/coinbaseexchange.d.ts +25 -25
- package/js/src/pro/coinbaseexchange.js +9 -9
- package/js/src/pro/coinbaseinternational.d.ts +20 -20
- package/js/src/pro/coinbaseinternational.js +2 -2
- package/js/src/pro/coincheck.d.ts +5 -5
- package/js/src/pro/coincheck.js +2 -2
- package/js/src/pro/coinex.d.ts +24 -24
- package/js/src/pro/coinex.js +3 -3
- package/js/src/pro/coinone.d.ts +9 -11
- package/js/src/pro/coinone.js +6 -6
- package/js/src/pro/cryptocom.d.ts +40 -40
- package/js/src/pro/cryptocom.js +10 -10
- package/js/src/pro/deepcoin.d.ts +24 -32
- package/js/src/pro/deribit.d.ts +24 -24
- package/js/src/pro/deribit.js +13 -13
- package/js/src/pro/derive.d.ts +22 -22
- package/js/src/pro/derive.js +4 -4
- package/js/src/pro/dydx.d.ts +9 -9
- package/js/src/pro/dydx.js +1 -1
- package/js/src/pro/extended.d.ts +22 -22
- package/js/src/pro/extended.js +16 -10
- package/js/src/pro/gate.d.ts +50 -50
- package/js/src/pro/gate.js +10 -10
- package/js/src/pro/gemini.d.ts +26 -26
- package/js/src/pro/gemini.js +3 -3
- package/js/src/pro/grvt.d.ts +22 -22
- package/js/src/pro/grvt.js +2 -2
- package/js/src/pro/hashkey.d.ts +19 -19
- package/js/src/pro/hashkey.js +2 -2
- package/js/src/pro/hitbtc.d.ts +32 -32
- package/js/src/pro/hitbtc.js +6 -6
- package/js/src/pro/hollaex.d.ts +15 -17
- package/js/src/pro/hollaex.js +3 -3
- package/js/src/pro/htx.d.ts +36 -36
- package/js/src/pro/htx.js +28 -28
- package/js/src/pro/hyperliquid.d.ts +29 -31
- package/js/src/pro/hyperliquid.js +1 -1
- package/js/src/pro/independentreserve.d.ts +10 -10
- package/js/src/pro/independentreserve.js +2 -2
- package/js/src/pro/kraken.d.ts +41 -55
- package/js/src/pro/kraken.js +7 -7
- package/js/src/pro/krakenfutures.d.ts +32 -32
- package/js/src/pro/krakenfutures.js +12 -12
- package/js/src/pro/kucoin.d.ts +69 -72
- package/js/src/pro/kucoin.js +12 -12
- package/js/src/pro/kucoinfutures.d.ts +4 -4
- package/js/src/pro/lbank.d.ts +22 -22
- package/js/src/pro/lbank.js +16 -16
- package/js/src/pro/lighter.d.ts +27 -27
- package/js/src/pro/luno.d.ts +8 -8
- package/js/src/pro/luno.js +2 -2
- package/js/src/pro/mexc.d.ts +33 -33
- package/js/src/pro/mexc.js +8 -8
- package/js/src/pro/modetrade.d.ts +37 -39
- package/js/src/pro/modetrade.js +3 -3
- package/js/src/pro/mudrex.d.ts +8 -8
- package/js/src/pro/mudrex.js +2 -2
- package/js/src/pro/nado.d.ts +42 -46
- package/js/src/pro/nado.js +3 -3
- package/js/src/pro/ndax.d.ts +12 -12
- package/js/src/pro/ndax.js +6 -6
- package/js/src/pro/okx.d.ts +49 -49
- package/js/src/pro/okx.js +20 -20
- package/js/src/pro/onetrading.d.ts +28 -28
- package/js/src/pro/onetrading.js +14 -14
- package/js/src/pro/p2b.d.ts +15 -19
- package/js/src/pro/p2b.js +5 -5
- package/js/src/pro/pacifica.d.ts +22 -22
- package/js/src/pro/pacifica.js +1 -1
- package/js/src/pro/paradex.d.ts +18 -18
- package/js/src/pro/paradex.js +1 -1
- package/js/src/pro/phemex.d.ts +25 -25
- package/js/src/pro/phemex.js +13 -13
- package/js/src/pro/poloniex.d.ts +30 -32
- package/js/src/pro/poloniex.js +17 -17
- package/js/src/pro/toobit.d.ts +31 -31
- package/js/src/pro/toobit.js +2 -2
- package/js/src/pro/upbit.d.ts +24 -24
- package/js/src/pro/upbit.js +4 -4
- package/js/src/pro/weex.d.ts +39 -39
- package/js/src/pro/weex.js +2 -2
- package/js/src/pro/whitebit.d.ts +26 -30
- package/js/src/pro/whitebit.js +12 -12
- package/js/src/pro/woo.d.ts +44 -46
- package/js/src/pro/woo.js +13 -13
- package/js/src/pro/woofipro.d.ts +39 -41
- package/js/src/pro/woofipro.js +3 -3
- package/js/src/pro/xt.d.ts +20 -20
- package/js/src/pro/xt.js +3 -3
- package/js/src/revolutx.d.ts +17 -17
- package/js/src/tokocrypto.d.ts +25 -30
- package/js/src/tokocrypto.js +20 -20
- package/js/src/toobit.d.ts +45 -79
- package/js/src/upbit.d.ts +28 -61
- package/js/src/upbit.js +12 -12
- package/js/src/weex.d.ts +57 -68
- package/js/src/whitebit.d.ts +53 -64
- package/js/src/whitebit.js +15 -15
- package/js/src/woo.d.ts +61 -75
- package/js/src/woo.js +3 -3
- package/js/src/woofipro.d.ts +53 -67
- package/js/src/woofipro.js +14 -14
- package/js/src/xt.d.ts +57 -67
- package/js/src/zaif.d.ts +11 -16
- package/js/src/zaif.js +9 -3
- package/js/src/zebpay.d.ts +32 -37
- package/js/src/zebpay.js +1 -1
- package/package.json +2 -2
package/dist/cjs/src/lbank.js
CHANGED
|
@@ -761,7 +761,7 @@ class lbank extends lbank$1["default"] {
|
|
|
761
761
|
}
|
|
762
762
|
const marketId = this.safeString(ticker, 'symbol');
|
|
763
763
|
const symbol = this.safeSymbol(marketId, market);
|
|
764
|
-
const tickerData = this.
|
|
764
|
+
const tickerData = this.safeDict(ticker, 'ticker', {});
|
|
765
765
|
market = this.safeMarket(marketId, market);
|
|
766
766
|
const data = (market['contract'] === true) ? ticker : tickerData;
|
|
767
767
|
return this.safeTicker({
|
|
@@ -830,7 +830,7 @@ class lbank extends lbank$1["default"] {
|
|
|
830
830
|
// "ts": :1692064276872
|
|
831
831
|
// }
|
|
832
832
|
//
|
|
833
|
-
const data = this.
|
|
833
|
+
const data = this.safeList(response, 'data', []);
|
|
834
834
|
const first = this.safeDict(data, 0, {});
|
|
835
835
|
return this.parseTicker(first, market);
|
|
836
836
|
}
|
|
@@ -997,7 +997,7 @@ class lbank extends lbank$1["default"] {
|
|
|
997
997
|
// "success": true
|
|
998
998
|
// }
|
|
999
999
|
//
|
|
1000
|
-
const orderbook = this.
|
|
1000
|
+
const orderbook = this.safeDict(response, 'data', {});
|
|
1001
1001
|
const timestamp = this.milliseconds();
|
|
1002
1002
|
if (market['swap'] === true) {
|
|
1003
1003
|
return this.parseOrderBook(orderbook, market['symbol'], timestamp, 'bids', 'asks', 'price', 'volume');
|
|
@@ -1137,7 +1137,7 @@ class lbank extends lbank$1["default"] {
|
|
|
1137
1137
|
else {
|
|
1138
1138
|
request['size'] = 600; // max
|
|
1139
1139
|
}
|
|
1140
|
-
const options = this.
|
|
1140
|
+
const options = this.safeDict(this.options, 'fetchTrades', {});
|
|
1141
1141
|
const defaultMethod = this.safeString(options, 'method', 'spotPublicGetTrades');
|
|
1142
1142
|
const method = this.safeString(params, 'method', defaultMethod);
|
|
1143
1143
|
params = this.omit(params, 'method');
|
|
@@ -1336,7 +1336,7 @@ class lbank extends lbank$1["default"] {
|
|
|
1336
1336
|
// from spotPrivatePostUserInfo
|
|
1337
1337
|
const toBtc = this.safeValue(data, 'toBtc');
|
|
1338
1338
|
if (toBtc !== undefined) {
|
|
1339
|
-
const used = this.
|
|
1339
|
+
const used = this.safeDict(data, 'freeze', {});
|
|
1340
1340
|
const free = this.safeDict(data, 'free', {});
|
|
1341
1341
|
const currencies = Object.keys(free);
|
|
1342
1342
|
for (let i = 0; i < currencies.length; i++) {
|
|
@@ -1352,7 +1352,7 @@ class lbank extends lbank$1["default"] {
|
|
|
1352
1352
|
return this.safeBalance(result);
|
|
1353
1353
|
}
|
|
1354
1354
|
// from spotPrivatePostSupplementUserInfoAccount
|
|
1355
|
-
const balances = this.
|
|
1355
|
+
const balances = this.safeList(data, 'balances');
|
|
1356
1356
|
if (balances !== undefined) {
|
|
1357
1357
|
for (let i = 0; i < balances.length; i++) {
|
|
1358
1358
|
const item = balances[i];
|
|
@@ -1507,7 +1507,7 @@ class lbank extends lbank$1["default"] {
|
|
|
1507
1507
|
if (this.markets === undefined) {
|
|
1508
1508
|
await this.loadMarkets();
|
|
1509
1509
|
}
|
|
1510
|
-
const options = this.
|
|
1510
|
+
const options = this.safeDict(this.options, 'fetchBalance', {});
|
|
1511
1511
|
const defaultMethod = this.safeString(options, 'method', 'spotPrivatePostSupplementUserInfo');
|
|
1512
1512
|
const method = this.safeString(params, 'method', defaultMethod);
|
|
1513
1513
|
let response;
|
|
@@ -1717,7 +1717,7 @@ class lbank extends lbank$1["default"] {
|
|
|
1717
1717
|
if (clientOrderId !== undefined) {
|
|
1718
1718
|
request['custom_id'] = clientOrderId;
|
|
1719
1719
|
}
|
|
1720
|
-
const options = this.
|
|
1720
|
+
const options = this.safeDict(this.options, 'createOrder', {});
|
|
1721
1721
|
const defaultMethod = this.safeString(options, 'method', 'spotPrivatePostSupplementCreateOrder');
|
|
1722
1722
|
const method = this.safeString(params, 'method', defaultMethod);
|
|
1723
1723
|
params = this.omit(params, 'method');
|
|
@@ -1739,7 +1739,7 @@ class lbank extends lbank$1["default"] {
|
|
|
1739
1739
|
// "ts":1648162321043
|
|
1740
1740
|
// }
|
|
1741
1741
|
//
|
|
1742
|
-
const result = this.
|
|
1742
|
+
const result = this.safeDict(response, 'data', {});
|
|
1743
1743
|
return this.safeOrder({
|
|
1744
1744
|
'id': this.safeString(result, 'order_id'),
|
|
1745
1745
|
'info': result,
|
|
@@ -1918,7 +1918,7 @@ class lbank extends lbank$1["default"] {
|
|
|
1918
1918
|
}
|
|
1919
1919
|
let method = this.safeString(params, 'method');
|
|
1920
1920
|
if (method === undefined) {
|
|
1921
|
-
const options = this.
|
|
1921
|
+
const options = this.safeDict(this.options, 'fetchOrder', {});
|
|
1922
1922
|
method = this.safeString(options, 'method', 'fetchOrderSupplement');
|
|
1923
1923
|
}
|
|
1924
1924
|
if (method === 'fetchOrderSupplement') {
|
|
@@ -2131,7 +2131,7 @@ class lbank extends lbank$1["default"] {
|
|
|
2131
2131
|
// "ts":1648505706348
|
|
2132
2132
|
// }
|
|
2133
2133
|
//
|
|
2134
|
-
const result = this.
|
|
2134
|
+
const result = this.safeDict(response, 'data', {});
|
|
2135
2135
|
const orders = this.safeList(result, 'orders', []);
|
|
2136
2136
|
return this.parseOrders(orders, market, since, limit);
|
|
2137
2137
|
}
|
|
@@ -2190,7 +2190,7 @@ class lbank extends lbank$1["default"] {
|
|
|
2190
2190
|
// "ts":1648506110196
|
|
2191
2191
|
// }
|
|
2192
2192
|
//
|
|
2193
|
-
const result = this.
|
|
2193
|
+
const result = this.safeDict(response, 'data', {});
|
|
2194
2194
|
const orders = this.safeList(result, 'orders', []);
|
|
2195
2195
|
return this.parseOrders(orders, market, since, limit);
|
|
2196
2196
|
}
|
|
@@ -2280,9 +2280,9 @@ class lbank extends lbank$1["default"] {
|
|
|
2280
2280
|
return this.parseOrders(data);
|
|
2281
2281
|
}
|
|
2282
2282
|
getNetworkCodeForCurrency(currencyCode, params) {
|
|
2283
|
-
const defaultNetworks = this.
|
|
2283
|
+
const defaultNetworks = this.safeDict(this.options, 'defaultNetworks');
|
|
2284
2284
|
const defaultNetwork = this.safeStringUpper(defaultNetworks, currencyCode);
|
|
2285
|
-
const networks = this.
|
|
2285
|
+
const networks = this.safeDict(this.options, 'networks', {});
|
|
2286
2286
|
let network = this.safeStringUpper(params, 'network', defaultNetwork); // this line allows the user to specify either ERC20 or ETH
|
|
2287
2287
|
network = this.safeString(networks, network, network); // handle ERC20>ETH alias
|
|
2288
2288
|
return network;
|
|
@@ -2301,7 +2301,7 @@ class lbank extends lbank$1["default"] {
|
|
|
2301
2301
|
if (this.markets === undefined) {
|
|
2302
2302
|
await this.loadMarkets();
|
|
2303
2303
|
}
|
|
2304
|
-
const options = this.
|
|
2304
|
+
const options = this.safeDict(this.options, 'fetchDepositAddress', {});
|
|
2305
2305
|
const defaultMethod = this.safeString(options, 'method', 'fetchDepositAddressDefault');
|
|
2306
2306
|
const method = this.safeString(params, 'method', defaultMethod);
|
|
2307
2307
|
params = this.omit(params, 'method');
|
|
@@ -2341,7 +2341,7 @@ class lbank extends lbank$1["default"] {
|
|
|
2341
2341
|
// "ts":1648075865103
|
|
2342
2342
|
// }
|
|
2343
2343
|
//
|
|
2344
|
-
const result = this.
|
|
2344
|
+
const result = this.safeDict(response, 'data');
|
|
2345
2345
|
const address = this.safeString(result, 'address');
|
|
2346
2346
|
const tag = this.safeString(result, 'memo');
|
|
2347
2347
|
return {
|
|
@@ -2361,7 +2361,7 @@ class lbank extends lbank$1["default"] {
|
|
|
2361
2361
|
const request = {
|
|
2362
2362
|
'coin': currency['id'],
|
|
2363
2363
|
};
|
|
2364
|
-
const networks = this.
|
|
2364
|
+
const networks = this.safeDict(this.options, 'networks');
|
|
2365
2365
|
let network = this.safeStringUpper(params, 'network');
|
|
2366
2366
|
network = this.safeString(networks, network, network);
|
|
2367
2367
|
if (network !== undefined) {
|
|
@@ -2381,7 +2381,7 @@ class lbank extends lbank$1["default"] {
|
|
|
2381
2381
|
// "ts":1648073818880
|
|
2382
2382
|
// }
|
|
2383
2383
|
//
|
|
2384
|
-
const result = this.
|
|
2384
|
+
const result = this.safeDict(response, 'data');
|
|
2385
2385
|
const address = this.safeString(result, 'address');
|
|
2386
2386
|
const tag = this.safeString(result, 'memo');
|
|
2387
2387
|
return {
|
|
@@ -2432,7 +2432,7 @@ class lbank extends lbank$1["default"] {
|
|
|
2432
2432
|
}
|
|
2433
2433
|
const network = this.safeStringUpper2(params, 'network', 'networkName');
|
|
2434
2434
|
params = this.omit(params, ['network', 'networkName']);
|
|
2435
|
-
const networks = this.
|
|
2435
|
+
const networks = this.safeDict(this.options, 'networks');
|
|
2436
2436
|
const networkId = this.safeString(networks, network, network);
|
|
2437
2437
|
if (networkId !== undefined) {
|
|
2438
2438
|
request['networkName'] = networkId;
|
|
@@ -2449,7 +2449,7 @@ class lbank extends lbank$1["default"] {
|
|
|
2449
2449
|
// "ts":1648992501414
|
|
2450
2450
|
// }
|
|
2451
2451
|
//
|
|
2452
|
-
const result = this.
|
|
2452
|
+
const result = this.safeDict(response, 'data', {});
|
|
2453
2453
|
return {
|
|
2454
2454
|
'info': result,
|
|
2455
2455
|
'id': this.safeString(result, 'withdrawId'),
|
|
@@ -2471,7 +2471,7 @@ class lbank extends lbank$1["default"] {
|
|
|
2471
2471
|
'4': 'ok',
|
|
2472
2472
|
},
|
|
2473
2473
|
};
|
|
2474
|
-
return this.safeString(this.
|
|
2474
|
+
return this.safeString(this.safeDict(statuses, type, {}), status, status);
|
|
2475
2475
|
}
|
|
2476
2476
|
parseTransaction(transaction, currency = undefined) {
|
|
2477
2477
|
//
|
|
@@ -2608,7 +2608,7 @@ class lbank extends lbank$1["default"] {
|
|
|
2608
2608
|
// "ts":1649719721758
|
|
2609
2609
|
// }
|
|
2610
2610
|
//
|
|
2611
|
-
const data = this.
|
|
2611
|
+
const data = this.safeDict(response, 'data', {});
|
|
2612
2612
|
const deposits = this.safeList(data, 'depositOrders', []);
|
|
2613
2613
|
return this.parseTransactions(deposits, currency, since, limit);
|
|
2614
2614
|
}
|
|
@@ -2667,7 +2667,7 @@ class lbank extends lbank$1["default"] {
|
|
|
2667
2667
|
// "ts":1649720362362
|
|
2668
2668
|
// }
|
|
2669
2669
|
//
|
|
2670
|
-
const data = this.
|
|
2670
|
+
const data = this.safeDict(response, 'data', {});
|
|
2671
2671
|
const withdraws = this.safeList(data, 'withdraws', []);
|
|
2672
2672
|
return this.parseTransactions(withdraws, currency, since, limit);
|
|
2673
2673
|
}
|
|
@@ -2688,7 +2688,7 @@ class lbank extends lbank$1["default"] {
|
|
|
2688
2688
|
const isAuthorized = this.checkRequiredCredentials(false);
|
|
2689
2689
|
let result;
|
|
2690
2690
|
if (isAuthorized === true) {
|
|
2691
|
-
const options = this.
|
|
2691
|
+
const options = this.safeDict(this.options, 'fetchTransactionFees', {});
|
|
2692
2692
|
const defaultMethod = this.safeString(options, 'method', 'fetchPrivateTransactionFees');
|
|
2693
2693
|
const method = this.safeString(params, 'method', defaultMethod);
|
|
2694
2694
|
params = this.omit(params, 'method');
|
|
@@ -2809,7 +2809,7 @@ class lbank extends lbank$1["default"] {
|
|
|
2809
2809
|
const withdrawFees = {};
|
|
2810
2810
|
for (let i = 0; i < result.length; i++) {
|
|
2811
2811
|
const item = result[i];
|
|
2812
|
-
const canWithdraw = this.
|
|
2812
|
+
const canWithdraw = this.safeString(item, 'canWithDraw');
|
|
2813
2813
|
if (canWithdraw === 'true') {
|
|
2814
2814
|
const currencyId = this.safeString(item, 'assetCode');
|
|
2815
2815
|
const codeInner = this.safeCurrencyCode(currencyId);
|
|
@@ -2851,7 +2851,7 @@ class lbank extends lbank$1["default"] {
|
|
|
2851
2851
|
const isAuthorized = this.checkRequiredCredentials(false);
|
|
2852
2852
|
let response;
|
|
2853
2853
|
if (isAuthorized === true) {
|
|
2854
|
-
const options = this.
|
|
2854
|
+
const options = this.safeDict(this.options, 'fetchDepositWithdrawFees', {});
|
|
2855
2855
|
const defaultMethod = this.safeString(options, 'method', 'fetchPrivateDepositWithdrawFees');
|
|
2856
2856
|
const method = this.safeString(params, 'method', defaultMethod);
|
|
2857
2857
|
params = this.omit(params, 'method');
|
|
@@ -2936,7 +2936,7 @@ class lbank extends lbank$1["default"] {
|
|
|
2936
2936
|
// "ts": "1663364435973"
|
|
2937
2937
|
// }
|
|
2938
2938
|
//
|
|
2939
|
-
const data = this.
|
|
2939
|
+
const data = this.safeList(response, 'data', []);
|
|
2940
2940
|
return this.parsePublicDepositWithdrawFees(data, codes);
|
|
2941
2941
|
}
|
|
2942
2942
|
parsePublicDepositWithdrawFees(response, codes = undefined) {
|
|
@@ -2959,14 +2959,14 @@ class lbank extends lbank$1["default"] {
|
|
|
2959
2959
|
const result = {};
|
|
2960
2960
|
for (let i = 0; i < response.length; i++) {
|
|
2961
2961
|
const fee = response[i];
|
|
2962
|
-
const canWithdraw = this.
|
|
2962
|
+
const canWithdraw = this.safeBool(fee, 'canWithDraw');
|
|
2963
2963
|
if (canWithdraw === true) {
|
|
2964
2964
|
const currencyId = this.safeString(fee, 'assetCode');
|
|
2965
2965
|
const code = this.safeCurrencyCode(currencyId);
|
|
2966
2966
|
if ((code !== undefined) && (codes === undefined || this.inArray(code, codes))) {
|
|
2967
2967
|
const withdrawFee = this.safeNumber(fee, 'fee');
|
|
2968
2968
|
if (withdrawFee !== undefined) {
|
|
2969
|
-
const resultValue = this.
|
|
2969
|
+
const resultValue = this.safeDict(result, code);
|
|
2970
2970
|
if (resultValue === undefined) {
|
|
2971
2971
|
result[code] = this.depositWithdrawFee([fee]);
|
|
2972
2972
|
}
|
|
@@ -3033,7 +3033,7 @@ class lbank extends lbank$1["default"] {
|
|
|
3033
3033
|
const networkEntry = networkList[j];
|
|
3034
3034
|
const networkCode = this.networkIdToCode(this.safeString(networkEntry, 'name'), code);
|
|
3035
3035
|
const withdrawFee = this.safeNumber(networkEntry, 'withdrawFee');
|
|
3036
|
-
const isDefault = this.
|
|
3036
|
+
const isDefault = this.safeBool(networkEntry, 'isDefault');
|
|
3037
3037
|
if (withdrawFee !== undefined) {
|
|
3038
3038
|
if (isDefault === true) {
|
|
3039
3039
|
result['withdraw'] = {
|
|
@@ -3100,7 +3100,7 @@ class lbank extends lbank$1["default"] {
|
|
|
3100
3100
|
const cacheSecretAsPem = this.safeBool(this.options, 'cacheSecretAsPem', true);
|
|
3101
3101
|
let pem = undefined;
|
|
3102
3102
|
if (cacheSecretAsPem === true) {
|
|
3103
|
-
pem = this.
|
|
3103
|
+
pem = this.safeString(this.options, 'pem');
|
|
3104
3104
|
if (pem === undefined) {
|
|
3105
3105
|
pem = this.convertSecretToPem(this.encode(this.secret));
|
|
3106
3106
|
this.options['pem'] = pem;
|
package/dist/cjs/src/lighter.js
CHANGED
|
@@ -764,8 +764,8 @@ class lighter extends lighter$1["default"] {
|
|
|
764
764
|
const triggerPrice = this.safeString2(params, 'triggerPrice', 'stopPrice');
|
|
765
765
|
const stopLossPrice = this.safeValue(params, 'stopLossPrice', triggerPrice);
|
|
766
766
|
const takeProfitPrice = this.safeValue(params, 'takeProfitPrice');
|
|
767
|
-
const stopLoss = this.
|
|
768
|
-
const takeProfit = this.
|
|
767
|
+
const stopLoss = this.safeDict(params, 'stopLoss');
|
|
768
|
+
const takeProfit = this.safeDict(params, 'takeProfit');
|
|
769
769
|
const hasStopLoss = (stopLoss !== undefined);
|
|
770
770
|
const hasTakeProfit = (takeProfit !== undefined);
|
|
771
771
|
const isConditional = ((stopLossPrice !== undefined) || (takeProfitPrice !== undefined));
|
package/dist/cjs/src/luno.js
CHANGED
|
@@ -1426,7 +1426,7 @@ class luno extends luno$1["default"] {
|
|
|
1426
1426
|
}
|
|
1427
1427
|
currency = this.currency(code);
|
|
1428
1428
|
const accountsByCurrencyCode = this.indexBy(this.accounts, 'currency');
|
|
1429
|
-
const account = this.
|
|
1429
|
+
const account = this.safeDict(accountsByCurrencyCode, code);
|
|
1430
1430
|
if (account === undefined) {
|
|
1431
1431
|
throw new errors.ExchangeError(this.id + ' fetchLedger() could not find account id for ' + code);
|
|
1432
1432
|
}
|
|
@@ -1456,7 +1456,7 @@ class luno extends luno$1["default"] {
|
|
|
1456
1456
|
'max_row': max_row,
|
|
1457
1457
|
};
|
|
1458
1458
|
const response = await this.privateGetAccountsIdTransactions(this.extend(params, request));
|
|
1459
|
-
const entries = this.
|
|
1459
|
+
const entries = this.safeList(response, 'transactions', []);
|
|
1460
1460
|
return this.parseLedger(entries, currency, since, limit);
|
|
1461
1461
|
}
|
|
1462
1462
|
parseLedgerComment(comment) {
|
package/dist/cjs/src/mercado.js
CHANGED
|
@@ -309,7 +309,7 @@ class mercado extends mercado$1["default"] {
|
|
|
309
309
|
// ]
|
|
310
310
|
//
|
|
311
311
|
const result = [];
|
|
312
|
-
const amountLimits = this.
|
|
312
|
+
const amountLimits = this.safeDict(this.options, 'limits', {});
|
|
313
313
|
const coins = this.toArray(response);
|
|
314
314
|
for (let i = 0; i < coins.length; i++) {
|
|
315
315
|
const coin = coins[i];
|
|
@@ -449,7 +449,7 @@ class mercado extends mercado$1["default"] {
|
|
|
449
449
|
'coin': market['base'],
|
|
450
450
|
};
|
|
451
451
|
const response = await this.publicGetCoinTicker(this.extend(request, params));
|
|
452
|
-
const ticker = this.
|
|
452
|
+
const ticker = this.safeDict(response, 'ticker', {});
|
|
453
453
|
//
|
|
454
454
|
// {
|
|
455
455
|
// "ticker": {
|
|
@@ -533,7 +533,7 @@ class mercado extends mercado$1["default"] {
|
|
|
533
533
|
return this.parseTrades(response, market, since, limit);
|
|
534
534
|
}
|
|
535
535
|
parseBalance(response) {
|
|
536
|
-
const data = this.
|
|
536
|
+
const data = this.safeDict(response, 'response_data', {});
|
|
537
537
|
const balances = this.safeDict(data, 'balance', {});
|
|
538
538
|
const result = { 'info': response };
|
|
539
539
|
const currencyIds = Object.keys(balances);
|
|
@@ -541,7 +541,7 @@ class mercado extends mercado$1["default"] {
|
|
|
541
541
|
const currencyId = currencyIds[i];
|
|
542
542
|
const code = this.safeCurrencyCode(currencyId);
|
|
543
543
|
if (currencyId in balances) {
|
|
544
|
-
const balance = this.
|
|
544
|
+
const balance = this.safeDict(balances, currencyId, {});
|
|
545
545
|
const account = this.account();
|
|
546
546
|
account['free'] = this.safeString(balance, 'available');
|
|
547
547
|
account['total'] = this.safeString(balance, 'total');
|
|
@@ -664,7 +664,7 @@ class mercado extends mercado$1["default"] {
|
|
|
664
664
|
// "server_unix_timestamp": "1536956499"
|
|
665
665
|
// }
|
|
666
666
|
//
|
|
667
|
-
const responseData = this.
|
|
667
|
+
const responseData = this.safeDict(response, 'response_data', {});
|
|
668
668
|
const order = this.safeDict(responseData, 'order', {});
|
|
669
669
|
return this.parseOrder(order, market);
|
|
670
670
|
}
|
|
@@ -722,7 +722,7 @@ class mercado extends mercado$1["default"] {
|
|
|
722
722
|
const amount = this.safeString(order, 'quantity');
|
|
723
723
|
const filled = this.safeString(order, 'executed_quantity');
|
|
724
724
|
const lastTradeTimestamp = this.safeTimestamp(order, 'updated_timestamp');
|
|
725
|
-
const rawTrades = this.
|
|
725
|
+
const rawTrades = this.safeList(order, 'operations', []);
|
|
726
726
|
const symbol = market['symbol'];
|
|
727
727
|
return this.safeOrder({
|
|
728
728
|
'info': order,
|
|
@@ -770,7 +770,7 @@ class mercado extends mercado$1["default"] {
|
|
|
770
770
|
'order_id': parseInt(id),
|
|
771
771
|
};
|
|
772
772
|
const response = await this.privatePostGetOrder(this.extend(request, params));
|
|
773
|
-
const responseData = this.
|
|
773
|
+
const responseData = this.safeDict(response, 'response_data', {});
|
|
774
774
|
const order = this.safeDict(responseData, 'order');
|
|
775
775
|
return this.parseOrder(order, market);
|
|
776
776
|
}
|
|
@@ -839,7 +839,7 @@ class mercado extends mercado$1["default"] {
|
|
|
839
839
|
// "server_unix_timestamp": "1453912088"
|
|
840
840
|
// }
|
|
841
841
|
//
|
|
842
|
-
const responseData = this.
|
|
842
|
+
const responseData = this.safeDict(response, 'response_data', {});
|
|
843
843
|
const withdrawal = this.safeDict(responseData, 'withdrawal');
|
|
844
844
|
return this.parseTransaction(withdrawal, currency);
|
|
845
845
|
}
|
|
@@ -949,7 +949,7 @@ class mercado extends mercado$1["default"] {
|
|
|
949
949
|
'coin_pair': market['id'],
|
|
950
950
|
};
|
|
951
951
|
const response = await this.privatePostListOrders(this.extend(request, params));
|
|
952
|
-
const responseData = this.
|
|
952
|
+
const responseData = this.safeDict(response, 'response_data', {});
|
|
953
953
|
const orders = this.safeList(responseData, 'orders', []);
|
|
954
954
|
return this.parseOrders(orders, market, since, limit);
|
|
955
955
|
}
|
|
@@ -976,7 +976,7 @@ class mercado extends mercado$1["default"] {
|
|
|
976
976
|
'status_list': '[2]', // open only
|
|
977
977
|
};
|
|
978
978
|
const response = await this.privatePostListOrders(this.extend(request, params));
|
|
979
|
-
const responseData = this.
|
|
979
|
+
const responseData = this.safeDict(response, 'response_data', {});
|
|
980
980
|
const orders = this.safeList(responseData, 'orders', []);
|
|
981
981
|
return this.parseOrders(orders, market, since, limit);
|
|
982
982
|
}
|
|
@@ -1003,8 +1003,8 @@ class mercado extends mercado$1["default"] {
|
|
|
1003
1003
|
'has_fills': true,
|
|
1004
1004
|
};
|
|
1005
1005
|
const response = await this.privatePostListOrders(this.extend(request, params));
|
|
1006
|
-
const responseData = this.
|
|
1007
|
-
const ordersRaw = this.
|
|
1006
|
+
const responseData = this.safeDict(response, 'response_data', {});
|
|
1007
|
+
const ordersRaw = this.safeList(responseData, 'orders', []);
|
|
1008
1008
|
const orders = this.parseOrders(ordersRaw, market, since, limit);
|
|
1009
1009
|
const trades = this.ordersToTrades(orders);
|
|
1010
1010
|
return this.filterBySymbolSinceLimit(trades, market['symbol'], since, limit);
|
package/dist/cjs/src/mexc.js
CHANGED
|
@@ -1304,12 +1304,12 @@ class mexc extends mexc$1["default"] {
|
|
|
1304
1304
|
const base = this.safeCurrencyCode(baseId);
|
|
1305
1305
|
const quote = this.safeCurrencyCode(quoteId);
|
|
1306
1306
|
const status = this.safeString(market, 'status');
|
|
1307
|
-
const isSpotTradingAllowed = this.
|
|
1307
|
+
const isSpotTradingAllowed = this.safeBool(market, 'isSpotTradingAllowed');
|
|
1308
1308
|
let active = false;
|
|
1309
1309
|
if ((status === '1') && (isSpotTradingAllowed === true)) {
|
|
1310
1310
|
active = true;
|
|
1311
1311
|
}
|
|
1312
|
-
const isMarginTradingAllowed = this.
|
|
1312
|
+
const isMarginTradingAllowed = this.safeBool(market, 'isMarginTradingAllowed');
|
|
1313
1313
|
const makerCommission = this.safeNumber(market, 'makerCommission');
|
|
1314
1314
|
const takerCommission = this.safeNumber(market, 'takerCommission');
|
|
1315
1315
|
const maxQuoteAmount = this.safeNumber(market, 'maxQuoteAmount');
|
|
@@ -1554,7 +1554,7 @@ class mexc extends mexc$1["default"] {
|
|
|
1554
1554
|
// }
|
|
1555
1555
|
// }
|
|
1556
1556
|
//
|
|
1557
|
-
const data = this.
|
|
1557
|
+
const data = this.safeDict(response, 'data');
|
|
1558
1558
|
const timestamp = this.safeInteger(data, 'timestamp');
|
|
1559
1559
|
orderbook = this.parseOrderBook(data, symbol, timestamp);
|
|
1560
1560
|
orderbook['nonce'] = this.safeInteger(data, 'version');
|
|
@@ -1779,16 +1779,16 @@ class mexc extends mexc$1["default"] {
|
|
|
1779
1779
|
'cost': this.safeString(trade, 'fee'),
|
|
1780
1780
|
'currency': this.safeCurrencyCode(this.safeString(trade, 'feeCurrency')),
|
|
1781
1781
|
};
|
|
1782
|
-
const isTaker = (this.
|
|
1782
|
+
const isTaker = (this.safeBool2(trade, 'isTaker', 'taker') === true);
|
|
1783
1783
|
takerOrMaker = isTaker ? 'taker' : 'maker';
|
|
1784
1784
|
}
|
|
1785
1785
|
else {
|
|
1786
1786
|
timestamp = this.safeInteger2(trade, 'time', 'T');
|
|
1787
1787
|
amountString = this.safeString2(trade, 'qty', 'q');
|
|
1788
1788
|
costString = this.safeString(trade, 'quoteQty');
|
|
1789
|
-
const isBuyer = this.
|
|
1790
|
-
const isMaker = this.
|
|
1791
|
-
const buyerMaker = this.
|
|
1789
|
+
const isBuyer = this.safeBool(trade, 'isBuyer');
|
|
1790
|
+
const isMaker = this.safeBool(trade, 'isMaker');
|
|
1791
|
+
const buyerMaker = this.safeBool2(trade, 'isBuyerMaker', 'm');
|
|
1792
1792
|
if (isMaker !== undefined) {
|
|
1793
1793
|
takerOrMaker = (isMaker === true) ? 'maker' : 'taker';
|
|
1794
1794
|
}
|
|
@@ -1855,8 +1855,8 @@ class mexc extends mexc$1["default"] {
|
|
|
1855
1855
|
if (paginate) {
|
|
1856
1856
|
return await this.fetchPaginatedCallDeterministic('fetchOHLCV', symbol, since, limit, timeframe, params, maxLimit);
|
|
1857
1857
|
}
|
|
1858
|
-
const options = this.
|
|
1859
|
-
const timeframes = this.
|
|
1858
|
+
const options = this.safeDict(this.options, 'timeframes', {});
|
|
1859
|
+
const timeframes = this.safeDict(options, market['type'], {});
|
|
1860
1860
|
const timeframeValue = this.safeString(timeframes, timeframe);
|
|
1861
1861
|
const duration = this.parseTimeframe(timeframe) * 1000;
|
|
1862
1862
|
const request = {
|
|
@@ -2043,7 +2043,7 @@ class mexc extends mexc$1["default"] {
|
|
|
2043
2043
|
// ]
|
|
2044
2044
|
// }
|
|
2045
2045
|
//
|
|
2046
|
-
tickers = this.
|
|
2046
|
+
tickers = this.safeList(response, 'data', []);
|
|
2047
2047
|
}
|
|
2048
2048
|
// when it's single symbol request, the returned structure is different (singular object) for both spot & swap, thus we need to wrap inside array
|
|
2049
2049
|
if (isSingularMarket) {
|
|
@@ -2123,7 +2123,7 @@ class mexc extends mexc$1["default"] {
|
|
|
2123
2123
|
// }
|
|
2124
2124
|
// }
|
|
2125
2125
|
//
|
|
2126
|
-
ticker = this.
|
|
2126
|
+
ticker = this.safeDict(response, 'data', {});
|
|
2127
2127
|
}
|
|
2128
2128
|
// when it's single symbol request, the returned structure is different (singular object) for both spot & swap, thus we need to wrap inside array
|
|
2129
2129
|
return this.parseTicker(ticker, market);
|
|
@@ -2144,7 +2144,7 @@ class mexc extends mexc$1["default"] {
|
|
|
2144
2144
|
let changePcnt = undefined;
|
|
2145
2145
|
let changeValue = undefined;
|
|
2146
2146
|
let prevClose = undefined;
|
|
2147
|
-
const isSwap = this.
|
|
2147
|
+
const isSwap = this.safeBool(market, 'swap');
|
|
2148
2148
|
// if swap
|
|
2149
2149
|
if ((isSwap === true) || ('timestamp' in ticker)) {
|
|
2150
2150
|
//
|
|
@@ -2678,7 +2678,7 @@ class mexc extends mexc$1["default"] {
|
|
|
2678
2678
|
const side = this.safeString(rawOrder, 'side');
|
|
2679
2679
|
const amount = this.safeValue(rawOrder, 'amount');
|
|
2680
2680
|
const price = this.safeValue(rawOrder, 'price');
|
|
2681
|
-
const orderParams = this.
|
|
2681
|
+
const orderParams = this.safeDict(rawOrder, 'params', {});
|
|
2682
2682
|
let marginMode = undefined;
|
|
2683
2683
|
[marginMode, params] = this.handleMarginModeAndParams('createOrder', params);
|
|
2684
2684
|
const orderRequest = this.createSpotOrderRequest(market, type, side, amount, price, marginMode, orderParams);
|
|
@@ -3356,8 +3356,8 @@ class mexc extends mexc$1["default"] {
|
|
|
3356
3356
|
// }
|
|
3357
3357
|
//
|
|
3358
3358
|
data = this.safeValue(response, 'data');
|
|
3359
|
-
const order = this.
|
|
3360
|
-
const errorMsg = this.
|
|
3359
|
+
const order = this.safeDict(data, 0);
|
|
3360
|
+
const errorMsg = this.safeString(order, 'errorMsg', '');
|
|
3361
3361
|
if (errorMsg !== 'success') {
|
|
3362
3362
|
throw new errors.InvalidOrder(this.id + ' cancelOrder() the order with id ' + id + ' cannot be cancelled: ' + errorMsg);
|
|
3363
3363
|
}
|
|
@@ -3820,7 +3820,7 @@ class mexc extends mexc$1["default"] {
|
|
|
3820
3820
|
// wrap the swap asset list so this helper always returns an account
|
|
3821
3821
|
// dict with a `balances` array — fetchAccounts reads response['balances']
|
|
3822
3822
|
return {
|
|
3823
|
-
'balances': this.
|
|
3823
|
+
'balances': this.safeList(response, 'data', []),
|
|
3824
3824
|
};
|
|
3825
3825
|
}
|
|
3826
3826
|
return undefined;
|
|
@@ -3973,8 +3973,8 @@ class mexc extends mexc$1["default"] {
|
|
|
3973
3973
|
if (marketType === 'margin') {
|
|
3974
3974
|
for (let i = 0; i < wallet.length; i++) {
|
|
3975
3975
|
const entry = wallet[i];
|
|
3976
|
-
const base = this.
|
|
3977
|
-
const quote = this.
|
|
3976
|
+
const base = this.safeDict(entry, 'baseAsset', {});
|
|
3977
|
+
const quote = this.safeDict(entry, 'quoteAsset', {});
|
|
3978
3978
|
const baseCode = this.safeCurrencyCode(this.safeString(base, 'asset'));
|
|
3979
3979
|
const quoteCode = this.safeCurrencyCode(this.safeString(quote, 'asset'));
|
|
3980
3980
|
if (baseCode !== undefined) {
|
|
@@ -4051,7 +4051,7 @@ class mexc extends mexc$1["default"] {
|
|
|
4051
4051
|
let parsedSymbols = undefined;
|
|
4052
4052
|
const symbol = this.safeString(params, 'symbol');
|
|
4053
4053
|
if (symbol === undefined) {
|
|
4054
|
-
const symbols = this.
|
|
4054
|
+
const symbols = this.safeList(params, 'symbols');
|
|
4055
4055
|
if (symbols !== undefined) {
|
|
4056
4056
|
const symbolIds = this.marketIds(symbols);
|
|
4057
4057
|
if (symbolIds !== undefined) {
|
|
@@ -4493,7 +4493,7 @@ class mexc extends mexc$1["default"] {
|
|
|
4493
4493
|
// }
|
|
4494
4494
|
// }
|
|
4495
4495
|
//
|
|
4496
|
-
const data = this.
|
|
4496
|
+
const data = this.safeDict(response, 'data', {});
|
|
4497
4497
|
const resultList = this.safeList(data, 'resultList', []);
|
|
4498
4498
|
const result = [];
|
|
4499
4499
|
for (let i = 0; i < resultList.length; i++) {
|
|
@@ -4607,7 +4607,7 @@ class mexc extends mexc$1["default"] {
|
|
|
4607
4607
|
// }
|
|
4608
4608
|
// }
|
|
4609
4609
|
//
|
|
4610
|
-
const result = this.
|
|
4610
|
+
const result = this.safeDict(response, 'data', {});
|
|
4611
4611
|
return this.parseFundingRate(result, market);
|
|
4612
4612
|
}
|
|
4613
4613
|
/**
|
|
@@ -4662,7 +4662,7 @@ class mexc extends mexc$1["default"] {
|
|
|
4662
4662
|
// }
|
|
4663
4663
|
// }
|
|
4664
4664
|
//
|
|
4665
|
-
const data = this.
|
|
4665
|
+
const data = this.safeDict(response, 'data');
|
|
4666
4666
|
const result = this.safeList(data, 'resultList', []);
|
|
4667
4667
|
const rates = [];
|
|
4668
4668
|
for (let i = 0; i < result.length; i++) {
|
|
@@ -4874,7 +4874,7 @@ class mexc extends mexc$1["default"] {
|
|
|
4874
4874
|
const networks = this.safeDict(currency, 'networks', {});
|
|
4875
4875
|
if ((networkUnified !== undefined) && (networkUnified in networks)) {
|
|
4876
4876
|
const network = (networkUnified === undefined) ? {} : this.safeDict(networks, networkUnified, {});
|
|
4877
|
-
const networkInfo = this.
|
|
4877
|
+
const networkInfo = this.safeDict(network, 'info', {});
|
|
4878
4878
|
networkId = this.safeString(networkInfo, 'network');
|
|
4879
4879
|
}
|
|
4880
4880
|
else {
|
|
@@ -4928,7 +4928,7 @@ class mexc extends mexc$1["default"] {
|
|
|
4928
4928
|
const networks = this.safeDict(currency, 'networks', {});
|
|
4929
4929
|
if ((networkUnified !== undefined) && (networkUnified in networks)) {
|
|
4930
4930
|
const network = (networkUnified === undefined) ? {} : this.safeDict(networks, networkUnified, {});
|
|
4931
|
-
const networkInfo = this.
|
|
4931
|
+
const networkInfo = this.safeDict(network, 'info', {});
|
|
4932
4932
|
networkId = this.safeString(networkInfo, 'network');
|
|
4933
4933
|
}
|
|
4934
4934
|
else {
|
|
@@ -5241,7 +5241,7 @@ class mexc extends mexc$1["default"] {
|
|
|
5241
5241
|
'10': 'pending', // MANUAL
|
|
5242
5242
|
},
|
|
5243
5243
|
};
|
|
5244
|
-
const statuses = this.
|
|
5244
|
+
const statuses = this.safeDict(statusesByType, type, {});
|
|
5245
5245
|
return this.safeString(statuses, status, status);
|
|
5246
5246
|
}
|
|
5247
5247
|
/**
|
|
@@ -5285,7 +5285,7 @@ class mexc extends mexc$1["default"] {
|
|
|
5285
5285
|
'symbol': market['id'],
|
|
5286
5286
|
};
|
|
5287
5287
|
const response = await this.fetchPositions(undefined, this.extend(request, params));
|
|
5288
|
-
return this.
|
|
5288
|
+
return this.safeDict(response, 0);
|
|
5289
5289
|
}
|
|
5290
5290
|
/**
|
|
5291
5291
|
* @method
|
|
@@ -5563,7 +5563,7 @@ class mexc extends mexc$1["default"] {
|
|
|
5563
5563
|
request['page_size'] = limit;
|
|
5564
5564
|
}
|
|
5565
5565
|
const response = await this.contractPrivateGetAccountTransferRecord(this.extend(request, params));
|
|
5566
|
-
const data = this.
|
|
5566
|
+
const data = this.safeDict(response, 'data');
|
|
5567
5567
|
resultList = this.safeValue(data, 'resultList');
|
|
5568
5568
|
//
|
|
5569
5569
|
// {
|
|
@@ -1396,29 +1396,29 @@ class modetrade extends modetrade$1["default"] {
|
|
|
1396
1396
|
const amount = this.safeString2(order, 'order_quantity', 'quantity'); // This is base amount
|
|
1397
1397
|
const cost = this.safeString2(order, 'order_amount', 'amount'); // This is quote amount
|
|
1398
1398
|
const orderType = this.safeStringLower2(order, 'order_type', 'type');
|
|
1399
|
-
let status = this.
|
|
1399
|
+
let status = this.safeString2(order, 'status', 'algoStatus');
|
|
1400
1400
|
const success = this.safeBool(order, 'success');
|
|
1401
1401
|
if (success !== undefined) {
|
|
1402
1402
|
status = (success) ? 'NEW' : 'REJECTED';
|
|
1403
1403
|
}
|
|
1404
1404
|
const side = this.safeStringLower(order, 'side');
|
|
1405
|
-
const filled = this.omitZero(this.
|
|
1405
|
+
const filled = this.omitZero(this.safeString2(order, 'executed', 'totalExecutedQuantity'));
|
|
1406
1406
|
const average = this.omitZero(this.safeString2(order, 'average_executed_price', 'averageExecutedPrice'));
|
|
1407
1407
|
const remaining = Precise["default"].stringSub(cost, filled);
|
|
1408
|
-
const fee = this.
|
|
1408
|
+
const fee = this.safeNumber2(order, 'total_fee', 'totalFee');
|
|
1409
1409
|
const feeCurrency = this.safeString2(order, 'fee_asset', 'feeAsset');
|
|
1410
1410
|
const transactions = this.safeValue(order, 'Transactions');
|
|
1411
1411
|
const triggerPrice = this.safeNumber(order, 'triggerPrice');
|
|
1412
1412
|
let takeProfitPrice = undefined;
|
|
1413
1413
|
let stopLossPrice = undefined;
|
|
1414
|
-
const childOrders = this.
|
|
1414
|
+
const childOrders = this.safeList(order, 'childOrders');
|
|
1415
1415
|
if (childOrders !== undefined) {
|
|
1416
|
-
const first = this.
|
|
1416
|
+
const first = this.safeDict(childOrders, 0);
|
|
1417
1417
|
const innerChildOrders = this.safeList(first, 'childOrders', []);
|
|
1418
1418
|
const innerChildOrdersLength = innerChildOrders.length;
|
|
1419
1419
|
if (innerChildOrdersLength > 0) {
|
|
1420
|
-
const takeProfitOrder = this.
|
|
1421
|
-
const stopLossOrder = this.
|
|
1420
|
+
const takeProfitOrder = this.safeDict(innerChildOrders, 0);
|
|
1421
|
+
const stopLossOrder = this.safeDict(innerChildOrders, 1);
|
|
1422
1422
|
takeProfitPrice = this.safeNumber(takeProfitOrder, 'triggerPrice');
|
|
1423
1423
|
stopLossPrice = this.safeNumber(stopLossOrder, 'triggerPrice');
|
|
1424
1424
|
}
|
|
@@ -1711,8 +1711,8 @@ class modetrade extends modetrade$1["default"] {
|
|
|
1711
1711
|
const price = this.safeValue(rawOrder, 'price');
|
|
1712
1712
|
const orderParams = this.safeDict(rawOrder, 'params', {});
|
|
1713
1713
|
const triggerPrice = this.safeString2(orderParams, 'triggerPrice', 'stopPrice');
|
|
1714
|
-
const stopLoss = this.
|
|
1715
|
-
const takeProfit = this.
|
|
1714
|
+
const stopLoss = this.safeDict(orderParams, 'stopLoss');
|
|
1715
|
+
const takeProfit = this.safeDict(orderParams, 'takeProfit');
|
|
1716
1716
|
const isConditional = triggerPrice !== undefined || stopLoss !== undefined || takeProfit !== undefined || (this.safeValue(orderParams, 'childOrders') !== undefined);
|
|
1717
1717
|
if (isConditional) {
|
|
1718
1718
|
throw new errors.NotSupported(this.id + ' createOrders() only support non-stop order');
|
|
@@ -2175,7 +2175,7 @@ class modetrade extends modetrade$1["default"] {
|
|
|
2175
2175
|
// }
|
|
2176
2176
|
// }
|
|
2177
2177
|
//
|
|
2178
|
-
const data = this.
|
|
2178
|
+
const data = this.safeDict(response, 'data', response);
|
|
2179
2179
|
const orders = this.safeList(data, 'rows', []);
|
|
2180
2180
|
return this.parseOrders(orders, market, since, limit);
|
|
2181
2181
|
}
|