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/bitrue.js
CHANGED
|
@@ -856,7 +856,7 @@ class bitrue extends bitrue$1["default"] {
|
|
|
856
856
|
}
|
|
857
857
|
}
|
|
858
858
|
const promises = await Promise.all(promisesRaw);
|
|
859
|
-
const spotMarkets = this.
|
|
859
|
+
const spotMarkets = this.safeList(this.safeDict(promises, 0), 'symbols', []);
|
|
860
860
|
const futureMarkets = this.safeValue(promises, 1);
|
|
861
861
|
const deliveryMarkets = this.safeValue(promises, 2);
|
|
862
862
|
let markets = spotMarkets;
|
|
@@ -2124,7 +2124,7 @@ class bitrue extends bitrue$1["default"] {
|
|
|
2124
2124
|
request['volume'] = this.parseToNumeric(amount);
|
|
2125
2125
|
}
|
|
2126
2126
|
request['positionType'] = 1;
|
|
2127
|
-
const reduceOnly = this.
|
|
2127
|
+
const reduceOnly = this.safeBool2(params, 'reduceOnly', 'reduce_only');
|
|
2128
2128
|
request['open'] = (reduceOnly === true) ? 'CLOSE' : 'OPEN';
|
|
2129
2129
|
const leverage = this.safeString(params, 'leverage', '1');
|
|
2130
2130
|
request['leverage'] = this.parseToNumeric(leverage);
|
|
@@ -2149,7 +2149,7 @@ class bitrue extends bitrue$1["default"] {
|
|
|
2149
2149
|
params = this.omit(params, ['newClientOrderId', 'clientOrderId']);
|
|
2150
2150
|
request['newClientOrderId'] = clientOrderId;
|
|
2151
2151
|
}
|
|
2152
|
-
const triggerPrice = this.
|
|
2152
|
+
const triggerPrice = this.safeNumber2(params, 'triggerPrice', 'stopPrice');
|
|
2153
2153
|
if (triggerPrice !== undefined) {
|
|
2154
2154
|
params = this.omit(params, ['triggerPrice', 'stopPrice']);
|
|
2155
2155
|
request['stopPrice'] = this.priceToPrecision(symbol, triggerPrice);
|
|
@@ -2202,7 +2202,7 @@ class bitrue extends bitrue$1["default"] {
|
|
|
2202
2202
|
await this.loadMarkets();
|
|
2203
2203
|
}
|
|
2204
2204
|
const market = this.market(symbol);
|
|
2205
|
-
const origClientOrderId = this.
|
|
2205
|
+
const origClientOrderId = this.safeString2(params, 'origClientOrderId', 'clientOrderId');
|
|
2206
2206
|
params = this.omit(params, ['origClientOrderId', 'clientOrderId']);
|
|
2207
2207
|
let response = undefined;
|
|
2208
2208
|
let data = {};
|
|
@@ -2451,7 +2451,7 @@ class bitrue extends bitrue$1["default"] {
|
|
|
2451
2451
|
await this.loadMarkets();
|
|
2452
2452
|
}
|
|
2453
2453
|
const market = this.market(symbol);
|
|
2454
|
-
const origClientOrderId = this.
|
|
2454
|
+
const origClientOrderId = this.safeString2(params, 'origClientOrderId', 'clientOrderId');
|
|
2455
2455
|
params = this.omit(params, ['origClientOrderId', 'clientOrderId']);
|
|
2456
2456
|
let response = undefined;
|
|
2457
2457
|
let data = {};
|
|
@@ -3435,7 +3435,7 @@ class bitrue extends bitrue$1["default"] {
|
|
|
3435
3435
|
}
|
|
3436
3436
|
}
|
|
3437
3437
|
}
|
|
3438
|
-
return this.
|
|
3438
|
+
return this.safeNumber(config, 'cost', 1);
|
|
3439
3439
|
}
|
|
3440
3440
|
}
|
|
3441
3441
|
|
package/dist/cjs/src/bitso.js
CHANGED
|
@@ -330,7 +330,7 @@ class bitso extends bitso$1["default"] {
|
|
|
330
330
|
// }]
|
|
331
331
|
// }
|
|
332
332
|
//
|
|
333
|
-
const payload = this.
|
|
333
|
+
const payload = this.safeList(response, 'payload', []);
|
|
334
334
|
const currency = this.safeCurrency(code);
|
|
335
335
|
return this.parseLedger(payload, currency, since, limit);
|
|
336
336
|
}
|
|
@@ -400,15 +400,15 @@ class bitso extends bitso$1["default"] {
|
|
|
400
400
|
// }
|
|
401
401
|
const operation = this.safeString(item, 'operation');
|
|
402
402
|
const type = this.parseLedgerEntryType(operation);
|
|
403
|
-
const balanceUpdates = this.
|
|
404
|
-
const firstBalance = this.
|
|
403
|
+
const balanceUpdates = this.safeList(item, 'balance_updates', []);
|
|
404
|
+
const firstBalance = this.safeDict(balanceUpdates, 0, {});
|
|
405
405
|
let direction = undefined;
|
|
406
406
|
let fee = undefined;
|
|
407
407
|
const amount = this.safeString(firstBalance, 'amount');
|
|
408
408
|
const currencyId = this.safeString(firstBalance, 'currency');
|
|
409
409
|
const code = this.safeCurrencyCode(currencyId, currency);
|
|
410
410
|
currency = this.safeCurrency(currencyId, currency);
|
|
411
|
-
const details = this.
|
|
411
|
+
const details = this.safeDict(item, 'details', {});
|
|
412
412
|
let referenceId = this.safeString2(details, 'fid', 'wid');
|
|
413
413
|
if (referenceId === undefined) {
|
|
414
414
|
referenceId = this.safeString(details, 'tid');
|
|
@@ -502,8 +502,8 @@ class bitso extends bitso$1["default"] {
|
|
|
502
502
|
let quote = quoteId.toUpperCase();
|
|
503
503
|
base = this.safeCurrencyCode(base);
|
|
504
504
|
quote = this.safeCurrencyCode(quote);
|
|
505
|
-
const fees = this.
|
|
506
|
-
const flatRate = this.
|
|
505
|
+
const fees = this.safeDict(market, 'fees', {});
|
|
506
|
+
const flatRate = this.safeDict(fees, 'flat_rate', {});
|
|
507
507
|
const takerString = this.safeString(flatRate, 'taker');
|
|
508
508
|
const makerString = this.safeString(flatRate, 'maker');
|
|
509
509
|
const taker = this.parseNumber(Precise["default"].stringDiv(takerString, '100'));
|
|
@@ -739,7 +739,7 @@ class bitso extends bitso$1["default"] {
|
|
|
739
739
|
'book': market['id'],
|
|
740
740
|
};
|
|
741
741
|
const response = await this.publicGetOrderBook(this.extend(request, params));
|
|
742
|
-
const orderbook = this.
|
|
742
|
+
const orderbook = this.safeDict(response, 'payload');
|
|
743
743
|
const timestamp = this.parse8601(this.safeString(orderbook, 'updated_at'));
|
|
744
744
|
return this.parseOrderBook(orderbook, market['symbol'], timestamp, 'bids', 'asks', 'price', 'amount');
|
|
745
745
|
}
|
|
@@ -1091,7 +1091,7 @@ class bitso extends bitso$1["default"] {
|
|
|
1091
1091
|
// }
|
|
1092
1092
|
// }
|
|
1093
1093
|
//
|
|
1094
|
-
const payload = this.
|
|
1094
|
+
const payload = this.safeDict(response, 'payload', {});
|
|
1095
1095
|
const fees = this.safeList(payload, 'fees', []);
|
|
1096
1096
|
const result = {};
|
|
1097
1097
|
for (let i = 0; i < fees.length; i++) {
|
|
@@ -1398,7 +1398,7 @@ class bitso extends bitso$1["default"] {
|
|
|
1398
1398
|
const response = await this.privateGetOrdersOid({
|
|
1399
1399
|
'oid': id,
|
|
1400
1400
|
});
|
|
1401
|
-
const payload = this.
|
|
1401
|
+
const payload = this.safeList(response, 'payload');
|
|
1402
1402
|
if (Array.isArray(payload)) {
|
|
1403
1403
|
const numOrders = payload.length;
|
|
1404
1404
|
if (numOrders === 1) {
|
|
@@ -1472,7 +1472,7 @@ class bitso extends bitso$1["default"] {
|
|
|
1472
1472
|
// }]
|
|
1473
1473
|
// }
|
|
1474
1474
|
//
|
|
1475
|
-
const transactions = this.
|
|
1475
|
+
const transactions = this.safeList(response, 'payload', []);
|
|
1476
1476
|
const first = this.safeDict(transactions, 0, {});
|
|
1477
1477
|
return this.parseTransaction(first);
|
|
1478
1478
|
}
|
|
@@ -1615,7 +1615,7 @@ class bitso extends bitso$1["default"] {
|
|
|
1615
1615
|
// }
|
|
1616
1616
|
//
|
|
1617
1617
|
const result = {};
|
|
1618
|
-
const payload = this.
|
|
1618
|
+
const payload = this.safeDict(response, 'payload', {});
|
|
1619
1619
|
const depositFees = this.safeList(payload, 'deposit_fees', []);
|
|
1620
1620
|
for (let i = 0; i < depositFees.length; i++) {
|
|
1621
1621
|
const depositFee = depositFees[i];
|
|
@@ -1645,10 +1645,10 @@ class bitso extends bitso$1["default"] {
|
|
|
1645
1645
|
}
|
|
1646
1646
|
if (code !== undefined) {
|
|
1647
1647
|
result[code] = {
|
|
1648
|
-
'deposit': this.safeValue(this.
|
|
1648
|
+
'deposit': this.safeValue(this.safeDict(result, code), 'deposit'),
|
|
1649
1649
|
'withdraw': this.safeNumber(withdrawalFees, currencyId),
|
|
1650
1650
|
'info': {
|
|
1651
|
-
'deposit': this.safeValue(this.
|
|
1651
|
+
'deposit': this.safeValue(this.safeDict(this.safeDict(result, code), 'info'), 'deposit'),
|
|
1652
1652
|
'withdraw': this.safeNumber(withdrawalFees, currencyId),
|
|
1653
1653
|
},
|
|
1654
1654
|
};
|
|
@@ -1769,7 +1769,7 @@ class bitso extends bitso$1["default"] {
|
|
|
1769
1769
|
result[code] = {
|
|
1770
1770
|
'deposit': {
|
|
1771
1771
|
'fee': this.safeNumber(entry, 'fee'),
|
|
1772
|
-
'percentage': (this.
|
|
1772
|
+
'percentage': (this.safeBool(entry, 'is_fixed') !== true),
|
|
1773
1773
|
},
|
|
1774
1774
|
'withdraw': {
|
|
1775
1775
|
'fee': undefined,
|
|
@@ -1787,7 +1787,7 @@ class bitso extends bitso$1["default"] {
|
|
|
1787
1787
|
const code = this.safeCurrencyCode(currencyId);
|
|
1788
1788
|
if ((code !== undefined) && ((codes === undefined) || (code in codes))) {
|
|
1789
1789
|
const withdrawFee = this.parseNumber(withdrawalResponse[currencyId]);
|
|
1790
|
-
const resultValue = this.
|
|
1790
|
+
const resultValue = this.safeDict(result, code);
|
|
1791
1791
|
if (resultValue === undefined) {
|
|
1792
1792
|
result[code] = this.depositWithdrawFee({});
|
|
1793
1793
|
}
|
|
@@ -1852,7 +1852,7 @@ class bitso extends bitso$1["default"] {
|
|
|
1852
1852
|
// ]
|
|
1853
1853
|
// }
|
|
1854
1854
|
//
|
|
1855
|
-
const payload = this.
|
|
1855
|
+
const payload = this.safeList(response, 'payload', []);
|
|
1856
1856
|
const first = this.safeDict(payload, 0);
|
|
1857
1857
|
return this.parseTransaction(first, currency);
|
|
1858
1858
|
}
|
|
@@ -1895,7 +1895,7 @@ class bitso extends bitso$1["default"] {
|
|
|
1895
1895
|
//
|
|
1896
1896
|
const currencyId = this.safeString2(transaction, 'currency', 'asset');
|
|
1897
1897
|
currency = this.safeCurrency(currencyId, currency);
|
|
1898
|
-
const details = this.
|
|
1898
|
+
const details = this.safeDict(transaction, 'details', {});
|
|
1899
1899
|
const datetime = this.safeString(transaction, 'created_at');
|
|
1900
1900
|
const withdrawalAddress = this.safeString(details, 'withdrawal_address');
|
|
1901
1901
|
const receivingAddress = this.safeString(details, 'receiving_address');
|
|
@@ -1988,7 +1988,7 @@ class bitso extends bitso$1["default"] {
|
|
|
1988
1988
|
}
|
|
1989
1989
|
if (success !== true) {
|
|
1990
1990
|
const feedback = this.id + ' ' + this.json(response);
|
|
1991
|
-
const error = this.
|
|
1991
|
+
const error = this.safeDict(response, 'error');
|
|
1992
1992
|
if (error === undefined) {
|
|
1993
1993
|
throw new errors.ExchangeError(feedback);
|
|
1994
1994
|
}
|
package/dist/cjs/src/bitstamp.js
CHANGED
|
@@ -791,7 +791,7 @@ class bitstamp extends bitstamp$1["default"] {
|
|
|
791
791
|
async fetchMarketsFromCache(params = {}) {
|
|
792
792
|
// this method is now redundant
|
|
793
793
|
// currencies are now fetched before markets
|
|
794
|
-
const options = this.
|
|
794
|
+
const options = this.safeDict(this.options, 'fetchMarkets', {});
|
|
795
795
|
const timestamp = this.safeInteger(options, 'timestamp');
|
|
796
796
|
const expires = this.safeInteger(options, 'expires', 1000);
|
|
797
797
|
const now = this.milliseconds();
|
|
@@ -1391,7 +1391,7 @@ class bitstamp extends bitstamp$1["default"] {
|
|
|
1391
1391
|
// }
|
|
1392
1392
|
// }
|
|
1393
1393
|
//
|
|
1394
|
-
const data = this.
|
|
1394
|
+
const data = this.safeDict(response, 'data', {});
|
|
1395
1395
|
const ohlc = this.safeList(data, 'ohlc', []);
|
|
1396
1396
|
return this.parseOHLCVs(ohlc, market, timeframe, since, limit);
|
|
1397
1397
|
}
|
|
@@ -1569,7 +1569,7 @@ class bitstamp extends bitstamp$1["default"] {
|
|
|
1569
1569
|
const ids = Object.keys(currencies);
|
|
1570
1570
|
for (let i = 0; i < ids.length; i++) {
|
|
1571
1571
|
const id = ids[i];
|
|
1572
|
-
const fees = this.
|
|
1572
|
+
const fees = this.safeDict(response, i, {});
|
|
1573
1573
|
const code = this.safeCurrencyCode(id);
|
|
1574
1574
|
if ((codes !== undefined) && !this.inArray(code, codes)) {
|
|
1575
1575
|
continue;
|
|
@@ -1970,7 +1970,7 @@ class bitstamp extends bitstamp$1["default"] {
|
|
|
1970
1970
|
// ]
|
|
1971
1971
|
// }
|
|
1972
1972
|
//
|
|
1973
|
-
const values = this.
|
|
1973
|
+
const values = this.safeList(response, 'funding_rate_history', []);
|
|
1974
1974
|
return this.parseFundingRateHistories(values, market, since, limit);
|
|
1975
1975
|
}
|
|
1976
1976
|
parseFundingRateHistory(contract, market = undefined) {
|
|
@@ -2307,7 +2307,7 @@ class bitstamp extends bitstamp$1["default"] {
|
|
|
2307
2307
|
const symbol = this.safeSymbol(marketId, market, '/');
|
|
2308
2308
|
const status = this.parseOrderStatus(this.safeString(order, 'status'));
|
|
2309
2309
|
const amount = this.safeString(order, 'amount');
|
|
2310
|
-
const transactions = this.
|
|
2310
|
+
const transactions = this.safeList(order, 'transactions', []);
|
|
2311
2311
|
const price = this.safeString(order, 'price');
|
|
2312
2312
|
return this.safeOrder({
|
|
2313
2313
|
'id': id,
|
package/dist/cjs/src/bitteam.js
CHANGED
|
@@ -452,8 +452,8 @@ class bitteam extends bitteam$1["default"] {
|
|
|
452
452
|
// }
|
|
453
453
|
// }
|
|
454
454
|
//
|
|
455
|
-
const result = this.
|
|
456
|
-
const markets = this.
|
|
455
|
+
const result = this.safeDict(response, 'result', {});
|
|
456
|
+
const markets = this.safeList(result, 'pairs', []);
|
|
457
457
|
return this.parseMarkets(markets);
|
|
458
458
|
}
|
|
459
459
|
parseMarket(market) {
|
|
@@ -464,14 +464,14 @@ class bitteam extends bitteam$1["default"] {
|
|
|
464
464
|
const quoteId = this.safeString(parts, 1);
|
|
465
465
|
const base = this.safeCurrencyCode(baseId);
|
|
466
466
|
const quote = this.safeCurrencyCode(quoteId);
|
|
467
|
-
const active = this.
|
|
467
|
+
const active = this.safeBool(market, 'active');
|
|
468
468
|
const timeStart = this.safeString(market, 'timeStart');
|
|
469
469
|
const created = this.parse8601(timeStart);
|
|
470
470
|
let minCost = undefined;
|
|
471
471
|
const currenciesValuedInUsd = this.handleOption('fetchMarkets', 'currenciesValuedInUsd', {});
|
|
472
472
|
const quoteInUsd = this.safeBool(currenciesValuedInUsd, quote, false);
|
|
473
473
|
if (quoteInUsd === true) {
|
|
474
|
-
const settings = this.
|
|
474
|
+
const settings = this.safeDict(market, 'settings', {});
|
|
475
475
|
minCost = this.safeNumber(settings, 'limit_usd');
|
|
476
476
|
}
|
|
477
477
|
return this.safeMarketStructure({
|
|
@@ -625,8 +625,8 @@ class bitteam extends bitteam$1["default"] {
|
|
|
625
625
|
// }
|
|
626
626
|
// }
|
|
627
627
|
//
|
|
628
|
-
const responseResult = this.
|
|
629
|
-
const currencies = this.
|
|
628
|
+
const responseResult = this.safeDict(response, 'result', {});
|
|
629
|
+
const currencies = this.safeList(responseResult, 'currencies', []);
|
|
630
630
|
// using another endpoint to fetch statuses of deposits and withdrawals
|
|
631
631
|
let statusesResponse = await this.publicGetTradeApiCmcAssets();
|
|
632
632
|
//
|
|
@@ -656,18 +656,18 @@ class bitteam extends bitteam$1["default"] {
|
|
|
656
656
|
return result;
|
|
657
657
|
}
|
|
658
658
|
parseCurrency(currency) {
|
|
659
|
-
const statusesResponse = this.
|
|
659
|
+
const statusesResponse = this.safeDict(this.options, '_temp_currencies_statuses', {});
|
|
660
660
|
const id = this.safeString(currency, 'symbol');
|
|
661
661
|
const numericId = this.safeInteger(currency, 'id');
|
|
662
662
|
const code = this.safeCurrencyCode(id);
|
|
663
663
|
const active = this.safeBool(currency, 'active', false);
|
|
664
664
|
const precision = this.parseNumber(this.parsePrecision(this.safeString(currency, 'precision')));
|
|
665
|
-
const txLimits = this.
|
|
665
|
+
const txLimits = this.safeDict(currency, 'txLimits', {});
|
|
666
666
|
const minWithdraw = this.safeString(txLimits, 'minWithdraw');
|
|
667
667
|
const maxWithdraw = this.safeString(txLimits, 'maxWithdraw');
|
|
668
668
|
const minDeposit = this.safeString(txLimits, 'minDeposit');
|
|
669
669
|
let fee = undefined;
|
|
670
|
-
const withdrawCommissionFixed = this.
|
|
670
|
+
const withdrawCommissionFixed = this.safeDict(txLimits, 'withdrawCommissionFixed', {});
|
|
671
671
|
let feesByNetworkId = {};
|
|
672
672
|
const blockChain = this.safeString(currency, 'blockChain');
|
|
673
673
|
// if only one blockChain
|
|
@@ -678,9 +678,9 @@ class bitteam extends bitteam$1["default"] {
|
|
|
678
678
|
else {
|
|
679
679
|
feesByNetworkId = withdrawCommissionFixed;
|
|
680
680
|
}
|
|
681
|
-
const statuses = this.
|
|
682
|
-
const deposit = this.
|
|
683
|
-
const withdraw = this.
|
|
681
|
+
const statuses = this.safeDict(statusesResponse, numericId, {});
|
|
682
|
+
const deposit = this.safeBool(statuses, 'depositStatus');
|
|
683
|
+
const withdraw = this.safeBool(statuses, 'withdrawStatus');
|
|
684
684
|
const networkIds = Object.keys(feesByNetworkId);
|
|
685
685
|
const networks = {};
|
|
686
686
|
const networkPrecision = this.parseNumber(this.parsePrecision(this.safeString(currency, 'decimals')));
|
|
@@ -794,7 +794,7 @@ class bitteam extends bitteam$1["default"] {
|
|
|
794
794
|
// }
|
|
795
795
|
// }
|
|
796
796
|
//
|
|
797
|
-
const result = this.
|
|
797
|
+
const result = this.safeDict(response, 'result', {});
|
|
798
798
|
const data = this.safeList(result, 'data', []);
|
|
799
799
|
return this.parseOHLCVs(data, market, timeframe, since, limit);
|
|
800
800
|
}
|
|
@@ -979,7 +979,7 @@ class bitteam extends bitteam$1["default"] {
|
|
|
979
979
|
// }
|
|
980
980
|
// }
|
|
981
981
|
//
|
|
982
|
-
const result = this.
|
|
982
|
+
const result = this.safeDict(response, 'result', {});
|
|
983
983
|
const orders = this.safeList(result, 'orders', []);
|
|
984
984
|
return this.parseOrders(orders, market, since, limit);
|
|
985
985
|
}
|
|
@@ -1224,7 +1224,7 @@ class bitteam extends bitteam$1["default"] {
|
|
|
1224
1224
|
// }
|
|
1225
1225
|
// }
|
|
1226
1226
|
//
|
|
1227
|
-
const result = this.
|
|
1227
|
+
const result = this.safeDict(response, 'result', {});
|
|
1228
1228
|
const orders = [result];
|
|
1229
1229
|
return this.parseOrders(orders, market);
|
|
1230
1230
|
}
|
|
@@ -1331,7 +1331,7 @@ class bitteam extends bitteam$1["default"] {
|
|
|
1331
1331
|
const status = this.parseOrderStatus(this.safeString(order, 'status'));
|
|
1332
1332
|
const type = this.parseOrderType(this.safeString(order, 'type'));
|
|
1333
1333
|
const side = this.safeString(order, 'side');
|
|
1334
|
-
const feeRaw = this.
|
|
1334
|
+
const feeRaw = this.safeDict(order, 'fee');
|
|
1335
1335
|
const price = this.safeString(order, 'price');
|
|
1336
1336
|
const amount = this.safeString(order, 'quantity');
|
|
1337
1337
|
const filled = this.safeString(order, 'executed');
|
|
@@ -1657,7 +1657,7 @@ class bitteam extends bitteam$1["default"] {
|
|
|
1657
1657
|
// }
|
|
1658
1658
|
// }
|
|
1659
1659
|
//
|
|
1660
|
-
const result = this.
|
|
1660
|
+
const result = this.safeDict(response, 'result', {});
|
|
1661
1661
|
const pair = this.safeDict(result, 'pair', {});
|
|
1662
1662
|
return this.parseTicker(pair, market);
|
|
1663
1663
|
}
|
|
@@ -1747,13 +1747,13 @@ class bitteam extends bitteam$1["default"] {
|
|
|
1747
1747
|
let bestAskPrice = undefined;
|
|
1748
1748
|
let bestBidVolume = undefined;
|
|
1749
1749
|
let bestAskVolume = undefined;
|
|
1750
|
-
const bids = this.
|
|
1751
|
-
const asks = this.
|
|
1750
|
+
const bids = this.safeList(ticker, 'bids');
|
|
1751
|
+
const asks = this.safeList(ticker, 'asks');
|
|
1752
1752
|
if ((bids !== undefined) && (Array.isArray(bids)) && (asks !== undefined) && (Array.isArray(asks))) {
|
|
1753
|
-
const bestBid = this.
|
|
1753
|
+
const bestBid = this.safeDict(bids, 0, {});
|
|
1754
1754
|
bestBidPrice = this.safeString(bestBid, 'price');
|
|
1755
1755
|
bestBidVolume = this.safeString(bestBid, 'quantity');
|
|
1756
|
-
const bestAsk = this.
|
|
1756
|
+
const bestAsk = this.safeDict(asks, 0, {});
|
|
1757
1757
|
bestAskPrice = this.safeString(bestAsk, 'price');
|
|
1758
1758
|
bestAskVolume = this.safeString(bestAsk, 'quantity');
|
|
1759
1759
|
}
|
|
@@ -1990,7 +1990,7 @@ class bitteam extends bitteam$1["default"] {
|
|
|
1990
1990
|
// }
|
|
1991
1991
|
// }
|
|
1992
1992
|
//
|
|
1993
|
-
const result = this.
|
|
1993
|
+
const result = this.safeDict(response, 'result', {});
|
|
1994
1994
|
const trades = this.safeList(result, 'trades', []);
|
|
1995
1995
|
return this.parseTrades(trades, market, since, limit);
|
|
1996
1996
|
}
|
|
@@ -2073,11 +2073,11 @@ class bitteam extends bitteam$1["default"] {
|
|
|
2073
2073
|
side = 'sell';
|
|
2074
2074
|
}
|
|
2075
2075
|
order = this.safeString(trade, 'makerOrderId');
|
|
2076
|
-
feeInfo = this.
|
|
2076
|
+
feeInfo = this.safeDict(trade, 'feeMaker', {});
|
|
2077
2077
|
}
|
|
2078
2078
|
else if (takerOrMaker === 'taker') {
|
|
2079
2079
|
order = this.safeString(trade, 'takerOrderId');
|
|
2080
|
-
feeInfo = this.
|
|
2080
|
+
feeInfo = this.safeDict(trade, 'feeTaker', {});
|
|
2081
2081
|
}
|
|
2082
2082
|
const feeCurrencyId = this.safeString(feeInfo, 'symbol');
|
|
2083
2083
|
const feeCost = this.safeString(feeInfo, 'amount');
|
|
@@ -2164,12 +2164,12 @@ class bitteam extends bitteam$1["default"] {
|
|
|
2164
2164
|
'timestamp': undefined,
|
|
2165
2165
|
'datetime': undefined,
|
|
2166
2166
|
};
|
|
2167
|
-
const result = this.
|
|
2167
|
+
const result = this.safeDict(response, 'result', {});
|
|
2168
2168
|
const balanceByCurrencies = this.omit(result, ['free', 'used', 'total']);
|
|
2169
2169
|
const rawCurrencyIds = Object.keys(balanceByCurrencies);
|
|
2170
2170
|
for (let i = 0; i < rawCurrencyIds.length; i++) {
|
|
2171
2171
|
const rawCurrencyId = rawCurrencyIds[i];
|
|
2172
|
-
const currencyBalance = this.
|
|
2172
|
+
const currencyBalance = this.safeDict(result, rawCurrencyId);
|
|
2173
2173
|
const free = this.safeString(currencyBalance, 'free');
|
|
2174
2174
|
const used = this.safeString(currencyBalance, 'used');
|
|
2175
2175
|
const total = this.safeString(currencyBalance, 'total');
|
|
@@ -2297,7 +2297,7 @@ class bitteam extends bitteam$1["default"] {
|
|
|
2297
2297
|
// }
|
|
2298
2298
|
// }
|
|
2299
2299
|
//
|
|
2300
|
-
const result = this.
|
|
2300
|
+
const result = this.safeDict(response, 'result', {});
|
|
2301
2301
|
const transactions = this.safeList(result, 'transactions', []);
|
|
2302
2302
|
return this.parseTransactions(transactions, currency, since, limit);
|
|
2303
2303
|
}
|
|
@@ -2349,17 +2349,17 @@ class bitteam extends bitteam$1["default"] {
|
|
|
2349
2349
|
// }
|
|
2350
2350
|
// }
|
|
2351
2351
|
//
|
|
2352
|
-
const currencyObject = this.
|
|
2352
|
+
const currencyObject = this.safeDict(transaction, 'currency');
|
|
2353
2353
|
const currencyId = this.safeString(currencyObject, 'symbol');
|
|
2354
2354
|
const code = this.safeCurrencyCode(currencyId, currency);
|
|
2355
2355
|
const id = this.safeString(transaction, 'id');
|
|
2356
|
-
const params = this.
|
|
2356
|
+
const params = this.safeDict(transaction, 'params');
|
|
2357
2357
|
const txid = this.safeString(params, 'tx_id');
|
|
2358
2358
|
const timestamp = this.safeInteger(transaction, 'timestamp');
|
|
2359
2359
|
let networkId = this.safeString(transaction, 'blockChain');
|
|
2360
2360
|
if (networkId === undefined) {
|
|
2361
|
-
const links = this.
|
|
2362
|
-
const blockChain = this.
|
|
2361
|
+
const links = this.safeList(currencyObject, 'links', []);
|
|
2362
|
+
const blockChain = this.safeDict(links, 0, {});
|
|
2363
2363
|
networkId = this.safeString(blockChain, 'blockChain');
|
|
2364
2364
|
}
|
|
2365
2365
|
const addressFrom = this.safeString(transaction, 'sender');
|
|
@@ -2367,7 +2367,7 @@ class bitteam extends bitteam$1["default"] {
|
|
|
2367
2367
|
const tag = this.safeString(transaction, 'message');
|
|
2368
2368
|
const type = this.parseTransactionType(this.safeString(transaction, 'type'));
|
|
2369
2369
|
const amount = this.parseValueToPricision(transaction, 'amount', currencyObject, 'decimals');
|
|
2370
|
-
const status = this.parseTransactionStatus(this.
|
|
2370
|
+
const status = this.parseTransactionStatus(this.safeString(transaction, 'status'));
|
|
2371
2371
|
return {
|
|
2372
2372
|
'info': transaction,
|
|
2373
2373
|
'id': id,
|
package/dist/cjs/src/bittrade.js
CHANGED
|
@@ -476,7 +476,7 @@ class bittrade extends bittrade$1["default"] {
|
|
|
476
476
|
// "market-sell-order-rate-must-less-than": 0.1,
|
|
477
477
|
// "market-buy-order-rate-must-less-than": 0.1 } }
|
|
478
478
|
//
|
|
479
|
-
return this.parseTradingLimits(this.
|
|
479
|
+
return this.parseTradingLimits(this.safeDict(response, 'data', {}));
|
|
480
480
|
}
|
|
481
481
|
parseTradingLimits(limits, symbol = undefined, params = {}) {
|
|
482
482
|
//
|
|
@@ -765,7 +765,7 @@ class bittrade extends bittrade$1["default"] {
|
|
|
765
765
|
if ((response['tick'] === undefined) || (response['tick'] === null)) {
|
|
766
766
|
throw new errors.BadSymbol(this.id + ' fetchOrderBook() returned empty response: ' + this.json(response));
|
|
767
767
|
}
|
|
768
|
-
const tick = this.
|
|
768
|
+
const tick = this.safeDict(response, 'tick');
|
|
769
769
|
const timestamp = this.safeInteger(tick, 'ts', this.safeInteger(response, 'ts'));
|
|
770
770
|
const result = this.parseOrderBook(tick, symbol, timestamp);
|
|
771
771
|
result['nonce'] = this.safeInteger(tick, 'version');
|
|
@@ -1165,15 +1165,15 @@ class bittrade extends bittrade$1["default"] {
|
|
|
1165
1165
|
// ]
|
|
1166
1166
|
// }
|
|
1167
1167
|
//
|
|
1168
|
-
const currencies = this.
|
|
1168
|
+
const currencies = this.safeList(response, 'data', []);
|
|
1169
1169
|
return this.parseCurrencies(currencies);
|
|
1170
1170
|
}
|
|
1171
1171
|
parseCurrency(currency) {
|
|
1172
|
-
const id = this.
|
|
1172
|
+
const id = this.safeString(currency, 'name');
|
|
1173
1173
|
const code = this.safeCurrencyCode(id);
|
|
1174
|
-
const depositEnabled = this.
|
|
1175
|
-
const withdrawEnabled = this.
|
|
1176
|
-
const countryDisabled = this.
|
|
1174
|
+
const depositEnabled = this.safeBool(currency, 'deposit-enabled');
|
|
1175
|
+
const withdrawEnabled = this.safeBool(currency, 'withdraw-enabled');
|
|
1176
|
+
const countryDisabled = this.safeBool(currency, 'country-disabled');
|
|
1177
1177
|
const visible = this.safeBool(currency, 'visible', false);
|
|
1178
1178
|
const state = this.safeString(currency, 'state');
|
|
1179
1179
|
const active = (visible === true) && (depositEnabled === true) && (withdrawEnabled === true) && (state === 'online') && (countryDisabled !== true);
|
|
@@ -1567,7 +1567,7 @@ class bittrade extends bittrade$1["default"] {
|
|
|
1567
1567
|
};
|
|
1568
1568
|
const clientOrderId = this.safeString2(params, 'clientOrderId', 'client-order-id'); // must be 64 chars max and unique within 24 hours
|
|
1569
1569
|
if (clientOrderId === undefined) {
|
|
1570
|
-
const broker = this.
|
|
1570
|
+
const broker = this.safeDict(this.options, 'broker', {});
|
|
1571
1571
|
const brokerId = this.safeString(broker, 'id');
|
|
1572
1572
|
request['client-order-id'] = brokerId + this.uuid();
|
|
1573
1573
|
}
|
|
@@ -1835,7 +1835,7 @@ class bittrade extends bittrade$1["default"] {
|
|
|
1835
1835
|
currency = this.safeCurrency(currencyId, currency);
|
|
1836
1836
|
const code = this.safeCurrencyCode(currencyId, currency);
|
|
1837
1837
|
const networkId = this.safeString(depositAddress, 'chain');
|
|
1838
|
-
const networks = this.
|
|
1838
|
+
const networks = this.safeDict(currency, 'networks', {});
|
|
1839
1839
|
const networksById = this.indexBy(networks, 'id');
|
|
1840
1840
|
const networkValue = this.safeValue(networksById, networkId, networkId);
|
|
1841
1841
|
const network = this.safeString(networkValue, 'network');
|
|
@@ -2049,7 +2049,7 @@ class bittrade extends bittrade$1["default"] {
|
|
|
2049
2049
|
if (tag !== undefined) {
|
|
2050
2050
|
request['addr-tag'] = tag; // only for XRP?
|
|
2051
2051
|
}
|
|
2052
|
-
const networks = this.
|
|
2052
|
+
const networks = this.safeDict(this.options, 'networks', {});
|
|
2053
2053
|
let network = this.safeStringUpper(params, 'network'); // this line allows the user to specify either ERC20 or ETH
|
|
2054
2054
|
network = this.safeStringLower(networks, network, network); // handle ETH>ERC20 alias
|
|
2055
2055
|
if (network !== undefined) {
|
package/dist/cjs/src/bitvavo.js
CHANGED
|
@@ -912,7 +912,7 @@ class bitvavo extends bitvavo$1["default"] {
|
|
|
912
912
|
const id = this.safeString2(trade, 'id', 'fillId');
|
|
913
913
|
const marketId = this.safeString(trade, 'market');
|
|
914
914
|
const symbol = this.safeSymbol(marketId, market, '-');
|
|
915
|
-
const taker = this.
|
|
915
|
+
const taker = this.safeBool(trade, 'taker');
|
|
916
916
|
let takerOrMaker = undefined;
|
|
917
917
|
if (taker !== undefined) {
|
|
918
918
|
takerOrMaker = (taker === true) ? 'taker' : 'maker';
|
|
@@ -978,7 +978,7 @@ class bitvavo extends bitvavo$1["default"] {
|
|
|
978
978
|
// }
|
|
979
979
|
// }
|
|
980
980
|
//
|
|
981
|
-
const feesValue = this.
|
|
981
|
+
const feesValue = this.safeDict(fees, 'fees');
|
|
982
982
|
const maker = this.safeNumber(feesValue, 'maker');
|
|
983
983
|
const taker = this.safeNumber(feesValue, 'taker');
|
|
984
984
|
const result = {};
|
|
@@ -1118,7 +1118,7 @@ class bitvavo extends bitvavo$1["default"] {
|
|
|
1118
1118
|
}
|
|
1119
1119
|
[request, params] = this.handleUntilOption('end', request, params);
|
|
1120
1120
|
if (limit !== undefined) {
|
|
1121
|
-
request['limit'] = limit; // default 1440, max 1440
|
|
1121
|
+
request['limit'] = Math.min(limit, 1440); // default 1440, max 1440
|
|
1122
1122
|
}
|
|
1123
1123
|
return this.extend(request, params);
|
|
1124
1124
|
}
|
|
@@ -1488,8 +1488,8 @@ class bitvavo extends bitvavo$1["default"] {
|
|
|
1488
1488
|
const timeInForce = this.safeString(params, 'timeInForce');
|
|
1489
1489
|
let triggerPrice = this.safeStringN(params, ['triggerPrice', 'stopPrice', 'triggerAmount']);
|
|
1490
1490
|
const postOnly = this.isPostOnly(isMarketOrder, false, params);
|
|
1491
|
-
const stopLossPrice = this.
|
|
1492
|
-
const takeProfitPrice = this.
|
|
1491
|
+
const stopLossPrice = this.safeString(params, 'stopLossPrice'); // trigger when price crosses from above to below this value
|
|
1492
|
+
const takeProfitPrice = this.safeString(params, 'takeProfitPrice'); // trigger when price crosses from below to above this value
|
|
1493
1493
|
params = this.omit(params, ['timeInForce', 'triggerPrice', 'stopPrice', 'stopLossPrice', 'takeProfitPrice']);
|
|
1494
1494
|
if (isMarketOrder) {
|
|
1495
1495
|
let cost = undefined;
|
|
@@ -2112,7 +2112,7 @@ class bitvavo extends bitvavo$1["default"] {
|
|
|
2112
2112
|
'currency': feeCurrencyCode,
|
|
2113
2113
|
};
|
|
2114
2114
|
}
|
|
2115
|
-
const rawTrades = this.
|
|
2115
|
+
const rawTrades = this.safeList(order, 'fills', []);
|
|
2116
2116
|
const timeInForce = this.safeString(order, 'timeInForce');
|
|
2117
2117
|
const postOnly = this.safeValue(order, 'postOnly');
|
|
2118
2118
|
// https://github.com/ccxt/ccxt/issues/8489
|
|
@@ -2597,8 +2597,8 @@ class bitvavo extends bitvavo$1["default"] {
|
|
|
2597
2597
|
},
|
|
2598
2598
|
'networks': {},
|
|
2599
2599
|
};
|
|
2600
|
-
const networks = this.
|
|
2601
|
-
let networkId = this.
|
|
2600
|
+
const networks = this.safeList(fee, 'networks');
|
|
2601
|
+
let networkId = this.safeString(networks, 0); // Bitvavo currently only supports one network per currency
|
|
2602
2602
|
const currencyCode = this.safeString(currency, 'code');
|
|
2603
2603
|
if (networkId === 'Mainnet') {
|
|
2604
2604
|
networkId = currencyCode;
|
|
@@ -2705,7 +2705,7 @@ class bitvavo extends bitvavo$1["default"] {
|
|
|
2705
2705
|
if (('noMarket' in config) && !('market' in params)) {
|
|
2706
2706
|
return config['noMarket'];
|
|
2707
2707
|
}
|
|
2708
|
-
return this.
|
|
2708
|
+
return this.safeNumber(config, 'cost', 1);
|
|
2709
2709
|
}
|
|
2710
2710
|
}
|
|
2711
2711
|
|
|
@@ -331,7 +331,7 @@ class blockchaincom extends blockchaincom$1["default"] {
|
|
|
331
331
|
const result = [];
|
|
332
332
|
for (let i = 0; i < marketIds.length; i++) {
|
|
333
333
|
const marketId = marketIds[i];
|
|
334
|
-
const market = this.
|
|
334
|
+
const market = this.safeDict(markets, marketId);
|
|
335
335
|
const baseId = this.safeString(market, 'base_currency');
|
|
336
336
|
const quoteId = this.safeString(market, 'counter_currency');
|
|
337
337
|
const base = this.safeCurrencyCode(baseId);
|
|
@@ -1190,7 +1190,7 @@ class blockchaincom extends blockchaincom$1["default"] {
|
|
|
1190
1190
|
// ]
|
|
1191
1191
|
// }
|
|
1192
1192
|
//
|
|
1193
|
-
const balances = this.
|
|
1193
|
+
const balances = this.safeList(response, accountName);
|
|
1194
1194
|
if (balances === undefined) {
|
|
1195
1195
|
throw new errors.ExchangeError(this.id + ' fetchBalance() could not find the "' + accountName + '" account');
|
|
1196
1196
|
}
|
package/dist/cjs/src/btcbox.js
CHANGED
|
@@ -835,11 +835,11 @@ class btcbox extends btcbox$1["default"] {
|
|
|
835
835
|
if (httpCode >= 400) {
|
|
836
836
|
return undefined; // resort to defaultErrorHandler
|
|
837
837
|
}
|
|
838
|
-
const result = this.
|
|
838
|
+
const result = this.safeBool(response, 'result');
|
|
839
839
|
if (result === undefined || result === true) {
|
|
840
840
|
return undefined; // either public API (no error codes expected) or success
|
|
841
841
|
}
|
|
842
|
-
const code = this.
|
|
842
|
+
const code = this.safeString(response, 'code');
|
|
843
843
|
const feedback = this.id + ' ' + body;
|
|
844
844
|
this.throwExactlyMatchedException(this.exceptions, code, feedback);
|
|
845
845
|
throw new errors.ExchangeError(feedback); // unknown message
|
|
@@ -520,7 +520,7 @@ class btcmarkets extends btcmarkets$1["default"] {
|
|
|
520
520
|
const base = this.safeCurrencyCode(baseId);
|
|
521
521
|
const quote = this.safeCurrencyCode(quoteId);
|
|
522
522
|
const symbol = base + '/' + quote;
|
|
523
|
-
const fees = this.
|
|
523
|
+
const fees = this.safeDict(this.safeDict(this.options, 'fees', {}), quote, this.fees);
|
|
524
524
|
const pricePrecision = this.parseNumber(this.parsePrecision(this.safeString(market, 'priceDecimals')));
|
|
525
525
|
const minAmount = this.safeNumber(market, 'minOrderAmount');
|
|
526
526
|
const maxAmount = this.safeNumber(market, 'maxOrderAmount');
|
|
@@ -956,7 +956,7 @@ class btcmarkets extends btcmarkets$1["default"] {
|
|
|
956
956
|
// 'clientOrderId': this.uuid (),
|
|
957
957
|
};
|
|
958
958
|
const lowercaseType = type.toLowerCase();
|
|
959
|
-
const orderTypes = this.
|
|
959
|
+
const orderTypes = this.safeDict(this.options, 'orderTypes', {
|
|
960
960
|
'limit': 'Limit',
|
|
961
961
|
'market': 'Market',
|
|
962
962
|
'stop': 'Stop',
|