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/bitmart.js
CHANGED
|
@@ -687,14 +687,14 @@ class bitmart extends bitmart$1 {
|
|
|
687
687
|
},
|
|
688
688
|
});
|
|
689
689
|
}
|
|
690
|
+
/**
|
|
691
|
+
* @method
|
|
692
|
+
* @name bitmart#fetchTime
|
|
693
|
+
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
694
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
695
|
+
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
696
|
+
*/
|
|
690
697
|
async fetchTime(params = {}) {
|
|
691
|
-
/**
|
|
692
|
-
* @method
|
|
693
|
-
* @name bitmart#fetchTime
|
|
694
|
-
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
695
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
696
|
-
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
697
|
-
*/
|
|
698
698
|
const response = await this.publicGetSystemTime(params);
|
|
699
699
|
//
|
|
700
700
|
// {
|
|
@@ -709,14 +709,14 @@ class bitmart extends bitmart$1 {
|
|
|
709
709
|
const data = this.safeDict(response, 'data', {});
|
|
710
710
|
return this.safeInteger(data, 'server_time');
|
|
711
711
|
}
|
|
712
|
+
/**
|
|
713
|
+
* @method
|
|
714
|
+
* @name bitmart#fetchStatus
|
|
715
|
+
* @description the latest known information on the availability of the exchange API
|
|
716
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
717
|
+
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
718
|
+
*/
|
|
712
719
|
async fetchStatus(params = {}) {
|
|
713
|
-
/**
|
|
714
|
-
* @method
|
|
715
|
-
* @name bitmart#fetchStatus
|
|
716
|
-
* @description the latest known information on the availability of the exchange API
|
|
717
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
718
|
-
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
719
|
-
*/
|
|
720
720
|
const options = this.safeDict(this.options, 'fetchStatus', {});
|
|
721
721
|
const defaultType = this.safeString(this.options, 'defaultType');
|
|
722
722
|
let type = this.safeString(options, 'type', defaultType);
|
|
@@ -986,27 +986,27 @@ class bitmart extends bitmart$1 {
|
|
|
986
986
|
}
|
|
987
987
|
return result;
|
|
988
988
|
}
|
|
989
|
+
/**
|
|
990
|
+
* @method
|
|
991
|
+
* @name bitmart#fetchMarkets
|
|
992
|
+
* @see https://developer-pro.bitmart.com/en/futuresv2/#get-contract-details
|
|
993
|
+
* @description retrieves data on all markets for bitmart
|
|
994
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
995
|
+
* @returns {object[]} an array of objects representing market data
|
|
996
|
+
*/
|
|
989
997
|
async fetchMarkets(params = {}) {
|
|
990
|
-
/**
|
|
991
|
-
* @method
|
|
992
|
-
* @name bitmart#fetchMarkets
|
|
993
|
-
* @see https://developer-pro.bitmart.com/en/futuresv2/#get-contract-details
|
|
994
|
-
* @description retrieves data on all markets for bitmart
|
|
995
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
996
|
-
* @returns {object[]} an array of objects representing market data
|
|
997
|
-
*/
|
|
998
998
|
const spot = await this.fetchSpotMarkets(params);
|
|
999
999
|
const contract = await this.fetchContractMarkets(params);
|
|
1000
1000
|
return this.arrayConcat(spot, contract);
|
|
1001
1001
|
}
|
|
1002
|
+
/**
|
|
1003
|
+
* @method
|
|
1004
|
+
* @name bitmart#fetchCurrencies
|
|
1005
|
+
* @description fetches all available currencies on an exchange
|
|
1006
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1007
|
+
* @returns {object} an associative dictionary of currencies
|
|
1008
|
+
*/
|
|
1002
1009
|
async fetchCurrencies(params = {}) {
|
|
1003
|
-
/**
|
|
1004
|
-
* @method
|
|
1005
|
-
* @name bitmart#fetchCurrencies
|
|
1006
|
-
* @description fetches all available currencies on an exchange
|
|
1007
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1008
|
-
* @returns {object} an associative dictionary of currencies
|
|
1009
|
-
*/
|
|
1010
1010
|
const response = await this.publicGetSpotV1Currencies(params);
|
|
1011
1011
|
//
|
|
1012
1012
|
// {
|
|
@@ -1051,16 +1051,16 @@ class bitmart extends bitmart$1 {
|
|
|
1051
1051
|
}
|
|
1052
1052
|
return result;
|
|
1053
1053
|
}
|
|
1054
|
+
/**
|
|
1055
|
+
* @method
|
|
1056
|
+
* @name bitmart#fetchTransactionFee
|
|
1057
|
+
* @deprecated
|
|
1058
|
+
* @description please use fetchDepositWithdrawFee instead
|
|
1059
|
+
* @param {string} code unified currency code
|
|
1060
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1061
|
+
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
1062
|
+
*/
|
|
1054
1063
|
async fetchTransactionFee(code, params = {}) {
|
|
1055
|
-
/**
|
|
1056
|
-
* @method
|
|
1057
|
-
* @name bitmart#fetchTransactionFee
|
|
1058
|
-
* @deprecated
|
|
1059
|
-
* @description please use fetchDepositWithdrawFee instead
|
|
1060
|
-
* @param {string} code unified currency code
|
|
1061
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1062
|
-
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
1063
|
-
*/
|
|
1064
1064
|
await this.loadMarkets();
|
|
1065
1065
|
const currency = this.currency(code);
|
|
1066
1066
|
const request = {
|
|
@@ -1111,15 +1111,15 @@ class bitmart extends bitmart$1 {
|
|
|
1111
1111
|
'networks': {},
|
|
1112
1112
|
};
|
|
1113
1113
|
}
|
|
1114
|
+
/**
|
|
1115
|
+
* @method
|
|
1116
|
+
* @name bitmart#fetchDepositWithdrawFee
|
|
1117
|
+
* @description fetch the fee for deposits and withdrawals
|
|
1118
|
+
* @param {string} code unified currency code
|
|
1119
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1120
|
+
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
1121
|
+
*/
|
|
1114
1122
|
async fetchDepositWithdrawFee(code, params = {}) {
|
|
1115
|
-
/**
|
|
1116
|
-
* @method
|
|
1117
|
-
* @name bitmart#fetchDepositWithdrawFee
|
|
1118
|
-
* @description fetch the fee for deposits and withdrawals
|
|
1119
|
-
* @param {string} code unified currency code
|
|
1120
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1121
|
-
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
1122
|
-
*/
|
|
1123
1123
|
await this.loadMarkets();
|
|
1124
1124
|
const currency = this.currency(code);
|
|
1125
1125
|
const request = {
|
|
@@ -1303,17 +1303,17 @@ class bitmart extends bitmart$1 {
|
|
|
1303
1303
|
'info': ticker,
|
|
1304
1304
|
}, market);
|
|
1305
1305
|
}
|
|
1306
|
+
/**
|
|
1307
|
+
* @method
|
|
1308
|
+
* @name bitmart#fetchTicker
|
|
1309
|
+
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1310
|
+
* @see https://developer-pro.bitmart.com/en/spot/#get-ticker-of-a-trading-pair-v3
|
|
1311
|
+
* @see https://developer-pro.bitmart.com/en/futuresv2/#get-contract-details
|
|
1312
|
+
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1313
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1314
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1315
|
+
*/
|
|
1306
1316
|
async fetchTicker(symbol, params = {}) {
|
|
1307
|
-
/**
|
|
1308
|
-
* @method
|
|
1309
|
-
* @name bitmart#fetchTicker
|
|
1310
|
-
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1311
|
-
* @see https://developer-pro.bitmart.com/en/spot/#get-ticker-of-a-trading-pair-v3
|
|
1312
|
-
* @see https://developer-pro.bitmart.com/en/futuresv2/#get-contract-details
|
|
1313
|
-
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1314
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1315
|
-
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1316
|
-
*/
|
|
1317
1317
|
await this.loadMarkets();
|
|
1318
1318
|
const market = this.market(symbol);
|
|
1319
1319
|
const request = {};
|
|
@@ -1403,17 +1403,17 @@ class bitmart extends bitmart$1 {
|
|
|
1403
1403
|
}
|
|
1404
1404
|
return this.parseTicker(ticker, market);
|
|
1405
1405
|
}
|
|
1406
|
+
/**
|
|
1407
|
+
* @method
|
|
1408
|
+
* @name bitmart#fetchTickers
|
|
1409
|
+
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
1410
|
+
* @see https://developer-pro.bitmart.com/en/spot/#get-ticker-of-all-pairs-v3
|
|
1411
|
+
* @see https://developer-pro.bitmart.com/en/futuresv2/#get-contract-details
|
|
1412
|
+
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1413
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1414
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1415
|
+
*/
|
|
1406
1416
|
async fetchTickers(symbols = undefined, params = {}) {
|
|
1407
|
-
/**
|
|
1408
|
-
* @method
|
|
1409
|
-
* @name bitmart#fetchTickers
|
|
1410
|
-
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
1411
|
-
* @see https://developer-pro.bitmart.com/en/spot/#get-ticker-of-all-pairs-v3
|
|
1412
|
-
* @see https://developer-pro.bitmart.com/en/futuresv2/#get-contract-details
|
|
1413
|
-
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1414
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1415
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1416
|
-
*/
|
|
1417
1417
|
await this.loadMarkets();
|
|
1418
1418
|
symbols = this.marketSymbols(symbols);
|
|
1419
1419
|
let type = undefined;
|
|
@@ -1518,19 +1518,19 @@ class bitmart extends bitmart$1 {
|
|
|
1518
1518
|
}
|
|
1519
1519
|
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
1520
1520
|
}
|
|
1521
|
+
/**
|
|
1522
|
+
* @method
|
|
1523
|
+
* @name bitmart#fetchOrderBook
|
|
1524
|
+
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
1525
|
+
* @see https://developer-pro.bitmart.com/en/spot/#get-depth-v3
|
|
1526
|
+
* @see https://developer-pro.bitmart.com/en/futures/#get-market-depth
|
|
1527
|
+
* @see https://developer-pro.bitmart.com/en/futuresv2/#get-market-depth
|
|
1528
|
+
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1529
|
+
* @param {int} [limit] the maximum amount of order book entries to return
|
|
1530
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1531
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
1532
|
+
*/
|
|
1521
1533
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
1522
|
-
/**
|
|
1523
|
-
* @method
|
|
1524
|
-
* @name bitmart#fetchOrderBook
|
|
1525
|
-
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
1526
|
-
* @see https://developer-pro.bitmart.com/en/spot/#get-depth-v3
|
|
1527
|
-
* @see https://developer-pro.bitmart.com/en/futures/#get-market-depth
|
|
1528
|
-
* @see https://developer-pro.bitmart.com/en/futuresv2/#get-market-depth
|
|
1529
|
-
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1530
|
-
* @param {int} [limit] the maximum amount of order book entries to return
|
|
1531
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1532
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
1533
|
-
*/
|
|
1534
1534
|
await this.loadMarkets();
|
|
1535
1535
|
const market = this.market(symbol);
|
|
1536
1536
|
const request = {
|
|
@@ -1704,18 +1704,18 @@ class bitmart extends bitmart$1 {
|
|
|
1704
1704
|
'fee': fee,
|
|
1705
1705
|
}, market);
|
|
1706
1706
|
}
|
|
1707
|
+
/**
|
|
1708
|
+
* @method
|
|
1709
|
+
* @name bitmart#fetchTrades
|
|
1710
|
+
* @description get a list of the most recent trades for a particular symbol
|
|
1711
|
+
* @see https://developer-pro.bitmart.com/en/spot/#get-recent-trades-v3
|
|
1712
|
+
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
1713
|
+
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1714
|
+
* @param {int} [limit] the maximum number of trades to fetch
|
|
1715
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1716
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
1717
|
+
*/
|
|
1707
1718
|
async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
1708
|
-
/**
|
|
1709
|
-
* @method
|
|
1710
|
-
* @name bitmart#fetchTrades
|
|
1711
|
-
* @description get a list of the most recent trades for a particular symbol
|
|
1712
|
-
* @see https://developer-pro.bitmart.com/en/spot/#get-recent-trades-v3
|
|
1713
|
-
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
1714
|
-
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1715
|
-
* @param {int} [limit] the maximum number of trades to fetch
|
|
1716
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1717
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
1718
|
-
*/
|
|
1719
1719
|
await this.loadMarkets();
|
|
1720
1720
|
const market = this.market(symbol);
|
|
1721
1721
|
if (!market['spot']) {
|
|
@@ -1811,22 +1811,22 @@ class bitmart extends bitmart$1 {
|
|
|
1811
1811
|
];
|
|
1812
1812
|
}
|
|
1813
1813
|
}
|
|
1814
|
+
/**
|
|
1815
|
+
* @method
|
|
1816
|
+
* @name bitmart#fetchOHLCV
|
|
1817
|
+
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1818
|
+
* @see https://developer-pro.bitmart.com/en/spot/#get-history-k-line-v3
|
|
1819
|
+
* @see https://developer-pro.bitmart.com/en/futuresv2/#get-k-line
|
|
1820
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1821
|
+
* @param {string} timeframe the length of time each candle represents
|
|
1822
|
+
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
1823
|
+
* @param {int} [limit] the maximum amount of candles to fetch
|
|
1824
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1825
|
+
* @param {int} [params.until] timestamp of the latest candle in ms
|
|
1826
|
+
* @param {boolean} [params.paginate] *spot only* default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
1827
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
1828
|
+
*/
|
|
1814
1829
|
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
1815
|
-
/**
|
|
1816
|
-
* @method
|
|
1817
|
-
* @name bitmart#fetchOHLCV
|
|
1818
|
-
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1819
|
-
* @see https://developer-pro.bitmart.com/en/spot/#get-history-k-line-v3
|
|
1820
|
-
* @see https://developer-pro.bitmart.com/en/futuresv2/#get-k-line
|
|
1821
|
-
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1822
|
-
* @param {string} timeframe the length of time each candle represents
|
|
1823
|
-
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
1824
|
-
* @param {int} [limit] the maximum amount of candles to fetch
|
|
1825
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1826
|
-
* @param {int} [params.until] timestamp of the latest candle in ms
|
|
1827
|
-
* @param {boolean} [params.paginate] *spot only* default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
1828
|
-
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
1829
|
-
*/
|
|
1830
1830
|
await this.loadMarkets();
|
|
1831
1831
|
let paginate = false;
|
|
1832
1832
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchOHLCV', 'paginate', false);
|
|
@@ -1917,21 +1917,21 @@ class bitmart extends bitmart$1 {
|
|
|
1917
1917
|
const ohlcv = this.safeList(response, 'data', []);
|
|
1918
1918
|
return this.parseOHLCVs(ohlcv, market, timeframe, since, limit);
|
|
1919
1919
|
}
|
|
1920
|
+
/**
|
|
1921
|
+
* @method
|
|
1922
|
+
* @name bitmart#fetchMyTrades
|
|
1923
|
+
* @see https://developer-pro.bitmart.com/en/spot/#account-trade-list-v4-signed
|
|
1924
|
+
* @see https://developer-pro.bitmart.com/en/futures/#get-order-trade-keyed
|
|
1925
|
+
* @description fetch all trades made by the user
|
|
1926
|
+
* @param {string} symbol unified market symbol
|
|
1927
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1928
|
+
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
1929
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1930
|
+
* @param {int} [params.until] the latest time in ms to fetch trades for
|
|
1931
|
+
* @param {boolean} [params.marginMode] *spot* whether to fetch trades for margin orders or spot orders, defaults to spot orders (only isolated margin orders are supported)
|
|
1932
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1933
|
+
*/
|
|
1920
1934
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1921
|
-
/**
|
|
1922
|
-
* @method
|
|
1923
|
-
* @name bitmart#fetchMyTrades
|
|
1924
|
-
* @see https://developer-pro.bitmart.com/en/spot/#account-trade-list-v4-signed
|
|
1925
|
-
* @see https://developer-pro.bitmart.com/en/futures/#get-order-trade-keyed
|
|
1926
|
-
* @description fetch all trades made by the user
|
|
1927
|
-
* @param {string} symbol unified market symbol
|
|
1928
|
-
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1929
|
-
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
1930
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1931
|
-
* @param {int} [params.until] the latest time in ms to fetch trades for
|
|
1932
|
-
* @param {boolean} [params.marginMode] *spot* whether to fetch trades for margin orders or spot orders, defaults to spot orders (only isolated margin orders are supported)
|
|
1933
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1934
|
-
*/
|
|
1935
1935
|
await this.loadMarkets();
|
|
1936
1936
|
let market = undefined;
|
|
1937
1937
|
const request = {};
|
|
@@ -2033,19 +2033,19 @@ class bitmart extends bitmart$1 {
|
|
|
2033
2033
|
const data = this.safeList(response, 'data', []);
|
|
2034
2034
|
return this.parseTrades(data, market, since, limit);
|
|
2035
2035
|
}
|
|
2036
|
+
/**
|
|
2037
|
+
* @method
|
|
2038
|
+
* @name bitmart#fetchOrderTrades
|
|
2039
|
+
* @see https://developer-pro.bitmart.com/en/spot/#order-trade-list-v4-signed
|
|
2040
|
+
* @description fetch all the trades made from a single order
|
|
2041
|
+
* @param {string} id order id
|
|
2042
|
+
* @param {string} symbol unified market symbol
|
|
2043
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
2044
|
+
* @param {int} [limit] the maximum number of trades to retrieve
|
|
2045
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2046
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
2047
|
+
*/
|
|
2036
2048
|
async fetchOrderTrades(id, symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2037
|
-
/**
|
|
2038
|
-
* @method
|
|
2039
|
-
* @name bitmart#fetchOrderTrades
|
|
2040
|
-
* @see https://developer-pro.bitmart.com/en/spot/#order-trade-list-v4-signed
|
|
2041
|
-
* @description fetch all the trades made from a single order
|
|
2042
|
-
* @param {string} id order id
|
|
2043
|
-
* @param {string} symbol unified market symbol
|
|
2044
|
-
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
2045
|
-
* @param {int} [limit] the maximum number of trades to retrieve
|
|
2046
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2047
|
-
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
2048
|
-
*/
|
|
2049
2049
|
await this.loadMarkets();
|
|
2050
2050
|
const request = {
|
|
2051
2051
|
'orderId': id,
|
|
@@ -2107,19 +2107,19 @@ class bitmart extends bitmart$1 {
|
|
|
2107
2107
|
account['debt'] = Precise["default"].stringAdd(debt, interest);
|
|
2108
2108
|
return account;
|
|
2109
2109
|
}
|
|
2110
|
+
/**
|
|
2111
|
+
* @method
|
|
2112
|
+
* @name bitmart#fetchBalance
|
|
2113
|
+
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
2114
|
+
* @see https://developer-pro.bitmart.com/en/spot/#get-spot-wallet-balance
|
|
2115
|
+
* @see https://developer-pro.bitmart.com/en/futures/#get-contract-assets-detail
|
|
2116
|
+
* @see https://developer-pro.bitmart.com/en/futuresv2/#get-contract-assets-keyed
|
|
2117
|
+
* @see https://developer-pro.bitmart.com/en/spot/#get-account-balance
|
|
2118
|
+
* @see https://developer-pro.bitmart.com/en/spot/#get-margin-account-details-isolated
|
|
2119
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2120
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
2121
|
+
*/
|
|
2110
2122
|
async fetchBalance(params = {}) {
|
|
2111
|
-
/**
|
|
2112
|
-
* @method
|
|
2113
|
-
* @name bitmart#fetchBalance
|
|
2114
|
-
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
2115
|
-
* @see https://developer-pro.bitmart.com/en/spot/#get-spot-wallet-balance
|
|
2116
|
-
* @see https://developer-pro.bitmart.com/en/futures/#get-contract-assets-detail
|
|
2117
|
-
* @see https://developer-pro.bitmart.com/en/futuresv2/#get-contract-assets-keyed
|
|
2118
|
-
* @see https://developer-pro.bitmart.com/en/spot/#get-account-balance
|
|
2119
|
-
* @see https://developer-pro.bitmart.com/en/spot/#get-margin-account-details-isolated
|
|
2120
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2121
|
-
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
2122
|
-
*/
|
|
2123
2123
|
await this.loadMarkets();
|
|
2124
2124
|
let marketType = undefined;
|
|
2125
2125
|
[marketType, params] = this.handleMarketTypeAndParams('fetchBalance', undefined, params);
|
|
@@ -2260,15 +2260,15 @@ class bitmart extends bitmart$1 {
|
|
|
2260
2260
|
'tierBased': undefined,
|
|
2261
2261
|
};
|
|
2262
2262
|
}
|
|
2263
|
+
/**
|
|
2264
|
+
* @method
|
|
2265
|
+
* @name bitmart#fetchTradingFee
|
|
2266
|
+
* @description fetch the trading fees for a market
|
|
2267
|
+
* @param {string} symbol unified market symbol
|
|
2268
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2269
|
+
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
2270
|
+
*/
|
|
2263
2271
|
async fetchTradingFee(symbol, params = {}) {
|
|
2264
|
-
/**
|
|
2265
|
-
* @method
|
|
2266
|
-
* @name bitmart#fetchTradingFee
|
|
2267
|
-
* @description fetch the trading fees for a market
|
|
2268
|
-
* @param {string} symbol unified market symbol
|
|
2269
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2270
|
-
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
2271
|
-
*/
|
|
2272
2272
|
await this.loadMarkets();
|
|
2273
2273
|
const market = this.market(symbol);
|
|
2274
2274
|
if (!market['spot']) {
|
|
@@ -2456,17 +2456,17 @@ class bitmart extends bitmart$1 {
|
|
|
2456
2456
|
const statuses = this.safeDict(statusesByType, type, {});
|
|
2457
2457
|
return this.safeString(statuses, status, status);
|
|
2458
2458
|
}
|
|
2459
|
+
/**
|
|
2460
|
+
* @method
|
|
2461
|
+
* @name bitmart#createMarketBuyOrderWithCost
|
|
2462
|
+
* @description create a market buy order by providing the symbol and cost
|
|
2463
|
+
* @see https://developer-pro.bitmart.com/en/spot/#new-order-v2-signed
|
|
2464
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
2465
|
+
* @param {float} cost how much you want to trade in units of the quote currency
|
|
2466
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2467
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2468
|
+
*/
|
|
2459
2469
|
async createMarketBuyOrderWithCost(symbol, cost, params = {}) {
|
|
2460
|
-
/**
|
|
2461
|
-
* @method
|
|
2462
|
-
* @name bitmart#createMarketBuyOrderWithCost
|
|
2463
|
-
* @description create a market buy order by providing the symbol and cost
|
|
2464
|
-
* @see https://developer-pro.bitmart.com/en/spot/#new-order-v2-signed
|
|
2465
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
2466
|
-
* @param {float} cost how much you want to trade in units of the quote currency
|
|
2467
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2468
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2469
|
-
*/
|
|
2470
2470
|
await this.loadMarkets();
|
|
2471
2471
|
const market = this.market(symbol);
|
|
2472
2472
|
if (!market['spot']) {
|
|
@@ -2475,39 +2475,39 @@ class bitmart extends bitmart$1 {
|
|
|
2475
2475
|
params['createMarketBuyOrderRequiresPrice'] = false;
|
|
2476
2476
|
return await this.createOrder(symbol, 'market', 'buy', cost, undefined, params);
|
|
2477
2477
|
}
|
|
2478
|
+
/**
|
|
2479
|
+
* @method
|
|
2480
|
+
* @name bitmart#createOrder
|
|
2481
|
+
* @description create a trade order
|
|
2482
|
+
* @see https://developer-pro.bitmart.com/en/spot/#new-order-v2-signed
|
|
2483
|
+
* @see https://developer-pro.bitmart.com/en/spot/#place-margin-order
|
|
2484
|
+
* @see https://developer-pro.bitmart.com/en/futures/#submit-order-signed
|
|
2485
|
+
* @see https://developer-pro.bitmart.com/en/futures/#submit-plan-order-signed
|
|
2486
|
+
* @see https://developer-pro.bitmart.com/en/futuresv2/#submit-plan-order-signed
|
|
2487
|
+
* @see https://developer-pro.bitmart.com/en/futuresv2/#submit-tp-or-sl-order-signed
|
|
2488
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
2489
|
+
* @param {string} type 'market', 'limit' or 'trailing' for swap markets only
|
|
2490
|
+
* @param {string} side 'buy' or 'sell'
|
|
2491
|
+
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
2492
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
2493
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2494
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
2495
|
+
* @param {string} [params.leverage] *swap only* leverage level
|
|
2496
|
+
* @param {string} [params.clientOrderId] client order id of the order
|
|
2497
|
+
* @param {boolean} [params.reduceOnly] *swap only* reduce only
|
|
2498
|
+
* @param {boolean} [params.postOnly] make sure the order is posted to the order book and not matched immediately
|
|
2499
|
+
* @param {string} [params.triggerPrice] *swap only* the price to trigger a stop order
|
|
2500
|
+
* @param {int} [params.price_type] *swap only* 1: last price, 2: fair price, default is 1
|
|
2501
|
+
* @param {int} [params.price_way] *swap only* 1: price way long, 2: price way short
|
|
2502
|
+
* @param {int} [params.activation_price_type] *swap trailing order only* 1: last price, 2: fair price, default is 1
|
|
2503
|
+
* @param {string} [params.trailingPercent] *swap only* the percent to trail away from the current market price, min 0.1 max 5
|
|
2504
|
+
* @param {string} [params.trailingTriggerPrice] *swap only* the price to trigger a trailing order, default uses the price argument
|
|
2505
|
+
* @param {string} [params.stopLossPrice] *swap only* the price to trigger a stop-loss order
|
|
2506
|
+
* @param {string} [params.takeProfitPrice] *swap only* the price to trigger a take-profit order
|
|
2507
|
+
* @param {int} [params.plan_category] *swap tp/sl only* 1: tp/sl, 2: position tp/sl, default is 1
|
|
2508
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2509
|
+
*/
|
|
2478
2510
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
2479
|
-
/**
|
|
2480
|
-
* @method
|
|
2481
|
-
* @name bitmart#createOrder
|
|
2482
|
-
* @description create a trade order
|
|
2483
|
-
* @see https://developer-pro.bitmart.com/en/spot/#new-order-v2-signed
|
|
2484
|
-
* @see https://developer-pro.bitmart.com/en/spot/#place-margin-order
|
|
2485
|
-
* @see https://developer-pro.bitmart.com/en/futures/#submit-order-signed
|
|
2486
|
-
* @see https://developer-pro.bitmart.com/en/futures/#submit-plan-order-signed
|
|
2487
|
-
* @see https://developer-pro.bitmart.com/en/futuresv2/#submit-plan-order-signed
|
|
2488
|
-
* @see https://developer-pro.bitmart.com/en/futuresv2/#submit-tp-or-sl-order-signed
|
|
2489
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
2490
|
-
* @param {string} type 'market', 'limit' or 'trailing' for swap markets only
|
|
2491
|
-
* @param {string} side 'buy' or 'sell'
|
|
2492
|
-
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
2493
|
-
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
2494
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2495
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
2496
|
-
* @param {string} [params.leverage] *swap only* leverage level
|
|
2497
|
-
* @param {string} [params.clientOrderId] client order id of the order
|
|
2498
|
-
* @param {boolean} [params.reduceOnly] *swap only* reduce only
|
|
2499
|
-
* @param {boolean} [params.postOnly] make sure the order is posted to the order book and not matched immediately
|
|
2500
|
-
* @param {string} [params.triggerPrice] *swap only* the price to trigger a stop order
|
|
2501
|
-
* @param {int} [params.price_type] *swap only* 1: last price, 2: fair price, default is 1
|
|
2502
|
-
* @param {int} [params.price_way] *swap only* 1: price way long, 2: price way short
|
|
2503
|
-
* @param {int} [params.activation_price_type] *swap trailing order only* 1: last price, 2: fair price, default is 1
|
|
2504
|
-
* @param {string} [params.trailingPercent] *swap only* the percent to trail away from the current market price, min 0.1 max 5
|
|
2505
|
-
* @param {string} [params.trailingTriggerPrice] *swap only* the price to trigger a trailing order, default uses the price argument
|
|
2506
|
-
* @param {string} [params.stopLossPrice] *swap only* the price to trigger a stop-loss order
|
|
2507
|
-
* @param {string} [params.takeProfitPrice] *swap only* the price to trigger a take-profit order
|
|
2508
|
-
* @param {int} [params.plan_category] *swap tp/sl only* 1: tp/sl, 2: position tp/sl, default is 1
|
|
2509
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2510
|
-
*/
|
|
2511
2511
|
await this.loadMarkets();
|
|
2512
2512
|
const market = this.market(symbol);
|
|
2513
2513
|
const result = this.handleMarginModeAndParams('createOrder', params);
|
|
@@ -2563,16 +2563,16 @@ class bitmart extends bitmart$1 {
|
|
|
2563
2563
|
order['price'] = price;
|
|
2564
2564
|
return order;
|
|
2565
2565
|
}
|
|
2566
|
+
/**
|
|
2567
|
+
* @method
|
|
2568
|
+
* @name bitmart#createOrders
|
|
2569
|
+
* @description create a list of trade orders
|
|
2570
|
+
* @see https://developer-pro.bitmart.com/en/spot/#new-batch-order-v4-signed
|
|
2571
|
+
* @param {Array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
|
|
2572
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2573
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2574
|
+
*/
|
|
2566
2575
|
async createOrders(orders, params = {}) {
|
|
2567
|
-
/**
|
|
2568
|
-
* @method
|
|
2569
|
-
* @name bitmart#createOrders
|
|
2570
|
-
* @description create a list of trade orders
|
|
2571
|
-
* @see https://developer-pro.bitmart.com/en/spot/#new-batch-order-v4-signed
|
|
2572
|
-
* @param {Array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
|
|
2573
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2574
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2575
|
-
*/
|
|
2576
2576
|
await this.loadMarkets();
|
|
2577
2577
|
const ordersRequests = [];
|
|
2578
2578
|
let symbol = undefined;
|
|
@@ -2863,24 +2863,24 @@ class bitmart extends bitmart$1 {
|
|
|
2863
2863
|
}
|
|
2864
2864
|
return this.extend(request, params);
|
|
2865
2865
|
}
|
|
2866
|
+
/**
|
|
2867
|
+
* @method
|
|
2868
|
+
* @name bitmart#cancelOrder
|
|
2869
|
+
* @description cancels an open order
|
|
2870
|
+
* @see https://developer-pro.bitmart.com/en/futures/#cancel-order-signed
|
|
2871
|
+
* @see https://developer-pro.bitmart.com/en/spot/#cancel-order-v3-signed
|
|
2872
|
+
* @see https://developer-pro.bitmart.com/en/futures/#cancel-plan-order-signed
|
|
2873
|
+
* @see https://developer-pro.bitmart.com/en/futures/#cancel-plan-order-signed
|
|
2874
|
+
* @see https://developer-pro.bitmart.com/en/futures/#cancel-order-signed
|
|
2875
|
+
* @see https://developer-pro.bitmart.com/en/futures/#cancel-plan-order-signed
|
|
2876
|
+
* @param {string} id order id
|
|
2877
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
2878
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2879
|
+
* @param {string} [params.clientOrderId] *spot only* the client order id of the order to cancel
|
|
2880
|
+
* @param {boolean} [params.stop] *swap only* whether the order is a stop order
|
|
2881
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2882
|
+
*/
|
|
2866
2883
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
2867
|
-
/**
|
|
2868
|
-
* @method
|
|
2869
|
-
* @name bitmart#cancelOrder
|
|
2870
|
-
* @description cancels an open order
|
|
2871
|
-
* @see https://developer-pro.bitmart.com/en/futures/#cancel-order-signed
|
|
2872
|
-
* @see https://developer-pro.bitmart.com/en/spot/#cancel-order-v3-signed
|
|
2873
|
-
* @see https://developer-pro.bitmart.com/en/futures/#cancel-plan-order-signed
|
|
2874
|
-
* @see https://developer-pro.bitmart.com/en/futures/#cancel-plan-order-signed
|
|
2875
|
-
* @see https://developer-pro.bitmart.com/en/futures/#cancel-order-signed
|
|
2876
|
-
* @see https://developer-pro.bitmart.com/en/futures/#cancel-plan-order-signed
|
|
2877
|
-
* @param {string} id order id
|
|
2878
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
2879
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2880
|
-
* @param {string} [params.clientOrderId] *spot only* the client order id of the order to cancel
|
|
2881
|
-
* @param {boolean} [params.stop] *swap only* whether the order is a stop order
|
|
2882
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2883
|
-
*/
|
|
2884
2884
|
if (symbol === undefined) {
|
|
2885
2885
|
throw new errors.ArgumentsRequired(this.id + ' cancelOrder() requires a symbol argument');
|
|
2886
2886
|
}
|
|
@@ -2957,18 +2957,18 @@ class bitmart extends bitmart$1 {
|
|
|
2957
2957
|
const order = this.safeOrder({ 'id': id, 'symbol': market['symbol'], 'info': {} }, market);
|
|
2958
2958
|
return order;
|
|
2959
2959
|
}
|
|
2960
|
+
/**
|
|
2961
|
+
* @method
|
|
2962
|
+
* @name bitmart#cancelOrders
|
|
2963
|
+
* @description cancel multiple orders
|
|
2964
|
+
* @see https://developer-pro.bitmart.com/en/spot/#cancel-batch-order-v4-signed
|
|
2965
|
+
* @param {string[]} ids order ids
|
|
2966
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
2967
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2968
|
+
* @param {string[]} [params.clientOrderIds] client order ids
|
|
2969
|
+
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2970
|
+
*/
|
|
2960
2971
|
async cancelOrders(ids, symbol = undefined, params = {}) {
|
|
2961
|
-
/**
|
|
2962
|
-
* @method
|
|
2963
|
-
* @name bitmart#cancelOrders
|
|
2964
|
-
* @description cancel multiple orders
|
|
2965
|
-
* @see https://developer-pro.bitmart.com/en/spot/#cancel-batch-order-v4-signed
|
|
2966
|
-
* @param {string[]} ids order ids
|
|
2967
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
2968
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2969
|
-
* @param {string[]} [params.clientOrderIds] client order ids
|
|
2970
|
-
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2971
|
-
*/
|
|
2972
2972
|
if (symbol === undefined) {
|
|
2973
2973
|
throw new errors.ArgumentsRequired(this.id + ' cancelOrders() requires a symbol argument');
|
|
2974
2974
|
}
|
|
@@ -3019,20 +3019,20 @@ class bitmart extends bitmart$1 {
|
|
|
3019
3019
|
}
|
|
3020
3020
|
return allOrders;
|
|
3021
3021
|
}
|
|
3022
|
+
/**
|
|
3023
|
+
* @method
|
|
3024
|
+
* @name bitmart#cancelAllOrders
|
|
3025
|
+
* @description cancel all open orders in a market
|
|
3026
|
+
* @see https://developer-pro.bitmart.com/en/spot/#cancel-all-orders
|
|
3027
|
+
* @see https://developer-pro.bitmart.com/en/spot/#new-batch-order-v4-signed
|
|
3028
|
+
* @see https://developer-pro.bitmart.com/en/futures/#cancel-all-orders-signed
|
|
3029
|
+
* @see https://developer-pro.bitmart.com/en/futuresv2/#cancel-all-orders-signed
|
|
3030
|
+
* @param {string} symbol unified market symbol of the market to cancel orders in
|
|
3031
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3032
|
+
* @param {string} [params.side] *spot only* 'buy' or 'sell'
|
|
3033
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3034
|
+
*/
|
|
3022
3035
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
3023
|
-
/**
|
|
3024
|
-
* @method
|
|
3025
|
-
* @name bitmart#cancelAllOrders
|
|
3026
|
-
* @description cancel all open orders in a market
|
|
3027
|
-
* @see https://developer-pro.bitmart.com/en/spot/#cancel-all-orders
|
|
3028
|
-
* @see https://developer-pro.bitmart.com/en/spot/#new-batch-order-v4-signed
|
|
3029
|
-
* @see https://developer-pro.bitmart.com/en/futures/#cancel-all-orders-signed
|
|
3030
|
-
* @see https://developer-pro.bitmart.com/en/futuresv2/#cancel-all-orders-signed
|
|
3031
|
-
* @param {string} symbol unified market symbol of the market to cancel orders in
|
|
3032
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3033
|
-
* @param {string} [params.side] *spot only* 'buy' or 'sell'
|
|
3034
|
-
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3035
|
-
*/
|
|
3036
3036
|
await this.loadMarkets();
|
|
3037
3037
|
const request = {};
|
|
3038
3038
|
let market = undefined;
|
|
@@ -3131,27 +3131,27 @@ class bitmart extends bitmart$1 {
|
|
|
3131
3131
|
const orders = this.safeList(data, 'orders', []);
|
|
3132
3132
|
return this.parseOrders(orders, market, since, limit);
|
|
3133
3133
|
}
|
|
3134
|
+
/**
|
|
3135
|
+
* @method
|
|
3136
|
+
* @name bitmart#fetchOpenOrders
|
|
3137
|
+
* @see https://developer-pro.bitmart.com/en/spot/#current-open-orders-v4-signed
|
|
3138
|
+
* @see https://developer-pro.bitmart.com/en/futures/#get-all-open-orders-keyed
|
|
3139
|
+
* @see https://developer-pro.bitmart.com/en/futures/#get-all-current-plan-orders-keyed
|
|
3140
|
+
* @description fetch all unfilled currently open orders
|
|
3141
|
+
* @param {string} symbol unified market symbol
|
|
3142
|
+
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
3143
|
+
* @param {int} [limit] the maximum number of open order structures to retrieve
|
|
3144
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3145
|
+
* @param {boolean} [params.marginMode] *spot* whether to fetch trades for margin orders or spot orders, defaults to spot orders (only isolated margin orders are supported)
|
|
3146
|
+
* @param {int} [params.until] *spot* the latest time in ms to fetch orders for
|
|
3147
|
+
* @param {string} [params.type] *swap* order type, 'limit' or 'market'
|
|
3148
|
+
* @param {string} [params.order_state] *swap* the order state, 'all' or 'partially_filled', default is 'all'
|
|
3149
|
+
* @param {string} [params.orderType] *swap only* 'limit', 'market', or 'trailing'
|
|
3150
|
+
* @param {boolean} [params.trailing] *swap only* set to true if you want to fetch trailing orders
|
|
3151
|
+
* @param {boolean} [params.trigger] *swap only* set to true if you want to fetch trigger orders
|
|
3152
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3153
|
+
*/
|
|
3134
3154
|
async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3135
|
-
/**
|
|
3136
|
-
* @method
|
|
3137
|
-
* @name bitmart#fetchOpenOrders
|
|
3138
|
-
* @see https://developer-pro.bitmart.com/en/spot/#current-open-orders-v4-signed
|
|
3139
|
-
* @see https://developer-pro.bitmart.com/en/futures/#get-all-open-orders-keyed
|
|
3140
|
-
* @see https://developer-pro.bitmart.com/en/futures/#get-all-current-plan-orders-keyed
|
|
3141
|
-
* @description fetch all unfilled currently open orders
|
|
3142
|
-
* @param {string} symbol unified market symbol
|
|
3143
|
-
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
3144
|
-
* @param {int} [limit] the maximum number of open order structures to retrieve
|
|
3145
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3146
|
-
* @param {boolean} [params.marginMode] *spot* whether to fetch trades for margin orders or spot orders, defaults to spot orders (only isolated margin orders are supported)
|
|
3147
|
-
* @param {int} [params.until] *spot* the latest time in ms to fetch orders for
|
|
3148
|
-
* @param {string} [params.type] *swap* order type, 'limit' or 'market'
|
|
3149
|
-
* @param {string} [params.order_state] *swap* the order state, 'all' or 'partially_filled', default is 'all'
|
|
3150
|
-
* @param {string} [params.orderType] *swap only* 'limit', 'market', or 'trailing'
|
|
3151
|
-
* @param {boolean} [params.trailing] *swap only* set to true if you want to fetch trailing orders
|
|
3152
|
-
* @param {boolean} [params.trigger] *swap only* set to true if you want to fetch trigger orders
|
|
3153
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3154
|
-
*/
|
|
3155
3155
|
await this.loadMarkets();
|
|
3156
3156
|
let market = undefined;
|
|
3157
3157
|
const request = {};
|
|
@@ -3260,22 +3260,22 @@ class bitmart extends bitmart$1 {
|
|
|
3260
3260
|
const data = this.safeList(response, 'data', []);
|
|
3261
3261
|
return this.parseOrders(data, market, since, limit);
|
|
3262
3262
|
}
|
|
3263
|
+
/**
|
|
3264
|
+
* @method
|
|
3265
|
+
* @name bitmart#fetchClosedOrders
|
|
3266
|
+
* @see https://developer-pro.bitmart.com/en/spot/#account-orders-v4-signed
|
|
3267
|
+
* @see https://developer-pro.bitmart.com/en/futures/#get-order-history-keyed
|
|
3268
|
+
* @see https://developer-pro.bitmart.com/en/futuresv2/#get-order-history-keyed
|
|
3269
|
+
* @description fetches information on multiple closed orders made by the user
|
|
3270
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
3271
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
3272
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
3273
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3274
|
+
* @param {int} [params.until] timestamp in ms of the latest entry
|
|
3275
|
+
* @param {string} [params.marginMode] *spot only* 'cross' or 'isolated', for margin trading
|
|
3276
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3277
|
+
*/
|
|
3263
3278
|
async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3264
|
-
/**
|
|
3265
|
-
* @method
|
|
3266
|
-
* @name bitmart#fetchClosedOrders
|
|
3267
|
-
* @see https://developer-pro.bitmart.com/en/spot/#account-orders-v4-signed
|
|
3268
|
-
* @see https://developer-pro.bitmart.com/en/futures/#get-order-history-keyed
|
|
3269
|
-
* @see https://developer-pro.bitmart.com/en/futuresv2/#get-order-history-keyed
|
|
3270
|
-
* @description fetches information on multiple closed orders made by the user
|
|
3271
|
-
* @param {string} symbol unified market symbol of the market orders were made in
|
|
3272
|
-
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
3273
|
-
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
3274
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3275
|
-
* @param {int} [params.until] timestamp in ms of the latest entry
|
|
3276
|
-
* @param {string} [params.marginMode] *spot only* 'cross' or 'isolated', for margin trading
|
|
3277
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3278
|
-
*/
|
|
3279
3279
|
await this.loadMarkets();
|
|
3280
3280
|
let market = undefined;
|
|
3281
3281
|
const request = {};
|
|
@@ -3315,36 +3315,36 @@ class bitmart extends bitmart$1 {
|
|
|
3315
3315
|
const data = this.safeList(response, 'data', []);
|
|
3316
3316
|
return this.parseOrders(data, market, since, limit);
|
|
3317
3317
|
}
|
|
3318
|
+
/**
|
|
3319
|
+
* @method
|
|
3320
|
+
* @name bitmart#fetchCanceledOrders
|
|
3321
|
+
* @description fetches information on multiple canceled orders made by the user
|
|
3322
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
3323
|
+
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
|
|
3324
|
+
* @param {int} [limit] max number of orders to return, default is undefined
|
|
3325
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3326
|
+
* @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3327
|
+
*/
|
|
3318
3328
|
async fetchCanceledOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3319
|
-
/**
|
|
3320
|
-
* @method
|
|
3321
|
-
* @name bitmart#fetchCanceledOrders
|
|
3322
|
-
* @description fetches information on multiple canceled orders made by the user
|
|
3323
|
-
* @param {string} symbol unified market symbol of the market orders were made in
|
|
3324
|
-
* @param {int} [since] timestamp in ms of the earliest order, default is undefined
|
|
3325
|
-
* @param {int} [limit] max number of orders to return, default is undefined
|
|
3326
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3327
|
-
* @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3328
|
-
*/
|
|
3329
3329
|
return await this.fetchOrdersByStatus('canceled', symbol, since, limit, params);
|
|
3330
3330
|
}
|
|
3331
|
+
/**
|
|
3332
|
+
* @method
|
|
3333
|
+
* @name bitmart#fetchOrder
|
|
3334
|
+
* @description fetches information on an order made by the user
|
|
3335
|
+
* @see https://developer-pro.bitmart.com/en/spot/#query-order-by-id-v4-signed
|
|
3336
|
+
* @see https://developer-pro.bitmart.com/en/spot/#query-order-by-clientorderid-v4-signed
|
|
3337
|
+
* @see https://developer-pro.bitmart.com/en/futures/#get-order-detail-keyed
|
|
3338
|
+
* @see https://developer-pro.bitmart.com/en/futuresv2/#get-order-detail-keyed
|
|
3339
|
+
* @param {string} id the id of the order
|
|
3340
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
3341
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3342
|
+
* @param {string} [params.clientOrderId] *spot* fetch the order by client order id instead of order id
|
|
3343
|
+
* @param {string} [params.orderType] *swap only* 'limit', 'market', 'liquidate', 'bankruptcy', 'adl' or 'trailing'
|
|
3344
|
+
* @param {boolean} [params.trailing] *swap only* set to true if you want to fetch a trailing order
|
|
3345
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3346
|
+
*/
|
|
3331
3347
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
3332
|
-
/**
|
|
3333
|
-
* @method
|
|
3334
|
-
* @name bitmart#fetchOrder
|
|
3335
|
-
* @description fetches information on an order made by the user
|
|
3336
|
-
* @see https://developer-pro.bitmart.com/en/spot/#query-order-by-id-v4-signed
|
|
3337
|
-
* @see https://developer-pro.bitmart.com/en/spot/#query-order-by-clientorderid-v4-signed
|
|
3338
|
-
* @see https://developer-pro.bitmart.com/en/futures/#get-order-detail-keyed
|
|
3339
|
-
* @see https://developer-pro.bitmart.com/en/futuresv2/#get-order-detail-keyed
|
|
3340
|
-
* @param {string} id the id of the order
|
|
3341
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
3342
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3343
|
-
* @param {string} [params.clientOrderId] *spot* fetch the order by client order id instead of order id
|
|
3344
|
-
* @param {string} [params.orderType] *swap only* 'limit', 'market', 'liquidate', 'bankruptcy', 'adl' or 'trailing'
|
|
3345
|
-
* @param {boolean} [params.trailing] *swap only* set to true if you want to fetch a trailing order
|
|
3346
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3347
|
-
*/
|
|
3348
3348
|
await this.loadMarkets();
|
|
3349
3349
|
const request = {};
|
|
3350
3350
|
let type = undefined;
|
|
@@ -3436,16 +3436,16 @@ class bitmart extends bitmart$1 {
|
|
|
3436
3436
|
const data = this.safeDict(response, 'data', {});
|
|
3437
3437
|
return this.parseOrder(data, market);
|
|
3438
3438
|
}
|
|
3439
|
+
/**
|
|
3440
|
+
* @method
|
|
3441
|
+
* @name bitmart#fetchDepositAddress
|
|
3442
|
+
* @description fetch the deposit address for a currency associated with this account
|
|
3443
|
+
* @see https://developer-pro.bitmart.com/en/spot/#deposit-address-keyed
|
|
3444
|
+
* @param {string} code unified currency code
|
|
3445
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3446
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
3447
|
+
*/
|
|
3439
3448
|
async fetchDepositAddress(code, params = {}) {
|
|
3440
|
-
/**
|
|
3441
|
-
* @method
|
|
3442
|
-
* @name bitmart#fetchDepositAddress
|
|
3443
|
-
* @description fetch the deposit address for a currency associated with this account
|
|
3444
|
-
* @see https://developer-pro.bitmart.com/en/spot/#deposit-address-keyed
|
|
3445
|
-
* @param {string} code unified currency code
|
|
3446
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3447
|
-
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
3448
|
-
*/
|
|
3449
3449
|
await this.loadMarkets();
|
|
3450
3450
|
const currency = this.currency(code);
|
|
3451
3451
|
const request = {
|
|
@@ -3513,18 +3513,18 @@ class bitmart extends bitmart$1 {
|
|
|
3513
3513
|
'tag': this.safeString(depositAddress, 'address_memo'),
|
|
3514
3514
|
};
|
|
3515
3515
|
}
|
|
3516
|
+
/**
|
|
3517
|
+
* @method
|
|
3518
|
+
* @name bitmart#withdraw
|
|
3519
|
+
* @description make a withdrawal
|
|
3520
|
+
* @param {string} code unified currency code
|
|
3521
|
+
* @param {float} amount the amount to withdraw
|
|
3522
|
+
* @param {string} address the address to withdraw to
|
|
3523
|
+
* @param {string} tag
|
|
3524
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3525
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
3526
|
+
*/
|
|
3516
3527
|
async withdraw(code, amount, address, tag = undefined, params = {}) {
|
|
3517
|
-
/**
|
|
3518
|
-
* @method
|
|
3519
|
-
* @name bitmart#withdraw
|
|
3520
|
-
* @description make a withdrawal
|
|
3521
|
-
* @param {string} code unified currency code
|
|
3522
|
-
* @param {float} amount the amount to withdraw
|
|
3523
|
-
* @param {string} address the address to withdraw to
|
|
3524
|
-
* @param {string} tag
|
|
3525
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3526
|
-
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
3527
|
-
*/
|
|
3528
3528
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
3529
3529
|
this.checkAddress(address);
|
|
3530
3530
|
await this.loadMarkets();
|
|
@@ -3624,16 +3624,16 @@ class bitmart extends bitmart$1 {
|
|
|
3624
3624
|
const records = this.safeList(data, 'records', []);
|
|
3625
3625
|
return this.parseTransactions(records, currency, since, limit);
|
|
3626
3626
|
}
|
|
3627
|
+
/**
|
|
3628
|
+
* @method
|
|
3629
|
+
* @name bitmart#fetchDeposit
|
|
3630
|
+
* @description fetch information on a deposit
|
|
3631
|
+
* @param {string} id deposit id
|
|
3632
|
+
* @param {string} code not used by bitmart fetchDeposit ()
|
|
3633
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3634
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
3635
|
+
*/
|
|
3627
3636
|
async fetchDeposit(id, code = undefined, params = {}) {
|
|
3628
|
-
/**
|
|
3629
|
-
* @method
|
|
3630
|
-
* @name bitmart#fetchDeposit
|
|
3631
|
-
* @description fetch information on a deposit
|
|
3632
|
-
* @param {string} id deposit id
|
|
3633
|
-
* @param {string} code not used by bitmart fetchDeposit ()
|
|
3634
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3635
|
-
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
3636
|
-
*/
|
|
3637
3637
|
await this.loadMarkets();
|
|
3638
3638
|
const request = {
|
|
3639
3639
|
'id': id,
|
|
@@ -3665,29 +3665,29 @@ class bitmart extends bitmart$1 {
|
|
|
3665
3665
|
const record = this.safeDict(data, 'record', {});
|
|
3666
3666
|
return this.parseTransaction(record);
|
|
3667
3667
|
}
|
|
3668
|
+
/**
|
|
3669
|
+
* @method
|
|
3670
|
+
* @name bitmart#fetchDeposits
|
|
3671
|
+
* @description fetch all deposits made to an account
|
|
3672
|
+
* @param {string} code unified currency code
|
|
3673
|
+
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
3674
|
+
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
3675
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3676
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
3677
|
+
*/
|
|
3668
3678
|
async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3669
|
-
/**
|
|
3670
|
-
* @method
|
|
3671
|
-
* @name bitmart#fetchDeposits
|
|
3672
|
-
* @description fetch all deposits made to an account
|
|
3673
|
-
* @param {string} code unified currency code
|
|
3674
|
-
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
3675
|
-
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
3676
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3677
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
3678
|
-
*/
|
|
3679
3679
|
return await this.fetchTransactionsByType('deposit', code, since, limit, params);
|
|
3680
3680
|
}
|
|
3681
|
+
/**
|
|
3682
|
+
* @method
|
|
3683
|
+
* @name bitmart#fetchWithdrawal
|
|
3684
|
+
* @description fetch data on a currency withdrawal via the withdrawal id
|
|
3685
|
+
* @param {string} id withdrawal id
|
|
3686
|
+
* @param {string} code not used by bitmart.fetchWithdrawal
|
|
3687
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3688
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
3689
|
+
*/
|
|
3681
3690
|
async fetchWithdrawal(id, code = undefined, params = {}) {
|
|
3682
|
-
/**
|
|
3683
|
-
* @method
|
|
3684
|
-
* @name bitmart#fetchWithdrawal
|
|
3685
|
-
* @description fetch data on a currency withdrawal via the withdrawal id
|
|
3686
|
-
* @param {string} id withdrawal id
|
|
3687
|
-
* @param {string} code not used by bitmart.fetchWithdrawal
|
|
3688
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3689
|
-
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
3690
|
-
*/
|
|
3691
3691
|
await this.loadMarkets();
|
|
3692
3692
|
const request = {
|
|
3693
3693
|
'id': id,
|
|
@@ -3719,17 +3719,17 @@ class bitmart extends bitmart$1 {
|
|
|
3719
3719
|
const record = this.safeDict(data, 'record', {});
|
|
3720
3720
|
return this.parseTransaction(record);
|
|
3721
3721
|
}
|
|
3722
|
+
/**
|
|
3723
|
+
* @method
|
|
3724
|
+
* @name bitmart#fetchWithdrawals
|
|
3725
|
+
* @description fetch all withdrawals made from an account
|
|
3726
|
+
* @param {string} code unified currency code
|
|
3727
|
+
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
3728
|
+
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
3729
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3730
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
3731
|
+
*/
|
|
3722
3732
|
async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3723
|
-
/**
|
|
3724
|
-
* @method
|
|
3725
|
-
* @name bitmart#fetchWithdrawals
|
|
3726
|
-
* @description fetch all withdrawals made from an account
|
|
3727
|
-
* @param {string} code unified currency code
|
|
3728
|
-
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
3729
|
-
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
3730
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3731
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
3732
|
-
*/
|
|
3733
3733
|
return await this.fetchTransactionsByType('withdraw', code, since, limit, params);
|
|
3734
3734
|
}
|
|
3735
3735
|
parseTransactionStatus(status) {
|
|
@@ -3818,18 +3818,18 @@ class bitmart extends bitmart$1 {
|
|
|
3818
3818
|
'fee': fee,
|
|
3819
3819
|
};
|
|
3820
3820
|
}
|
|
3821
|
+
/**
|
|
3822
|
+
* @method
|
|
3823
|
+
* @name bitmart#repayIsolatedMargin
|
|
3824
|
+
* @description repay borrowed margin and interest
|
|
3825
|
+
* @see https://developer-pro.bitmart.com/en/spot/#margin-repay-isolated
|
|
3826
|
+
* @param {string} symbol unified market symbol
|
|
3827
|
+
* @param {string} code unified currency code of the currency to repay
|
|
3828
|
+
* @param {string} amount the amount to repay
|
|
3829
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3830
|
+
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
3831
|
+
*/
|
|
3821
3832
|
async repayIsolatedMargin(symbol, code, amount, params = {}) {
|
|
3822
|
-
/**
|
|
3823
|
-
* @method
|
|
3824
|
-
* @name bitmart#repayIsolatedMargin
|
|
3825
|
-
* @description repay borrowed margin and interest
|
|
3826
|
-
* @see https://developer-pro.bitmart.com/en/spot/#margin-repay-isolated
|
|
3827
|
-
* @param {string} symbol unified market symbol
|
|
3828
|
-
* @param {string} code unified currency code of the currency to repay
|
|
3829
|
-
* @param {string} amount the amount to repay
|
|
3830
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3831
|
-
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
3832
|
-
*/
|
|
3833
3833
|
await this.loadMarkets();
|
|
3834
3834
|
const market = this.market(symbol);
|
|
3835
3835
|
const currency = this.currency(code);
|
|
@@ -3856,18 +3856,18 @@ class bitmart extends bitmart$1 {
|
|
|
3856
3856
|
'symbol': symbol,
|
|
3857
3857
|
});
|
|
3858
3858
|
}
|
|
3859
|
+
/**
|
|
3860
|
+
* @method
|
|
3861
|
+
* @name bitmart#borrowIsolatedMargin
|
|
3862
|
+
* @description create a loan to borrow margin
|
|
3863
|
+
* @see https://developer-pro.bitmart.com/en/spot/#margin-borrow-isolated
|
|
3864
|
+
* @param {string} symbol unified market symbol
|
|
3865
|
+
* @param {string} code unified currency code of the currency to borrow
|
|
3866
|
+
* @param {string} amount the amount to borrow
|
|
3867
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3868
|
+
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
3869
|
+
*/
|
|
3859
3870
|
async borrowIsolatedMargin(symbol, code, amount, params = {}) {
|
|
3860
|
-
/**
|
|
3861
|
-
* @method
|
|
3862
|
-
* @name bitmart#borrowIsolatedMargin
|
|
3863
|
-
* @description create a loan to borrow margin
|
|
3864
|
-
* @see https://developer-pro.bitmart.com/en/spot/#margin-borrow-isolated
|
|
3865
|
-
* @param {string} symbol unified market symbol
|
|
3866
|
-
* @param {string} code unified currency code of the currency to borrow
|
|
3867
|
-
* @param {string} amount the amount to borrow
|
|
3868
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3869
|
-
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
3870
|
-
*/
|
|
3871
3871
|
await this.loadMarkets();
|
|
3872
3872
|
const market = this.market(symbol);
|
|
3873
3873
|
const currency = this.currency(code);
|
|
@@ -3918,16 +3918,16 @@ class bitmart extends bitmart$1 {
|
|
|
3918
3918
|
'info': info,
|
|
3919
3919
|
};
|
|
3920
3920
|
}
|
|
3921
|
+
/**
|
|
3922
|
+
* @method
|
|
3923
|
+
* @name bitmart#fetchIsolatedBorrowRate
|
|
3924
|
+
* @description fetch the rate of interest to borrow a currency for margin trading
|
|
3925
|
+
* @see https://developer-pro.bitmart.com/en/spot/#get-trading-pair-borrowing-rate-and-amount-keyed
|
|
3926
|
+
* @param {string} symbol unified symbol of the market to fetch the borrow rate for
|
|
3927
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3928
|
+
* @returns {object} an [isolated borrow rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#isolated-borrow-rate-structure}
|
|
3929
|
+
*/
|
|
3921
3930
|
async fetchIsolatedBorrowRate(symbol, params = {}) {
|
|
3922
|
-
/**
|
|
3923
|
-
* @method
|
|
3924
|
-
* @name bitmart#fetchIsolatedBorrowRate
|
|
3925
|
-
* @description fetch the rate of interest to borrow a currency for margin trading
|
|
3926
|
-
* @see https://developer-pro.bitmart.com/en/spot/#get-trading-pair-borrowing-rate-and-amount-keyed
|
|
3927
|
-
* @param {string} symbol unified symbol of the market to fetch the borrow rate for
|
|
3928
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3929
|
-
* @returns {object} an [isolated borrow rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#isolated-borrow-rate-structure}
|
|
3930
|
-
*/
|
|
3931
3931
|
await this.loadMarkets();
|
|
3932
3932
|
const market = this.market(symbol);
|
|
3933
3933
|
const request = {
|
|
@@ -4013,15 +4013,15 @@ class bitmart extends bitmart$1 {
|
|
|
4013
4013
|
'info': info,
|
|
4014
4014
|
};
|
|
4015
4015
|
}
|
|
4016
|
+
/**
|
|
4017
|
+
* @method
|
|
4018
|
+
* @name bitmart#fetchIsolatedBorrowRates
|
|
4019
|
+
* @description fetch the borrow interest rates of all currencies, currently only works for isolated margin
|
|
4020
|
+
* @see https://developer-pro.bitmart.com/en/spot/#get-trading-pair-borrowing-rate-and-amount-keyed
|
|
4021
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4022
|
+
* @returns {object} a list of [isolated borrow rate structures]{@link https://docs.ccxt.com/#/?id=isolated-borrow-rate-structure}
|
|
4023
|
+
*/
|
|
4016
4024
|
async fetchIsolatedBorrowRates(params = {}) {
|
|
4017
|
-
/**
|
|
4018
|
-
* @method
|
|
4019
|
-
* @name bitmart#fetchIsolatedBorrowRates
|
|
4020
|
-
* @description fetch the borrow interest rates of all currencies, currently only works for isolated margin
|
|
4021
|
-
* @see https://developer-pro.bitmart.com/en/spot/#get-trading-pair-borrowing-rate-and-amount-keyed
|
|
4022
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4023
|
-
* @returns {object} a list of [isolated borrow rate structures]{@link https://docs.ccxt.com/#/?id=isolated-borrow-rate-structure}
|
|
4024
|
-
*/
|
|
4025
4025
|
await this.loadMarkets();
|
|
4026
4026
|
const response = await this.privateGetSpotV1MarginIsolatedPairs(params);
|
|
4027
4027
|
//
|
|
@@ -4060,21 +4060,21 @@ class bitmart extends bitmart$1 {
|
|
|
4060
4060
|
const symbols = this.safeList(data, 'symbols', []);
|
|
4061
4061
|
return this.parseIsolatedBorrowRates(symbols);
|
|
4062
4062
|
}
|
|
4063
|
+
/**
|
|
4064
|
+
* @method
|
|
4065
|
+
* @name bitmart#transfer
|
|
4066
|
+
* @description transfer currency internally between wallets on the same account, currently only supports transfer between spot and margin
|
|
4067
|
+
* @see https://developer-pro.bitmart.com/en/spot/#margin-asset-transfer-signed
|
|
4068
|
+
* @see https://developer-pro.bitmart.com/en/futures/#transfer-signed
|
|
4069
|
+
* @see https://developer-pro.bitmart.com/en/futuresv2/#transfer-signed
|
|
4070
|
+
* @param {string} code unified currency code
|
|
4071
|
+
* @param {float} amount amount to transfer
|
|
4072
|
+
* @param {string} fromAccount account to transfer from
|
|
4073
|
+
* @param {string} toAccount account to transfer to
|
|
4074
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4075
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
4076
|
+
*/
|
|
4063
4077
|
async transfer(code, amount, fromAccount, toAccount, params = {}) {
|
|
4064
|
-
/**
|
|
4065
|
-
* @method
|
|
4066
|
-
* @name bitmart#transfer
|
|
4067
|
-
* @description transfer currency internally between wallets on the same account, currently only supports transfer between spot and margin
|
|
4068
|
-
* @see https://developer-pro.bitmart.com/en/spot/#margin-asset-transfer-signed
|
|
4069
|
-
* @see https://developer-pro.bitmart.com/en/futures/#transfer-signed
|
|
4070
|
-
* @see https://developer-pro.bitmart.com/en/futuresv2/#transfer-signed
|
|
4071
|
-
* @param {string} code unified currency code
|
|
4072
|
-
* @param {float} amount amount to transfer
|
|
4073
|
-
* @param {string} fromAccount account to transfer from
|
|
4074
|
-
* @param {string} toAccount account to transfer to
|
|
4075
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4076
|
-
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
4077
|
-
*/
|
|
4078
4078
|
await this.loadMarkets();
|
|
4079
4079
|
const currency = this.currency(code);
|
|
4080
4080
|
const amountToPrecision = this.currencyToPrecision(code, amount);
|
|
@@ -4202,20 +4202,20 @@ class bitmart extends bitmart$1 {
|
|
|
4202
4202
|
'status': this.parseTransferStatus(this.safeString(transfer, 'state')),
|
|
4203
4203
|
};
|
|
4204
4204
|
}
|
|
4205
|
+
/**
|
|
4206
|
+
* @method
|
|
4207
|
+
* @name bitmart#fetchTransfers
|
|
4208
|
+
* @description fetch a history of internal transfers made on an account, only transfers between spot and swap are supported
|
|
4209
|
+
* @see https://developer-pro.bitmart.com/en/futures/#get-transfer-list-signed
|
|
4210
|
+
* @param {string} code unified currency code of the currency transferred
|
|
4211
|
+
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
4212
|
+
* @param {int} [limit] the maximum number of transfer structures to retrieve
|
|
4213
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4214
|
+
* @param {int} [params.page] the required number of pages, default is 1, max is 1000
|
|
4215
|
+
* @param {int} [params.until] the latest time in ms to fetch transfers for
|
|
4216
|
+
* @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
4217
|
+
*/
|
|
4205
4218
|
async fetchTransfers(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
4206
|
-
/**
|
|
4207
|
-
* @method
|
|
4208
|
-
* @name bitmart#fetchTransfers
|
|
4209
|
-
* @description fetch a history of internal transfers made on an account, only transfers between spot and swap are supported
|
|
4210
|
-
* @see https://developer-pro.bitmart.com/en/futures/#get-transfer-list-signed
|
|
4211
|
-
* @param {string} code unified currency code of the currency transferred
|
|
4212
|
-
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
4213
|
-
* @param {int} [limit] the maximum number of transfer structures to retrieve
|
|
4214
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4215
|
-
* @param {int} [params.page] the required number of pages, default is 1, max is 1000
|
|
4216
|
-
* @param {int} [params.until] the latest time in ms to fetch transfers for
|
|
4217
|
-
* @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
4218
|
-
*/
|
|
4219
4219
|
await this.loadMarkets();
|
|
4220
4220
|
if (limit === undefined) {
|
|
4221
4221
|
limit = 10;
|
|
@@ -4265,19 +4265,19 @@ class bitmart extends bitmart$1 {
|
|
|
4265
4265
|
const records = this.safeList(data, 'records', []);
|
|
4266
4266
|
return this.parseTransfers(records, currency, since, limit);
|
|
4267
4267
|
}
|
|
4268
|
+
/**
|
|
4269
|
+
* @method
|
|
4270
|
+
* @name bitmart#fetchBorrowInterest
|
|
4271
|
+
* @description fetch the interest owed by the user for borrowing currency for margin trading
|
|
4272
|
+
* @see https://developer-pro.bitmart.com/en/spot/#get-borrow-record-isolated
|
|
4273
|
+
* @param {string} code unified currency code
|
|
4274
|
+
* @param {string} symbol unified market symbol when fetch interest in isolated markets
|
|
4275
|
+
* @param {int} [since] the earliest time in ms to fetch borrrow interest for
|
|
4276
|
+
* @param {int} [limit] the maximum number of structures to retrieve
|
|
4277
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4278
|
+
* @returns {object[]} a list of [borrow interest structures]{@link https://docs.ccxt.com/#/?id=borrow-interest-structure}
|
|
4279
|
+
*/
|
|
4268
4280
|
async fetchBorrowInterest(code = undefined, symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
4269
|
-
/**
|
|
4270
|
-
* @method
|
|
4271
|
-
* @name bitmart#fetchBorrowInterest
|
|
4272
|
-
* @description fetch the interest owed by the user for borrowing currency for margin trading
|
|
4273
|
-
* @see https://developer-pro.bitmart.com/en/spot/#get-borrow-record-isolated
|
|
4274
|
-
* @param {string} code unified currency code
|
|
4275
|
-
* @param {string} symbol unified market symbol when fetch interest in isolated markets
|
|
4276
|
-
* @param {int} [since] the earliest time in ms to fetch borrrow interest for
|
|
4277
|
-
* @param {int} [limit] the maximum number of structures to retrieve
|
|
4278
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4279
|
-
* @returns {object[]} a list of [borrow interest structures]{@link https://docs.ccxt.com/#/?id=borrow-interest-structure}
|
|
4280
|
-
*/
|
|
4281
4281
|
if (symbol === undefined) {
|
|
4282
4282
|
throw new errors.ArgumentsRequired(this.id + ' fetchBorrowInterest() requires a symbol argument');
|
|
4283
4283
|
}
|
|
@@ -4347,16 +4347,16 @@ class bitmart extends bitmart$1 {
|
|
|
4347
4347
|
'datetime': this.iso8601(timestamp),
|
|
4348
4348
|
};
|
|
4349
4349
|
}
|
|
4350
|
+
/**
|
|
4351
|
+
* @method
|
|
4352
|
+
* @name bitmart#fetchOpenInterest
|
|
4353
|
+
* @description Retrieves the open interest of a currency
|
|
4354
|
+
* @see https://developer-pro.bitmart.com/en/futuresv2/#get-futures-openinterest
|
|
4355
|
+
* @param {string} symbol Unified CCXT market symbol
|
|
4356
|
+
* @param {object} [params] exchange specific parameters
|
|
4357
|
+
* @returns {object} an open interest structure{@link https://docs.ccxt.com/#/?id=open-interest-structure}
|
|
4358
|
+
*/
|
|
4350
4359
|
async fetchOpenInterest(symbol, params = {}) {
|
|
4351
|
-
/**
|
|
4352
|
-
* @method
|
|
4353
|
-
* @name bitmart#fetchOpenInterest
|
|
4354
|
-
* @description Retrieves the open interest of a currency
|
|
4355
|
-
* @see https://developer-pro.bitmart.com/en/futuresv2/#get-futures-openinterest
|
|
4356
|
-
* @param {string} symbol Unified CCXT market symbol
|
|
4357
|
-
* @param {object} [params] exchange specific parameters
|
|
4358
|
-
* @returns {object} an open interest structure{@link https://docs.ccxt.com/#/?id=open-interest-structure}
|
|
4359
|
-
*/
|
|
4360
4360
|
await this.loadMarkets();
|
|
4361
4361
|
const market = this.market(symbol);
|
|
4362
4362
|
if (!market['contract']) {
|
|
@@ -4402,19 +4402,19 @@ class bitmart extends bitmart$1 {
|
|
|
4402
4402
|
'info': interest,
|
|
4403
4403
|
}, market);
|
|
4404
4404
|
}
|
|
4405
|
+
/**
|
|
4406
|
+
* @method
|
|
4407
|
+
* @name bitmart#setLeverage
|
|
4408
|
+
* @description set the level of leverage for a market
|
|
4409
|
+
* @see https://developer-pro.bitmart.com/en/futures/#submit-leverage-signed
|
|
4410
|
+
* @see https://developer-pro.bitmart.com/en/futuresv2/#submit-leverage-signed
|
|
4411
|
+
* @param {float} leverage the rate of leverage
|
|
4412
|
+
* @param {string} symbol unified market symbol
|
|
4413
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4414
|
+
* @param {string} [params.marginMode] 'isolated' or 'cross'
|
|
4415
|
+
* @returns {object} response from the exchange
|
|
4416
|
+
*/
|
|
4405
4417
|
async setLeverage(leverage, symbol = undefined, params = {}) {
|
|
4406
|
-
/**
|
|
4407
|
-
* @method
|
|
4408
|
-
* @name bitmart#setLeverage
|
|
4409
|
-
* @description set the level of leverage for a market
|
|
4410
|
-
* @see https://developer-pro.bitmart.com/en/futures/#submit-leverage-signed
|
|
4411
|
-
* @see https://developer-pro.bitmart.com/en/futuresv2/#submit-leverage-signed
|
|
4412
|
-
* @param {float} leverage the rate of leverage
|
|
4413
|
-
* @param {string} symbol unified market symbol
|
|
4414
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4415
|
-
* @param {string} [params.marginMode] 'isolated' or 'cross'
|
|
4416
|
-
* @returns {object} response from the exchange
|
|
4417
|
-
*/
|
|
4418
4418
|
if (symbol === undefined) {
|
|
4419
4419
|
throw new errors.ArgumentsRequired(this.id + ' setLeverage() requires a symbol argument');
|
|
4420
4420
|
}
|
|
@@ -4433,16 +4433,16 @@ class bitmart extends bitmart$1 {
|
|
|
4433
4433
|
};
|
|
4434
4434
|
return await this.privatePostContractPrivateSubmitLeverage(this.extend(request, params));
|
|
4435
4435
|
}
|
|
4436
|
+
/**
|
|
4437
|
+
* @method
|
|
4438
|
+
* @name bitmart#fetchFundingRate
|
|
4439
|
+
* @description fetch the current funding rate
|
|
4440
|
+
* @see https://developer-pro.bitmart.com/en/futuresv2/#get-current-funding-rate
|
|
4441
|
+
* @param {string} symbol unified market symbol
|
|
4442
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4443
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
4444
|
+
*/
|
|
4436
4445
|
async fetchFundingRate(symbol, params = {}) {
|
|
4437
|
-
/**
|
|
4438
|
-
* @method
|
|
4439
|
-
* @name bitmart#fetchFundingRate
|
|
4440
|
-
* @description fetch the current funding rate
|
|
4441
|
-
* @see https://developer-pro.bitmart.com/en/futuresv2/#get-current-funding-rate
|
|
4442
|
-
* @param {string} symbol unified market symbol
|
|
4443
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4444
|
-
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
4445
|
-
*/
|
|
4446
4446
|
await this.loadMarkets();
|
|
4447
4447
|
const market = this.market(symbol);
|
|
4448
4448
|
if (!market['swap']) {
|
|
@@ -4500,17 +4500,17 @@ class bitmart extends bitmart$1 {
|
|
|
4500
4500
|
'interval': undefined,
|
|
4501
4501
|
};
|
|
4502
4502
|
}
|
|
4503
|
+
/**
|
|
4504
|
+
* @method
|
|
4505
|
+
* @name bitmart#fetchPosition
|
|
4506
|
+
* @description fetch data on a single open contract trade position
|
|
4507
|
+
* @see https://developer-pro.bitmart.com/en/futures/#get-current-position-keyed
|
|
4508
|
+
* @see https://developer-pro.bitmart.com/en/futuresv2/#get-current-position-risk-details-keyed
|
|
4509
|
+
* @param {string} symbol unified market symbol of the market the position is held in
|
|
4510
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4511
|
+
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
4512
|
+
*/
|
|
4503
4513
|
async fetchPosition(symbol, params = {}) {
|
|
4504
|
-
/**
|
|
4505
|
-
* @method
|
|
4506
|
-
* @name bitmart#fetchPosition
|
|
4507
|
-
* @description fetch data on a single open contract trade position
|
|
4508
|
-
* @see https://developer-pro.bitmart.com/en/futures/#get-current-position-keyed
|
|
4509
|
-
* @see https://developer-pro.bitmart.com/en/futuresv2/#get-current-position-risk-details-keyed
|
|
4510
|
-
* @param {string} symbol unified market symbol of the market the position is held in
|
|
4511
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4512
|
-
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
4513
|
-
*/
|
|
4514
4514
|
await this.loadMarkets();
|
|
4515
4515
|
const market = this.market(symbol);
|
|
4516
4516
|
const request = {
|
|
@@ -4550,17 +4550,17 @@ class bitmart extends bitmart$1 {
|
|
|
4550
4550
|
const first = this.safeDict(data, 0, {});
|
|
4551
4551
|
return this.parsePosition(first, market);
|
|
4552
4552
|
}
|
|
4553
|
+
/**
|
|
4554
|
+
* @method
|
|
4555
|
+
* @name bitmart#fetchPositions
|
|
4556
|
+
* @description fetch all open contract positions
|
|
4557
|
+
* @see https://developer-pro.bitmart.com/en/futures/#get-current-position-keyed
|
|
4558
|
+
* @see https://developer-pro.bitmart.com/en/futuresv2/#get-current-position-risk-details-keyed
|
|
4559
|
+
* @param {string[]|undefined} symbols list of unified market symbols
|
|
4560
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4561
|
+
* @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
4562
|
+
*/
|
|
4553
4563
|
async fetchPositions(symbols = undefined, params = {}) {
|
|
4554
|
-
/**
|
|
4555
|
-
* @method
|
|
4556
|
-
* @name bitmart#fetchPositions
|
|
4557
|
-
* @description fetch all open contract positions
|
|
4558
|
-
* @see https://developer-pro.bitmart.com/en/futures/#get-current-position-keyed
|
|
4559
|
-
* @see https://developer-pro.bitmart.com/en/futuresv2/#get-current-position-risk-details-keyed
|
|
4560
|
-
* @param {string[]|undefined} symbols list of unified market symbols
|
|
4561
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4562
|
-
* @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
4563
|
-
*/
|
|
4564
4564
|
await this.loadMarkets();
|
|
4565
4565
|
let market = undefined;
|
|
4566
4566
|
let symbolsLength = undefined;
|
|
@@ -4676,19 +4676,19 @@ class bitmart extends bitmart$1 {
|
|
|
4676
4676
|
'takeProfitPrice': undefined,
|
|
4677
4677
|
});
|
|
4678
4678
|
}
|
|
4679
|
+
/**
|
|
4680
|
+
* @method
|
|
4681
|
+
* @name bitmart#fetchMyLiquidations
|
|
4682
|
+
* @description retrieves the users liquidated positions
|
|
4683
|
+
* @see https://developer-pro.bitmart.com/en/futures/#get-order-history-keyed
|
|
4684
|
+
* @param {string} symbol unified CCXT market symbol
|
|
4685
|
+
* @param {int} [since] the earliest time in ms to fetch liquidations for
|
|
4686
|
+
* @param {int} [limit] the maximum number of liquidation structures to retrieve
|
|
4687
|
+
* @param {object} [params] exchange specific parameters for the bitmart api endpoint
|
|
4688
|
+
* @param {int} [params.until] timestamp in ms of the latest liquidation
|
|
4689
|
+
* @returns {object} an array of [liquidation structures]{@link https://docs.ccxt.com/#/?id=liquidation-structure}
|
|
4690
|
+
*/
|
|
4679
4691
|
async fetchMyLiquidations(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
4680
|
-
/**
|
|
4681
|
-
* @method
|
|
4682
|
-
* @name bitmart#fetchMyLiquidations
|
|
4683
|
-
* @description retrieves the users liquidated positions
|
|
4684
|
-
* @see https://developer-pro.bitmart.com/en/futures/#get-order-history-keyed
|
|
4685
|
-
* @param {string} symbol unified CCXT market symbol
|
|
4686
|
-
* @param {int} [since] the earliest time in ms to fetch liquidations for
|
|
4687
|
-
* @param {int} [limit] the maximum number of liquidation structures to retrieve
|
|
4688
|
-
* @param {object} [params] exchange specific parameters for the bitmart api endpoint
|
|
4689
|
-
* @param {int} [params.until] timestamp in ms of the latest liquidation
|
|
4690
|
-
* @returns {object} an array of [liquidation structures]{@link https://docs.ccxt.com/#/?id=liquidation-structure}
|
|
4691
|
-
*/
|
|
4692
4692
|
if (symbol === undefined) {
|
|
4693
4693
|
throw new errors.ArgumentsRequired(this.id + ' fetchMyLiquidations() requires a symbol argument');
|
|
4694
4694
|
}
|
|
@@ -4779,31 +4779,31 @@ class bitmart extends bitmart$1 {
|
|
|
4779
4779
|
'datetime': this.iso8601(timestamp),
|
|
4780
4780
|
});
|
|
4781
4781
|
}
|
|
4782
|
+
/**
|
|
4783
|
+
* @method
|
|
4784
|
+
* @name bitmart#editOrder
|
|
4785
|
+
* @description edits an open order
|
|
4786
|
+
* @see https://developer-pro.bitmart.com/en/futuresv2/#modify-plan-order-signed
|
|
4787
|
+
* @see https://developer-pro.bitmart.com/en/futuresv2/#modify-tp-sl-order-signed
|
|
4788
|
+
* @see https://developer-pro.bitmart.com/en/futuresv2/#modify-preset-plan-order-signed
|
|
4789
|
+
* @param {string} id order id
|
|
4790
|
+
* @param {string} symbol unified symbol of the market to edit an order in
|
|
4791
|
+
* @param {string} type 'market' or 'limit'
|
|
4792
|
+
* @param {string} side 'buy' or 'sell'
|
|
4793
|
+
* @param {float} [amount] how much you want to trade in units of the base currency
|
|
4794
|
+
* @param {float} [price] the price to fulfill the order, in units of the quote currency, ignored in market orders
|
|
4795
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4796
|
+
* @param {string} [params.triggerPrice] *swap only* the price to trigger a stop order
|
|
4797
|
+
* @param {string} [params.stopLossPrice] *swap only* the price to trigger a stop-loss order
|
|
4798
|
+
* @param {string} [params.takeProfitPrice] *swap only* the price to trigger a take-profit order
|
|
4799
|
+
* @param {string} [params.stopLoss.triggerPrice] *swap only* the price to trigger a preset stop-loss order
|
|
4800
|
+
* @param {string} [params.takeProfit.triggerPrice] *swap only* the price to trigger a preset take-profit order
|
|
4801
|
+
* @param {string} [params.clientOrderId] client order id of the order
|
|
4802
|
+
* @param {int} [params.price_type] *swap only* 1: last price, 2: fair price, default is 1
|
|
4803
|
+
* @param {int} [params.plan_category] *swap tp/sl only* 1: tp/sl, 2: position tp/sl, default is 1
|
|
4804
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4805
|
+
*/
|
|
4782
4806
|
async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
4783
|
-
/**
|
|
4784
|
-
* @method
|
|
4785
|
-
* @name bitmart#editOrder
|
|
4786
|
-
* @description edits an open order
|
|
4787
|
-
* @see https://developer-pro.bitmart.com/en/futuresv2/#modify-plan-order-signed
|
|
4788
|
-
* @see https://developer-pro.bitmart.com/en/futuresv2/#modify-tp-sl-order-signed
|
|
4789
|
-
* @see https://developer-pro.bitmart.com/en/futuresv2/#modify-preset-plan-order-signed
|
|
4790
|
-
* @param {string} id order id
|
|
4791
|
-
* @param {string} symbol unified symbol of the market to edit an order in
|
|
4792
|
-
* @param {string} type 'market' or 'limit'
|
|
4793
|
-
* @param {string} side 'buy' or 'sell'
|
|
4794
|
-
* @param {float} [amount] how much you want to trade in units of the base currency
|
|
4795
|
-
* @param {float} [price] the price to fulfill the order, in units of the quote currency, ignored in market orders
|
|
4796
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4797
|
-
* @param {string} [params.triggerPrice] *swap only* the price to trigger a stop order
|
|
4798
|
-
* @param {string} [params.stopLossPrice] *swap only* the price to trigger a stop-loss order
|
|
4799
|
-
* @param {string} [params.takeProfitPrice] *swap only* the price to trigger a take-profit order
|
|
4800
|
-
* @param {string} [params.stopLoss.triggerPrice] *swap only* the price to trigger a preset stop-loss order
|
|
4801
|
-
* @param {string} [params.takeProfit.triggerPrice] *swap only* the price to trigger a preset take-profit order
|
|
4802
|
-
* @param {string} [params.clientOrderId] client order id of the order
|
|
4803
|
-
* @param {int} [params.price_type] *swap only* 1: last price, 2: fair price, default is 1
|
|
4804
|
-
* @param {int} [params.plan_category] *swap tp/sl only* 1: tp/sl, 2: position tp/sl, default is 1
|
|
4805
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
4806
|
-
*/
|
|
4807
4807
|
await this.loadMarkets();
|
|
4808
4808
|
const market = this.market(symbol);
|
|
4809
4809
|
if (!market['swap']) {
|