ccxt 4.4.30 → 4.4.32
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 +9 -3
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +123 -123
- package/dist/cjs/src/alpaca.js +237 -237
- package/dist/cjs/src/ascendex.js +342 -341
- package/dist/cjs/src/bigone.js +242 -242
- package/dist/cjs/src/binance.js +1339 -1291
- package/dist/cjs/src/bingx.js +639 -639
- package/dist/cjs/src/bit2c.js +111 -111
- package/dist/cjs/src/bitbank.js +142 -142
- package/dist/cjs/src/bitbns.js +140 -140
- package/dist/cjs/src/bitfinex.js +231 -231
- package/dist/cjs/src/bitfinex2.js +403 -403
- package/dist/cjs/src/bitflyer.js +184 -184
- package/dist/cjs/src/bitget.js +848 -846
- package/dist/cjs/src/bithumb.js +125 -124
- package/dist/cjs/src/bitmart.js +525 -525
- package/dist/cjs/src/bitmex.js +317 -317
- package/dist/cjs/src/bitopro.js +221 -221
- package/dist/cjs/src/bitrue.js +315 -315
- package/dist/cjs/src/bitso.js +220 -220
- package/dist/cjs/src/bitstamp.js +251 -251
- package/dist/cjs/src/bitteam.js +183 -183
- package/dist/cjs/src/bitvavo.js +247 -251
- package/dist/cjs/src/bl3p.js +82 -82
- package/dist/cjs/src/blockchaincom.js +211 -211
- package/dist/cjs/src/blofin.js +332 -331
- package/dist/cjs/src/btcalpha.js +166 -166
- package/dist/cjs/src/btcbox.js +108 -108
- package/dist/cjs/src/btcmarkets.js +198 -198
- package/dist/cjs/src/btcturk.js +124 -124
- package/dist/cjs/src/bybit.js +906 -900
- package/dist/cjs/src/cex.js +227 -226
- package/dist/cjs/src/coinbase.js +481 -481
- package/dist/cjs/src/coinbaseexchange.js +274 -274
- package/dist/cjs/src/coinbaseinternational.js +304 -304
- package/dist/cjs/src/coincatch.js +650 -650
- package/dist/cjs/src/coincheck.js +113 -113
- package/dist/cjs/src/coinex.js +611 -601
- package/dist/cjs/src/coinlist.js +304 -303
- package/dist/cjs/src/coinmate.js +162 -161
- package/dist/cjs/src/coinmetro.js +187 -187
- package/dist/cjs/src/coinone.js +124 -123
- package/dist/cjs/src/coinsph.js +237 -237
- package/dist/cjs/src/coinspot.js +82 -82
- package/dist/cjs/src/cryptocom.js +342 -341
- package/dist/cjs/src/currencycom.js +225 -224
- package/dist/cjs/src/delta.js +320 -320
- package/dist/cjs/src/deribit.js +411 -408
- package/dist/cjs/src/digifinex.js +432 -431
- package/dist/cjs/src/exmo.js +328 -327
- package/dist/cjs/src/gate.js +830 -791
- package/dist/cjs/src/gemini.js +199 -198
- package/dist/cjs/src/hashkey.js +520 -517
- package/dist/cjs/src/hitbtc.js +465 -462
- package/dist/cjs/src/hollaex.js +253 -252
- package/dist/cjs/src/htx.js +791 -848
- package/dist/cjs/src/huobijp.js +219 -218
- package/dist/cjs/src/hyperliquid.js +421 -417
- package/dist/cjs/src/idex.js +238 -237
- package/dist/cjs/src/independentreserve.js +133 -132
- package/dist/cjs/src/indodax.js +177 -171
- package/dist/cjs/src/kraken.js +381 -377
- package/dist/cjs/src/krakenfutures.js +285 -279
- package/dist/cjs/src/kucoin.js +632 -622
- package/dist/cjs/src/kucoinfutures.js +533 -457
- package/dist/cjs/src/kuna.js +283 -282
- package/dist/cjs/src/latoken.js +211 -210
- package/dist/cjs/src/lbank.js +268 -267
- package/dist/cjs/src/luno.js +174 -173
- package/dist/cjs/src/lykke.js +172 -171
- package/dist/cjs/src/mercado.js +123 -122
- package/dist/cjs/src/mexc.js +650 -646
- package/dist/cjs/src/ndax.js +229 -228
- package/dist/cjs/src/novadax.js +230 -229
- package/dist/cjs/src/oceanex.js +187 -186
- package/dist/cjs/src/okcoin.js +286 -285
- package/dist/cjs/src/okx.js +909 -904
- package/dist/cjs/src/onetrading.js +218 -218
- package/dist/cjs/src/oxfun.js +335 -334
- package/dist/cjs/src/p2b.js +154 -154
- package/dist/cjs/src/paradex.js +249 -244
- package/dist/cjs/src/paymium.js +101 -101
- package/dist/cjs/src/phemex.js +388 -390
- package/dist/cjs/src/poloniex.js +270 -270
- package/dist/cjs/src/poloniexfutures.js +250 -250
- package/dist/cjs/src/pro/alpaca.js +64 -64
- package/dist/cjs/src/pro/ascendex.js +64 -64
- package/dist/cjs/src/pro/binance.js +546 -543
- package/dist/cjs/src/pro/bingx.js +116 -116
- package/dist/cjs/src/pro/bitfinex.js +42 -42
- package/dist/cjs/src/pro/bitfinex2.js +66 -66
- package/dist/cjs/src/pro/bitget.js +188 -181
- package/dist/cjs/src/pro/bithumb.js +40 -40
- package/dist/cjs/src/pro/bitmart.js +121 -119
- package/dist/cjs/src/pro/bitmex.js +135 -133
- package/dist/cjs/src/pro/bitopro.js +49 -49
- package/dist/cjs/src/pro/bitrue.js +19 -19
- package/dist/cjs/src/pro/bitstamp.js +29 -29
- package/dist/cjs/src/pro/bitvavo.js +299 -301
- package/dist/cjs/src/pro/blockchaincom.js +62 -62
- package/dist/cjs/src/pro/blofin.js +132 -130
- package/dist/cjs/src/pro/bybit.js +317 -313
- package/dist/cjs/src/pro/cex.js +168 -168
- package/dist/cjs/src/pro/coinbase.js +93 -91
- package/dist/cjs/src/pro/coinbaseexchange.js +95 -95
- package/dist/cjs/src/pro/coinbaseinternational.js +111 -111
- package/dist/cjs/src/pro/coincatch.js +150 -143
- package/dist/cjs/src/pro/coincheck.js +21 -21
- package/dist/cjs/src/pro/coinex.js +110 -110
- package/dist/cjs/src/pro/coinone.js +30 -30
- package/dist/cjs/src/pro/cryptocom.js +227 -227
- package/dist/cjs/src/pro/currencycom.js +45 -45
- package/dist/cjs/src/pro/deribit.js +127 -127
- package/dist/cjs/src/pro/exmo.js +66 -66
- package/dist/cjs/src/pro/gate.js +287 -283
- package/dist/cjs/src/pro/gemini.js +74 -74
- package/dist/cjs/src/pro/hashkey.js +87 -85
- package/dist/cjs/src/pro/hitbtc.js +190 -190
- package/dist/cjs/src/pro/hollaex.js +51 -51
- package/dist/cjs/src/pro/htx.js +96 -94
- package/dist/cjs/src/pro/huobijp.js +38 -38
- package/dist/cjs/src/pro/hyperliquid.js +151 -150
- package/dist/cjs/src/pro/idex.js +48 -48
- package/dist/cjs/src/pro/independentreserve.js +19 -19
- package/dist/cjs/src/pro/kraken.js +167 -167
- package/dist/cjs/src/pro/krakenfutures.js +137 -138
- package/dist/cjs/src/pro/kucoin.js +167 -168
- package/dist/cjs/src/pro/kucoinfutures.js +147 -147
- package/dist/cjs/src/pro/lbank.js +95 -95
- package/dist/cjs/src/pro/luno.js +21 -21
- package/dist/cjs/src/pro/mexc.js +102 -103
- package/dist/cjs/src/pro/ndax.js +42 -42
- package/dist/cjs/src/pro/okcoin.js +61 -61
- package/dist/cjs/src/pro/okx.js +332 -330
- package/dist/cjs/src/pro/onetrading.js +71 -71
- package/dist/cjs/src/pro/oxfun.js +193 -191
- package/dist/cjs/src/pro/p2b.js +77 -77
- package/dist/cjs/src/pro/paradex.js +39 -39
- package/dist/cjs/src/pro/phemex.js +94 -94
- package/dist/cjs/src/pro/poloniex.js +171 -171
- package/dist/cjs/src/pro/poloniexfutures.js +62 -62
- package/dist/cjs/src/pro/probit.js +63 -63
- package/dist/cjs/src/pro/upbit.js +80 -80
- package/dist/cjs/src/pro/vertex.js +65 -63
- package/dist/cjs/src/pro/wazirx.js +70 -70
- package/dist/cjs/src/pro/whitebit.js +83 -83
- package/dist/cjs/src/pro/woo.js +106 -104
- package/dist/cjs/src/pro/woofipro.js +105 -103
- package/dist/cjs/src/pro/xt.js +119 -119
- package/dist/cjs/src/probit.js +229 -229
- package/dist/cjs/src/timex.js +198 -197
- package/dist/cjs/src/tokocrypto.js +214 -213
- package/dist/cjs/src/tradeogre.js +92 -91
- package/dist/cjs/src/upbit.js +243 -242
- package/dist/cjs/src/vertex.js +258 -258
- package/dist/cjs/src/wavesexchange.js +176 -172
- package/dist/cjs/src/wazirx.js +168 -168
- package/dist/cjs/src/whitebit.js +361 -361
- package/dist/cjs/src/woo.js +571 -572
- package/dist/cjs/src/woofipro.js +392 -391
- package/dist/cjs/src/xt.js +436 -435
- package/dist/cjs/src/yobit.js +159 -158
- package/dist/cjs/src/zaif.js +103 -103
- package/dist/cjs/src/zonda.js +168 -168
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/ace.d.ts +123 -0
- package/js/src/ace.js +123 -123
- package/js/src/alpaca.d.ts +237 -0
- package/js/src/alpaca.js +237 -237
- package/js/src/ascendex.d.ts +339 -0
- package/js/src/ascendex.js +342 -341
- package/js/src/base/types.d.ts +1 -0
- package/js/src/bigone.d.ts +242 -0
- package/js/src/bigone.js +242 -242
- package/js/src/binance.d.ts +1306 -0
- package/js/src/binance.js +1339 -1291
- package/js/src/bingx.d.ts +639 -0
- package/js/src/bingx.js +639 -639
- package/js/src/bit2c.d.ts +111 -0
- package/js/src/bit2c.js +111 -111
- package/js/src/bitbank.d.ts +142 -0
- package/js/src/bitbank.js +142 -142
- package/js/src/bitbns.d.ts +140 -0
- package/js/src/bitbns.js +140 -140
- package/js/src/bitfinex.d.ts +231 -0
- package/js/src/bitfinex.js +231 -231
- package/js/src/bitfinex2.d.ts +403 -0
- package/js/src/bitfinex2.js +403 -403
- package/js/src/bitflyer.d.ts +184 -0
- package/js/src/bitflyer.js +184 -184
- package/js/src/bitget.d.ts +846 -0
- package/js/src/bitget.js +848 -846
- package/js/src/bithumb.d.ts +125 -0
- package/js/src/bithumb.js +125 -124
- package/js/src/bitmart.d.ts +525 -0
- package/js/src/bitmart.js +525 -525
- package/js/src/bitmex.d.ts +317 -0
- package/js/src/bitmex.js +317 -317
- package/js/src/bitopro.d.ts +221 -0
- package/js/src/bitopro.js +221 -221
- package/js/src/bitrue.d.ts +315 -0
- package/js/src/bitrue.js +315 -315
- package/js/src/bitso.d.ts +220 -0
- package/js/src/bitso.js +220 -220
- package/js/src/bitstamp.d.ts +251 -0
- package/js/src/bitstamp.js +251 -251
- package/js/src/bitteam.d.ts +183 -0
- package/js/src/bitteam.js +183 -183
- package/js/src/bitvavo.d.ts +247 -0
- package/js/src/bitvavo.js +247 -251
- package/js/src/bl3p.d.ts +82 -0
- package/js/src/bl3p.js +82 -82
- package/js/src/blockchaincom.d.ts +211 -0
- package/js/src/blockchaincom.js +211 -211
- package/js/src/blofin.d.ts +332 -0
- package/js/src/blofin.js +332 -331
- package/js/src/btcalpha.d.ts +166 -0
- package/js/src/btcalpha.js +166 -166
- package/js/src/btcbox.d.ts +108 -0
- package/js/src/btcbox.js +108 -108
- package/js/src/btcmarkets.d.ts +198 -0
- package/js/src/btcmarkets.js +198 -198
- package/js/src/btcturk.d.ts +124 -0
- package/js/src/btcturk.js +124 -124
- package/js/src/bybit.d.ts +906 -1
- package/js/src/bybit.js +906 -900
- package/js/src/cex.d.ts +227 -0
- package/js/src/cex.js +227 -226
- package/js/src/coinbase.d.ts +481 -0
- package/js/src/coinbase.js +481 -481
- package/js/src/coinbaseexchange.d.ts +274 -0
- package/js/src/coinbaseexchange.js +274 -274
- package/js/src/coinbaseinternational.d.ts +304 -0
- package/js/src/coinbaseinternational.js +304 -304
- package/js/src/coincatch.d.ts +646 -0
- package/js/src/coincatch.js +650 -650
- package/js/src/coincheck.d.ts +113 -0
- package/js/src/coincheck.js +113 -113
- package/js/src/coinex.d.ts +603 -0
- package/js/src/coinex.js +611 -601
- package/js/src/coinlist.d.ts +304 -0
- package/js/src/coinlist.js +304 -303
- package/js/src/coinmate.d.ts +162 -0
- package/js/src/coinmate.js +162 -161
- package/js/src/coinmetro.d.ts +187 -0
- package/js/src/coinmetro.js +187 -187
- package/js/src/coinone.d.ts +124 -0
- package/js/src/coinone.js +124 -123
- package/js/src/coinsph.d.ts +237 -0
- package/js/src/coinsph.js +237 -237
- package/js/src/coinspot.d.ts +82 -0
- package/js/src/coinspot.js +82 -82
- package/js/src/cryptocom.d.ts +342 -0
- package/js/src/cryptocom.js +342 -341
- package/js/src/currencycom.d.ts +225 -0
- package/js/src/currencycom.js +225 -224
- package/js/src/delta.d.ts +320 -0
- package/js/src/delta.js +320 -320
- package/js/src/deribit.d.ts +411 -0
- package/js/src/deribit.js +411 -408
- package/js/src/digifinex.d.ts +430 -0
- package/js/src/digifinex.js +432 -431
- package/js/src/exmo.d.ts +328 -0
- package/js/src/exmo.js +328 -327
- package/js/src/gate.d.ts +803 -1
- package/js/src/gate.js +830 -791
- package/js/src/gemini.d.ts +199 -0
- package/js/src/gemini.js +199 -198
- package/js/src/hashkey.d.ts +516 -0
- package/js/src/hashkey.js +520 -517
- package/js/src/hitbtc.d.ts +465 -0
- package/js/src/hitbtc.js +465 -462
- package/js/src/hollaex.d.ts +253 -0
- package/js/src/hollaex.js +253 -252
- package/js/src/htx.d.ts +765 -2
- package/js/src/htx.js +791 -848
- package/js/src/huobijp.d.ts +219 -0
- package/js/src/huobijp.js +219 -218
- package/js/src/hyperliquid.d.ts +419 -0
- package/js/src/hyperliquid.js +421 -417
- package/js/src/idex.d.ts +238 -0
- package/js/src/idex.js +238 -237
- package/js/src/independentreserve.d.ts +133 -0
- package/js/src/independentreserve.js +133 -132
- package/js/src/indodax.d.ts +171 -0
- package/js/src/indodax.js +177 -171
- package/js/src/kraken.d.ts +381 -0
- package/js/src/kraken.js +381 -377
- package/js/src/krakenfutures.d.ts +282 -0
- package/js/src/krakenfutures.js +285 -279
- package/js/src/kucoin.d.ts +613 -0
- package/js/src/kucoin.js +632 -622
- package/js/src/kucoinfutures.d.ts +441 -0
- package/js/src/kucoinfutures.js +533 -457
- package/js/src/kuna.d.ts +283 -0
- package/js/src/kuna.js +283 -282
- package/js/src/latoken.d.ts +211 -0
- package/js/src/latoken.js +211 -210
- package/js/src/lbank.d.ts +268 -0
- package/js/src/lbank.js +268 -267
- package/js/src/luno.d.ts +174 -0
- package/js/src/luno.js +174 -173
- package/js/src/lykke.d.ts +172 -0
- package/js/src/lykke.js +172 -171
- package/js/src/mercado.d.ts +123 -0
- package/js/src/mercado.js +123 -122
- package/js/src/mexc.d.ts +647 -0
- package/js/src/mexc.js +650 -646
- package/js/src/ndax.d.ts +229 -0
- package/js/src/ndax.js +229 -228
- package/js/src/novadax.d.ts +230 -0
- package/js/src/novadax.js +230 -229
- package/js/src/oceanex.d.ts +187 -0
- package/js/src/oceanex.js +187 -186
- package/js/src/okcoin.d.ts +286 -0
- package/js/src/okcoin.js +286 -285
- package/js/src/okx.d.ts +907 -0
- package/js/src/okx.js +909 -904
- package/js/src/onetrading.d.ts +218 -0
- package/js/src/onetrading.js +218 -218
- package/js/src/oxfun.d.ts +336 -3
- package/js/src/oxfun.js +335 -334
- package/js/src/p2b.d.ts +154 -0
- package/js/src/p2b.js +154 -154
- package/js/src/paradex.d.ts +241 -0
- package/js/src/paradex.js +249 -244
- package/js/src/paymium.d.ts +101 -0
- package/js/src/paymium.js +101 -101
- package/js/src/phemex.d.ts +366 -0
- package/js/src/phemex.js +388 -390
- package/js/src/poloniex.d.ts +270 -0
- package/js/src/poloniex.js +270 -270
- package/js/src/poloniexfutures.d.ts +250 -0
- package/js/src/poloniexfutures.js +250 -250
- package/js/src/pro/alpaca.d.ts +64 -0
- package/js/src/pro/alpaca.js +64 -64
- package/js/src/pro/ascendex.d.ts +64 -0
- package/js/src/pro/ascendex.js +64 -64
- package/js/src/pro/binance.d.ts +546 -0
- package/js/src/pro/binance.js +546 -543
- package/js/src/pro/bingx.d.ts +116 -0
- package/js/src/pro/bingx.js +116 -116
- package/js/src/pro/bitfinex.d.ts +42 -0
- package/js/src/pro/bitfinex.js +42 -42
- package/js/src/pro/bitfinex2.d.ts +66 -0
- package/js/src/pro/bitfinex2.js +66 -66
- package/js/src/pro/bitget.d.ts +187 -0
- package/js/src/pro/bitget.js +188 -181
- package/js/src/pro/bithumb.d.ts +40 -0
- package/js/src/pro/bithumb.js +40 -40
- package/js/src/pro/bitmart.d.ts +121 -0
- package/js/src/pro/bitmart.js +121 -119
- package/js/src/pro/bitmex.d.ts +135 -0
- package/js/src/pro/bitmex.js +135 -133
- package/js/src/pro/bitopro.d.ts +49 -0
- package/js/src/pro/bitopro.js +49 -49
- package/js/src/pro/bitrue.d.ts +19 -0
- package/js/src/pro/bitrue.js +19 -19
- package/js/src/pro/bitstamp.d.ts +29 -0
- package/js/src/pro/bitstamp.js +29 -29
- package/js/src/pro/bitvavo.d.ts +254 -1
- package/js/src/pro/bitvavo.js +299 -301
- package/js/src/pro/blockchaincom.d.ts +62 -0
- package/js/src/pro/blockchaincom.js +62 -62
- package/js/src/pro/blofin.d.ts +132 -0
- package/js/src/pro/blofin.js +132 -130
- package/js/src/pro/bybit.d.ts +317 -0
- package/js/src/pro/bybit.js +317 -313
- package/js/src/pro/cex.d.ts +168 -0
- package/js/src/pro/cex.js +168 -168
- package/js/src/pro/coinbase.d.ts +93 -0
- package/js/src/pro/coinbase.js +93 -91
- package/js/src/pro/coinbaseexchange.d.ts +95 -0
- package/js/src/pro/coinbaseexchange.js +95 -95
- package/js/src/pro/coinbaseinternational.d.ts +111 -0
- package/js/src/pro/coinbaseinternational.js +111 -111
- package/js/src/pro/coincatch.d.ts +150 -0
- package/js/src/pro/coincatch.js +150 -143
- package/js/src/pro/coincheck.d.ts +21 -0
- package/js/src/pro/coincheck.js +21 -21
- package/js/src/pro/coinex.d.ts +110 -0
- package/js/src/pro/coinex.js +110 -110
- package/js/src/pro/coinone.d.ts +30 -0
- package/js/src/pro/coinone.js +30 -30
- package/js/src/pro/cryptocom.d.ts +227 -0
- package/js/src/pro/cryptocom.js +227 -227
- package/js/src/pro/currencycom.d.ts +45 -0
- package/js/src/pro/currencycom.js +45 -45
- package/js/src/pro/deribit.d.ts +127 -0
- package/js/src/pro/deribit.js +127 -127
- package/js/src/pro/exmo.d.ts +66 -0
- package/js/src/pro/exmo.js +66 -66
- package/js/src/pro/gate.d.ts +287 -0
- package/js/src/pro/gate.js +287 -283
- package/js/src/pro/gemini.d.ts +74 -0
- package/js/src/pro/gemini.js +74 -74
- package/js/src/pro/hashkey.d.ts +87 -0
- package/js/src/pro/hashkey.js +87 -85
- package/js/src/pro/hitbtc.d.ts +190 -0
- package/js/src/pro/hitbtc.js +190 -190
- package/js/src/pro/hollaex.d.ts +51 -0
- package/js/src/pro/hollaex.js +51 -51
- package/js/src/pro/htx.d.ts +96 -0
- package/js/src/pro/htx.js +96 -94
- package/js/src/pro/huobijp.d.ts +38 -0
- package/js/src/pro/huobijp.js +38 -38
- package/js/src/pro/hyperliquid.d.ts +151 -0
- package/js/src/pro/hyperliquid.js +151 -150
- package/js/src/pro/idex.d.ts +48 -0
- package/js/src/pro/idex.js +48 -48
- package/js/src/pro/independentreserve.d.ts +19 -0
- package/js/src/pro/independentreserve.js +19 -19
- package/js/src/pro/kraken.d.ts +167 -0
- package/js/src/pro/kraken.js +167 -167
- package/js/src/pro/krakenfutures.d.ts +137 -0
- package/js/src/pro/krakenfutures.js +137 -138
- package/js/src/pro/kucoin.d.ts +167 -0
- package/js/src/pro/kucoin.js +167 -168
- package/js/src/pro/kucoinfutures.d.ts +147 -0
- package/js/src/pro/kucoinfutures.js +147 -147
- package/js/src/pro/lbank.d.ts +95 -0
- package/js/src/pro/lbank.js +95 -95
- package/js/src/pro/luno.d.ts +21 -0
- package/js/src/pro/luno.js +21 -21
- package/js/src/pro/mexc.d.ts +101 -0
- package/js/src/pro/mexc.js +102 -103
- package/js/src/pro/ndax.d.ts +42 -0
- package/js/src/pro/ndax.js +42 -42
- package/js/src/pro/okcoin.d.ts +61 -0
- package/js/src/pro/okcoin.js +61 -61
- package/js/src/pro/okx.d.ts +332 -0
- package/js/src/pro/okx.js +332 -330
- package/js/src/pro/onetrading.d.ts +71 -0
- package/js/src/pro/onetrading.js +71 -71
- package/js/src/pro/oxfun.d.ts +193 -0
- package/js/src/pro/oxfun.js +193 -191
- package/js/src/pro/p2b.d.ts +77 -0
- package/js/src/pro/p2b.js +77 -77
- package/js/src/pro/paradex.d.ts +39 -0
- package/js/src/pro/paradex.js +39 -39
- package/js/src/pro/phemex.d.ts +94 -0
- package/js/src/pro/phemex.js +94 -94
- package/js/src/pro/poloniex.d.ts +171 -0
- package/js/src/pro/poloniex.js +171 -171
- package/js/src/pro/poloniexfutures.d.ts +62 -0
- package/js/src/pro/poloniexfutures.js +62 -62
- package/js/src/pro/probit.d.ts +63 -0
- package/js/src/pro/probit.js +63 -63
- package/js/src/pro/upbit.d.ts +80 -0
- package/js/src/pro/upbit.js +80 -80
- package/js/src/pro/vertex.d.ts +65 -0
- package/js/src/pro/vertex.js +65 -63
- package/js/src/pro/wazirx.d.ts +70 -0
- package/js/src/pro/wazirx.js +70 -70
- package/js/src/pro/whitebit.d.ts +83 -0
- package/js/src/pro/whitebit.js +83 -83
- package/js/src/pro/woo.d.ts +106 -0
- package/js/src/pro/woo.js +106 -104
- package/js/src/pro/woofipro.d.ts +105 -0
- package/js/src/pro/woofipro.js +105 -103
- package/js/src/pro/xt.d.ts +119 -0
- package/js/src/pro/xt.js +119 -119
- package/js/src/probit.d.ts +229 -0
- package/js/src/probit.js +229 -229
- package/js/src/timex.d.ts +198 -0
- package/js/src/timex.js +198 -197
- package/js/src/tokocrypto.d.ts +214 -0
- package/js/src/tokocrypto.js +214 -213
- package/js/src/tradeogre.d.ts +92 -0
- package/js/src/tradeogre.js +92 -91
- package/js/src/upbit.d.ts +243 -0
- package/js/src/upbit.js +243 -242
- package/js/src/vertex.d.ts +258 -0
- package/js/src/vertex.js +258 -258
- package/js/src/wavesexchange.d.ts +176 -0
- package/js/src/wavesexchange.js +176 -172
- package/js/src/wazirx.d.ts +168 -0
- package/js/src/wazirx.js +168 -168
- package/js/src/whitebit.d.ts +361 -0
- package/js/src/whitebit.js +361 -361
- package/js/src/woo.d.ts +571 -0
- package/js/src/woo.js +571 -572
- package/js/src/woofipro.d.ts +392 -0
- package/js/src/woofipro.js +392 -391
- package/js/src/xt.d.ts +439 -4
- package/js/src/xt.js +436 -435
- package/js/src/yobit.d.ts +159 -0
- package/js/src/yobit.js +159 -158
- package/js/src/zaif.d.ts +103 -0
- package/js/src/zaif.js +103 -103
- package/js/src/zonda.d.ts +168 -0
- package/js/src/zonda.js +168 -168
- package/package.json +1 -1
package/dist/cjs/src/xt.js
CHANGED
|
@@ -678,15 +678,15 @@ class xt extends xt$1 {
|
|
|
678
678
|
nonce() {
|
|
679
679
|
return this.milliseconds() - this.options['timeDifference'];
|
|
680
680
|
}
|
|
681
|
+
/**
|
|
682
|
+
* @method
|
|
683
|
+
* @name xt#fetchTime
|
|
684
|
+
* @description fetches the current integer timestamp in milliseconds from the xt server
|
|
685
|
+
* @see https://doc.xt.com/#market1serverInfo
|
|
686
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
687
|
+
* @returns {int} the current integer timestamp in milliseconds from the xt server
|
|
688
|
+
*/
|
|
681
689
|
async fetchTime(params = {}) {
|
|
682
|
-
/**
|
|
683
|
-
* @method
|
|
684
|
-
* @name xt#fetchTime
|
|
685
|
-
* @description fetches the current integer timestamp in milliseconds from the xt server
|
|
686
|
-
* @see https://doc.xt.com/#market1serverInfo
|
|
687
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
688
|
-
* @returns {int} the current integer timestamp in milliseconds from the xt server
|
|
689
|
-
*/
|
|
690
690
|
const response = await this.publicSpotGetTime(params);
|
|
691
691
|
//
|
|
692
692
|
// {
|
|
@@ -701,15 +701,15 @@ class xt extends xt$1 {
|
|
|
701
701
|
const data = this.safeValue(response, 'result');
|
|
702
702
|
return this.safeInteger(data, 'serverTime');
|
|
703
703
|
}
|
|
704
|
+
/**
|
|
705
|
+
* @method
|
|
706
|
+
* @name xt#fetchCurrencies
|
|
707
|
+
* @description fetches all available currencies on an exchange
|
|
708
|
+
* @see https://doc.xt.com/#deposit_withdrawalsupportedCurrenciesGet
|
|
709
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
710
|
+
* @returns {object} an associative dictionary of currencies
|
|
711
|
+
*/
|
|
704
712
|
async fetchCurrencies(params = {}) {
|
|
705
|
-
/**
|
|
706
|
-
* @method
|
|
707
|
-
* @name xt#fetchCurrencies
|
|
708
|
-
* @description fetches all available currencies on an exchange
|
|
709
|
-
* @see https://doc.xt.com/#deposit_withdrawalsupportedCurrenciesGet
|
|
710
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
711
|
-
* @returns {object} an associative dictionary of currencies
|
|
712
|
-
*/
|
|
713
713
|
const promisesRaw = [this.publicSpotGetWalletSupportCurrency(params), this.publicSpotGetCurrencies(params)];
|
|
714
714
|
const [chainsResponse, currenciesResponse] = await Promise.all(promisesRaw);
|
|
715
715
|
//
|
|
@@ -854,16 +854,16 @@ class xt extends xt$1 {
|
|
|
854
854
|
}
|
|
855
855
|
return result;
|
|
856
856
|
}
|
|
857
|
+
/**
|
|
858
|
+
* @method
|
|
859
|
+
* @name xt#fetchMarkets
|
|
860
|
+
* @description retrieves data on all markets for xt
|
|
861
|
+
* @see https://doc.xt.com/#market2symbol
|
|
862
|
+
* @see https://doc.xt.com/#futures_quotesgetSymbols
|
|
863
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
864
|
+
* @returns {object[]} an array of objects representing market data
|
|
865
|
+
*/
|
|
857
866
|
async fetchMarkets(params = {}) {
|
|
858
|
-
/**
|
|
859
|
-
* @method
|
|
860
|
-
* @name xt#fetchMarkets
|
|
861
|
-
* @description retrieves data on all markets for xt
|
|
862
|
-
* @see https://doc.xt.com/#market2symbol
|
|
863
|
-
* @see https://doc.xt.com/#futures_quotesgetSymbols
|
|
864
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
865
|
-
* @returns {object[]} an array of objects representing market data
|
|
866
|
-
*/
|
|
867
867
|
if (this.options['adjustForTimeDifference']) {
|
|
868
868
|
await this.loadTimeDifference();
|
|
869
869
|
}
|
|
@@ -1266,20 +1266,20 @@ class xt extends xt$1 {
|
|
|
1266
1266
|
'info': market,
|
|
1267
1267
|
});
|
|
1268
1268
|
}
|
|
1269
|
+
/**
|
|
1270
|
+
* @method
|
|
1271
|
+
* @name xt#fetchOHLCV
|
|
1272
|
+
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1273
|
+
* @see https://doc.xt.com/#market4kline
|
|
1274
|
+
* @see https://doc.xt.com/#futures_quotesgetKLine
|
|
1275
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1276
|
+
* @param {string} timeframe the length of time each candle represents
|
|
1277
|
+
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
1278
|
+
* @param {int} [limit] the maximum amount of candles to fetch
|
|
1279
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
1280
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
1281
|
+
*/
|
|
1269
1282
|
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
1270
|
-
/**
|
|
1271
|
-
* @method
|
|
1272
|
-
* @name xt#fetchOHLCV
|
|
1273
|
-
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1274
|
-
* @see https://doc.xt.com/#market4kline
|
|
1275
|
-
* @see https://doc.xt.com/#futures_quotesgetKLine
|
|
1276
|
-
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1277
|
-
* @param {string} timeframe the length of time each candle represents
|
|
1278
|
-
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
1279
|
-
* @param {int} [limit] the maximum amount of candles to fetch
|
|
1280
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
1281
|
-
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
1282
|
-
*/
|
|
1283
1283
|
await this.loadMarkets();
|
|
1284
1284
|
const market = this.market(symbol);
|
|
1285
1285
|
const request = {
|
|
@@ -1384,18 +1384,18 @@ class xt extends xt$1 {
|
|
|
1384
1384
|
this.safeNumber2(ohlcv, 'q', volumeIndex),
|
|
1385
1385
|
];
|
|
1386
1386
|
}
|
|
1387
|
+
/**
|
|
1388
|
+
* @method
|
|
1389
|
+
* @name xt#fetchOrderBook
|
|
1390
|
+
* @see https://doc.xt.com/#market3depth
|
|
1391
|
+
* @see https://doc.xt.com/#futures_quotesgetDepth
|
|
1392
|
+
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
1393
|
+
* @param {string} symbol unified market symbol to fetch the order book for
|
|
1394
|
+
* @param {int} [limit] the maximum amount of order book entries to return
|
|
1395
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
1396
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols
|
|
1397
|
+
*/
|
|
1387
1398
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
1388
|
-
/**
|
|
1389
|
-
* @method
|
|
1390
|
-
* @name xt#fetchOrderBook
|
|
1391
|
-
* @see https://doc.xt.com/#market3depth
|
|
1392
|
-
* @see https://doc.xt.com/#futures_quotesgetDepth
|
|
1393
|
-
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
1394
|
-
* @param {string} symbol unified market symbol to fetch the order book for
|
|
1395
|
-
* @param {int} [limit] the maximum amount of order book entries to return
|
|
1396
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
1397
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols
|
|
1398
|
-
*/
|
|
1399
1399
|
await this.loadMarkets();
|
|
1400
1400
|
const market = this.market(symbol);
|
|
1401
1401
|
const request = {
|
|
@@ -1479,17 +1479,17 @@ class xt extends xt$1 {
|
|
|
1479
1479
|
swapOb['nonce'] = this.safeInteger2(orderBook, 'u', 'lastUpdateId');
|
|
1480
1480
|
return swapOb;
|
|
1481
1481
|
}
|
|
1482
|
+
/**
|
|
1483
|
+
* @method
|
|
1484
|
+
* @name xt#fetchTicker
|
|
1485
|
+
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1486
|
+
* @see https://doc.xt.com/#market10ticker24h
|
|
1487
|
+
* @see https://doc.xt.com/#futures_quotesgetAggTicker
|
|
1488
|
+
* @param {string} symbol unified market symbol to fetch the ticker for
|
|
1489
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
1490
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure}
|
|
1491
|
+
*/
|
|
1482
1492
|
async fetchTicker(symbol, params = {}) {
|
|
1483
|
-
/**
|
|
1484
|
-
* @method
|
|
1485
|
-
* @name xt#fetchTicker
|
|
1486
|
-
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1487
|
-
* @see https://doc.xt.com/#market10ticker24h
|
|
1488
|
-
* @see https://doc.xt.com/#futures_quotesgetAggTicker
|
|
1489
|
-
* @param {string} symbol unified market symbol to fetch the ticker for
|
|
1490
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
1491
|
-
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure}
|
|
1492
|
-
*/
|
|
1493
1493
|
await this.loadMarkets();
|
|
1494
1494
|
const market = this.market(symbol);
|
|
1495
1495
|
const request = {
|
|
@@ -1557,17 +1557,17 @@ class xt extends xt$1 {
|
|
|
1557
1557
|
}
|
|
1558
1558
|
return this.parseTicker(ticker, market);
|
|
1559
1559
|
}
|
|
1560
|
+
/**
|
|
1561
|
+
* @method
|
|
1562
|
+
* @name xt#fetchTickers
|
|
1563
|
+
* @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
|
|
1564
|
+
* @see https://doc.xt.com/#market10ticker24h
|
|
1565
|
+
* @see https://doc.xt.com/#futures_quotesgetAggTickers
|
|
1566
|
+
* @param {string} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1567
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
1568
|
+
* @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure}
|
|
1569
|
+
*/
|
|
1560
1570
|
async fetchTickers(symbols = undefined, params = {}) {
|
|
1561
|
-
/**
|
|
1562
|
-
* @method
|
|
1563
|
-
* @name xt#fetchTickers
|
|
1564
|
-
* @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
|
|
1565
|
-
* @see https://doc.xt.com/#market10ticker24h
|
|
1566
|
-
* @see https://doc.xt.com/#futures_quotesgetAggTickers
|
|
1567
|
-
* @param {string} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1568
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
1569
|
-
* @returns {object} an array of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure}
|
|
1570
|
-
*/
|
|
1571
1571
|
await this.loadMarkets();
|
|
1572
1572
|
let market = undefined;
|
|
1573
1573
|
if (symbols !== undefined) {
|
|
@@ -1646,16 +1646,16 @@ class xt extends xt$1 {
|
|
|
1646
1646
|
}
|
|
1647
1647
|
return this.filterByArray(result, 'symbol', symbols);
|
|
1648
1648
|
}
|
|
1649
|
+
/**
|
|
1650
|
+
* @method
|
|
1651
|
+
* @name xt#fetchBidsAsks
|
|
1652
|
+
* @description fetches the bid and ask price and volume for multiple markets
|
|
1653
|
+
* @see https://doc.xt.com/#market9tickerBook
|
|
1654
|
+
* @param {string} [symbols] unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
|
|
1655
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
1656
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure}
|
|
1657
|
+
*/
|
|
1649
1658
|
async fetchBidsAsks(symbols = undefined, params = {}) {
|
|
1650
|
-
/**
|
|
1651
|
-
* @method
|
|
1652
|
-
* @name xt#fetchBidsAsks
|
|
1653
|
-
* @description fetches the bid and ask price and volume for multiple markets
|
|
1654
|
-
* @see https://doc.xt.com/#market9tickerBook
|
|
1655
|
-
* @param {string} [symbols] unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
|
|
1656
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
1657
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure}
|
|
1658
|
-
*/
|
|
1659
1659
|
await this.loadMarkets();
|
|
1660
1660
|
symbols = this.marketSymbols(symbols);
|
|
1661
1661
|
const request = {};
|
|
@@ -1771,19 +1771,19 @@ class xt extends xt$1 {
|
|
|
1771
1771
|
'info': ticker,
|
|
1772
1772
|
}, market);
|
|
1773
1773
|
}
|
|
1774
|
+
/**
|
|
1775
|
+
* @method
|
|
1776
|
+
* @name xt#fetchTrades
|
|
1777
|
+
* @description get the list of most recent trades for a particular symbol
|
|
1778
|
+
* @see https://doc.xt.com/#market5tradeRecent
|
|
1779
|
+
* @see https://doc.xt.com/#futures_quotesgetDeal
|
|
1780
|
+
* @param {string} symbol unified market symbol to fetch trades for
|
|
1781
|
+
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1782
|
+
* @param {int} [limit] the maximum amount of trades to fetch
|
|
1783
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
1784
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
|
|
1785
|
+
*/
|
|
1774
1786
|
async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
1775
|
-
/**
|
|
1776
|
-
* @method
|
|
1777
|
-
* @name xt#fetchTrades
|
|
1778
|
-
* @description get the list of most recent trades for a particular symbol
|
|
1779
|
-
* @see https://doc.xt.com/#market5tradeRecent
|
|
1780
|
-
* @see https://doc.xt.com/#futures_quotesgetDeal
|
|
1781
|
-
* @param {string} symbol unified market symbol to fetch trades for
|
|
1782
|
-
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1783
|
-
* @param {int} [limit] the maximum amount of trades to fetch
|
|
1784
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
1785
|
-
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
|
|
1786
|
-
*/
|
|
1787
1787
|
await this.loadMarkets();
|
|
1788
1788
|
const market = this.market(symbol);
|
|
1789
1789
|
const request = {
|
|
@@ -1846,19 +1846,19 @@ class xt extends xt$1 {
|
|
|
1846
1846
|
const trades = this.safeValue(response, 'result', []);
|
|
1847
1847
|
return this.parseTrades(trades, market);
|
|
1848
1848
|
}
|
|
1849
|
+
/**
|
|
1850
|
+
* @method
|
|
1851
|
+
* @name xt#fetchMyTrades
|
|
1852
|
+
* @description fetch all trades made by the user
|
|
1853
|
+
* @see https://doc.xt.com/#tradetradeGet
|
|
1854
|
+
* @see https://doc.xt.com/#futures_ordergetTrades
|
|
1855
|
+
* @param {string} [symbol] unified market symbol to fetch trades for
|
|
1856
|
+
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1857
|
+
* @param {int} [limit] the maximum amount of trades to fetch
|
|
1858
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
1859
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
|
|
1860
|
+
*/
|
|
1849
1861
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1850
|
-
/**
|
|
1851
|
-
* @method
|
|
1852
|
-
* @name xt#fetchMyTrades
|
|
1853
|
-
* @description fetch all trades made by the user
|
|
1854
|
-
* @see https://doc.xt.com/#tradetradeGet
|
|
1855
|
-
* @see https://doc.xt.com/#futures_ordergetTrades
|
|
1856
|
-
* @param {string} [symbol] unified market symbol to fetch trades for
|
|
1857
|
-
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1858
|
-
* @param {int} [limit] the maximum amount of trades to fetch
|
|
1859
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
1860
|
-
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
|
|
1861
|
-
*/
|
|
1862
1862
|
await this.loadMarkets();
|
|
1863
1863
|
const request = {};
|
|
1864
1864
|
let market = undefined;
|
|
@@ -2134,16 +2134,16 @@ class xt extends xt$1 {
|
|
|
2134
2134
|
},
|
|
2135
2135
|
}, market);
|
|
2136
2136
|
}
|
|
2137
|
+
/**
|
|
2138
|
+
* @method
|
|
2139
|
+
* @name xt#fetchBalance
|
|
2140
|
+
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
2141
|
+
* @see https://doc.xt.com/#balancebalancesGet
|
|
2142
|
+
* @see https://doc.xt.com/#futures_usergetBalances
|
|
2143
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
2144
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure}
|
|
2145
|
+
*/
|
|
2137
2146
|
async fetchBalance(params = {}) {
|
|
2138
|
-
/**
|
|
2139
|
-
* @method
|
|
2140
|
-
* @name xt#fetchBalance
|
|
2141
|
-
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
2142
|
-
* @see https://doc.xt.com/#balancebalancesGet
|
|
2143
|
-
* @see https://doc.xt.com/#futures_usergetBalances
|
|
2144
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
2145
|
-
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure}
|
|
2146
|
-
*/
|
|
2147
2147
|
await this.loadMarkets();
|
|
2148
2148
|
let type = undefined;
|
|
2149
2149
|
let subType = undefined;
|
|
@@ -2261,17 +2261,17 @@ class xt extends xt$1 {
|
|
|
2261
2261
|
}
|
|
2262
2262
|
return this.safeBalance(result);
|
|
2263
2263
|
}
|
|
2264
|
+
/**
|
|
2265
|
+
* @method
|
|
2266
|
+
* @name xt#createMarketBuyOrderWithCost
|
|
2267
|
+
* @see https://doc.xt.com/#orderorderPost
|
|
2268
|
+
* @description create a market buy order by providing the symbol and cost
|
|
2269
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
2270
|
+
* @param {float} cost how much you want to trade in units of the quote currency
|
|
2271
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2272
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2273
|
+
*/
|
|
2264
2274
|
async createMarketBuyOrderWithCost(symbol, cost, params = {}) {
|
|
2265
|
-
/**
|
|
2266
|
-
* @method
|
|
2267
|
-
* @name xt#createMarketBuyOrderWithCost
|
|
2268
|
-
* @see https://doc.xt.com/#orderorderPost
|
|
2269
|
-
* @description create a market buy order by providing the symbol and cost
|
|
2270
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
2271
|
-
* @param {float} cost how much you want to trade in units of the quote currency
|
|
2272
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2273
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2274
|
-
*/
|
|
2275
2275
|
await this.loadMarkets();
|
|
2276
2276
|
const market = this.market(symbol);
|
|
2277
2277
|
if (!market['spot']) {
|
|
@@ -2279,29 +2279,29 @@ class xt extends xt$1 {
|
|
|
2279
2279
|
}
|
|
2280
2280
|
return await this.createOrder(symbol, 'market', 'buy', cost, 1, params);
|
|
2281
2281
|
}
|
|
2282
|
+
/**
|
|
2283
|
+
* @method
|
|
2284
|
+
* @name xt#createOrder
|
|
2285
|
+
* @description create a trade order
|
|
2286
|
+
* @see https://doc.xt.com/#orderorderPost
|
|
2287
|
+
* @see https://doc.xt.com/#futures_ordercreate
|
|
2288
|
+
* @see https://doc.xt.com/#futures_entrustcreatePlan
|
|
2289
|
+
* @see https://doc.xt.com/#futures_entrustcreateProfit
|
|
2290
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
2291
|
+
* @param {string} type 'market' or 'limit'
|
|
2292
|
+
* @param {string} side 'buy' or 'sell'
|
|
2293
|
+
* @param {float} amount how much you want to trade in units of the base currency
|
|
2294
|
+
* @param {float} [price] the price to fulfill the order, in units of the quote currency, can be ignored in market orders
|
|
2295
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
2296
|
+
* @param {string} [params.timeInForce] 'GTC', 'IOC', 'FOK' or 'GTX'
|
|
2297
|
+
* @param {string} [params.entrustType] 'TAKE_PROFIT', 'STOP', 'TAKE_PROFIT_MARKET', 'STOP_MARKET', 'TRAILING_STOP_MARKET', required if stopPrice is defined, currently isn't functioning on xt's side
|
|
2298
|
+
* @param {string} [params.triggerPriceType] 'INDEX_PRICE', 'MARK_PRICE', 'LATEST_PRICE', required if stopPrice is defined
|
|
2299
|
+
* @param {float} [params.stopPrice] price to trigger a stop order
|
|
2300
|
+
* @param {float} [params.stopLoss] price to set a stop-loss on an open position
|
|
2301
|
+
* @param {float} [params.takeProfit] price to set a take-profit on an open position
|
|
2302
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
2303
|
+
*/
|
|
2282
2304
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
2283
|
-
/**
|
|
2284
|
-
* @method
|
|
2285
|
-
* @name xt#createOrder
|
|
2286
|
-
* @description create a trade order
|
|
2287
|
-
* @see https://doc.xt.com/#orderorderPost
|
|
2288
|
-
* @see https://doc.xt.com/#futures_ordercreate
|
|
2289
|
-
* @see https://doc.xt.com/#futures_entrustcreatePlan
|
|
2290
|
-
* @see https://doc.xt.com/#futures_entrustcreateProfit
|
|
2291
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
2292
|
-
* @param {string} type 'market' or 'limit'
|
|
2293
|
-
* @param {string} side 'buy' or 'sell'
|
|
2294
|
-
* @param {float} amount how much you want to trade in units of the base currency
|
|
2295
|
-
* @param {float} [price] the price to fulfill the order, in units of the quote currency, can be ignored in market orders
|
|
2296
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
2297
|
-
* @param {string} [params.timeInForce] 'GTC', 'IOC', 'FOK' or 'GTX'
|
|
2298
|
-
* @param {string} [params.entrustType] 'TAKE_PROFIT', 'STOP', 'TAKE_PROFIT_MARKET', 'STOP_MARKET', 'TRAILING_STOP_MARKET', required if stopPrice is defined, currently isn't functioning on xt's side
|
|
2299
|
-
* @param {string} [params.triggerPriceType] 'INDEX_PRICE', 'MARK_PRICE', 'LATEST_PRICE', required if stopPrice is defined
|
|
2300
|
-
* @param {float} [params.stopPrice] price to trigger a stop order
|
|
2301
|
-
* @param {float} [params.stopLoss] price to set a stop-loss on an open position
|
|
2302
|
-
* @param {float} [params.takeProfit] price to set a take-profit on an open position
|
|
2303
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
2304
|
-
*/
|
|
2305
2305
|
await this.loadMarkets();
|
|
2306
2306
|
const market = this.market(symbol);
|
|
2307
2307
|
symbol = market['symbol'];
|
|
@@ -2458,22 +2458,22 @@ class xt extends xt$1 {
|
|
|
2458
2458
|
//
|
|
2459
2459
|
return this.parseOrder(response, market);
|
|
2460
2460
|
}
|
|
2461
|
+
/**
|
|
2462
|
+
* @method
|
|
2463
|
+
* @name xt#fetchOrder
|
|
2464
|
+
* @description fetches information on an order made by the user
|
|
2465
|
+
* @see https://doc.xt.com/#orderorderGet
|
|
2466
|
+
* @see https://doc.xt.com/#futures_ordergetById
|
|
2467
|
+
* @see https://doc.xt.com/#futures_entrustgetPlanById
|
|
2468
|
+
* @see https://doc.xt.com/#futures_entrustgetProfitById
|
|
2469
|
+
* @param {string} id order id
|
|
2470
|
+
* @param {string} [symbol] unified symbol of the market the order was made in
|
|
2471
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
2472
|
+
* @param {bool} [params.stop] if the order is a stop trigger order or not
|
|
2473
|
+
* @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
|
|
2474
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
2475
|
+
*/
|
|
2461
2476
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
2462
|
-
/**
|
|
2463
|
-
* @method
|
|
2464
|
-
* @name xt#fetchOrder
|
|
2465
|
-
* @description fetches information on an order made by the user
|
|
2466
|
-
* @see https://doc.xt.com/#orderorderGet
|
|
2467
|
-
* @see https://doc.xt.com/#futures_ordergetById
|
|
2468
|
-
* @see https://doc.xt.com/#futures_entrustgetPlanById
|
|
2469
|
-
* @see https://doc.xt.com/#futures_entrustgetProfitById
|
|
2470
|
-
* @param {string} id order id
|
|
2471
|
-
* @param {string} [symbol] unified symbol of the market the order was made in
|
|
2472
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
2473
|
-
* @param {bool} [params.stop] if the order is a stop trigger order or not
|
|
2474
|
-
* @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
|
|
2475
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
2476
|
-
*/
|
|
2477
2477
|
await this.loadMarkets();
|
|
2478
2478
|
let market = undefined;
|
|
2479
2479
|
if (symbol !== undefined) {
|
|
@@ -2643,21 +2643,21 @@ class xt extends xt$1 {
|
|
|
2643
2643
|
const order = this.safeValue(response, 'result', {});
|
|
2644
2644
|
return this.parseOrder(order, market);
|
|
2645
2645
|
}
|
|
2646
|
+
/**
|
|
2647
|
+
* @method
|
|
2648
|
+
* @name xt#fetchOrders
|
|
2649
|
+
* @description fetches information on multiple orders made by the user
|
|
2650
|
+
* @see https://doc.xt.com/#orderhistoryOrderGet
|
|
2651
|
+
* @see https://doc.xt.com/#futures_ordergetHistory
|
|
2652
|
+
* @see https://doc.xt.com/#futures_entrustgetPlanHistory
|
|
2653
|
+
* @param {string} [symbol] unified market symbol of the market the orders were made in
|
|
2654
|
+
* @param {int} [since] timestamp in ms of the earliest order
|
|
2655
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
2656
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
2657
|
+
* @param {bool} [params.stop] if the order is a stop trigger order or not
|
|
2658
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
2659
|
+
*/
|
|
2646
2660
|
async fetchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2647
|
-
/**
|
|
2648
|
-
* @method
|
|
2649
|
-
* @name xt#fetchOrders
|
|
2650
|
-
* @description fetches information on multiple orders made by the user
|
|
2651
|
-
* @see https://doc.xt.com/#orderhistoryOrderGet
|
|
2652
|
-
* @see https://doc.xt.com/#futures_ordergetHistory
|
|
2653
|
-
* @see https://doc.xt.com/#futures_entrustgetPlanHistory
|
|
2654
|
-
* @param {string} [symbol] unified market symbol of the market the orders were made in
|
|
2655
|
-
* @param {int} [since] timestamp in ms of the earliest order
|
|
2656
|
-
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
2657
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
2658
|
-
* @param {bool} [params.stop] if the order is a stop trigger order or not
|
|
2659
|
-
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
2660
|
-
*/
|
|
2661
2661
|
await this.loadMarkets();
|
|
2662
2662
|
const request = {};
|
|
2663
2663
|
let market = undefined;
|
|
@@ -3090,79 +3090,79 @@ class xt extends xt$1 {
|
|
|
3090
3090
|
const orders = isSpotOpenOrders ? this.safeValue(response, 'result', []) : this.safeValue(data, 'items', []);
|
|
3091
3091
|
return this.parseOrders(orders, market, since, limit);
|
|
3092
3092
|
}
|
|
3093
|
+
/**
|
|
3094
|
+
* @method
|
|
3095
|
+
* @name xt#fetchOpenOrders
|
|
3096
|
+
* @description fetch all unfilled currently open orders
|
|
3097
|
+
* @see https://doc.xt.com/#orderopenOrderGet
|
|
3098
|
+
* @see https://doc.xt.com/#futures_ordergetOrders
|
|
3099
|
+
* @see https://doc.xt.com/#futures_entrustgetPlan
|
|
3100
|
+
* @see https://doc.xt.com/#futures_entrustgetProfit
|
|
3101
|
+
* @param {string} [symbol] unified market symbol of the market the orders were made in
|
|
3102
|
+
* @param {int} [since] timestamp in ms of the earliest order
|
|
3103
|
+
* @param {int} [limit] the maximum number of open order structures to retrieve
|
|
3104
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
3105
|
+
* @param {bool} [params.stop] if the order is a stop trigger order or not
|
|
3106
|
+
* @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
|
|
3107
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
3108
|
+
*/
|
|
3093
3109
|
async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3094
|
-
/**
|
|
3095
|
-
* @method
|
|
3096
|
-
* @name xt#fetchOpenOrders
|
|
3097
|
-
* @description fetch all unfilled currently open orders
|
|
3098
|
-
* @see https://doc.xt.com/#orderopenOrderGet
|
|
3099
|
-
* @see https://doc.xt.com/#futures_ordergetOrders
|
|
3100
|
-
* @see https://doc.xt.com/#futures_entrustgetPlan
|
|
3101
|
-
* @see https://doc.xt.com/#futures_entrustgetProfit
|
|
3102
|
-
* @param {string} [symbol] unified market symbol of the market the orders were made in
|
|
3103
|
-
* @param {int} [since] timestamp in ms of the earliest order
|
|
3104
|
-
* @param {int} [limit] the maximum number of open order structures to retrieve
|
|
3105
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
3106
|
-
* @param {bool} [params.stop] if the order is a stop trigger order or not
|
|
3107
|
-
* @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
|
|
3108
|
-
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
3109
|
-
*/
|
|
3110
3110
|
return await this.fetchOrdersByStatus('open', symbol, since, limit, params);
|
|
3111
3111
|
}
|
|
3112
|
+
/**
|
|
3113
|
+
* @method
|
|
3114
|
+
* @name xt#fetchClosedOrders
|
|
3115
|
+
* @description fetches information on multiple closed orders made by the user
|
|
3116
|
+
* @see https://doc.xt.com/#orderhistoryOrderGet
|
|
3117
|
+
* @see https://doc.xt.com/#futures_ordergetOrders
|
|
3118
|
+
* @see https://doc.xt.com/#futures_entrustgetPlan
|
|
3119
|
+
* @see https://doc.xt.com/#futures_entrustgetProfit
|
|
3120
|
+
* @param {string} [symbol] unified market symbol of the market the orders were made in
|
|
3121
|
+
* @param {int} [since] timestamp in ms of the earliest order
|
|
3122
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
3123
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
3124
|
+
* @param {bool} [params.stop] if the order is a stop trigger order or not
|
|
3125
|
+
* @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
|
|
3126
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
3127
|
+
*/
|
|
3112
3128
|
async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3113
|
-
/**
|
|
3114
|
-
* @method
|
|
3115
|
-
* @name xt#fetchClosedOrders
|
|
3116
|
-
* @description fetches information on multiple closed orders made by the user
|
|
3117
|
-
* @see https://doc.xt.com/#orderhistoryOrderGet
|
|
3118
|
-
* @see https://doc.xt.com/#futures_ordergetOrders
|
|
3119
|
-
* @see https://doc.xt.com/#futures_entrustgetPlan
|
|
3120
|
-
* @see https://doc.xt.com/#futures_entrustgetProfit
|
|
3121
|
-
* @param {string} [symbol] unified market symbol of the market the orders were made in
|
|
3122
|
-
* @param {int} [since] timestamp in ms of the earliest order
|
|
3123
|
-
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
3124
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
3125
|
-
* @param {bool} [params.stop] if the order is a stop trigger order or not
|
|
3126
|
-
* @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
|
|
3127
|
-
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
3128
|
-
*/
|
|
3129
3129
|
return await this.fetchOrdersByStatus('closed', symbol, since, limit, params);
|
|
3130
3130
|
}
|
|
3131
|
+
/**
|
|
3132
|
+
* @method
|
|
3133
|
+
* @name xt#fetchCanceledOrders
|
|
3134
|
+
* @description fetches information on multiple canceled orders made by the user
|
|
3135
|
+
* @see https://doc.xt.com/#orderhistoryOrderGet
|
|
3136
|
+
* @see https://doc.xt.com/#futures_ordergetOrders
|
|
3137
|
+
* @see https://doc.xt.com/#futures_entrustgetPlan
|
|
3138
|
+
* @see https://doc.xt.com/#futures_entrustgetProfit
|
|
3139
|
+
* @param {string} [symbol] unified market symbol of the market the orders were made in
|
|
3140
|
+
* @param {int} [since] timestamp in ms of the earliest order
|
|
3141
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
3142
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
3143
|
+
* @param {bool} [params.stop] if the order is a stop trigger order or not
|
|
3144
|
+
* @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
|
|
3145
|
+
* @returns {object} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
3146
|
+
*/
|
|
3131
3147
|
async fetchCanceledOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3132
|
-
/**
|
|
3133
|
-
* @method
|
|
3134
|
-
* @name xt#fetchCanceledOrders
|
|
3135
|
-
* @description fetches information on multiple canceled orders made by the user
|
|
3136
|
-
* @see https://doc.xt.com/#orderhistoryOrderGet
|
|
3137
|
-
* @see https://doc.xt.com/#futures_ordergetOrders
|
|
3138
|
-
* @see https://doc.xt.com/#futures_entrustgetPlan
|
|
3139
|
-
* @see https://doc.xt.com/#futures_entrustgetProfit
|
|
3140
|
-
* @param {string} [symbol] unified market symbol of the market the orders were made in
|
|
3141
|
-
* @param {int} [since] timestamp in ms of the earliest order
|
|
3142
|
-
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
3143
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
3144
|
-
* @param {bool} [params.stop] if the order is a stop trigger order or not
|
|
3145
|
-
* @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
|
|
3146
|
-
* @returns {object} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
3147
|
-
*/
|
|
3148
3148
|
return await this.fetchOrdersByStatus('canceled', symbol, since, limit, params);
|
|
3149
3149
|
}
|
|
3150
|
+
/**
|
|
3151
|
+
* @method
|
|
3152
|
+
* @name xt#cancelOrder
|
|
3153
|
+
* @description cancels an open order
|
|
3154
|
+
* @see https://doc.xt.com/#orderorderDel
|
|
3155
|
+
* @see https://doc.xt.com/#futures_ordercancel
|
|
3156
|
+
* @see https://doc.xt.com/#futures_entrustcancelPlan
|
|
3157
|
+
* @see https://doc.xt.com/#futures_entrustcancelProfit
|
|
3158
|
+
* @param {string} id order id
|
|
3159
|
+
* @param {string} [symbol] unified symbol of the market the order was made in
|
|
3160
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
3161
|
+
* @param {bool} [params.stop] if the order is a stop trigger order or not
|
|
3162
|
+
* @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
|
|
3163
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
3164
|
+
*/
|
|
3150
3165
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
3151
|
-
/**
|
|
3152
|
-
* @method
|
|
3153
|
-
* @name xt#cancelOrder
|
|
3154
|
-
* @description cancels an open order
|
|
3155
|
-
* @see https://doc.xt.com/#orderorderDel
|
|
3156
|
-
* @see https://doc.xt.com/#futures_ordercancel
|
|
3157
|
-
* @see https://doc.xt.com/#futures_entrustcancelPlan
|
|
3158
|
-
* @see https://doc.xt.com/#futures_entrustcancelProfit
|
|
3159
|
-
* @param {string} id order id
|
|
3160
|
-
* @param {string} [symbol] unified symbol of the market the order was made in
|
|
3161
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
3162
|
-
* @param {bool} [params.stop] if the order is a stop trigger order or not
|
|
3163
|
-
* @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
|
|
3164
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
3165
|
-
*/
|
|
3166
3166
|
await this.loadMarkets();
|
|
3167
3167
|
let market = undefined;
|
|
3168
3168
|
if (symbol !== undefined) {
|
|
@@ -3237,21 +3237,21 @@ class xt extends xt$1 {
|
|
|
3237
3237
|
const order = isContractResponse ? response : this.safeValue(response, 'result', {});
|
|
3238
3238
|
return this.parseOrder(order, market);
|
|
3239
3239
|
}
|
|
3240
|
+
/**
|
|
3241
|
+
* @method
|
|
3242
|
+
* @name xt#cancelAllOrders
|
|
3243
|
+
* @description cancel all open orders in a market
|
|
3244
|
+
* @see https://doc.xt.com/#orderopenOrderDel
|
|
3245
|
+
* @see https://doc.xt.com/#futures_ordercancelBatch
|
|
3246
|
+
* @see https://doc.xt.com/#futures_entrustcancelPlanBatch
|
|
3247
|
+
* @see https://doc.xt.com/#futures_entrustcancelProfitBatch
|
|
3248
|
+
* @param {string} [symbol] unified market symbol of the market to cancel orders in
|
|
3249
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
3250
|
+
* @param {bool} [params.stop] if the order is a stop trigger order or not
|
|
3251
|
+
* @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
|
|
3252
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
3253
|
+
*/
|
|
3240
3254
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
3241
|
-
/**
|
|
3242
|
-
* @method
|
|
3243
|
-
* @name xt#cancelAllOrders
|
|
3244
|
-
* @description cancel all open orders in a market
|
|
3245
|
-
* @see https://doc.xt.com/#orderopenOrderDel
|
|
3246
|
-
* @see https://doc.xt.com/#futures_ordercancelBatch
|
|
3247
|
-
* @see https://doc.xt.com/#futures_entrustcancelPlanBatch
|
|
3248
|
-
* @see https://doc.xt.com/#futures_entrustcancelProfitBatch
|
|
3249
|
-
* @param {string} [symbol] unified market symbol of the market to cancel orders in
|
|
3250
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
3251
|
-
* @param {bool} [params.stop] if the order is a stop trigger order or not
|
|
3252
|
-
* @param {bool} [params.stopLossTakeProfit] if the order is a stop-loss or take-profit order
|
|
3253
|
-
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
3254
|
-
*/
|
|
3255
3255
|
await this.loadMarkets();
|
|
3256
3256
|
const request = {};
|
|
3257
3257
|
let market = undefined;
|
|
@@ -3320,17 +3320,17 @@ class xt extends xt$1 {
|
|
|
3320
3320
|
this.safeOrder(response),
|
|
3321
3321
|
];
|
|
3322
3322
|
}
|
|
3323
|
+
/**
|
|
3324
|
+
* @method
|
|
3325
|
+
* @name xt#cancelOrders
|
|
3326
|
+
* @description cancel multiple orders
|
|
3327
|
+
* @see https://doc.xt.com/#orderbatchOrderDel
|
|
3328
|
+
* @param {string[]} ids order ids
|
|
3329
|
+
* @param {string} [symbol] unified market symbol of the market to cancel orders in
|
|
3330
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
3331
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
3332
|
+
*/
|
|
3323
3333
|
async cancelOrders(ids, symbol = undefined, params = {}) {
|
|
3324
|
-
/**
|
|
3325
|
-
* @method
|
|
3326
|
-
* @name xt#cancelOrders
|
|
3327
|
-
* @description cancel multiple orders
|
|
3328
|
-
* @see https://doc.xt.com/#orderbatchOrderDel
|
|
3329
|
-
* @param {string[]} ids order ids
|
|
3330
|
-
* @param {string} [symbol] unified market symbol of the market to cancel orders in
|
|
3331
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
3332
|
-
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
3333
|
-
*/
|
|
3334
3334
|
await this.loadMarkets();
|
|
3335
3335
|
const request = {
|
|
3336
3336
|
'orderIds': ids,
|
|
@@ -3536,18 +3536,18 @@ class xt extends xt$1 {
|
|
|
3536
3536
|
};
|
|
3537
3537
|
return this.safeString(statuses, status, status);
|
|
3538
3538
|
}
|
|
3539
|
+
/**
|
|
3540
|
+
* @method
|
|
3541
|
+
* @name xt#fetchLedger
|
|
3542
|
+
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
3543
|
+
* @see https://doc.xt.com/#futures_usergetBalanceBill
|
|
3544
|
+
* @param {string} [code] unified currency code
|
|
3545
|
+
* @param {int} [since] timestamp in ms of the earliest ledger entry
|
|
3546
|
+
* @param {int} [limit] max number of ledger entries to return
|
|
3547
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
3548
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure}
|
|
3549
|
+
*/
|
|
3539
3550
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3540
|
-
/**
|
|
3541
|
-
* @method
|
|
3542
|
-
* @name xt#fetchLedger
|
|
3543
|
-
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
3544
|
-
* @see https://doc.xt.com/#futures_usergetBalanceBill
|
|
3545
|
-
* @param {string} [code] unified currency code
|
|
3546
|
-
* @param {int} [since] timestamp in ms of the earliest ledger entry
|
|
3547
|
-
* @param {int} [limit] max number of ledger entries to return
|
|
3548
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
3549
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/en/latest/manual.html#ledger-structure}
|
|
3550
|
-
*/
|
|
3551
3551
|
await this.loadMarkets();
|
|
3552
3552
|
const request = {};
|
|
3553
3553
|
let currency = undefined;
|
|
@@ -3653,17 +3653,17 @@ class xt extends xt$1 {
|
|
|
3653
3653
|
};
|
|
3654
3654
|
return this.safeString(ledgerType, type, type);
|
|
3655
3655
|
}
|
|
3656
|
+
/**
|
|
3657
|
+
* @method
|
|
3658
|
+
* @name xt#fetchDepositAddress
|
|
3659
|
+
* @description fetch the deposit address for a currency associated with this account
|
|
3660
|
+
* @see https://doc.xt.com/#deposit_withdrawaldepositAddressGet
|
|
3661
|
+
* @param {string} code unified currency code
|
|
3662
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
3663
|
+
* @param {string} params.network required network id
|
|
3664
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure}
|
|
3665
|
+
*/
|
|
3656
3666
|
async fetchDepositAddress(code, params = {}) {
|
|
3657
|
-
/**
|
|
3658
|
-
* @method
|
|
3659
|
-
* @name xt#fetchDepositAddress
|
|
3660
|
-
* @description fetch the deposit address for a currency associated with this account
|
|
3661
|
-
* @see https://doc.xt.com/#deposit_withdrawaldepositAddressGet
|
|
3662
|
-
* @param {string} code unified currency code
|
|
3663
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
3664
|
-
* @param {string} params.network required network id
|
|
3665
|
-
* @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure}
|
|
3666
|
-
*/
|
|
3667
3667
|
await this.loadMarkets();
|
|
3668
3668
|
let networkCode = undefined;
|
|
3669
3669
|
[networkCode, params] = this.handleNetworkCodeAndParams(params);
|
|
@@ -3706,18 +3706,18 @@ class xt extends xt$1 {
|
|
|
3706
3706
|
'tag': this.safeString(depositAddress, 'memo'),
|
|
3707
3707
|
};
|
|
3708
3708
|
}
|
|
3709
|
+
/**
|
|
3710
|
+
* @method
|
|
3711
|
+
* @name xt#fetchDeposits
|
|
3712
|
+
* @description fetch all deposits made to an account
|
|
3713
|
+
* @see https://doc.xt.com/#deposit_withdrawalhistoryDepositGet
|
|
3714
|
+
* @param {string} [code] unified currency code
|
|
3715
|
+
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
3716
|
+
* @param {int} [limit] the maximum number of transaction structures to retrieve
|
|
3717
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
3718
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure}
|
|
3719
|
+
*/
|
|
3709
3720
|
async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3710
|
-
/**
|
|
3711
|
-
* @method
|
|
3712
|
-
* @name xt#fetchDeposits
|
|
3713
|
-
* @description fetch all deposits made to an account
|
|
3714
|
-
* @see https://doc.xt.com/#deposit_withdrawalhistoryDepositGet
|
|
3715
|
-
* @param {string} [code] unified currency code
|
|
3716
|
-
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
3717
|
-
* @param {int} [limit] the maximum number of transaction structures to retrieve
|
|
3718
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
3719
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure}
|
|
3720
|
-
*/
|
|
3721
3721
|
await this.loadMarkets();
|
|
3722
3722
|
const request = {};
|
|
3723
3723
|
let currency = undefined;
|
|
@@ -3762,18 +3762,18 @@ class xt extends xt$1 {
|
|
|
3762
3762
|
const deposits = this.safeValue(data, 'items', []);
|
|
3763
3763
|
return this.parseTransactions(deposits, currency, since, limit, params);
|
|
3764
3764
|
}
|
|
3765
|
+
/**
|
|
3766
|
+
* @method
|
|
3767
|
+
* @name xt#fetchWithdrawals
|
|
3768
|
+
* @description fetch all withdrawals made from an account
|
|
3769
|
+
* @see https://doc.xt.com/#deposit_withdrawalwithdrawHistory
|
|
3770
|
+
* @param {string} [code] unified currency code
|
|
3771
|
+
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
3772
|
+
* @param {int} [limit] the maximum number of transaction structures to retrieve
|
|
3773
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
3774
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure}
|
|
3775
|
+
*/
|
|
3765
3776
|
async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3766
|
-
/**
|
|
3767
|
-
* @method
|
|
3768
|
-
* @name xt#fetchWithdrawals
|
|
3769
|
-
* @description fetch all withdrawals made from an account
|
|
3770
|
-
* @see https://doc.xt.com/#deposit_withdrawalwithdrawHistory
|
|
3771
|
-
* @param {string} [code] unified currency code
|
|
3772
|
-
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
3773
|
-
* @param {int} [limit] the maximum number of transaction structures to retrieve
|
|
3774
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
3775
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure}
|
|
3776
|
-
*/
|
|
3777
3777
|
await this.loadMarkets();
|
|
3778
3778
|
const request = {};
|
|
3779
3779
|
let currency = undefined;
|
|
@@ -3818,19 +3818,19 @@ class xt extends xt$1 {
|
|
|
3818
3818
|
const withdrawals = this.safeValue(data, 'items', []);
|
|
3819
3819
|
return this.parseTransactions(withdrawals, currency, since, limit, params);
|
|
3820
3820
|
}
|
|
3821
|
+
/**
|
|
3822
|
+
* @method
|
|
3823
|
+
* @name xt#withdraw
|
|
3824
|
+
* @description make a withdrawal
|
|
3825
|
+
* @see https://doc.xt.com/#deposit_withdrawalwithdraw
|
|
3826
|
+
* @param {string} code unified currency code
|
|
3827
|
+
* @param {float} amount the amount to withdraw
|
|
3828
|
+
* @param {string} address the address to withdraw to
|
|
3829
|
+
* @param {string} [tag]
|
|
3830
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
3831
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure}
|
|
3832
|
+
*/
|
|
3821
3833
|
async withdraw(code, amount, address, tag = undefined, params = {}) {
|
|
3822
|
-
/**
|
|
3823
|
-
* @method
|
|
3824
|
-
* @name xt#withdraw
|
|
3825
|
-
* @description make a withdrawal
|
|
3826
|
-
* @see https://doc.xt.com/#deposit_withdrawalwithdraw
|
|
3827
|
-
* @param {string} code unified currency code
|
|
3828
|
-
* @param {float} amount the amount to withdraw
|
|
3829
|
-
* @param {string} address the address to withdraw to
|
|
3830
|
-
* @param {string} [tag]
|
|
3831
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
3832
|
-
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/en/latest/manual.html#transaction-structure}
|
|
3833
|
-
*/
|
|
3834
3834
|
this.checkAddress(address);
|
|
3835
3835
|
await this.loadMarkets();
|
|
3836
3836
|
const currency = this.currency(code);
|
|
@@ -3949,18 +3949,18 @@ class xt extends xt$1 {
|
|
|
3949
3949
|
};
|
|
3950
3950
|
return this.safeString(statuses, status, status);
|
|
3951
3951
|
}
|
|
3952
|
+
/**
|
|
3953
|
+
* @method
|
|
3954
|
+
* @name xt#setLeverage
|
|
3955
|
+
* @description set the level of leverage for a market
|
|
3956
|
+
* @see https://doc.xt.com/#futures_useradjustLeverage
|
|
3957
|
+
* @param {float} leverage the rate of leverage
|
|
3958
|
+
* @param {string} symbol unified market symbol
|
|
3959
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
3960
|
+
* @param {string} params.positionSide 'LONG' or 'SHORT'
|
|
3961
|
+
* @returns {object} response from the exchange
|
|
3962
|
+
*/
|
|
3952
3963
|
async setLeverage(leverage, symbol = undefined, params = {}) {
|
|
3953
|
-
/**
|
|
3954
|
-
* @method
|
|
3955
|
-
* @name xt#setLeverage
|
|
3956
|
-
* @description set the level of leverage for a market
|
|
3957
|
-
* @see https://doc.xt.com/#futures_useradjustLeverage
|
|
3958
|
-
* @param {float} leverage the rate of leverage
|
|
3959
|
-
* @param {string} symbol unified market symbol
|
|
3960
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
3961
|
-
* @param {string} params.positionSide 'LONG' or 'SHORT'
|
|
3962
|
-
* @returns {object} response from the exchange
|
|
3963
|
-
*/
|
|
3964
3964
|
if (symbol === undefined) {
|
|
3965
3965
|
throw new errors.ArgumentsRequired(this.id + ' setLeverage() requires a symbol argument');
|
|
3966
3966
|
}
|
|
@@ -3998,32 +3998,32 @@ class xt extends xt$1 {
|
|
|
3998
3998
|
//
|
|
3999
3999
|
return response;
|
|
4000
4000
|
}
|
|
4001
|
+
/**
|
|
4002
|
+
* @method
|
|
4003
|
+
* @name xt#addMargin
|
|
4004
|
+
* @description add margin to a position
|
|
4005
|
+
* @see https://doc.xt.com/#futures_useradjustMargin
|
|
4006
|
+
* @param {string} symbol unified market symbol
|
|
4007
|
+
* @param {float} amount amount of margin to add
|
|
4008
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
4009
|
+
* @param {string} params.positionSide 'LONG' or 'SHORT'
|
|
4010
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
|
|
4011
|
+
*/
|
|
4001
4012
|
async addMargin(symbol, amount, params = {}) {
|
|
4002
|
-
/**
|
|
4003
|
-
* @method
|
|
4004
|
-
* @name xt#addMargin
|
|
4005
|
-
* @description add margin to a position
|
|
4006
|
-
* @see https://doc.xt.com/#futures_useradjustMargin
|
|
4007
|
-
* @param {string} symbol unified market symbol
|
|
4008
|
-
* @param {float} amount amount of margin to add
|
|
4009
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
4010
|
-
* @param {string} params.positionSide 'LONG' or 'SHORT'
|
|
4011
|
-
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
|
|
4012
|
-
*/
|
|
4013
4013
|
return await this.modifyMarginHelper(symbol, amount, 'ADD', params);
|
|
4014
4014
|
}
|
|
4015
|
+
/**
|
|
4016
|
+
* @method
|
|
4017
|
+
* @name xt#reduceMargin
|
|
4018
|
+
* @description remove margin from a position
|
|
4019
|
+
* @see https://doc.xt.com/#futures_useradjustMargin
|
|
4020
|
+
* @param {string} symbol unified market symbol
|
|
4021
|
+
* @param {float} amount the amount of margin to remove
|
|
4022
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
4023
|
+
* @param {string} params.positionSide 'LONG' or 'SHORT'
|
|
4024
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
|
|
4025
|
+
*/
|
|
4015
4026
|
async reduceMargin(symbol, amount, params = {}) {
|
|
4016
|
-
/**
|
|
4017
|
-
* @method
|
|
4018
|
-
* @name xt#reduceMargin
|
|
4019
|
-
* @description remove margin from a position
|
|
4020
|
-
* @see https://doc.xt.com/#futures_useradjustMargin
|
|
4021
|
-
* @param {string} symbol unified market symbol
|
|
4022
|
-
* @param {float} amount the amount of margin to remove
|
|
4023
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
4024
|
-
* @param {string} params.positionSide 'LONG' or 'SHORT'
|
|
4025
|
-
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
|
|
4026
|
-
*/
|
|
4027
4027
|
return await this.modifyMarginHelper(symbol, amount, 'SUB', params);
|
|
4028
4028
|
}
|
|
4029
4029
|
async modifyMarginHelper(symbol, amount, addOrReduce, params = {}) {
|
|
@@ -4070,16 +4070,16 @@ class xt extends xt$1 {
|
|
|
4070
4070
|
'datetime': undefined,
|
|
4071
4071
|
};
|
|
4072
4072
|
}
|
|
4073
|
+
/**
|
|
4074
|
+
* @method
|
|
4075
|
+
* @name xt#fetchLeverageTiers
|
|
4076
|
+
* @description retrieve information on the maximum leverage for different trade sizes
|
|
4077
|
+
* @see https://doc.xt.com/#futures_quotesgetLeverageBrackets
|
|
4078
|
+
* @param {string} [symbols] a list of unified market symbols
|
|
4079
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
4080
|
+
* @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}
|
|
4081
|
+
*/
|
|
4073
4082
|
async fetchLeverageTiers(symbols = undefined, params = {}) {
|
|
4074
|
-
/**
|
|
4075
|
-
* @method
|
|
4076
|
-
* @name xt#fetchLeverageTiers
|
|
4077
|
-
* @see https://doc.xt.com/#futures_quotesgetLeverageBrackets
|
|
4078
|
-
* @description retrieve information on the maximum leverage for different trade sizes
|
|
4079
|
-
* @param {string} [symbols] a list of unified market symbols
|
|
4080
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
4081
|
-
* @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}
|
|
4082
|
-
*/
|
|
4083
4083
|
await this.loadMarkets();
|
|
4084
4084
|
let subType = undefined;
|
|
4085
4085
|
[subType, params] = this.handleSubTypeAndParams('fetchLeverageTiers', undefined, params);
|
|
@@ -4153,16 +4153,16 @@ class xt extends xt$1 {
|
|
|
4153
4153
|
}
|
|
4154
4154
|
return result;
|
|
4155
4155
|
}
|
|
4156
|
+
/**
|
|
4157
|
+
* @method
|
|
4158
|
+
* @name xt#fetchMarketLeverageTiers
|
|
4159
|
+
* @description retrieve information on the maximum leverage for different trade sizes of a single market
|
|
4160
|
+
* @see https://doc.xt.com/#futures_quotesgetLeverageBracket
|
|
4161
|
+
* @param {string} symbol unified market symbol
|
|
4162
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
4163
|
+
* @returns {object} a [leverage tiers structure]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}
|
|
4164
|
+
*/
|
|
4156
4165
|
async fetchMarketLeverageTiers(symbol, params = {}) {
|
|
4157
|
-
/**
|
|
4158
|
-
* @method
|
|
4159
|
-
* @name xt#fetchMarketLeverageTiers
|
|
4160
|
-
* @see https://doc.xt.com/#futures_quotesgetLeverageBracket
|
|
4161
|
-
* @description retrieve information on the maximum leverage for different trade sizes of a single market
|
|
4162
|
-
* @param {string} symbol unified market symbol
|
|
4163
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
4164
|
-
* @returns {object} a [leverage tiers structure]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}
|
|
4165
|
-
*/
|
|
4166
4166
|
await this.loadMarkets();
|
|
4167
4167
|
const market = this.market(symbol);
|
|
4168
4168
|
const request = {
|
|
@@ -4228,6 +4228,7 @@ class xt extends xt$1 {
|
|
|
4228
4228
|
market = this.safeMarket(marketId, market, '_', 'contract');
|
|
4229
4229
|
tiers.push({
|
|
4230
4230
|
'tier': this.safeInteger(tier, 'bracket'),
|
|
4231
|
+
'symbol': this.safeSymbol(marketId, market, '_', 'contract'),
|
|
4231
4232
|
'currency': market['settle'],
|
|
4232
4233
|
'minNotional': this.safeNumber(brackets[i - 1], 'maxNominalValue', 0),
|
|
4233
4234
|
'maxNotional': this.safeNumber(tier, 'maxNominalValue'),
|
|
@@ -4238,18 +4239,18 @@ class xt extends xt$1 {
|
|
|
4238
4239
|
}
|
|
4239
4240
|
return tiers;
|
|
4240
4241
|
}
|
|
4242
|
+
/**
|
|
4243
|
+
* @method
|
|
4244
|
+
* @name xt#fetchFundingRateHistory
|
|
4245
|
+
* @description fetches historical funding rates
|
|
4246
|
+
* @see https://doc.xt.com/#futures_quotesgetFundingRateRecord
|
|
4247
|
+
* @param {string} [symbol] unified symbol of the market to fetch the funding rate history for
|
|
4248
|
+
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
4249
|
+
* @param {int} [limit] the maximum amount of [funding rate structures] to fetch
|
|
4250
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
4251
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure}
|
|
4252
|
+
*/
|
|
4241
4253
|
async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
4242
|
-
/**
|
|
4243
|
-
* @method
|
|
4244
|
-
* @name xt#fetchFundingRateHistory
|
|
4245
|
-
* @description fetches historical funding rates
|
|
4246
|
-
* @see https://doc.xt.com/#futures_quotesgetFundingRateRecord
|
|
4247
|
-
* @param {string} [symbol] unified symbol of the market to fetch the funding rate history for
|
|
4248
|
-
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
4249
|
-
* @param {int} [limit] the maximum amount of [funding rate structures] to fetch
|
|
4250
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
4251
|
-
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/en/latest/manual.html?#funding-rate-history-structure}
|
|
4252
|
-
*/
|
|
4253
4254
|
if (symbol === undefined) {
|
|
4254
4255
|
throw new errors.ArgumentsRequired(this.id + ' fetchFundingRateHistory() requires a symbol argument');
|
|
4255
4256
|
}
|
|
@@ -4312,28 +4313,28 @@ class xt extends xt$1 {
|
|
|
4312
4313
|
const sorted = this.sortBy(rates, 'timestamp');
|
|
4313
4314
|
return this.filterBySymbolSinceLimit(sorted, market['symbol'], since, limit);
|
|
4314
4315
|
}
|
|
4316
|
+
/**
|
|
4317
|
+
* @method
|
|
4318
|
+
* @name xt#fetchFundingInterval
|
|
4319
|
+
* @description fetch the current funding rate interval
|
|
4320
|
+
* @see https://doc.xt.com/#futures_quotesgetFundingRate
|
|
4321
|
+
* @param {string} symbol unified market symbol
|
|
4322
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4323
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
4324
|
+
*/
|
|
4315
4325
|
async fetchFundingInterval(symbol, params = {}) {
|
|
4316
|
-
/**
|
|
4317
|
-
* @method
|
|
4318
|
-
* @name xt#fetchFundingInterval
|
|
4319
|
-
* @description fetch the current funding rate interval
|
|
4320
|
-
* @see https://doc.xt.com/#futures_quotesgetFundingRate
|
|
4321
|
-
* @param {string} symbol unified market symbol
|
|
4322
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4323
|
-
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
4324
|
-
*/
|
|
4325
4326
|
return await this.fetchFundingRate(symbol, params);
|
|
4326
4327
|
}
|
|
4328
|
+
/**
|
|
4329
|
+
* @method
|
|
4330
|
+
* @name xt#fetchFundingRate
|
|
4331
|
+
* @description fetch the current funding rate
|
|
4332
|
+
* @see https://doc.xt.com/#futures_quotesgetFundingRate
|
|
4333
|
+
* @param {string} symbol unified market symbol
|
|
4334
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
4335
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
4336
|
+
*/
|
|
4327
4337
|
async fetchFundingRate(symbol, params = {}) {
|
|
4328
|
-
/**
|
|
4329
|
-
* @method
|
|
4330
|
-
* @name xt#fetchFundingRate
|
|
4331
|
-
* @description fetch the current funding rate
|
|
4332
|
-
* @see https://doc.xt.com/#futures_quotesgetFundingRate
|
|
4333
|
-
* @param {string} symbol unified market symbol
|
|
4334
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
4335
|
-
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
4336
|
-
*/
|
|
4337
4338
|
await this.loadMarkets();
|
|
4338
4339
|
const market = this.market(symbol);
|
|
4339
4340
|
if (!market['swap']) {
|
|
@@ -4401,18 +4402,18 @@ class xt extends xt$1 {
|
|
|
4401
4402
|
'interval': interval + 'h',
|
|
4402
4403
|
};
|
|
4403
4404
|
}
|
|
4405
|
+
/**
|
|
4406
|
+
* @method
|
|
4407
|
+
* @name xt#fetchFundingHistory
|
|
4408
|
+
* @description fetch the funding history
|
|
4409
|
+
* @see https://doc.xt.com/#futures_usergetFunding
|
|
4410
|
+
* @param {string} symbol unified market symbol
|
|
4411
|
+
* @param {int} [since] the starting timestamp in milliseconds
|
|
4412
|
+
* @param {int} [limit] the number of entries to return
|
|
4413
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
4414
|
+
* @returns {object[]} a list of [funding history structures]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
|
|
4415
|
+
*/
|
|
4404
4416
|
async fetchFundingHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
4405
|
-
/**
|
|
4406
|
-
* @method
|
|
4407
|
-
* @name xt#fetchFundingHistory
|
|
4408
|
-
* @description fetch the funding history
|
|
4409
|
-
* @see https://doc.xt.com/#futures_usergetFunding
|
|
4410
|
-
* @param {string} symbol unified market symbol
|
|
4411
|
-
* @param {int} [since] the starting timestamp in milliseconds
|
|
4412
|
-
* @param {int} [limit] the number of entries to return
|
|
4413
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
4414
|
-
* @returns {object[]} a list of [funding history structures]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
|
|
4415
|
-
*/
|
|
4416
4417
|
await this.loadMarkets();
|
|
4417
4418
|
const market = this.market(symbol);
|
|
4418
4419
|
if (!market['swap']) {
|
|
@@ -4493,16 +4494,16 @@ class xt extends xt$1 {
|
|
|
4493
4494
|
'amount': this.safeNumber(contract, 'cast'),
|
|
4494
4495
|
};
|
|
4495
4496
|
}
|
|
4497
|
+
/**
|
|
4498
|
+
* @method
|
|
4499
|
+
* @name xt#fetchPosition
|
|
4500
|
+
* @description fetch data on a single open contract trade position
|
|
4501
|
+
* @see https://doc.xt.com/#futures_usergetPosition
|
|
4502
|
+
* @param {string} symbol unified market symbol of the market the position is held in
|
|
4503
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
4504
|
+
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
4505
|
+
*/
|
|
4496
4506
|
async fetchPosition(symbol, params = {}) {
|
|
4497
|
-
/**
|
|
4498
|
-
* @method
|
|
4499
|
-
* @name xt#fetchPosition
|
|
4500
|
-
* @description fetch data on a single open contract trade position
|
|
4501
|
-
* @see https://doc.xt.com/#futures_usergetPosition
|
|
4502
|
-
* @param {string} symbol unified market symbol of the market the position is held in
|
|
4503
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
4504
|
-
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
4505
|
-
*/
|
|
4506
4507
|
await this.loadMarkets();
|
|
4507
4508
|
const market = this.market(symbol);
|
|
4508
4509
|
const request = {
|
|
@@ -4554,16 +4555,16 @@ class xt extends xt$1 {
|
|
|
4554
4555
|
}
|
|
4555
4556
|
return undefined;
|
|
4556
4557
|
}
|
|
4558
|
+
/**
|
|
4559
|
+
* @method
|
|
4560
|
+
* @name xt#fetchPositions
|
|
4561
|
+
* @description fetch all open positions
|
|
4562
|
+
* @see https://doc.xt.com/#futures_usergetPosition
|
|
4563
|
+
* @param {string} [symbols] list of unified market symbols, not supported with xt
|
|
4564
|
+
* @param {object} params extra parameters specific to the xt api endpoint
|
|
4565
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
4566
|
+
*/
|
|
4557
4567
|
async fetchPositions(symbols = undefined, params = {}) {
|
|
4558
|
-
/**
|
|
4559
|
-
* @method
|
|
4560
|
-
* @name xt#fetchPositions
|
|
4561
|
-
* @description fetch all open positions
|
|
4562
|
-
* @see https://doc.xt.com/#futures_usergetPosition
|
|
4563
|
-
* @param {string} [symbols] list of unified market symbols, not supported with xt
|
|
4564
|
-
* @param {object} params extra parameters specific to the xt api endpoint
|
|
4565
|
-
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
4566
|
-
*/
|
|
4567
4568
|
await this.loadMarkets();
|
|
4568
4569
|
let subType = undefined;
|
|
4569
4570
|
[subType, params] = this.handleSubTypeAndParams('fetchPositions', undefined, params);
|
|
@@ -4660,19 +4661,19 @@ class xt extends xt$1 {
|
|
|
4660
4661
|
'marginRatio': undefined,
|
|
4661
4662
|
});
|
|
4662
4663
|
}
|
|
4664
|
+
/**
|
|
4665
|
+
* @method
|
|
4666
|
+
* @name xt#transfer
|
|
4667
|
+
* @description transfer currency internally between wallets on the same account
|
|
4668
|
+
* @see https://doc.xt.com/#transfersubTransferPost
|
|
4669
|
+
* @param {string} code unified currency code
|
|
4670
|
+
* @param {float} amount amount to transfer
|
|
4671
|
+
* @param {string} fromAccount account to transfer from - spot, swap, leverage, finance
|
|
4672
|
+
* @param {string} toAccount account to transfer to - spot, swap, leverage, finance
|
|
4673
|
+
* @param {object} params extra parameters specific to the whitebit api endpoint
|
|
4674
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
4675
|
+
*/
|
|
4663
4676
|
async transfer(code, amount, fromAccount, toAccount, params = {}) {
|
|
4664
|
-
/**
|
|
4665
|
-
* @method
|
|
4666
|
-
* @name xt#transfer
|
|
4667
|
-
* @description transfer currency internally between wallets on the same account
|
|
4668
|
-
* @see https://doc.xt.com/#transfersubTransferPost
|
|
4669
|
-
* @param {string} code unified currency code
|
|
4670
|
-
* @param {float} amount amount to transfer
|
|
4671
|
-
* @param {string} fromAccount account to transfer from - spot, swap, leverage, finance
|
|
4672
|
-
* @param {string} toAccount account to transfer to - spot, swap, leverage, finance
|
|
4673
|
-
* @param {object} params extra parameters specific to the whitebit api endpoint
|
|
4674
|
-
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
4675
|
-
*/
|
|
4676
4677
|
await this.loadMarkets();
|
|
4677
4678
|
const currency = this.currency(code);
|
|
4678
4679
|
const accountsByType = this.safeValue(this.options, 'accountsById');
|