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