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/hollaex.js
CHANGED
|
@@ -380,7 +380,7 @@ class hollaex extends hollaex$1["default"] {
|
|
|
380
380
|
'swap': false,
|
|
381
381
|
'future': false,
|
|
382
382
|
'option': false,
|
|
383
|
-
'active': this.
|
|
383
|
+
'active': this.safeBool(market, 'active'),
|
|
384
384
|
'contract': false,
|
|
385
385
|
'linear': undefined,
|
|
386
386
|
'inverse': undefined,
|
|
@@ -547,7 +547,7 @@ class hollaex extends hollaex$1["default"] {
|
|
|
547
547
|
},
|
|
548
548
|
'withdraw': {
|
|
549
549
|
'min': undefined,
|
|
550
|
-
'max': this.
|
|
550
|
+
'max': this.safeNumber(withdrawalLimits, 0),
|
|
551
551
|
},
|
|
552
552
|
},
|
|
553
553
|
'networks': networks,
|
|
@@ -618,7 +618,7 @@ class hollaex extends hollaex$1["default"] {
|
|
|
618
618
|
// // ...
|
|
619
619
|
// }
|
|
620
620
|
//
|
|
621
|
-
const orderbook = this.
|
|
621
|
+
const orderbook = this.safeDict(response, market['id']);
|
|
622
622
|
const timestamp = this.parse8601(this.safeString(orderbook, 'timestamp'));
|
|
623
623
|
return this.parseOrderBook(orderbook, market['symbol'], timestamp);
|
|
624
624
|
}
|
|
@@ -887,10 +887,10 @@ class hollaex extends hollaex$1["default"] {
|
|
|
887
887
|
// ...
|
|
888
888
|
// }
|
|
889
889
|
//
|
|
890
|
-
const firstTier = this.
|
|
891
|
-
const fees = this.
|
|
892
|
-
const makerFees = this.
|
|
893
|
-
const takerFees = this.
|
|
890
|
+
const firstTier = this.safeDict(response, '1', {});
|
|
891
|
+
const fees = this.safeDict(firstTier, 'fees', {});
|
|
892
|
+
const makerFees = this.safeDict(fees, 'maker', {});
|
|
893
|
+
const takerFees = this.safeDict(fees, 'taker', {});
|
|
894
894
|
const result = {};
|
|
895
895
|
for (let i = 0; i < this.symbols.length; i++) {
|
|
896
896
|
const symbol = this.symbols[i];
|
|
@@ -1280,7 +1280,7 @@ class hollaex extends hollaex$1["default"] {
|
|
|
1280
1280
|
const amount = this.safeString(order, 'size');
|
|
1281
1281
|
const filled = this.safeString(order, 'filled');
|
|
1282
1282
|
const status = this.parseOrderStatus(this.safeString(order, 'status'));
|
|
1283
|
-
const meta = this.
|
|
1283
|
+
const meta = this.safeDict(order, 'meta', {});
|
|
1284
1284
|
const postOnly = this.safeBool(meta, 'post_only', false);
|
|
1285
1285
|
return this.safeOrder({
|
|
1286
1286
|
'id': id,
|
|
@@ -1335,7 +1335,7 @@ class hollaex extends hollaex$1["default"] {
|
|
|
1335
1335
|
// 'meta': {}, // other options such as post_only
|
|
1336
1336
|
};
|
|
1337
1337
|
const triggerPrice = this.safeNumberN(params, ['triggerPrice', 'stopPrice', 'stop']);
|
|
1338
|
-
const meta = this.
|
|
1338
|
+
const meta = this.safeDict(params, 'meta', {});
|
|
1339
1339
|
const exchangeSpecificParam = this.safeBool(meta, 'post_only', false);
|
|
1340
1340
|
const isMarketOrder = type === 'market';
|
|
1341
1341
|
const postOnly = this.isPostOnly(isMarketOrder, exchangeSpecificParam, params);
|
|
@@ -1591,7 +1591,7 @@ class hollaex extends hollaex$1["default"] {
|
|
|
1591
1591
|
// ]
|
|
1592
1592
|
// }
|
|
1593
1593
|
//
|
|
1594
|
-
const wallet = this.
|
|
1594
|
+
const wallet = this.safeList(response, 'wallet', []);
|
|
1595
1595
|
const addresses = (network === undefined) ? wallet : this.filterBy(wallet, 'network', network);
|
|
1596
1596
|
return this.parseDepositAddresses(addresses, codes, false);
|
|
1597
1597
|
}
|
|
@@ -1703,7 +1703,7 @@ class hollaex extends hollaex$1["default"] {
|
|
|
1703
1703
|
// ]
|
|
1704
1704
|
// }
|
|
1705
1705
|
//
|
|
1706
|
-
const data = this.
|
|
1706
|
+
const data = this.safeList(response, 'data', []);
|
|
1707
1707
|
const transaction = this.safeDict(data, 0, {});
|
|
1708
1708
|
return this.parseTransaction(transaction, currency);
|
|
1709
1709
|
}
|
|
@@ -1823,8 +1823,8 @@ class hollaex extends hollaex$1["default"] {
|
|
|
1823
1823
|
const currencyId = this.safeString(transaction, 'currency');
|
|
1824
1824
|
currency = this.safeCurrency(currencyId, currency);
|
|
1825
1825
|
let status = this.safeValue(transaction, 'status');
|
|
1826
|
-
const dismissed = this.
|
|
1827
|
-
const rejected = this.
|
|
1826
|
+
const dismissed = this.safeBool(transaction, 'dismissed');
|
|
1827
|
+
const rejected = this.safeBool(transaction, 'rejected');
|
|
1828
1828
|
if (status === true) {
|
|
1829
1829
|
status = 'ok';
|
|
1830
1830
|
}
|
|
@@ -1959,11 +1959,11 @@ class hollaex extends hollaex$1["default"] {
|
|
|
1959
1959
|
},
|
|
1960
1960
|
'networks': {},
|
|
1961
1961
|
};
|
|
1962
|
-
const allowWithdrawal = this.
|
|
1962
|
+
const allowWithdrawal = this.safeBool(fee, 'allow_withdrawal');
|
|
1963
1963
|
if (allowWithdrawal === true) {
|
|
1964
1964
|
result['withdraw'] = { 'fee': this.safeNumber(fee, 'withdrawal_fee'), 'percentage': false };
|
|
1965
1965
|
}
|
|
1966
|
-
const withdrawalFees = this.
|
|
1966
|
+
const withdrawalFees = this.safeDict(fee, 'withdrawal_fees');
|
|
1967
1967
|
if (withdrawalFees !== undefined) {
|
|
1968
1968
|
const keys = Object.keys(withdrawalFees);
|
|
1969
1969
|
const keysLength = keys.length;
|
package/dist/cjs/src/htx.js
CHANGED
|
@@ -1366,7 +1366,7 @@ class htx extends htx$1["default"] {
|
|
|
1366
1366
|
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
1367
1367
|
*/
|
|
1368
1368
|
async fetchTime(params = {}) {
|
|
1369
|
-
const options = this.
|
|
1369
|
+
const options = this.safeDict(this.options, 'fetchTime', {});
|
|
1370
1370
|
const defaultType = this.safeString(this.options, 'defaultType', 'spot');
|
|
1371
1371
|
let type = this.safeString(options, 'type', defaultType);
|
|
1372
1372
|
type = this.safeString(params, 'type', type);
|
|
@@ -1441,8 +1441,8 @@ class htx extends htx$1["default"] {
|
|
|
1441
1441
|
// "success":true
|
|
1442
1442
|
// }
|
|
1443
1443
|
//
|
|
1444
|
-
const data = this.
|
|
1445
|
-
const first = this.
|
|
1444
|
+
const data = this.safeList(response, 'data', []);
|
|
1445
|
+
const first = this.safeDict(data, 0, {});
|
|
1446
1446
|
return this.parseTradingFee(first, market);
|
|
1447
1447
|
}
|
|
1448
1448
|
async fetchTradingLimits(symbols = undefined, params = {}) {
|
|
@@ -1495,7 +1495,7 @@ class htx extends htx$1["default"] {
|
|
|
1495
1495
|
// "market-sell-order-rate-must-less-than": 0.1,
|
|
1496
1496
|
// "market-buy-order-rate-must-less-than": 0.1 } }
|
|
1497
1497
|
//
|
|
1498
|
-
return this.parseTradingLimits(this.
|
|
1498
|
+
return this.parseTradingLimits(this.safeDict(response, 'data', {}));
|
|
1499
1499
|
}
|
|
1500
1500
|
parseTradingLimits(limits, symbol = undefined, params = {}) {
|
|
1501
1501
|
//
|
|
@@ -1914,9 +1914,9 @@ class htx extends htx$1["default"] {
|
|
|
1914
1914
|
};
|
|
1915
1915
|
for (let i = 0; i < futureMarkets.length; i++) {
|
|
1916
1916
|
const market = futureMarkets[i];
|
|
1917
|
-
const info = this.
|
|
1917
|
+
const info = this.safeDict(market, 'info', {});
|
|
1918
1918
|
const contractType = this.safeString(info, 'contract_type');
|
|
1919
|
-
const contractSuffix = this.
|
|
1919
|
+
const contractSuffix = this.safeString(futuresCharsMaps, contractType);
|
|
1920
1920
|
// see comment on formats a bit above
|
|
1921
1921
|
const constructedId = (market['linear'] === true) ? market['base'] + '-' + market['quote'] + '-' + contractSuffix : market['base'] + '_' + contractSuffix;
|
|
1922
1922
|
if (constructedId === symbolOrMarketId) {
|
|
@@ -2110,7 +2110,7 @@ class htx extends htx$1["default"] {
|
|
|
2110
2110
|
// "ts":1637502670059
|
|
2111
2111
|
// }
|
|
2112
2112
|
//
|
|
2113
|
-
const tick = this.
|
|
2113
|
+
const tick = this.safeDict(response, 'tick', {});
|
|
2114
2114
|
const ticker = this.parseTicker(tick, market);
|
|
2115
2115
|
const timestamp = this.safeInteger(response, 'ts');
|
|
2116
2116
|
ticker['timestamp'] = timestamp;
|
|
@@ -2340,7 +2340,7 @@ class htx extends htx$1["default"] {
|
|
|
2340
2340
|
else {
|
|
2341
2341
|
throw new errors.NotSupported(this.id + ' fetchLastPrices() does not support ' + type + ' markets yet');
|
|
2342
2342
|
}
|
|
2343
|
-
const tick = this.
|
|
2343
|
+
const tick = this.safeDict(response, 'tick', {});
|
|
2344
2344
|
const data = this.safeList(tick, 'data', []);
|
|
2345
2345
|
return this.parseLastPrices(data, symbols);
|
|
2346
2346
|
}
|
|
@@ -2453,7 +2453,7 @@ class htx extends htx$1["default"] {
|
|
|
2453
2453
|
if ((response['tick'] === undefined) || (response['tick'] === null)) {
|
|
2454
2454
|
throw new errors.BadSymbol(this.id + ' fetchOrderBook() returned empty response: ' + this.json(response));
|
|
2455
2455
|
}
|
|
2456
|
-
const tick = this.
|
|
2456
|
+
const tick = this.safeDict(response, 'tick');
|
|
2457
2457
|
const timestamp = this.safeInteger(tick, 'ts', this.safeInteger(response, 'ts'));
|
|
2458
2458
|
const result = this.parseOrderBook(tick, symbol, timestamp);
|
|
2459
2459
|
result['nonce'] = this.safeInteger(tick, 'version');
|
|
@@ -3193,7 +3193,7 @@ class htx extends htx$1["default"] {
|
|
|
3193
3193
|
// }
|
|
3194
3194
|
//
|
|
3195
3195
|
const typeId = this.safeString(account, 'type');
|
|
3196
|
-
const accountsById = this.
|
|
3196
|
+
const accountsById = this.safeDict(this.options, 'accountsById', {});
|
|
3197
3197
|
const type = this.safeValue(accountsById, typeId, typeId);
|
|
3198
3198
|
return {
|
|
3199
3199
|
'info': account,
|
|
@@ -3233,7 +3233,7 @@ class htx extends htx$1["default"] {
|
|
|
3233
3233
|
}
|
|
3234
3234
|
for (let i = 0; i < accounts.length; i++) {
|
|
3235
3235
|
const account = accounts[i];
|
|
3236
|
-
const info = this.
|
|
3236
|
+
const info = this.safeDict(account, 'info');
|
|
3237
3237
|
const subtype = this.safeString(info, 'subtype');
|
|
3238
3238
|
const typeFromAccount = this.safeString(account, 'type');
|
|
3239
3239
|
if (type === 'margin') {
|
|
@@ -3245,7 +3245,7 @@ class htx extends htx$1["default"] {
|
|
|
3245
3245
|
return this.safeString(account, 'id');
|
|
3246
3246
|
}
|
|
3247
3247
|
}
|
|
3248
|
-
const defaultAccount = this.
|
|
3248
|
+
const defaultAccount = this.safeDict(accounts, 0, {});
|
|
3249
3249
|
return this.safeString(defaultAccount, 'id');
|
|
3250
3250
|
}
|
|
3251
3251
|
/**
|
|
@@ -4037,7 +4037,7 @@ class htx extends htx$1["default"] {
|
|
|
4037
4037
|
let request = {};
|
|
4038
4038
|
let response = undefined;
|
|
4039
4039
|
const trigger = this.safeBool2(params, 'stop', 'trigger');
|
|
4040
|
-
const stopLossTakeProfit = this.
|
|
4040
|
+
const stopLossTakeProfit = this.safeBool(params, 'stopLossTakeProfit');
|
|
4041
4041
|
const stopLoss = this.safeBool(params, 'stopLoss');
|
|
4042
4042
|
const takeProfit = this.safeBool(params, 'takeProfit');
|
|
4043
4043
|
const trailing = this.safeBool(params, 'trailing', false);
|
|
@@ -4189,7 +4189,7 @@ class htx extends htx$1["default"] {
|
|
|
4189
4189
|
}
|
|
4190
4190
|
let orders = this.safeValue(response, 'data');
|
|
4191
4191
|
if (!Array.isArray(orders)) {
|
|
4192
|
-
orders = this.
|
|
4192
|
+
orders = this.safeList(orders, 'orders', []);
|
|
4193
4193
|
}
|
|
4194
4194
|
return this.parseOrders(orders, market, since, limit);
|
|
4195
4195
|
}
|
|
@@ -4204,7 +4204,7 @@ class htx extends htx$1["default"] {
|
|
|
4204
4204
|
const market = this.market(symbol);
|
|
4205
4205
|
if (market['linear'] === true) {
|
|
4206
4206
|
const trigger = this.safeBool2(params, 'stop', 'trigger');
|
|
4207
|
-
const stopLossTakeProfit = this.
|
|
4207
|
+
const stopLossTakeProfit = this.safeBool(params, 'stopLossTakeProfit');
|
|
4208
4208
|
const stopLoss = this.safeBool(params, 'stopLoss');
|
|
4209
4209
|
const takeProfit = this.safeBool(params, 'takeProfit');
|
|
4210
4210
|
const trailing = this.safeBool(params, 'trailing', false);
|
|
@@ -4307,7 +4307,7 @@ class htx extends htx$1["default"] {
|
|
|
4307
4307
|
const request = {};
|
|
4308
4308
|
if (this.safeBool(market, 'linear') === true) {
|
|
4309
4309
|
const trigger = this.safeBool2(params, 'stop', 'trigger');
|
|
4310
|
-
const stopLossTakeProfit = this.
|
|
4310
|
+
const stopLossTakeProfit = this.safeBool(params, 'stopLossTakeProfit');
|
|
4311
4311
|
const stopLoss = this.safeBool(params, 'stopLoss');
|
|
4312
4312
|
const takeProfit = this.safeBool(params, 'takeProfit');
|
|
4313
4313
|
const trailing = this.safeBool(params, 'trailing', false);
|
|
@@ -4760,7 +4760,7 @@ class htx extends htx$1["default"] {
|
|
|
4760
4760
|
//
|
|
4761
4761
|
let orders = this.safeValue(response, 'data');
|
|
4762
4762
|
if (!Array.isArray(orders)) {
|
|
4763
|
-
orders = this.
|
|
4763
|
+
orders = this.safeList(orders, 'orders', []);
|
|
4764
4764
|
}
|
|
4765
4765
|
return this.parseOrders(orders, market, since, limit);
|
|
4766
4766
|
}
|
|
@@ -5188,7 +5188,7 @@ class htx extends htx$1["default"] {
|
|
|
5188
5188
|
};
|
|
5189
5189
|
let orderType = type.replace('buy-', '');
|
|
5190
5190
|
orderType = orderType.replace('sell-', '');
|
|
5191
|
-
const options = this.
|
|
5191
|
+
const options = this.safeDict(this.options, market['type'], {});
|
|
5192
5192
|
const triggerPrice = this.safeStringN(params, ['triggerPrice', 'stopPrice', 'stop-price']);
|
|
5193
5193
|
if (triggerPrice === undefined) {
|
|
5194
5194
|
const stopOrderTypes = this.safeDict(options, 'stopOrderTypes', {});
|
|
@@ -5223,7 +5223,7 @@ class htx extends htx$1["default"] {
|
|
|
5223
5223
|
request['type'] = side + '-' + orderType;
|
|
5224
5224
|
const clientOrderId = this.safeString2(params, 'clientOrderId', 'client-order-id'); // must be 64 chars max and unique within 24 hours
|
|
5225
5225
|
if (clientOrderId === undefined) {
|
|
5226
|
-
const broker = this.
|
|
5226
|
+
const broker = this.safeDict(this.options, 'broker', {});
|
|
5227
5227
|
const brokerId = this.safeString(broker, 'id');
|
|
5228
5228
|
request['client-order-id'] = brokerId + this.uuid();
|
|
5229
5229
|
}
|
|
@@ -5479,7 +5479,7 @@ class htx extends htx$1["default"] {
|
|
|
5479
5479
|
request['lever_rate'] = this.safeIntegerN(params, ['leverRate', 'lever_rate', 'leverage'], 1);
|
|
5480
5480
|
}
|
|
5481
5481
|
}
|
|
5482
|
-
const broker = this.
|
|
5482
|
+
const broker = this.safeDict(this.options, 'broker', {});
|
|
5483
5483
|
const brokerId = this.safeString(broker, 'id');
|
|
5484
5484
|
request['channel_code'] = brokerId;
|
|
5485
5485
|
params = this.omit(params, ['reduceOnly', 'triggerPrice', 'stopPrice', 'stopLossPrice', 'takeProfitPrice', 'triggerType', 'leverRate', 'timeInForce', 'leverage', 'trailingPercent', 'trailingTriggerPrice', 'hedged']);
|
|
@@ -5694,15 +5694,15 @@ class htx extends htx$1["default"] {
|
|
|
5694
5694
|
});
|
|
5695
5695
|
}
|
|
5696
5696
|
else if (isStopLossTriggerOrder) {
|
|
5697
|
-
data = this.
|
|
5698
|
-
result = this.
|
|
5697
|
+
data = this.safeDict(response, 'data', {});
|
|
5698
|
+
result = this.safeDict(data, 'sl_order', {});
|
|
5699
5699
|
}
|
|
5700
5700
|
else if (isTakeProfitTriggerOrder) {
|
|
5701
|
-
data = this.
|
|
5702
|
-
result = this.
|
|
5701
|
+
data = this.safeDict(response, 'data', {});
|
|
5702
|
+
result = this.safeDict(data, 'tp_order', {});
|
|
5703
5703
|
}
|
|
5704
5704
|
else {
|
|
5705
|
-
result = this.
|
|
5705
|
+
result = this.safeDict(response, 'data', {});
|
|
5706
5706
|
}
|
|
5707
5707
|
if (result === undefined) {
|
|
5708
5708
|
throw new errors.NullResponse(this.id + ' parseOrder() returned empty response');
|
|
@@ -5744,7 +5744,7 @@ class htx extends htx$1["default"] {
|
|
|
5744
5744
|
const side = this.safeString(rawOrder, 'side');
|
|
5745
5745
|
const amount = this.safeValue(rawOrder, 'amount');
|
|
5746
5746
|
const price = this.safeValue(rawOrder, 'price');
|
|
5747
|
-
const orderParams = this.
|
|
5747
|
+
const orderParams = this.safeDict(rawOrder, 'params', {});
|
|
5748
5748
|
const marginResult = this.handleMarginModeAndParams('createOrders', orderParams);
|
|
5749
5749
|
const currentMarginMode = marginResult[0];
|
|
5750
5750
|
if (currentMarginMode !== undefined) {
|
|
@@ -5853,7 +5853,7 @@ class htx extends htx$1["default"] {
|
|
|
5853
5853
|
//
|
|
5854
5854
|
let result = undefined;
|
|
5855
5855
|
if (this.safeBool(market, 'spot') === true) {
|
|
5856
|
-
result = this.
|
|
5856
|
+
result = this.safeList(response, 'data', []);
|
|
5857
5857
|
}
|
|
5858
5858
|
else {
|
|
5859
5859
|
const data = this.safeValue(response, 'data');
|
|
@@ -5861,9 +5861,9 @@ class htx extends htx$1["default"] {
|
|
|
5861
5861
|
result = data;
|
|
5862
5862
|
}
|
|
5863
5863
|
else {
|
|
5864
|
-
const batchData = this.
|
|
5865
|
-
const success = this.
|
|
5866
|
-
const errors = this.
|
|
5864
|
+
const batchData = this.safeDict(response, 'data', {});
|
|
5865
|
+
const success = this.safeList(batchData, 'success', []);
|
|
5866
|
+
const errors = this.safeList(batchData, 'errors', []);
|
|
5867
5867
|
result = this.arrayConcat(success, errors);
|
|
5868
5868
|
}
|
|
5869
5869
|
}
|
|
@@ -6102,7 +6102,7 @@ class htx extends htx$1["default"] {
|
|
|
6102
6102
|
// 'symbol': market['settleId'],
|
|
6103
6103
|
};
|
|
6104
6104
|
const trigger = this.safeBool2(params, 'stop', 'trigger');
|
|
6105
|
-
const stopLossTakeProfit = this.
|
|
6105
|
+
const stopLossTakeProfit = this.safeBool(params, 'stopLossTakeProfit');
|
|
6106
6106
|
params = this.omit(params, ['stop', 'stopLossTakeProfit', 'trigger']);
|
|
6107
6107
|
let response = undefined;
|
|
6108
6108
|
if (marketType === 'spot') {
|
|
@@ -6427,7 +6427,7 @@ class htx extends htx$1["default"] {
|
|
|
6427
6427
|
}
|
|
6428
6428
|
request['contract_code'] = this.safeString(market, 'id');
|
|
6429
6429
|
const trigger = this.safeBool2(params, 'stop', 'trigger');
|
|
6430
|
-
const stopLossTakeProfit = this.
|
|
6430
|
+
const stopLossTakeProfit = this.safeBool(params, 'stopLossTakeProfit');
|
|
6431
6431
|
const trailing = this.safeBool(params, 'trailing', false);
|
|
6432
6432
|
params = this.omit(params, ['stop', 'stopLossTakeProfit', 'trailing', 'trigger']);
|
|
6433
6433
|
if (this.safeBool(market, 'linear') === true) {
|
|
@@ -6587,7 +6587,7 @@ class htx extends htx$1["default"] {
|
|
|
6587
6587
|
// ]
|
|
6588
6588
|
// }
|
|
6589
6589
|
//
|
|
6590
|
-
const data = this.
|
|
6590
|
+
const data = this.safeList(response, 'data', []);
|
|
6591
6591
|
const parsed = this.parseDepositAddresses(data, [currency['code']], false);
|
|
6592
6592
|
return this.indexBy(parsed, 'network');
|
|
6593
6593
|
}
|
|
@@ -6633,7 +6633,7 @@ class htx extends htx$1["default"] {
|
|
|
6633
6633
|
// ]
|
|
6634
6634
|
// }
|
|
6635
6635
|
//
|
|
6636
|
-
const data = this.
|
|
6636
|
+
const data = this.safeList(response, 'data', []);
|
|
6637
6637
|
const allAddresses = this.parseDepositAddresses(data, [currency['code']], false);
|
|
6638
6638
|
const addresses = [];
|
|
6639
6639
|
for (let i = 0; i < allAddresses.length; i++) {
|
|
@@ -6928,13 +6928,13 @@ class htx extends htx$1["default"] {
|
|
|
6928
6928
|
amountPrecision = '0';
|
|
6929
6929
|
}
|
|
6930
6930
|
amount = parseFloat(amountPrecision);
|
|
6931
|
-
const withdrawOptions = this.
|
|
6931
|
+
const withdrawOptions = this.safeDict(this.options, 'withdraw', {});
|
|
6932
6932
|
if (this.safeBool(withdrawOptions, 'includeFee', false)) {
|
|
6933
6933
|
let fee = this.safeNumber(params, 'fee');
|
|
6934
6934
|
if (fee === undefined) {
|
|
6935
6935
|
const currencies = await this.fetchCurrencies();
|
|
6936
6936
|
this.currencies = this.mapToSafeMap(this.deepExtend(this.currencies, currencies));
|
|
6937
|
-
const targetNetwork = this.
|
|
6937
|
+
const targetNetwork = this.safeDict(currency['networks'], networkCode, {});
|
|
6938
6938
|
fee = this.safeNumber(targetNetwork, 'fee');
|
|
6939
6939
|
if (fee === undefined) {
|
|
6940
6940
|
throw new errors.ArgumentsRequired(this.id + ' withdraw() function can not find withdraw fee for chosen network. You need to re-load markets with "exchange.loadMarkets(true)", or provide the "fee" parameter');
|
|
@@ -7235,7 +7235,7 @@ class htx extends htx$1["default"] {
|
|
|
7235
7235
|
// ]
|
|
7236
7236
|
// }
|
|
7237
7237
|
//
|
|
7238
|
-
const data = this.
|
|
7238
|
+
const data = this.safeList(response, 'data', []);
|
|
7239
7239
|
return this.parseIsolatedBorrowRates(data);
|
|
7240
7240
|
}
|
|
7241
7241
|
parseIsolatedBorrowRate(info, market = undefined) {
|
|
@@ -7264,9 +7264,9 @@ class htx extends htx$1["default"] {
|
|
|
7264
7264
|
//
|
|
7265
7265
|
const marketId = this.safeString(info, 'symbol');
|
|
7266
7266
|
const symbol = this.safeSymbol(marketId, market);
|
|
7267
|
-
const currencies = this.
|
|
7268
|
-
const baseData = this.
|
|
7269
|
-
const quoteData = this.
|
|
7267
|
+
const currencies = this.safeList(info, 'currencies', []);
|
|
7268
|
+
const baseData = this.safeDict(currencies, 0);
|
|
7269
|
+
const quoteData = this.safeDict(currencies, 1);
|
|
7270
7270
|
const baseId = this.safeString(baseData, 'currency');
|
|
7271
7271
|
const quoteId = this.safeString(quoteData, 'currency');
|
|
7272
7272
|
return {
|
|
@@ -7542,7 +7542,7 @@ class htx extends htx$1["default"] {
|
|
|
7542
7542
|
result = this.safeDict(data, 0, {});
|
|
7543
7543
|
}
|
|
7544
7544
|
else {
|
|
7545
|
-
result = this.
|
|
7545
|
+
result = this.safeDict(response, 'data', {});
|
|
7546
7546
|
}
|
|
7547
7547
|
return this.parseFundingRate(result, market);
|
|
7548
7548
|
}
|
|
@@ -7600,7 +7600,7 @@ class htx extends htx$1["default"] {
|
|
|
7600
7600
|
// "ts": 1643346173103
|
|
7601
7601
|
// }
|
|
7602
7602
|
//
|
|
7603
|
-
const data = this.
|
|
7603
|
+
const data = this.safeList(response, 'data', []);
|
|
7604
7604
|
return this.parseFundingRates(data, symbols);
|
|
7605
7605
|
}
|
|
7606
7606
|
/**
|
|
@@ -7827,7 +7827,7 @@ class htx extends htx$1["default"] {
|
|
|
7827
7827
|
else if (access === 'private') {
|
|
7828
7828
|
this.checkRequiredCredentials();
|
|
7829
7829
|
if (method === 'POST') {
|
|
7830
|
-
const options = this.
|
|
7830
|
+
const options = this.safeDict(this.options, 'broker', {});
|
|
7831
7831
|
const id = this.safeString(options, 'id', 'AA03022abc');
|
|
7832
7832
|
if (!isArrayParams) {
|
|
7833
7833
|
if ((pathString.indexOf('cancel') === -1) && pathString.endsWith('order')) {
|
|
@@ -8214,7 +8214,7 @@ class htx extends htx$1["default"] {
|
|
|
8214
8214
|
market = this.safeMarket(this.safeString(position, 'contract_code'));
|
|
8215
8215
|
const symbol = market['symbol'];
|
|
8216
8216
|
const contracts = this.safeString(position, 'volume');
|
|
8217
|
-
const contractSize = this.
|
|
8217
|
+
const contractSize = this.safeNumber(market, 'contractSize');
|
|
8218
8218
|
const contractSizeString = this.numberToString(contractSize);
|
|
8219
8219
|
const entryPrice = this.safeNumber2(position, 'cost_open', 'open_avg_price');
|
|
8220
8220
|
const initialMargin = this.safeString2(position, 'position_margin', 'initial_margin');
|
|
@@ -8597,7 +8597,7 @@ class htx extends htx$1["default"] {
|
|
|
8597
8597
|
account = data;
|
|
8598
8598
|
}
|
|
8599
8599
|
else {
|
|
8600
|
-
account = this.
|
|
8600
|
+
account = this.safeDict(data, 0);
|
|
8601
8601
|
}
|
|
8602
8602
|
const omitted = this.omit(account, ['positions']);
|
|
8603
8603
|
const positions = this.safeValue(account, 'positions');
|
|
@@ -8612,7 +8612,7 @@ class htx extends htx$1["default"] {
|
|
|
8612
8612
|
}
|
|
8613
8613
|
}
|
|
8614
8614
|
else {
|
|
8615
|
-
position = this.
|
|
8615
|
+
position = this.safeDict(positions, 0);
|
|
8616
8616
|
}
|
|
8617
8617
|
const timestamp = this.safeInteger(response, 'ts');
|
|
8618
8618
|
const parsed = this.parsePosition(this.extend(position, omitted), market);
|
|
@@ -8756,7 +8756,7 @@ class htx extends htx$1["default"] {
|
|
|
8756
8756
|
// "ok": true
|
|
8757
8757
|
// }
|
|
8758
8758
|
//
|
|
8759
|
-
const data = this.
|
|
8759
|
+
const data = this.safeList(response, 'data', []);
|
|
8760
8760
|
return this.parseLedger(data, currency, since, limit);
|
|
8761
8761
|
}
|
|
8762
8762
|
/**
|
|
@@ -8947,7 +8947,7 @@ class htx extends htx$1["default"] {
|
|
|
8947
8947
|
// "ts": 1648227062944
|
|
8948
8948
|
// }
|
|
8949
8949
|
//
|
|
8950
|
-
const data = this.
|
|
8950
|
+
const data = this.safeDict(response, 'data');
|
|
8951
8951
|
const tick = this.safeList(data, 'tick');
|
|
8952
8952
|
return this.parseOpenInterestsHistory(tick, market, since, limit);
|
|
8953
8953
|
}
|
|
@@ -9304,7 +9304,7 @@ class htx extends htx$1["default"] {
|
|
|
9304
9304
|
// ]
|
|
9305
9305
|
// }
|
|
9306
9306
|
//
|
|
9307
|
-
const data = this.
|
|
9307
|
+
const data = this.safeList(response, 'Data', []);
|
|
9308
9308
|
const loan = this.safeValue(data, 0);
|
|
9309
9309
|
const transaction = this.parseMarginLoan(loan, currency);
|
|
9310
9310
|
return this.extend(transaction, {
|
|
@@ -9345,7 +9345,7 @@ class htx extends htx$1["default"] {
|
|
|
9345
9345
|
// ]
|
|
9346
9346
|
// }
|
|
9347
9347
|
//
|
|
9348
|
-
const data = this.
|
|
9348
|
+
const data = this.safeList(response, 'Data', []);
|
|
9349
9349
|
const loan = this.safeValue(data, 0);
|
|
9350
9350
|
const transaction = this.parseMarginLoan(loan, currency);
|
|
9351
9351
|
return this.extend(transaction, {
|
|
@@ -9511,7 +9511,7 @@ class htx extends htx$1["default"] {
|
|
|
9511
9511
|
const settlementsLinear = this.parseSettlements(dataLinear, market);
|
|
9512
9512
|
return this.sortBy(settlementsLinear, 'timestamp');
|
|
9513
9513
|
}
|
|
9514
|
-
const data = this.
|
|
9514
|
+
const data = this.safeDict(response, 'data');
|
|
9515
9515
|
const settlementRecord = this.safeValue(data, 'settlement_record');
|
|
9516
9516
|
const settlements = this.parseSettlements(settlementRecord, market);
|
|
9517
9517
|
return this.sortBy(settlements, 'timestamp');
|
|
@@ -9690,7 +9690,7 @@ class htx extends htx$1["default"] {
|
|
|
9690
9690
|
const result = [];
|
|
9691
9691
|
for (let i = 0; i < settlements.length; i++) {
|
|
9692
9692
|
const settlement = settlements[i];
|
|
9693
|
-
const list = this.
|
|
9693
|
+
const list = this.safeList(settlement, 'list');
|
|
9694
9694
|
if (market['linear'] === true) {
|
|
9695
9695
|
const parsedSettlement = this.parseSettlement(settlement, market);
|
|
9696
9696
|
result.push(parsedSettlement);
|
|
@@ -2347,8 +2347,8 @@ class hyperliquid extends hyperliquid$1["default"] {
|
|
|
2347
2347
|
let orderParams = this.safeDict(rawOrder, 'params', {});
|
|
2348
2348
|
const slippage = this.safeString(orderParams, 'slippage', defaultSlippage);
|
|
2349
2349
|
orderParams['slippage'] = slippage;
|
|
2350
|
-
const stopLoss = this.
|
|
2351
|
-
const takeProfit = this.
|
|
2350
|
+
const stopLoss = this.safeDict(orderParams, 'stopLoss');
|
|
2351
|
+
const takeProfit = this.safeDict(orderParams, 'takeProfit');
|
|
2352
2352
|
const hasStopLoss = (stopLoss !== undefined);
|
|
2353
2353
|
const hasTakeProfit = (takeProfit !== undefined);
|
|
2354
2354
|
orderParams = this.omit(orderParams, ['stopLoss', 'takeProfit']);
|
|
@@ -892,9 +892,9 @@ class independentreserve extends independentreserve$1["default"] {
|
|
|
892
892
|
for (let i = 0; i < symbols.length; i++) {
|
|
893
893
|
const symbol = symbols[i];
|
|
894
894
|
const market = this.market(symbol);
|
|
895
|
-
const fee = this.
|
|
895
|
+
const fee = this.safeDict(fees, market['base'], {});
|
|
896
896
|
result[symbol] = {
|
|
897
|
-
'info': this.
|
|
897
|
+
'info': this.safeDict(fee, 'info'),
|
|
898
898
|
'symbol': symbol,
|
|
899
899
|
'maker': this.safeNumber(fee, 'fee'),
|
|
900
900
|
'taker': this.safeNumber(fee, 'fee'),
|
package/dist/cjs/src/indodax.js
CHANGED
|
@@ -435,9 +435,9 @@ class indodax extends indodax$1["default"] {
|
|
|
435
435
|
return result;
|
|
436
436
|
}
|
|
437
437
|
parseBalance(response) {
|
|
438
|
-
const balances = this.
|
|
438
|
+
const balances = this.safeDict(response, 'return', {});
|
|
439
439
|
const free = this.safeDict(balances, 'balance', {});
|
|
440
|
-
const used = this.
|
|
440
|
+
const used = this.safeDict(balances, 'balance_hold', {});
|
|
441
441
|
const timestamp = this.safeTimestamp(balances, 'server_time');
|
|
442
442
|
const result = {
|
|
443
443
|
'info': response,
|
|
@@ -1025,7 +1025,7 @@ class indodax extends indodax$1["default"] {
|
|
|
1025
1025
|
request[market['baseId']] = this.amountToPrecision(symbol, amount);
|
|
1026
1026
|
}
|
|
1027
1027
|
const result = await this.privatePostTrade(this.extend(request, params));
|
|
1028
|
-
const data = this.
|
|
1028
|
+
const data = this.safeDict(result, 'return', {});
|
|
1029
1029
|
const id = this.safeString(data, 'order_id');
|
|
1030
1030
|
return this.safeOrder({
|
|
1031
1031
|
'info': result,
|
|
@@ -1110,7 +1110,7 @@ class indodax extends indodax$1["default"] {
|
|
|
1110
1110
|
// }
|
|
1111
1111
|
// }
|
|
1112
1112
|
//
|
|
1113
|
-
const data = this.
|
|
1113
|
+
const data = this.safeDict(response, 'return', {});
|
|
1114
1114
|
const currencyId = this.safeString(data, 'currency');
|
|
1115
1115
|
return {
|
|
1116
1116
|
'info': response,
|
|
@@ -1231,7 +1231,7 @@ class indodax extends indodax$1["default"] {
|
|
|
1231
1231
|
// }
|
|
1232
1232
|
// }
|
|
1233
1233
|
//
|
|
1234
|
-
const data = this.
|
|
1234
|
+
const data = this.safeDict(response, 'return', {});
|
|
1235
1235
|
const withdraw = this.safeDict(data, 'withdraw', {});
|
|
1236
1236
|
const deposit = this.safeDict(data, 'deposit', {});
|
|
1237
1237
|
let transactions = [];
|
|
@@ -1250,8 +1250,8 @@ class indodax extends indodax$1["default"] {
|
|
|
1250
1250
|
}
|
|
1251
1251
|
else {
|
|
1252
1252
|
currency = this.currency(code);
|
|
1253
|
-
const withdraws = this.
|
|
1254
|
-
const deposits = this.
|
|
1253
|
+
const withdraws = this.safeList(withdraw, currency['id'], []);
|
|
1254
|
+
const deposits = this.safeList(deposit, currency['id'], []);
|
|
1255
1255
|
transactions = this.arrayConcat(withdraws, deposits);
|
|
1256
1256
|
}
|
|
1257
1257
|
return this.parseTransactions(transactions, currency, since, limit);
|
|
@@ -1530,7 +1530,7 @@ class indodax extends indodax$1["default"] {
|
|
|
1530
1530
|
if (Array.isArray(response)) {
|
|
1531
1531
|
return undefined; // public endpoints may return []-arrays
|
|
1532
1532
|
}
|
|
1533
|
-
const error = this.
|
|
1533
|
+
const error = this.safeString(response, 'error', '');
|
|
1534
1534
|
if (!('success' in response) && error === '') {
|
|
1535
1535
|
return undefined; // no 'success' property on public responses
|
|
1536
1536
|
}
|