ccxt 4.5.82 → 4.5.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +3 -1
- package/dist/cjs/src/abstract/prediction/sxbet.js +11 -0
- package/dist/cjs/src/apex.js +1 -0
- package/dist/cjs/src/aster.js +2 -2
- package/dist/cjs/src/base/Exchange.js +1 -1
- package/dist/cjs/src/bigone.js +2 -2
- package/dist/cjs/src/binance.js +10 -10
- package/dist/cjs/src/bingx.js +3 -3
- package/dist/cjs/src/bit2c.js +4 -4
- package/dist/cjs/src/bitbank.js +15 -15
- package/dist/cjs/src/bitfinex.js +15 -15
- package/dist/cjs/src/bitget.js +109 -73
- package/dist/cjs/src/bitmex.js +7 -7
- package/dist/cjs/src/bitopro.js +2 -2
- package/dist/cjs/src/bitrue.js +6 -6
- package/dist/cjs/src/bitso.js +18 -18
- package/dist/cjs/src/bitstamp.js +5 -5
- package/dist/cjs/src/bitteam.js +32 -32
- package/dist/cjs/src/bittrade.js +10 -10
- package/dist/cjs/src/bitvavo.js +9 -9
- package/dist/cjs/src/blockchaincom.js +2 -2
- package/dist/cjs/src/btcbox.js +2 -2
- package/dist/cjs/src/btcmarkets.js +2 -2
- package/dist/cjs/src/btcturk.js +2 -2
- package/dist/cjs/src/btse.js +2 -2
- package/dist/cjs/src/bybitid.js +4 -0
- package/dist/cjs/src/coinbase.js +1 -1
- package/dist/cjs/src/coinbaseexchange.js +13 -13
- package/dist/cjs/src/coincheck.js +4 -4
- package/dist/cjs/src/coinex.js +10 -10
- package/dist/cjs/src/coinmate.js +4 -4
- package/dist/cjs/src/coinone.js +4 -4
- package/dist/cjs/src/coinsph.js +5 -5
- package/dist/cjs/src/cryptocom.js +5 -5
- package/dist/cjs/src/deribit.js +31 -31
- package/dist/cjs/src/derive.js +1 -1
- package/dist/cjs/src/digifinex.js +31 -31
- package/dist/cjs/src/gate.js +25 -25
- package/dist/cjs/src/gemini.js +5 -5
- package/dist/cjs/src/grvt.js +1 -1
- package/dist/cjs/src/hibachi.js +5 -5
- package/dist/cjs/src/hitbtc.js +15 -15
- package/dist/cjs/src/hollaex.js +15 -15
- package/dist/cjs/src/htx.js +52 -52
- package/dist/cjs/src/hyperliquid.js +2 -2
- package/dist/cjs/src/independentreserve.js +2 -2
- package/dist/cjs/src/indodax.js +8 -8
- package/dist/cjs/src/kraken.js +29 -29
- package/dist/cjs/src/krakenfutures.js +16 -16
- package/dist/cjs/src/kucoin.js +15 -15
- package/dist/cjs/src/latoken.js +8 -8
- package/dist/cjs/src/lbank.js +31 -31
- package/dist/cjs/src/lighter.js +2 -2
- package/dist/cjs/src/luno.js +2 -2
- package/dist/cjs/src/mercado.js +12 -12
- package/dist/cjs/src/mexc.js +27 -27
- package/dist/cjs/src/modetrade.js +10 -10
- package/dist/cjs/src/ndax.js +4 -4
- package/dist/cjs/src/okx.js +19 -20
- package/dist/cjs/src/onetrading.js +7 -7
- package/dist/cjs/src/p2b.js +8 -8
- package/dist/cjs/src/pacifica.js +9 -3
- package/dist/cjs/src/paymium.js +2 -2
- package/dist/cjs/src/phemex.js +37 -37
- package/dist/cjs/src/poloniex.js +14 -14
- package/dist/cjs/src/prediction/sxbet.js +2710 -0
- package/dist/cjs/src/pro/alpaca.js +5 -5
- package/dist/cjs/src/pro/apex.js +6 -6
- package/dist/cjs/src/pro/aster.js +8 -8
- package/dist/cjs/src/pro/backpack.js +1 -1
- package/dist/cjs/src/pro/binance.js +26 -26
- package/dist/cjs/src/pro/bingx.js +11 -11
- package/dist/cjs/src/pro/bitfinex.js +11 -11
- package/dist/cjs/src/pro/bitget.js +20 -20
- package/dist/cjs/src/pro/bithumb.js +1 -1
- package/dist/cjs/src/pro/bitmex.js +12 -12
- package/dist/cjs/src/pro/bitopro.js +5 -5
- package/dist/cjs/src/pro/bitrue.js +7 -7
- package/dist/cjs/src/pro/bitstamp.js +5 -5
- package/dist/cjs/src/pro/bittrade.js +11 -11
- package/dist/cjs/src/pro/bitvavo.js +16 -16
- package/dist/cjs/src/pro/blockchaincom.js +5 -5
- package/dist/cjs/src/pro/blofin.js +2 -2
- package/dist/cjs/src/pro/bybit.js +21 -21
- package/dist/cjs/src/pro/bydfi.js +2 -2
- package/dist/cjs/src/pro/cex.js +19 -19
- package/dist/cjs/src/pro/coinbase.js +2 -2
- package/dist/cjs/src/pro/coinbaseexchange.js +9 -9
- package/dist/cjs/src/pro/coinbaseinternational.js +2 -2
- package/dist/cjs/src/pro/coincheck.js +2 -2
- package/dist/cjs/src/pro/coinex.js +3 -3
- package/dist/cjs/src/pro/coinone.js +6 -6
- package/dist/cjs/src/pro/cryptocom.js +10 -10
- package/dist/cjs/src/pro/deribit.js +13 -13
- package/dist/cjs/src/pro/derive.js +4 -4
- package/dist/cjs/src/pro/dydx.js +1 -1
- package/dist/cjs/src/pro/extended.js +16 -10
- package/dist/cjs/src/pro/gate.js +10 -10
- package/dist/cjs/src/pro/gemini.js +3 -3
- package/dist/cjs/src/pro/grvt.js +2 -2
- package/dist/cjs/src/pro/hashkey.js +2 -2
- package/dist/cjs/src/pro/hitbtc.js +6 -6
- package/dist/cjs/src/pro/hollaex.js +3 -3
- package/dist/cjs/src/pro/htx.js +28 -28
- package/dist/cjs/src/pro/hyperliquid.js +1 -1
- package/dist/cjs/src/pro/independentreserve.js +2 -2
- package/dist/cjs/src/pro/kraken.js +7 -7
- package/dist/cjs/src/pro/krakenfutures.js +12 -12
- package/dist/cjs/src/pro/kucoin.js +12 -12
- package/dist/cjs/src/pro/lbank.js +16 -16
- package/dist/cjs/src/pro/luno.js +2 -2
- package/dist/cjs/src/pro/mexc.js +8 -8
- package/dist/cjs/src/pro/modetrade.js +3 -3
- package/dist/cjs/src/pro/mudrex.js +2 -2
- package/dist/cjs/src/pro/nado.js +3 -3
- package/dist/cjs/src/pro/ndax.js +6 -6
- package/dist/cjs/src/pro/okx.js +20 -20
- package/dist/cjs/src/pro/onetrading.js +14 -14
- package/dist/cjs/src/pro/p2b.js +5 -5
- package/dist/cjs/src/pro/pacifica.js +1 -1
- package/dist/cjs/src/pro/paradex.js +1 -1
- package/dist/cjs/src/pro/phemex.js +13 -13
- package/dist/cjs/src/pro/poloniex.js +17 -17
- package/dist/cjs/src/pro/toobit.js +2 -2
- package/dist/cjs/src/pro/upbit.js +4 -4
- package/dist/cjs/src/pro/weex.js +2 -2
- package/dist/cjs/src/pro/whitebit.js +12 -12
- package/dist/cjs/src/pro/woo.js +13 -13
- package/dist/cjs/src/pro/woofipro.js +3 -3
- package/dist/cjs/src/pro/xt.js +3 -3
- package/dist/cjs/src/tokocrypto.js +20 -20
- package/dist/cjs/src/upbit.js +12 -12
- package/dist/cjs/src/whitebit.js +15 -15
- package/dist/cjs/src/woo.js +3 -3
- package/dist/cjs/src/woofipro.js +14 -14
- package/dist/cjs/src/zaif.js +9 -3
- package/dist/cjs/src/zebpay.js +1 -1
- package/js/ccxt.d.ts +4 -1
- package/js/ccxt.js +3 -1
- package/js/src/abstract/prediction/sxbet.d.ts +41 -0
- package/js/src/abstract/prediction/sxbet.js +11 -0
- package/js/src/alpaca.d.ts +28 -33
- package/js/src/apex.d.ts +28 -42
- package/js/src/apex.js +1 -0
- package/js/src/aster.d.ts +58 -108
- package/js/src/aster.js +2 -2
- package/js/src/backpack.d.ts +34 -48
- package/js/src/base/Exchange.d.ts +304 -320
- package/js/src/base/Exchange.js +1 -1
- package/js/src/bigone.d.ts +24 -29
- package/js/src/bigone.js +2 -2
- package/js/src/binance.d.ts +112 -138
- package/js/src/binance.js +10 -10
- package/js/src/binancecoinm.d.ts +3 -2
- package/js/src/binanceusdm.d.ts +3 -2
- package/js/src/bingx.d.ts +65 -84
- package/js/src/bingx.js +3 -3
- package/js/src/bit2c.d.ts +13 -18
- package/js/src/bit2c.js +4 -4
- package/js/src/bitbank.d.ts +16 -21
- package/js/src/bitbank.js +15 -15
- package/js/src/bitbns.d.ts +15 -20
- package/js/src/bitfinex.d.ts +46 -51
- package/js/src/bitfinex.js +15 -15
- package/js/src/bitflyer.d.ts +20 -25
- package/js/src/bitget.d.ts +105 -93
- package/js/src/bitget.js +109 -73
- package/js/src/bithumb.d.ts +26 -31
- package/js/src/bitmex.d.ts +48 -65
- package/js/src/bitmex.js +7 -7
- package/js/src/bitopro.d.ts +25 -41
- package/js/src/bitopro.js +2 -2
- package/js/src/bitrue.d.ts +30 -45
- package/js/src/bitrue.js +6 -6
- package/js/src/bitso.d.ts +24 -29
- package/js/src/bitso.js +18 -18
- package/js/src/bitstamp.d.ts +36 -47
- package/js/src/bitstamp.js +5 -5
- package/js/src/bitteam.d.ts +22 -27
- package/js/src/bitteam.js +32 -32
- package/js/src/bittrade.d.ts +35 -46
- package/js/src/bittrade.js +10 -10
- package/js/src/bitvavo.d.ts +43 -48
- package/js/src/bitvavo.js +9 -9
- package/js/src/blockchaincom.d.ts +26 -31
- package/js/src/blockchaincom.js +2 -2
- package/js/src/blofin.d.ts +38 -43
- package/js/src/btcbox.d.ts +14 -19
- package/js/src/btcbox.js +2 -2
- package/js/src/btcmarkets.d.ts +25 -30
- package/js/src/btcmarkets.js +2 -2
- package/js/src/btcturk.d.ts +13 -18
- package/js/src/btcturk.js +2 -2
- package/js/src/btse.d.ts +44 -50
- package/js/src/btse.js +2 -2
- package/js/src/bullish.d.ts +35 -57
- package/js/src/bybit.d.ts +95 -106
- package/js/src/bybitid.js +4 -0
- package/js/src/bydfi.d.ts +37 -48
- package/js/src/cex.d.ts +29 -34
- package/js/src/coinbase.d.ts +66 -82
- package/js/src/coinbase.js +1 -1
- package/js/src/coinbaseexchange.d.ts +33 -43
- package/js/src/coinbaseexchange.js +13 -13
- package/js/src/coinbaseinternational.d.ts +34 -73
- package/js/src/coincheck.d.ts +13 -18
- package/js/src/coincheck.js +4 -4
- package/js/src/coinex.d.ts +63 -68
- package/js/src/coinex.js +10 -10
- package/js/src/coinmate.d.ts +15 -20
- package/js/src/coinmate.js +4 -4
- package/js/src/coinone.d.ts +14 -19
- package/js/src/coinone.js +4 -4
- package/js/src/coinsph.d.ts +32 -37
- package/js/src/coinsph.js +5 -5
- package/js/src/coinspot.d.ts +10 -15
- package/js/src/cryptocom.d.ts +48 -64
- package/js/src/cryptocom.js +5 -5
- package/js/src/cryptomus.d.ts +15 -23
- package/js/src/deepcoin.d.ts +43 -48
- package/js/src/delta.d.ts +43 -54
- package/js/src/deribit.d.ts +48 -69
- package/js/src/deribit.js +31 -31
- package/js/src/derive.d.ts +28 -42
- package/js/src/derive.js +1 -1
- package/js/src/digifinex.d.ts +54 -67
- package/js/src/digifinex.js +31 -31
- package/js/src/dydx.d.ts +26 -31
- package/js/src/extended.d.ts +51 -56
- package/js/src/foxbit.d.ts +34 -64
- package/js/src/gate.d.ts +94 -162
- package/js/src/gate.js +25 -25
- package/js/src/gemini.d.ts +33 -43
- package/js/src/gemini.js +5 -5
- package/js/src/grvt.d.ts +36 -47
- package/js/src/grvt.js +1 -1
- package/js/src/hashkey.d.ts +58 -78
- package/js/src/hibachi.d.ts +42 -52
- package/js/src/hibachi.js +5 -5
- package/js/src/hitbtc.d.ts +49 -56
- package/js/src/hitbtc.js +15 -15
- package/js/src/hollaex.d.ts +26 -31
- package/js/src/hollaex.js +15 -15
- package/js/src/htx.d.ts +80 -121
- package/js/src/htx.js +52 -52
- package/js/src/hyperliquid.d.ts +77 -127
- package/js/src/hyperliquid.js +2 -2
- package/js/src/independentreserve.d.ts +15 -20
- package/js/src/independentreserve.js +2 -2
- package/js/src/indodax.d.ts +19 -24
- package/js/src/indodax.js +8 -8
- package/js/src/kraken.d.ts +43 -55
- package/js/src/kraken.js +29 -29
- package/js/src/krakenfutures.d.ts +34 -39
- package/js/src/krakenfutures.js +16 -16
- package/js/src/kucoin.d.ts +121 -132
- package/js/src/kucoin.js +15 -15
- package/js/src/kucoinfutures.d.ts +4 -4
- package/js/src/latoken.d.ts +24 -29
- package/js/src/latoken.js +8 -8
- package/js/src/lbank.d.ts +40 -53
- package/js/src/lbank.js +31 -31
- package/js/src/lighter.d.ts +40 -45
- package/js/src/lighter.js +2 -2
- package/js/src/luno.d.ts +25 -30
- package/js/src/luno.js +2 -2
- package/js/src/mercado.d.ts +15 -20
- package/js/src/mercado.js +12 -12
- package/js/src/mexc.d.ts +70 -83
- package/js/src/mexc.js +27 -27
- package/js/src/modetrade.d.ts +43 -57
- package/js/src/modetrade.js +10 -10
- package/js/src/mudrex.d.ts +25 -35
- package/js/src/nado.d.ts +45 -50
- package/js/src/ndax.d.ts +27 -32
- package/js/src/ndax.js +4 -4
- package/js/src/okx.d.ts +97 -108
- package/js/src/okx.js +19 -20
- package/js/src/onetrading.d.ts +23 -31
- package/js/src/onetrading.js +7 -7
- package/js/src/p2b.d.ts +17 -22
- package/js/src/p2b.js +8 -8
- package/js/src/pacifica.d.ts +55 -73
- package/js/src/pacifica.js +9 -3
- package/js/src/paradex.d.ts +47 -68
- package/js/src/paymium.d.ts +12 -17
- package/js/src/paymium.js +2 -2
- package/js/src/phemex.d.ts +47 -52
- package/js/src/phemex.js +37 -37
- package/js/src/poloniex.d.ts +45 -50
- package/js/src/poloniex.js +14 -14
- package/js/src/prediction/sxbet.d.ts +595 -0
- package/js/src/prediction/sxbet.js +2708 -0
- package/js/src/pro/alpaca.d.ts +23 -23
- package/js/src/pro/alpaca.js +5 -5
- package/js/src/pro/apex.d.ts +28 -28
- package/js/src/pro/apex.js +6 -6
- package/js/src/pro/aster.d.ts +33 -33
- package/js/src/pro/aster.js +8 -8
- package/js/src/pro/backpack.d.ts +28 -28
- package/js/src/pro/backpack.js +1 -1
- package/js/src/pro/binance.d.ts +57 -57
- package/js/src/pro/binance.js +26 -26
- package/js/src/pro/bingx.d.ts +26 -26
- package/js/src/pro/bingx.js +11 -11
- package/js/src/pro/bitfinex.d.ts +25 -25
- package/js/src/pro/bitfinex.js +11 -11
- package/js/src/pro/bitget.d.ts +41 -41
- package/js/src/pro/bitget.js +20 -20
- package/js/src/pro/bithumb.d.ts +15 -15
- package/js/src/pro/bithumb.js +1 -1
- package/js/src/pro/bitmex.d.ts +29 -29
- package/js/src/pro/bitmex.js +12 -12
- package/js/src/pro/bitopro.d.ts +13 -13
- package/js/src/pro/bitopro.js +5 -5
- package/js/src/pro/bitrue.d.ts +25 -25
- package/js/src/pro/bitrue.js +7 -7
- package/js/src/pro/bitstamp.d.ts +21 -21
- package/js/src/pro/bitstamp.js +5 -5
- package/js/src/pro/bittrade.d.ts +19 -19
- package/js/src/pro/bittrade.js +11 -11
- package/js/src/pro/bitvavo.d.ts +62 -62
- package/js/src/pro/bitvavo.js +16 -16
- package/js/src/pro/blockchaincom.d.ts +19 -19
- package/js/src/pro/blockchaincom.js +5 -5
- package/js/src/pro/blofin.d.ts +23 -23
- package/js/src/pro/blofin.js +2 -2
- package/js/src/pro/bullish.d.ts +19 -25
- package/js/src/pro/bybit.d.ts +42 -45
- package/js/src/pro/bybit.js +21 -21
- package/js/src/pro/bydfi.d.ts +24 -24
- package/js/src/pro/bydfi.js +2 -2
- package/js/src/pro/cex.d.ts +37 -37
- package/js/src/pro/cex.js +19 -19
- package/js/src/pro/coinbase.d.ts +19 -19
- package/js/src/pro/coinbase.js +2 -2
- package/js/src/pro/coinbaseexchange.d.ts +25 -25
- package/js/src/pro/coinbaseexchange.js +9 -9
- package/js/src/pro/coinbaseinternational.d.ts +20 -20
- package/js/src/pro/coinbaseinternational.js +2 -2
- package/js/src/pro/coincheck.d.ts +5 -5
- package/js/src/pro/coincheck.js +2 -2
- package/js/src/pro/coinex.d.ts +24 -24
- package/js/src/pro/coinex.js +3 -3
- package/js/src/pro/coinone.d.ts +9 -11
- package/js/src/pro/coinone.js +6 -6
- package/js/src/pro/cryptocom.d.ts +40 -40
- package/js/src/pro/cryptocom.js +10 -10
- package/js/src/pro/deepcoin.d.ts +24 -32
- package/js/src/pro/deribit.d.ts +24 -24
- package/js/src/pro/deribit.js +13 -13
- package/js/src/pro/derive.d.ts +22 -22
- package/js/src/pro/derive.js +4 -4
- package/js/src/pro/dydx.d.ts +9 -9
- package/js/src/pro/dydx.js +1 -1
- package/js/src/pro/extended.d.ts +22 -22
- package/js/src/pro/extended.js +16 -10
- package/js/src/pro/gate.d.ts +50 -50
- package/js/src/pro/gate.js +10 -10
- package/js/src/pro/gemini.d.ts +26 -26
- package/js/src/pro/gemini.js +3 -3
- package/js/src/pro/grvt.d.ts +22 -22
- package/js/src/pro/grvt.js +2 -2
- package/js/src/pro/hashkey.d.ts +19 -19
- package/js/src/pro/hashkey.js +2 -2
- package/js/src/pro/hitbtc.d.ts +32 -32
- package/js/src/pro/hitbtc.js +6 -6
- package/js/src/pro/hollaex.d.ts +15 -17
- package/js/src/pro/hollaex.js +3 -3
- package/js/src/pro/htx.d.ts +36 -36
- package/js/src/pro/htx.js +28 -28
- package/js/src/pro/hyperliquid.d.ts +29 -31
- package/js/src/pro/hyperliquid.js +1 -1
- package/js/src/pro/independentreserve.d.ts +10 -10
- package/js/src/pro/independentreserve.js +2 -2
- package/js/src/pro/kraken.d.ts +41 -55
- package/js/src/pro/kraken.js +7 -7
- package/js/src/pro/krakenfutures.d.ts +32 -32
- package/js/src/pro/krakenfutures.js +12 -12
- package/js/src/pro/kucoin.d.ts +69 -72
- package/js/src/pro/kucoin.js +12 -12
- package/js/src/pro/kucoinfutures.d.ts +4 -4
- package/js/src/pro/lbank.d.ts +22 -22
- package/js/src/pro/lbank.js +16 -16
- package/js/src/pro/lighter.d.ts +27 -27
- package/js/src/pro/luno.d.ts +8 -8
- package/js/src/pro/luno.js +2 -2
- package/js/src/pro/mexc.d.ts +33 -33
- package/js/src/pro/mexc.js +8 -8
- package/js/src/pro/modetrade.d.ts +37 -39
- package/js/src/pro/modetrade.js +3 -3
- package/js/src/pro/mudrex.d.ts +8 -8
- package/js/src/pro/mudrex.js +2 -2
- package/js/src/pro/nado.d.ts +42 -46
- package/js/src/pro/nado.js +3 -3
- package/js/src/pro/ndax.d.ts +12 -12
- package/js/src/pro/ndax.js +6 -6
- package/js/src/pro/okx.d.ts +49 -49
- package/js/src/pro/okx.js +20 -20
- package/js/src/pro/onetrading.d.ts +28 -28
- package/js/src/pro/onetrading.js +14 -14
- package/js/src/pro/p2b.d.ts +15 -19
- package/js/src/pro/p2b.js +5 -5
- package/js/src/pro/pacifica.d.ts +22 -22
- package/js/src/pro/pacifica.js +1 -1
- package/js/src/pro/paradex.d.ts +18 -18
- package/js/src/pro/paradex.js +1 -1
- package/js/src/pro/phemex.d.ts +25 -25
- package/js/src/pro/phemex.js +13 -13
- package/js/src/pro/poloniex.d.ts +30 -32
- package/js/src/pro/poloniex.js +17 -17
- package/js/src/pro/toobit.d.ts +31 -31
- package/js/src/pro/toobit.js +2 -2
- package/js/src/pro/upbit.d.ts +24 -24
- package/js/src/pro/upbit.js +4 -4
- package/js/src/pro/weex.d.ts +39 -39
- package/js/src/pro/weex.js +2 -2
- package/js/src/pro/whitebit.d.ts +26 -30
- package/js/src/pro/whitebit.js +12 -12
- package/js/src/pro/woo.d.ts +44 -46
- package/js/src/pro/woo.js +13 -13
- package/js/src/pro/woofipro.d.ts +39 -41
- package/js/src/pro/woofipro.js +3 -3
- package/js/src/pro/xt.d.ts +20 -20
- package/js/src/pro/xt.js +3 -3
- package/js/src/revolutx.d.ts +17 -17
- package/js/src/tokocrypto.d.ts +25 -30
- package/js/src/tokocrypto.js +20 -20
- package/js/src/toobit.d.ts +45 -79
- package/js/src/upbit.d.ts +28 -61
- package/js/src/upbit.js +12 -12
- package/js/src/weex.d.ts +57 -68
- package/js/src/whitebit.d.ts +53 -64
- package/js/src/whitebit.js +15 -15
- package/js/src/woo.d.ts +61 -75
- package/js/src/woo.js +3 -3
- package/js/src/woofipro.d.ts +53 -67
- package/js/src/woofipro.js +14 -14
- package/js/src/xt.d.ts +57 -67
- package/js/src/zaif.d.ts +11 -16
- package/js/src/zaif.js +9 -3
- package/js/src/zebpay.d.ts +32 -37
- package/js/src/zebpay.js +1 -1
- package/package.json +2 -2
package/js/src/xt.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/xt.js';
|
|
2
|
-
import type { Currencies, Currency, DepositAddress, Dict, FundingHistory, FundingRate, FundingRateHistory, Int, LedgerEntry, LeverageTier, LeverageTiers, List, MarginModification, Market, Num, OHLCV, OpenInterest, Order, OrderSide, OrderType, Position, Str, Strings, Tickers, TradingFeeInterface, TradingFees, Transaction, TransferEntry, int, NullableDict } from './base/types.js';
|
|
2
|
+
import type { Balances, Currencies, Currency, DepositAddress, Dict, FundingHistory, FundingRate, FundingRateHistory, Int, LedgerEntry, LeverageTier, LeverageTiers, List, MarginModification, Market, Num, OHLCV, OpenInterest, Order, OrderBook, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry, int, NullableDict } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class xt
|
|
5
5
|
* @augments Exchange
|
|
@@ -15,7 +15,7 @@ export default class xt extends Exchange {
|
|
|
15
15
|
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
16
16
|
* @returns {int} the current integer timestamp in milliseconds from the xt server
|
|
17
17
|
*/
|
|
18
|
-
fetchTime(params?:
|
|
18
|
+
fetchTime(params?: Dict): Promise<Int>;
|
|
19
19
|
/**
|
|
20
20
|
* @method
|
|
21
21
|
* @name xt#fetchCurrencies
|
|
@@ -24,7 +24,7 @@ export default class xt extends Exchange {
|
|
|
24
24
|
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
25
25
|
* @returns {object} an associative dictionary of currencies
|
|
26
26
|
*/
|
|
27
|
-
fetchCurrencies(params?:
|
|
27
|
+
fetchCurrencies(params?: Dict): Promise<Currencies>;
|
|
28
28
|
/**
|
|
29
29
|
* @method
|
|
30
30
|
* @name xt#fetchMarkets
|
|
@@ -34,9 +34,9 @@ export default class xt extends Exchange {
|
|
|
34
34
|
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
35
35
|
* @returns {object[]} an array of objects representing market data
|
|
36
36
|
*/
|
|
37
|
-
fetchMarkets(params?:
|
|
37
|
+
fetchMarkets(params?: Dict): Promise<Market[]>;
|
|
38
38
|
fetchSpotMarkets(params?: any): Promise<Market[]>;
|
|
39
|
-
fetchSwapAndFutureMarkets(params?:
|
|
39
|
+
fetchSwapAndFutureMarkets(params?: Dict): Promise<Market[]>;
|
|
40
40
|
parseMarkets(markets: any): List;
|
|
41
41
|
parseMarket(market: Dict): Market;
|
|
42
42
|
/**
|
|
@@ -54,7 +54,7 @@ export default class xt extends Exchange {
|
|
|
54
54
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
55
55
|
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
56
56
|
*/
|
|
57
|
-
fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?:
|
|
57
|
+
fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: Dict): Promise<OHLCV[]>;
|
|
58
58
|
parseOHLCV(ohlcv: any, market?: Market): OHLCV;
|
|
59
59
|
/**
|
|
60
60
|
* @method
|
|
@@ -67,7 +67,7 @@ export default class xt extends Exchange {
|
|
|
67
67
|
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
68
68
|
* @returns {object} an [order book structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure}
|
|
69
69
|
*/
|
|
70
|
-
fetchOrderBook(symbol: string, limit?: Int, params?:
|
|
70
|
+
fetchOrderBook(symbol: string, limit?: Int, params?: Dict): Promise<OrderBook>;
|
|
71
71
|
/**
|
|
72
72
|
* @method
|
|
73
73
|
* @name xt#fetchTicker
|
|
@@ -78,7 +78,7 @@ export default class xt extends Exchange {
|
|
|
78
78
|
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
79
79
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure}
|
|
80
80
|
*/
|
|
81
|
-
fetchTicker(symbol: string, params?:
|
|
81
|
+
fetchTicker(symbol: string, params?: Dict): Promise<Ticker>;
|
|
82
82
|
/**
|
|
83
83
|
* @method
|
|
84
84
|
* @name xt#fetchTickers
|
|
@@ -89,7 +89,7 @@ export default class xt extends Exchange {
|
|
|
89
89
|
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
90
90
|
* @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure}
|
|
91
91
|
*/
|
|
92
|
-
fetchTickers(symbols?: Strings, params?:
|
|
92
|
+
fetchTickers(symbols?: Strings, params?: Dict): Promise<Tickers>;
|
|
93
93
|
/**
|
|
94
94
|
* @method
|
|
95
95
|
* @name xt#fetchBidsAsks
|
|
@@ -100,8 +100,8 @@ export default class xt extends Exchange {
|
|
|
100
100
|
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
101
101
|
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure}
|
|
102
102
|
*/
|
|
103
|
-
fetchBidsAsks(symbols?: Strings, params?:
|
|
104
|
-
parseTicker(ticker:
|
|
103
|
+
fetchBidsAsks(symbols?: Strings, params?: Dict): Promise<Tickers>;
|
|
104
|
+
parseTicker(ticker: Dict, market?: Market): Ticker;
|
|
105
105
|
/**
|
|
106
106
|
* @method
|
|
107
107
|
* @name xt#fetchTrades
|
|
@@ -114,7 +114,7 @@ export default class xt extends Exchange {
|
|
|
114
114
|
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
115
115
|
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
|
|
116
116
|
*/
|
|
117
|
-
fetchTrades(symbol: string, since?: Int, limit?: Int, params?:
|
|
117
|
+
fetchTrades(symbol: string, since?: Int, limit?: Int, params?: Dict): Promise<Trade[]>;
|
|
118
118
|
/**
|
|
119
119
|
* @method
|
|
120
120
|
* @name xt#fetchMyTrades
|
|
@@ -127,8 +127,8 @@ export default class xt extends Exchange {
|
|
|
127
127
|
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
128
128
|
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
|
|
129
129
|
*/
|
|
130
|
-
fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?:
|
|
131
|
-
parseTrade(trade:
|
|
130
|
+
fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: Dict): Promise<Trade[]>;
|
|
131
|
+
parseTrade(trade: Dict, market?: Market): Trade;
|
|
132
132
|
/**
|
|
133
133
|
* @method
|
|
134
134
|
* @name xt#fetchBalance
|
|
@@ -138,8 +138,8 @@ export default class xt extends Exchange {
|
|
|
138
138
|
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
139
139
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure}
|
|
140
140
|
*/
|
|
141
|
-
fetchBalance(params?:
|
|
142
|
-
parseBalance(response: any):
|
|
141
|
+
fetchBalance(params?: Dict): Promise<Balances>;
|
|
142
|
+
parseBalance(response: any): Balances;
|
|
143
143
|
/**
|
|
144
144
|
* @method
|
|
145
145
|
* @name xt#createMarketBuyOrderWithCost
|
|
@@ -150,7 +150,7 @@ export default class xt extends Exchange {
|
|
|
150
150
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
151
151
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
|
|
152
152
|
*/
|
|
153
|
-
createMarketBuyOrderWithCost(symbol: string, cost: number, params?:
|
|
153
|
+
createMarketBuyOrderWithCost(symbol: string, cost: number, params?: Dict): Promise<Order>;
|
|
154
154
|
/**
|
|
155
155
|
* @method
|
|
156
156
|
* @name xt#createOrder
|
|
@@ -180,9 +180,9 @@ export default class xt extends Exchange {
|
|
|
180
180
|
* @param {string} [params.marginMode] 'cross' or 'isolated', for trailing orders only, default is 'cross'
|
|
181
181
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
182
182
|
*/
|
|
183
|
-
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?:
|
|
184
|
-
createSpotOrder(symbol: string, type: OrderType, side: any, amount: any, price?: Num, params?:
|
|
185
|
-
createContractOrder(symbol: string, type: any, side: any, amount: any, price?: Num, params?:
|
|
183
|
+
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: Dict): Promise<Order>;
|
|
184
|
+
createSpotOrder(symbol: string, type: OrderType, side: any, amount: any, price?: Num, params?: Dict): Promise<Order>;
|
|
185
|
+
createContractOrder(symbol: string, type: any, side: any, amount: any, price?: Num, params?: Dict): Promise<Order>;
|
|
186
186
|
/**
|
|
187
187
|
* @method
|
|
188
188
|
* @name xt#fetchOrder
|
|
@@ -200,7 +200,7 @@ export default class xt extends Exchange {
|
|
|
200
200
|
* @param {bool} [params.trailing] if the order is a trailing order or not
|
|
201
201
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
202
202
|
*/
|
|
203
|
-
fetchOrder(id: string, symbol?: Str, params?:
|
|
203
|
+
fetchOrder(id: string, symbol?: Str, params?: Dict): Promise<Order>;
|
|
204
204
|
/**
|
|
205
205
|
* @method
|
|
206
206
|
* @name xt#fetchOrders
|
|
@@ -217,8 +217,8 @@ export default class xt extends Exchange {
|
|
|
217
217
|
* @param {bool} [params.trailing] if the orders are trailing orders or not
|
|
218
218
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
219
219
|
*/
|
|
220
|
-
fetchOrders(symbol?: Str, since?: Int, limit?: Int, params?:
|
|
221
|
-
fetchOrdersByStatus(status: any, symbol?: Str, since?: Int, limit?: Int, params?:
|
|
220
|
+
fetchOrders(symbol?: Str, since?: Int, limit?: Int, params?: Dict): Promise<Order[]>;
|
|
221
|
+
fetchOrdersByStatus(status: any, symbol?: Str, since?: Int, limit?: Int, params?: Dict): Promise<Order[]>;
|
|
222
222
|
/**
|
|
223
223
|
* @method
|
|
224
224
|
* @name xt#fetchOpenOrders
|
|
@@ -237,7 +237,7 @@ export default class xt extends Exchange {
|
|
|
237
237
|
* @param {bool} [params.trailing] if the orders are trailing orders or not
|
|
238
238
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
239
239
|
*/
|
|
240
|
-
fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?:
|
|
240
|
+
fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: Dict): Promise<Order[]>;
|
|
241
241
|
/**
|
|
242
242
|
* @method
|
|
243
243
|
* @name xt#fetchClosedOrders
|
|
@@ -256,7 +256,7 @@ export default class xt extends Exchange {
|
|
|
256
256
|
* @param {bool} [params.trailing] if the orders are trailing orders or not
|
|
257
257
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
258
258
|
*/
|
|
259
|
-
fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?:
|
|
259
|
+
fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: Dict): Promise<Order[]>;
|
|
260
260
|
/**
|
|
261
261
|
* @method
|
|
262
262
|
* @name xt#fetchCanceledOrders
|
|
@@ -275,7 +275,7 @@ export default class xt extends Exchange {
|
|
|
275
275
|
* @param {bool} [params.trailing] if the orders are trailing orders or not
|
|
276
276
|
* @returns {object} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
277
277
|
*/
|
|
278
|
-
fetchCanceledOrders(symbol?: Str, since?: Int, limit?: Int, params?:
|
|
278
|
+
fetchCanceledOrders(symbol?: Str, since?: Int, limit?: Int, params?: Dict): Promise<Order[]>;
|
|
279
279
|
/**
|
|
280
280
|
* @method
|
|
281
281
|
* @name xt#cancelOrder
|
|
@@ -293,7 +293,7 @@ export default class xt extends Exchange {
|
|
|
293
293
|
* @param {bool} [params.trailing] if the order is a trailing order or not
|
|
294
294
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
295
295
|
*/
|
|
296
|
-
cancelOrder(id: string, symbol?: Str, params?:
|
|
296
|
+
cancelOrder(id: string, symbol?: Str, params?: Dict): Promise<Order>;
|
|
297
297
|
/**
|
|
298
298
|
* @method
|
|
299
299
|
* @name xt#cancelAllOrders
|
|
@@ -310,7 +310,7 @@ export default class xt extends Exchange {
|
|
|
310
310
|
* @param {bool} [params.trailing] if the orders are trailing orders or not
|
|
311
311
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
312
312
|
*/
|
|
313
|
-
cancelAllOrders(symbol?: Str, params?:
|
|
313
|
+
cancelAllOrders(symbol?: Str, params?: Dict): Promise<Order[]>;
|
|
314
314
|
/**
|
|
315
315
|
* @method
|
|
316
316
|
* @name xt#cancelOrders
|
|
@@ -321,7 +321,7 @@ export default class xt extends Exchange {
|
|
|
321
321
|
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
322
322
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
323
323
|
*/
|
|
324
|
-
cancelOrders(ids: string[], symbol?: Str, params?:
|
|
324
|
+
cancelOrders(ids: string[], symbol?: Str, params?: Dict): Promise<Order[]>;
|
|
325
325
|
parseOrder(order: Dict, market?: Market): Order;
|
|
326
326
|
parseOrderStatus(status: Str): Str;
|
|
327
327
|
/**
|
|
@@ -335,8 +335,8 @@ export default class xt extends Exchange {
|
|
|
335
335
|
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
336
336
|
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure}
|
|
337
337
|
*/
|
|
338
|
-
fetchLedger(code?: Str, since?: Int, limit?: Int, params?:
|
|
339
|
-
parseLedgerEntry(item:
|
|
338
|
+
fetchLedger(code?: Str, since?: Int, limit?: Int, params?: Dict): Promise<LedgerEntry[]>;
|
|
339
|
+
parseLedgerEntry(item: Dict, currency?: Currency): LedgerEntry;
|
|
340
340
|
parseLedgerEntryType(type: any): string;
|
|
341
341
|
/**
|
|
342
342
|
* @method
|
|
@@ -348,7 +348,7 @@ export default class xt extends Exchange {
|
|
|
348
348
|
* @param {string} params.network required network id
|
|
349
349
|
* @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure}
|
|
350
350
|
*/
|
|
351
|
-
fetchDepositAddress(code: string, params?:
|
|
351
|
+
fetchDepositAddress(code: string, params?: Dict): Promise<DepositAddress>;
|
|
352
352
|
parseDepositAddress(depositAddress: any, currency?: Currency): DepositAddress;
|
|
353
353
|
/**
|
|
354
354
|
* @method
|
|
@@ -361,7 +361,7 @@ export default class xt extends Exchange {
|
|
|
361
361
|
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
362
362
|
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure}
|
|
363
363
|
*/
|
|
364
|
-
fetchDeposits(code?: Str, since?: Int, limit?: Int, params?:
|
|
364
|
+
fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: Dict): Promise<Transaction[]>;
|
|
365
365
|
/**
|
|
366
366
|
* @method
|
|
367
367
|
* @name xt#fetchWithdrawals
|
|
@@ -373,7 +373,7 @@ export default class xt extends Exchange {
|
|
|
373
373
|
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
374
374
|
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure}
|
|
375
375
|
*/
|
|
376
|
-
fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?:
|
|
376
|
+
fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: Dict): Promise<Transaction[]>;
|
|
377
377
|
/**
|
|
378
378
|
* @method
|
|
379
379
|
* @name xt#withdraw
|
|
@@ -386,7 +386,7 @@ export default class xt extends Exchange {
|
|
|
386
386
|
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
387
387
|
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure}
|
|
388
388
|
*/
|
|
389
|
-
withdraw(code: string, amount: number, address: string, tag?: Str, params?:
|
|
389
|
+
withdraw(code: string, amount: number, address: string, tag?: Str, params?: Dict): Promise<Transaction>;
|
|
390
390
|
parseTransaction(transaction: Dict, currency?: Currency): Transaction;
|
|
391
391
|
parseTransactionStatus(status: Str): Str;
|
|
392
392
|
/**
|
|
@@ -400,7 +400,7 @@ export default class xt extends Exchange {
|
|
|
400
400
|
* @param {string} params.positionSide 'LONG' or 'SHORT'
|
|
401
401
|
* @returns {object} response from the exchange
|
|
402
402
|
*/
|
|
403
|
-
setLeverage(leverage: int, symbol?: Str, params?:
|
|
403
|
+
setLeverage(leverage: int, symbol?: Str, params?: Dict): Promise<Dict>;
|
|
404
404
|
/**
|
|
405
405
|
* @method
|
|
406
406
|
* @name xt#addMargin
|
|
@@ -412,7 +412,7 @@ export default class xt extends Exchange {
|
|
|
412
412
|
* @param {string} params.positionSide 'LONG' or 'SHORT'
|
|
413
413
|
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=margin-structure}
|
|
414
414
|
*/
|
|
415
|
-
addMargin(symbol: string, amount: number, params?:
|
|
415
|
+
addMargin(symbol: string, amount: number, params?: Dict): Promise<MarginModification>;
|
|
416
416
|
/**
|
|
417
417
|
* @method
|
|
418
418
|
* @name xt#reduceMargin
|
|
@@ -424,9 +424,9 @@ export default class xt extends Exchange {
|
|
|
424
424
|
* @param {string} params.positionSide 'LONG' or 'SHORT'
|
|
425
425
|
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/?id=margin-structure}
|
|
426
426
|
*/
|
|
427
|
-
reduceMargin(symbol: string, amount: number, params?:
|
|
428
|
-
modifyMarginHelper(symbol: string, amount: any, addOrReduce: any, params?:
|
|
429
|
-
parseMarginModification(data:
|
|
427
|
+
reduceMargin(symbol: string, amount: number, params?: Dict): Promise<MarginModification>;
|
|
428
|
+
modifyMarginHelper(symbol: string, amount: any, addOrReduce: any, params?: Dict): Promise<MarginModification>;
|
|
429
|
+
parseMarginModification(data: Dict, market?: Market): MarginModification;
|
|
430
430
|
/**
|
|
431
431
|
* @method
|
|
432
432
|
* @name xt#fetchLeverageTiers
|
|
@@ -436,7 +436,7 @@ export default class xt extends Exchange {
|
|
|
436
436
|
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
437
437
|
* @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/?id=leverage-tiers-structure}
|
|
438
438
|
*/
|
|
439
|
-
fetchLeverageTiers(symbols?: Strings, params?:
|
|
439
|
+
fetchLeverageTiers(symbols?: Strings, params?: Dict): Promise<LeverageTiers>;
|
|
440
440
|
parseLeverageTiers(response: any, symbols?: Strings, marketIdKey?: Str): LeverageTiers;
|
|
441
441
|
/**
|
|
442
442
|
* @method
|
|
@@ -447,7 +447,7 @@ export default class xt extends Exchange {
|
|
|
447
447
|
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
448
448
|
* @returns {object} a [leverage tiers structure]{@link https://docs.ccxt.com/?id=leverage-tiers-structure}
|
|
449
449
|
*/
|
|
450
|
-
fetchMarketLeverageTiers(symbol: string, params?:
|
|
450
|
+
fetchMarketLeverageTiers(symbol: string, params?: Dict): Promise<LeverageTier[]>;
|
|
451
451
|
parseMarketLeverageTiers(info: any, market?: Market): LeverageTier[];
|
|
452
452
|
/**
|
|
453
453
|
* @method
|
|
@@ -461,7 +461,7 @@ export default class xt extends Exchange {
|
|
|
461
461
|
* @param {bool} params.paginate true/false whether to use the pagination helper to aumatically paginate through the results
|
|
462
462
|
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure}
|
|
463
463
|
*/
|
|
464
|
-
fetchFundingRateHistory(symbol?: Str, since?: Int, limit?: Int, params?:
|
|
464
|
+
fetchFundingRateHistory(symbol?: Str, since?: Int, limit?: Int, params?: Dict): Promise<FundingRateHistory[]>;
|
|
465
465
|
/**
|
|
466
466
|
* @method
|
|
467
467
|
* @name xt#fetchFundingInterval
|
|
@@ -471,7 +471,7 @@ export default class xt extends Exchange {
|
|
|
471
471
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
472
472
|
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/?id=funding-rate-structure}
|
|
473
473
|
*/
|
|
474
|
-
fetchFundingInterval(symbol: string, params?:
|
|
474
|
+
fetchFundingInterval(symbol: string, params?: Dict): Promise<FundingRate>;
|
|
475
475
|
/**
|
|
476
476
|
* @method
|
|
477
477
|
* @name xt#fetchFundingRate
|
|
@@ -492,7 +492,7 @@ export default class xt extends Exchange {
|
|
|
492
492
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
493
493
|
* @returns {object} an [open interest structure]{@link https://docs.ccxt.com/?id=open-interest-structure}
|
|
494
494
|
*/
|
|
495
|
-
fetchOpenInterest(symbol: string, params?:
|
|
495
|
+
fetchOpenInterest(symbol: string, params?: Dict): Promise<OpenInterest>;
|
|
496
496
|
parseOpenInterest(interest: any, market?: Market): OpenInterest;
|
|
497
497
|
/**
|
|
498
498
|
* @method
|
|
@@ -503,7 +503,7 @@ export default class xt extends Exchange {
|
|
|
503
503
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
504
504
|
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/?id=fee-structure}
|
|
505
505
|
*/
|
|
506
|
-
fetchTradingFee(symbol: string, params?:
|
|
506
|
+
fetchTradingFee(symbol: string, params?: Dict): Promise<TradingFeeInterface>;
|
|
507
507
|
/**
|
|
508
508
|
* @method
|
|
509
509
|
* @name xt#fetchTradingFees
|
|
@@ -513,7 +513,7 @@ export default class xt extends Exchange {
|
|
|
513
513
|
* @param {string} [params.subType] 'linear' (default) or 'inverse'
|
|
514
514
|
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/?id=fee-structure} indexed by market symbol
|
|
515
515
|
*/
|
|
516
|
-
fetchTradingFees(params?:
|
|
516
|
+
fetchTradingFees(params?: Dict): Promise<TradingFees>;
|
|
517
517
|
parseTradingFee(fee: Dict, market?: Market): TradingFeeInterface;
|
|
518
518
|
/**
|
|
519
519
|
* @method
|
|
@@ -526,7 +526,7 @@ export default class xt extends Exchange {
|
|
|
526
526
|
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
527
527
|
* @returns {object[]} a list of [funding history structures]{@link https://docs.ccxt.com/?id=funding-history-structure}
|
|
528
528
|
*/
|
|
529
|
-
fetchFundingHistory(symbol?: Str, since?: Int, limit?: Int, params?:
|
|
529
|
+
fetchFundingHistory(symbol?: Str, since?: Int, limit?: Int, params?: Dict): Promise<FundingHistory[]>;
|
|
530
530
|
parseFundingHistory(contract: any, market?: Market): {
|
|
531
531
|
info: any;
|
|
532
532
|
symbol: string;
|
|
@@ -559,7 +559,7 @@ export default class xt extends Exchange {
|
|
|
559
559
|
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
560
560
|
* @returns {object} a [position structure]{@link https://docs.ccxt.com/?id=position-structure}
|
|
561
561
|
*/
|
|
562
|
-
fetchPosition(symbol: string, params?:
|
|
562
|
+
fetchPosition(symbol: string, params?: Dict): Promise<Position>;
|
|
563
563
|
/**
|
|
564
564
|
* @method
|
|
565
565
|
* @name xt#fetchPositions
|
|
@@ -570,7 +570,7 @@ export default class xt extends Exchange {
|
|
|
570
570
|
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
571
571
|
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/?id=position-structure}
|
|
572
572
|
*/
|
|
573
|
-
fetchPositions(symbols?: Strings, params?:
|
|
573
|
+
fetchPositions(symbols?: Strings, params?: Dict): Promise<Position[]>;
|
|
574
574
|
/**
|
|
575
575
|
* @method
|
|
576
576
|
* @name xt#fetchPositionsHistory
|
|
@@ -583,8 +583,8 @@ export default class xt extends Exchange {
|
|
|
583
583
|
* @param {int} [params.until] timestamp in ms of the latest position to fetch
|
|
584
584
|
* @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/?id=position-structure}
|
|
585
585
|
*/
|
|
586
|
-
fetchPositionsHistory(symbols?: Strings, since?: Int, limit?: Int, params?:
|
|
587
|
-
parsePosition(position:
|
|
586
|
+
fetchPositionsHistory(symbols?: Strings, since?: Int, limit?: Int, params?: Dict): Promise<Position[]>;
|
|
587
|
+
parsePosition(position: Dict, market?: Market): Position;
|
|
588
588
|
/**
|
|
589
589
|
* @method
|
|
590
590
|
* @name xt#transfer
|
|
@@ -597,18 +597,8 @@ export default class xt extends Exchange {
|
|
|
597
597
|
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
598
598
|
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/?id=transfer-structure}
|
|
599
599
|
*/
|
|
600
|
-
transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?:
|
|
601
|
-
parseTransfer(transfer:
|
|
602
|
-
info: any;
|
|
603
|
-
id: Str;
|
|
604
|
-
timestamp: undefined;
|
|
605
|
-
datetime: undefined;
|
|
606
|
-
currency: undefined;
|
|
607
|
-
amount: undefined;
|
|
608
|
-
fromAccount: undefined;
|
|
609
|
-
toAccount: undefined;
|
|
610
|
-
status: undefined;
|
|
611
|
-
};
|
|
600
|
+
transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: Dict): Promise<TransferEntry>;
|
|
601
|
+
parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
|
|
612
602
|
/**
|
|
613
603
|
* @method
|
|
614
604
|
* @name xt#setMarginMode
|
|
@@ -620,7 +610,7 @@ export default class xt extends Exchange {
|
|
|
620
610
|
* @param {string} [params.positionSide] *required* "long" or "short"
|
|
621
611
|
* @returns {object} response from the exchange
|
|
622
612
|
*/
|
|
623
|
-
setMarginMode(marginMode: string, symbol?: Str, params?:
|
|
613
|
+
setMarginMode(marginMode: string, symbol?: Str, params?: Dict): Promise<Dict>;
|
|
624
614
|
/**
|
|
625
615
|
* @method
|
|
626
616
|
* @name xt#editOrder
|
|
@@ -639,8 +629,8 @@ export default class xt extends Exchange {
|
|
|
639
629
|
* @param {float} [params.takeProfit] price to set a take-profit on an open position
|
|
640
630
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
|
|
641
631
|
*/
|
|
642
|
-
editOrder(id: string, symbol: string, type: OrderType, side: OrderSide, amount?: Num, price?: Num, params?:
|
|
643
|
-
handleErrors(code: int, reason: string, url:
|
|
632
|
+
editOrder(id: string, symbol: string, type: OrderType, side: OrderSide, amount?: Num, price?: Num, params?: Dict): Promise<Order>;
|
|
633
|
+
handleErrors(code: int, reason: string, url: string, method: string, headers: Dict, body: string, response: any, requestHeaders: any, requestBody: any): undefined;
|
|
644
634
|
sign(path: any, api?: any, method?: string, params?: {}, headers?: NullableDict, body?: any): {
|
|
645
635
|
url: string;
|
|
646
636
|
method: string;
|
package/js/src/zaif.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export default class zaif extends Exchange {
|
|
|
14
14
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
15
15
|
* @returns {object[]} an array of objects representing market data
|
|
16
16
|
*/
|
|
17
|
-
fetchMarkets(params?:
|
|
17
|
+
fetchMarkets(params?: Dict): Promise<Market[]>;
|
|
18
18
|
parseMarket(market: Dict): Market;
|
|
19
19
|
parseBalance(response: any): Balances;
|
|
20
20
|
/**
|
|
@@ -25,7 +25,7 @@ export default class zaif extends Exchange {
|
|
|
25
25
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
26
26
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/?id=balance-structure}
|
|
27
27
|
*/
|
|
28
|
-
fetchBalance(params?:
|
|
28
|
+
fetchBalance(params?: Dict): Promise<Balances>;
|
|
29
29
|
/**
|
|
30
30
|
* @method
|
|
31
31
|
* @name zaif#fetchOrderBook
|
|
@@ -36,7 +36,7 @@ export default class zaif extends Exchange {
|
|
|
36
36
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
37
37
|
* @returns {object} an [order book structure]{@link https://docs.ccxt.com/?id=order-book-structure}
|
|
38
38
|
*/
|
|
39
|
-
fetchOrderBook(symbol: string, limit?: Int, params?:
|
|
39
|
+
fetchOrderBook(symbol: string, limit?: Int, params?: Dict): Promise<OrderBook>;
|
|
40
40
|
parseTicker(ticker: Dict, market?: Market): Ticker;
|
|
41
41
|
/**
|
|
42
42
|
* @method
|
|
@@ -47,7 +47,7 @@ export default class zaif extends Exchange {
|
|
|
47
47
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
48
48
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
|
|
49
49
|
*/
|
|
50
|
-
fetchTicker(symbol: string, params?:
|
|
50
|
+
fetchTicker(symbol: string, params?: Dict): Promise<Ticker>;
|
|
51
51
|
parseTrade(trade: Dict, market?: Market): Trade;
|
|
52
52
|
/**
|
|
53
53
|
* @method
|
|
@@ -60,7 +60,7 @@ export default class zaif extends Exchange {
|
|
|
60
60
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
61
61
|
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=public-trades}
|
|
62
62
|
*/
|
|
63
|
-
fetchTrades(symbol: string, since?: Int, limit?: Int, params?:
|
|
63
|
+
fetchTrades(symbol: string, since?: Int, limit?: Int, params?: Dict): Promise<Trade[]>;
|
|
64
64
|
/**
|
|
65
65
|
* @method
|
|
66
66
|
* @name zaif#createOrder
|
|
@@ -74,7 +74,7 @@ export default class zaif extends Exchange {
|
|
|
74
74
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
75
75
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
|
|
76
76
|
*/
|
|
77
|
-
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?:
|
|
77
|
+
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: Dict): Promise<Order>;
|
|
78
78
|
/**
|
|
79
79
|
* @method
|
|
80
80
|
* @name zaif#cancelOrder
|
|
@@ -85,7 +85,7 @@ export default class zaif extends Exchange {
|
|
|
85
85
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
86
86
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/?id=order-structure}
|
|
87
87
|
*/
|
|
88
|
-
cancelOrder(id: string, symbol?: Str, params?:
|
|
88
|
+
cancelOrder(id: string, symbol?: Str, params?: Dict): Promise<Order>;
|
|
89
89
|
parseOrder(order: Dict, market?: Market): Order;
|
|
90
90
|
/**
|
|
91
91
|
* @method
|
|
@@ -98,7 +98,7 @@ export default class zaif extends Exchange {
|
|
|
98
98
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
99
99
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
|
|
100
100
|
*/
|
|
101
|
-
fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?:
|
|
101
|
+
fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: Dict): Promise<Order[]>;
|
|
102
102
|
/**
|
|
103
103
|
* @method
|
|
104
104
|
* @name zaif#fetchClosedOrders
|
|
@@ -110,7 +110,7 @@ export default class zaif extends Exchange {
|
|
|
110
110
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
111
111
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
|
|
112
112
|
*/
|
|
113
|
-
fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?:
|
|
113
|
+
fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: Dict): Promise<Order[]>;
|
|
114
114
|
/**
|
|
115
115
|
* @method
|
|
116
116
|
* @name zaif#withdraw
|
|
@@ -123,14 +123,9 @@ export default class zaif extends Exchange {
|
|
|
123
123
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
124
124
|
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/?id=transaction-structure}
|
|
125
125
|
*/
|
|
126
|
-
withdraw(code: string, amount: number, address: string, tag?: Str, params?:
|
|
126
|
+
withdraw(code: string, amount: number, address: string, tag?: Str, params?: Dict): Promise<Transaction>;
|
|
127
127
|
parseTransaction(transaction: Dict, currency?: Currency): Transaction;
|
|
128
128
|
customNonce(): string;
|
|
129
|
-
sign(path: any, api?:
|
|
130
|
-
url: string;
|
|
131
|
-
method: string;
|
|
132
|
-
body: any;
|
|
133
|
-
headers: NullableDict;
|
|
134
|
-
};
|
|
129
|
+
sign(path: any, api?: string, method?: string, params?: Dict, headers?: NullableDict, body?: Str): Dict;
|
|
135
130
|
handleErrors(httpCode: int, reason: string, url: string, method: string, headers: Dict, body: string, response: any, requestHeaders: any, requestBody: any): undefined;
|
|
136
131
|
}
|
package/js/src/zaif.js
CHANGED
|
@@ -325,8 +325,8 @@ export default class zaif extends Exchange {
|
|
|
325
325
|
});
|
|
326
326
|
}
|
|
327
327
|
parseBalance(response) {
|
|
328
|
-
const balances = this.
|
|
329
|
-
const deposit = this.
|
|
328
|
+
const balances = this.safeDict(response, 'return', {});
|
|
329
|
+
const deposit = this.safeDict(balances, 'deposit');
|
|
330
330
|
const result = {
|
|
331
331
|
'info': response,
|
|
332
332
|
'timestamp': undefined,
|
|
@@ -717,6 +717,12 @@ export default class zaif extends Exchange {
|
|
|
717
717
|
market = this.market(symbol);
|
|
718
718
|
request['currency_pair'] = market['id'];
|
|
719
719
|
}
|
|
720
|
+
if (since !== undefined) {
|
|
721
|
+
request['since'] = this.parseToInt(since / 1000);
|
|
722
|
+
}
|
|
723
|
+
if (limit !== undefined) {
|
|
724
|
+
request['count'] = Math.min(limit, 1000);
|
|
725
|
+
}
|
|
720
726
|
const response = await this.privatePostTradeHistory(this.extend(request, params));
|
|
721
727
|
const data = this.safeDict(response, 'return', {});
|
|
722
728
|
return this.parseOrders(data, market, since, limit);
|
|
@@ -789,7 +795,7 @@ export default class zaif extends Exchange {
|
|
|
789
795
|
//
|
|
790
796
|
currency = this.safeCurrency(undefined, currency);
|
|
791
797
|
let fee = undefined;
|
|
792
|
-
const feeCost = this.
|
|
798
|
+
const feeCost = this.safeNumber(transaction, 'fee');
|
|
793
799
|
if (feeCost !== undefined) {
|
|
794
800
|
fee = {
|
|
795
801
|
'cost': feeCost,
|