ccxt 4.4.30 → 4.4.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -3
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +123 -123
- package/dist/cjs/src/alpaca.js +237 -237
- package/dist/cjs/src/ascendex.js +342 -341
- package/dist/cjs/src/bigone.js +242 -242
- package/dist/cjs/src/binance.js +1339 -1291
- package/dist/cjs/src/bingx.js +639 -639
- package/dist/cjs/src/bit2c.js +111 -111
- package/dist/cjs/src/bitbank.js +142 -142
- package/dist/cjs/src/bitbns.js +140 -140
- package/dist/cjs/src/bitfinex.js +231 -231
- package/dist/cjs/src/bitfinex2.js +403 -403
- package/dist/cjs/src/bitflyer.js +184 -184
- package/dist/cjs/src/bitget.js +848 -846
- package/dist/cjs/src/bithumb.js +125 -124
- package/dist/cjs/src/bitmart.js +525 -525
- package/dist/cjs/src/bitmex.js +317 -317
- package/dist/cjs/src/bitopro.js +221 -221
- package/dist/cjs/src/bitrue.js +315 -315
- package/dist/cjs/src/bitso.js +220 -220
- package/dist/cjs/src/bitstamp.js +251 -251
- package/dist/cjs/src/bitteam.js +183 -183
- package/dist/cjs/src/bitvavo.js +247 -251
- package/dist/cjs/src/bl3p.js +82 -82
- package/dist/cjs/src/blockchaincom.js +211 -211
- package/dist/cjs/src/blofin.js +332 -331
- package/dist/cjs/src/btcalpha.js +166 -166
- package/dist/cjs/src/btcbox.js +108 -108
- package/dist/cjs/src/btcmarkets.js +198 -198
- package/dist/cjs/src/btcturk.js +124 -124
- package/dist/cjs/src/bybit.js +906 -900
- package/dist/cjs/src/cex.js +227 -226
- package/dist/cjs/src/coinbase.js +481 -481
- package/dist/cjs/src/coinbaseexchange.js +274 -274
- package/dist/cjs/src/coinbaseinternational.js +304 -304
- package/dist/cjs/src/coincatch.js +650 -650
- package/dist/cjs/src/coincheck.js +113 -113
- package/dist/cjs/src/coinex.js +611 -601
- package/dist/cjs/src/coinlist.js +304 -303
- package/dist/cjs/src/coinmate.js +162 -161
- package/dist/cjs/src/coinmetro.js +187 -187
- package/dist/cjs/src/coinone.js +124 -123
- package/dist/cjs/src/coinsph.js +237 -237
- package/dist/cjs/src/coinspot.js +82 -82
- package/dist/cjs/src/cryptocom.js +342 -341
- package/dist/cjs/src/currencycom.js +225 -224
- package/dist/cjs/src/delta.js +320 -320
- package/dist/cjs/src/deribit.js +411 -408
- package/dist/cjs/src/digifinex.js +432 -431
- package/dist/cjs/src/exmo.js +328 -327
- package/dist/cjs/src/gate.js +830 -791
- package/dist/cjs/src/gemini.js +199 -198
- package/dist/cjs/src/hashkey.js +520 -517
- package/dist/cjs/src/hitbtc.js +465 -462
- package/dist/cjs/src/hollaex.js +253 -252
- package/dist/cjs/src/htx.js +791 -848
- package/dist/cjs/src/huobijp.js +219 -218
- package/dist/cjs/src/hyperliquid.js +421 -417
- package/dist/cjs/src/idex.js +238 -237
- package/dist/cjs/src/independentreserve.js +133 -132
- package/dist/cjs/src/indodax.js +177 -171
- package/dist/cjs/src/kraken.js +381 -377
- package/dist/cjs/src/krakenfutures.js +285 -279
- package/dist/cjs/src/kucoin.js +632 -622
- package/dist/cjs/src/kucoinfutures.js +533 -457
- package/dist/cjs/src/kuna.js +283 -282
- package/dist/cjs/src/latoken.js +211 -210
- package/dist/cjs/src/lbank.js +268 -267
- package/dist/cjs/src/luno.js +174 -173
- package/dist/cjs/src/lykke.js +172 -171
- package/dist/cjs/src/mercado.js +123 -122
- package/dist/cjs/src/mexc.js +650 -646
- package/dist/cjs/src/ndax.js +229 -228
- package/dist/cjs/src/novadax.js +230 -229
- package/dist/cjs/src/oceanex.js +187 -186
- package/dist/cjs/src/okcoin.js +286 -285
- package/dist/cjs/src/okx.js +909 -904
- package/dist/cjs/src/onetrading.js +218 -218
- package/dist/cjs/src/oxfun.js +335 -334
- package/dist/cjs/src/p2b.js +154 -154
- package/dist/cjs/src/paradex.js +249 -244
- package/dist/cjs/src/paymium.js +101 -101
- package/dist/cjs/src/phemex.js +388 -390
- package/dist/cjs/src/poloniex.js +270 -270
- package/dist/cjs/src/poloniexfutures.js +250 -250
- package/dist/cjs/src/pro/alpaca.js +64 -64
- package/dist/cjs/src/pro/ascendex.js +64 -64
- package/dist/cjs/src/pro/binance.js +546 -543
- package/dist/cjs/src/pro/bingx.js +116 -116
- package/dist/cjs/src/pro/bitfinex.js +42 -42
- package/dist/cjs/src/pro/bitfinex2.js +66 -66
- package/dist/cjs/src/pro/bitget.js +188 -181
- package/dist/cjs/src/pro/bithumb.js +40 -40
- package/dist/cjs/src/pro/bitmart.js +121 -119
- package/dist/cjs/src/pro/bitmex.js +135 -133
- package/dist/cjs/src/pro/bitopro.js +49 -49
- package/dist/cjs/src/pro/bitrue.js +19 -19
- package/dist/cjs/src/pro/bitstamp.js +29 -29
- package/dist/cjs/src/pro/bitvavo.js +299 -301
- package/dist/cjs/src/pro/blockchaincom.js +62 -62
- package/dist/cjs/src/pro/blofin.js +132 -130
- package/dist/cjs/src/pro/bybit.js +317 -313
- package/dist/cjs/src/pro/cex.js +168 -168
- package/dist/cjs/src/pro/coinbase.js +93 -91
- package/dist/cjs/src/pro/coinbaseexchange.js +95 -95
- package/dist/cjs/src/pro/coinbaseinternational.js +111 -111
- package/dist/cjs/src/pro/coincatch.js +150 -143
- package/dist/cjs/src/pro/coincheck.js +21 -21
- package/dist/cjs/src/pro/coinex.js +110 -110
- package/dist/cjs/src/pro/coinone.js +30 -30
- package/dist/cjs/src/pro/cryptocom.js +227 -227
- package/dist/cjs/src/pro/currencycom.js +45 -45
- package/dist/cjs/src/pro/deribit.js +127 -127
- package/dist/cjs/src/pro/exmo.js +66 -66
- package/dist/cjs/src/pro/gate.js +287 -283
- package/dist/cjs/src/pro/gemini.js +74 -74
- package/dist/cjs/src/pro/hashkey.js +87 -85
- package/dist/cjs/src/pro/hitbtc.js +190 -190
- package/dist/cjs/src/pro/hollaex.js +51 -51
- package/dist/cjs/src/pro/htx.js +96 -94
- package/dist/cjs/src/pro/huobijp.js +38 -38
- package/dist/cjs/src/pro/hyperliquid.js +151 -150
- package/dist/cjs/src/pro/idex.js +48 -48
- package/dist/cjs/src/pro/independentreserve.js +19 -19
- package/dist/cjs/src/pro/kraken.js +167 -167
- package/dist/cjs/src/pro/krakenfutures.js +137 -138
- package/dist/cjs/src/pro/kucoin.js +167 -168
- package/dist/cjs/src/pro/kucoinfutures.js +147 -147
- package/dist/cjs/src/pro/lbank.js +95 -95
- package/dist/cjs/src/pro/luno.js +21 -21
- package/dist/cjs/src/pro/mexc.js +102 -103
- package/dist/cjs/src/pro/ndax.js +42 -42
- package/dist/cjs/src/pro/okcoin.js +61 -61
- package/dist/cjs/src/pro/okx.js +332 -330
- package/dist/cjs/src/pro/onetrading.js +71 -71
- package/dist/cjs/src/pro/oxfun.js +193 -191
- package/dist/cjs/src/pro/p2b.js +77 -77
- package/dist/cjs/src/pro/paradex.js +39 -39
- package/dist/cjs/src/pro/phemex.js +94 -94
- package/dist/cjs/src/pro/poloniex.js +171 -171
- package/dist/cjs/src/pro/poloniexfutures.js +62 -62
- package/dist/cjs/src/pro/probit.js +63 -63
- package/dist/cjs/src/pro/upbit.js +80 -80
- package/dist/cjs/src/pro/vertex.js +65 -63
- package/dist/cjs/src/pro/wazirx.js +70 -70
- package/dist/cjs/src/pro/whitebit.js +83 -83
- package/dist/cjs/src/pro/woo.js +106 -104
- package/dist/cjs/src/pro/woofipro.js +105 -103
- package/dist/cjs/src/pro/xt.js +119 -119
- package/dist/cjs/src/probit.js +229 -229
- package/dist/cjs/src/timex.js +198 -197
- package/dist/cjs/src/tokocrypto.js +214 -213
- package/dist/cjs/src/tradeogre.js +92 -91
- package/dist/cjs/src/upbit.js +243 -242
- package/dist/cjs/src/vertex.js +258 -258
- package/dist/cjs/src/wavesexchange.js +176 -172
- package/dist/cjs/src/wazirx.js +168 -168
- package/dist/cjs/src/whitebit.js +361 -361
- package/dist/cjs/src/woo.js +571 -572
- package/dist/cjs/src/woofipro.js +392 -391
- package/dist/cjs/src/xt.js +436 -435
- package/dist/cjs/src/yobit.js +159 -158
- package/dist/cjs/src/zaif.js +103 -103
- package/dist/cjs/src/zonda.js +168 -168
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/ace.d.ts +123 -0
- package/js/src/ace.js +123 -123
- package/js/src/alpaca.d.ts +237 -0
- package/js/src/alpaca.js +237 -237
- package/js/src/ascendex.d.ts +339 -0
- package/js/src/ascendex.js +342 -341
- package/js/src/base/types.d.ts +1 -0
- package/js/src/bigone.d.ts +242 -0
- package/js/src/bigone.js +242 -242
- package/js/src/binance.d.ts +1306 -0
- package/js/src/binance.js +1339 -1291
- package/js/src/bingx.d.ts +639 -0
- package/js/src/bingx.js +639 -639
- package/js/src/bit2c.d.ts +111 -0
- package/js/src/bit2c.js +111 -111
- package/js/src/bitbank.d.ts +142 -0
- package/js/src/bitbank.js +142 -142
- package/js/src/bitbns.d.ts +140 -0
- package/js/src/bitbns.js +140 -140
- package/js/src/bitfinex.d.ts +231 -0
- package/js/src/bitfinex.js +231 -231
- package/js/src/bitfinex2.d.ts +403 -0
- package/js/src/bitfinex2.js +403 -403
- package/js/src/bitflyer.d.ts +184 -0
- package/js/src/bitflyer.js +184 -184
- package/js/src/bitget.d.ts +846 -0
- package/js/src/bitget.js +848 -846
- package/js/src/bithumb.d.ts +125 -0
- package/js/src/bithumb.js +125 -124
- package/js/src/bitmart.d.ts +525 -0
- package/js/src/bitmart.js +525 -525
- package/js/src/bitmex.d.ts +317 -0
- package/js/src/bitmex.js +317 -317
- package/js/src/bitopro.d.ts +221 -0
- package/js/src/bitopro.js +221 -221
- package/js/src/bitrue.d.ts +315 -0
- package/js/src/bitrue.js +315 -315
- package/js/src/bitso.d.ts +220 -0
- package/js/src/bitso.js +220 -220
- package/js/src/bitstamp.d.ts +251 -0
- package/js/src/bitstamp.js +251 -251
- package/js/src/bitteam.d.ts +183 -0
- package/js/src/bitteam.js +183 -183
- package/js/src/bitvavo.d.ts +247 -0
- package/js/src/bitvavo.js +247 -251
- package/js/src/bl3p.d.ts +82 -0
- package/js/src/bl3p.js +82 -82
- package/js/src/blockchaincom.d.ts +211 -0
- package/js/src/blockchaincom.js +211 -211
- package/js/src/blofin.d.ts +332 -0
- package/js/src/blofin.js +332 -331
- package/js/src/btcalpha.d.ts +166 -0
- package/js/src/btcalpha.js +166 -166
- package/js/src/btcbox.d.ts +108 -0
- package/js/src/btcbox.js +108 -108
- package/js/src/btcmarkets.d.ts +198 -0
- package/js/src/btcmarkets.js +198 -198
- package/js/src/btcturk.d.ts +124 -0
- package/js/src/btcturk.js +124 -124
- package/js/src/bybit.d.ts +906 -1
- package/js/src/bybit.js +906 -900
- package/js/src/cex.d.ts +227 -0
- package/js/src/cex.js +227 -226
- package/js/src/coinbase.d.ts +481 -0
- package/js/src/coinbase.js +481 -481
- package/js/src/coinbaseexchange.d.ts +274 -0
- package/js/src/coinbaseexchange.js +274 -274
- package/js/src/coinbaseinternational.d.ts +304 -0
- package/js/src/coinbaseinternational.js +304 -304
- package/js/src/coincatch.d.ts +646 -0
- package/js/src/coincatch.js +650 -650
- package/js/src/coincheck.d.ts +113 -0
- package/js/src/coincheck.js +113 -113
- package/js/src/coinex.d.ts +603 -0
- package/js/src/coinex.js +611 -601
- package/js/src/coinlist.d.ts +304 -0
- package/js/src/coinlist.js +304 -303
- package/js/src/coinmate.d.ts +162 -0
- package/js/src/coinmate.js +162 -161
- package/js/src/coinmetro.d.ts +187 -0
- package/js/src/coinmetro.js +187 -187
- package/js/src/coinone.d.ts +124 -0
- package/js/src/coinone.js +124 -123
- package/js/src/coinsph.d.ts +237 -0
- package/js/src/coinsph.js +237 -237
- package/js/src/coinspot.d.ts +82 -0
- package/js/src/coinspot.js +82 -82
- package/js/src/cryptocom.d.ts +342 -0
- package/js/src/cryptocom.js +342 -341
- package/js/src/currencycom.d.ts +225 -0
- package/js/src/currencycom.js +225 -224
- package/js/src/delta.d.ts +320 -0
- package/js/src/delta.js +320 -320
- package/js/src/deribit.d.ts +411 -0
- package/js/src/deribit.js +411 -408
- package/js/src/digifinex.d.ts +430 -0
- package/js/src/digifinex.js +432 -431
- package/js/src/exmo.d.ts +328 -0
- package/js/src/exmo.js +328 -327
- package/js/src/gate.d.ts +803 -1
- package/js/src/gate.js +830 -791
- package/js/src/gemini.d.ts +199 -0
- package/js/src/gemini.js +199 -198
- package/js/src/hashkey.d.ts +516 -0
- package/js/src/hashkey.js +520 -517
- package/js/src/hitbtc.d.ts +465 -0
- package/js/src/hitbtc.js +465 -462
- package/js/src/hollaex.d.ts +253 -0
- package/js/src/hollaex.js +253 -252
- package/js/src/htx.d.ts +765 -2
- package/js/src/htx.js +791 -848
- package/js/src/huobijp.d.ts +219 -0
- package/js/src/huobijp.js +219 -218
- package/js/src/hyperliquid.d.ts +419 -0
- package/js/src/hyperliquid.js +421 -417
- package/js/src/idex.d.ts +238 -0
- package/js/src/idex.js +238 -237
- package/js/src/independentreserve.d.ts +133 -0
- package/js/src/independentreserve.js +133 -132
- package/js/src/indodax.d.ts +171 -0
- package/js/src/indodax.js +177 -171
- package/js/src/kraken.d.ts +381 -0
- package/js/src/kraken.js +381 -377
- package/js/src/krakenfutures.d.ts +282 -0
- package/js/src/krakenfutures.js +285 -279
- package/js/src/kucoin.d.ts +613 -0
- package/js/src/kucoin.js +632 -622
- package/js/src/kucoinfutures.d.ts +441 -0
- package/js/src/kucoinfutures.js +533 -457
- package/js/src/kuna.d.ts +283 -0
- package/js/src/kuna.js +283 -282
- package/js/src/latoken.d.ts +211 -0
- package/js/src/latoken.js +211 -210
- package/js/src/lbank.d.ts +268 -0
- package/js/src/lbank.js +268 -267
- package/js/src/luno.d.ts +174 -0
- package/js/src/luno.js +174 -173
- package/js/src/lykke.d.ts +172 -0
- package/js/src/lykke.js +172 -171
- package/js/src/mercado.d.ts +123 -0
- package/js/src/mercado.js +123 -122
- package/js/src/mexc.d.ts +647 -0
- package/js/src/mexc.js +650 -646
- package/js/src/ndax.d.ts +229 -0
- package/js/src/ndax.js +229 -228
- package/js/src/novadax.d.ts +230 -0
- package/js/src/novadax.js +230 -229
- package/js/src/oceanex.d.ts +187 -0
- package/js/src/oceanex.js +187 -186
- package/js/src/okcoin.d.ts +286 -0
- package/js/src/okcoin.js +286 -285
- package/js/src/okx.d.ts +907 -0
- package/js/src/okx.js +909 -904
- package/js/src/onetrading.d.ts +218 -0
- package/js/src/onetrading.js +218 -218
- package/js/src/oxfun.d.ts +336 -3
- package/js/src/oxfun.js +335 -334
- package/js/src/p2b.d.ts +154 -0
- package/js/src/p2b.js +154 -154
- package/js/src/paradex.d.ts +241 -0
- package/js/src/paradex.js +249 -244
- package/js/src/paymium.d.ts +101 -0
- package/js/src/paymium.js +101 -101
- package/js/src/phemex.d.ts +366 -0
- package/js/src/phemex.js +388 -390
- package/js/src/poloniex.d.ts +270 -0
- package/js/src/poloniex.js +270 -270
- package/js/src/poloniexfutures.d.ts +250 -0
- package/js/src/poloniexfutures.js +250 -250
- package/js/src/pro/alpaca.d.ts +64 -0
- package/js/src/pro/alpaca.js +64 -64
- package/js/src/pro/ascendex.d.ts +64 -0
- package/js/src/pro/ascendex.js +64 -64
- package/js/src/pro/binance.d.ts +546 -0
- package/js/src/pro/binance.js +546 -543
- package/js/src/pro/bingx.d.ts +116 -0
- package/js/src/pro/bingx.js +116 -116
- package/js/src/pro/bitfinex.d.ts +42 -0
- package/js/src/pro/bitfinex.js +42 -42
- package/js/src/pro/bitfinex2.d.ts +66 -0
- package/js/src/pro/bitfinex2.js +66 -66
- package/js/src/pro/bitget.d.ts +187 -0
- package/js/src/pro/bitget.js +188 -181
- package/js/src/pro/bithumb.d.ts +40 -0
- package/js/src/pro/bithumb.js +40 -40
- package/js/src/pro/bitmart.d.ts +121 -0
- package/js/src/pro/bitmart.js +121 -119
- package/js/src/pro/bitmex.d.ts +135 -0
- package/js/src/pro/bitmex.js +135 -133
- package/js/src/pro/bitopro.d.ts +49 -0
- package/js/src/pro/bitopro.js +49 -49
- package/js/src/pro/bitrue.d.ts +19 -0
- package/js/src/pro/bitrue.js +19 -19
- package/js/src/pro/bitstamp.d.ts +29 -0
- package/js/src/pro/bitstamp.js +29 -29
- package/js/src/pro/bitvavo.d.ts +254 -1
- package/js/src/pro/bitvavo.js +299 -301
- package/js/src/pro/blockchaincom.d.ts +62 -0
- package/js/src/pro/blockchaincom.js +62 -62
- package/js/src/pro/blofin.d.ts +132 -0
- package/js/src/pro/blofin.js +132 -130
- package/js/src/pro/bybit.d.ts +317 -0
- package/js/src/pro/bybit.js +317 -313
- package/js/src/pro/cex.d.ts +168 -0
- package/js/src/pro/cex.js +168 -168
- package/js/src/pro/coinbase.d.ts +93 -0
- package/js/src/pro/coinbase.js +93 -91
- package/js/src/pro/coinbaseexchange.d.ts +95 -0
- package/js/src/pro/coinbaseexchange.js +95 -95
- package/js/src/pro/coinbaseinternational.d.ts +111 -0
- package/js/src/pro/coinbaseinternational.js +111 -111
- package/js/src/pro/coincatch.d.ts +150 -0
- package/js/src/pro/coincatch.js +150 -143
- package/js/src/pro/coincheck.d.ts +21 -0
- package/js/src/pro/coincheck.js +21 -21
- package/js/src/pro/coinex.d.ts +110 -0
- package/js/src/pro/coinex.js +110 -110
- package/js/src/pro/coinone.d.ts +30 -0
- package/js/src/pro/coinone.js +30 -30
- package/js/src/pro/cryptocom.d.ts +227 -0
- package/js/src/pro/cryptocom.js +227 -227
- package/js/src/pro/currencycom.d.ts +45 -0
- package/js/src/pro/currencycom.js +45 -45
- package/js/src/pro/deribit.d.ts +127 -0
- package/js/src/pro/deribit.js +127 -127
- package/js/src/pro/exmo.d.ts +66 -0
- package/js/src/pro/exmo.js +66 -66
- package/js/src/pro/gate.d.ts +287 -0
- package/js/src/pro/gate.js +287 -283
- package/js/src/pro/gemini.d.ts +74 -0
- package/js/src/pro/gemini.js +74 -74
- package/js/src/pro/hashkey.d.ts +87 -0
- package/js/src/pro/hashkey.js +87 -85
- package/js/src/pro/hitbtc.d.ts +190 -0
- package/js/src/pro/hitbtc.js +190 -190
- package/js/src/pro/hollaex.d.ts +51 -0
- package/js/src/pro/hollaex.js +51 -51
- package/js/src/pro/htx.d.ts +96 -0
- package/js/src/pro/htx.js +96 -94
- package/js/src/pro/huobijp.d.ts +38 -0
- package/js/src/pro/huobijp.js +38 -38
- package/js/src/pro/hyperliquid.d.ts +151 -0
- package/js/src/pro/hyperliquid.js +151 -150
- package/js/src/pro/idex.d.ts +48 -0
- package/js/src/pro/idex.js +48 -48
- package/js/src/pro/independentreserve.d.ts +19 -0
- package/js/src/pro/independentreserve.js +19 -19
- package/js/src/pro/kraken.d.ts +167 -0
- package/js/src/pro/kraken.js +167 -167
- package/js/src/pro/krakenfutures.d.ts +137 -0
- package/js/src/pro/krakenfutures.js +137 -138
- package/js/src/pro/kucoin.d.ts +167 -0
- package/js/src/pro/kucoin.js +167 -168
- package/js/src/pro/kucoinfutures.d.ts +147 -0
- package/js/src/pro/kucoinfutures.js +147 -147
- package/js/src/pro/lbank.d.ts +95 -0
- package/js/src/pro/lbank.js +95 -95
- package/js/src/pro/luno.d.ts +21 -0
- package/js/src/pro/luno.js +21 -21
- package/js/src/pro/mexc.d.ts +101 -0
- package/js/src/pro/mexc.js +102 -103
- package/js/src/pro/ndax.d.ts +42 -0
- package/js/src/pro/ndax.js +42 -42
- package/js/src/pro/okcoin.d.ts +61 -0
- package/js/src/pro/okcoin.js +61 -61
- package/js/src/pro/okx.d.ts +332 -0
- package/js/src/pro/okx.js +332 -330
- package/js/src/pro/onetrading.d.ts +71 -0
- package/js/src/pro/onetrading.js +71 -71
- package/js/src/pro/oxfun.d.ts +193 -0
- package/js/src/pro/oxfun.js +193 -191
- package/js/src/pro/p2b.d.ts +77 -0
- package/js/src/pro/p2b.js +77 -77
- package/js/src/pro/paradex.d.ts +39 -0
- package/js/src/pro/paradex.js +39 -39
- package/js/src/pro/phemex.d.ts +94 -0
- package/js/src/pro/phemex.js +94 -94
- package/js/src/pro/poloniex.d.ts +171 -0
- package/js/src/pro/poloniex.js +171 -171
- package/js/src/pro/poloniexfutures.d.ts +62 -0
- package/js/src/pro/poloniexfutures.js +62 -62
- package/js/src/pro/probit.d.ts +63 -0
- package/js/src/pro/probit.js +63 -63
- package/js/src/pro/upbit.d.ts +80 -0
- package/js/src/pro/upbit.js +80 -80
- package/js/src/pro/vertex.d.ts +65 -0
- package/js/src/pro/vertex.js +65 -63
- package/js/src/pro/wazirx.d.ts +70 -0
- package/js/src/pro/wazirx.js +70 -70
- package/js/src/pro/whitebit.d.ts +83 -0
- package/js/src/pro/whitebit.js +83 -83
- package/js/src/pro/woo.d.ts +106 -0
- package/js/src/pro/woo.js +106 -104
- package/js/src/pro/woofipro.d.ts +105 -0
- package/js/src/pro/woofipro.js +105 -103
- package/js/src/pro/xt.d.ts +119 -0
- package/js/src/pro/xt.js +119 -119
- package/js/src/probit.d.ts +229 -0
- package/js/src/probit.js +229 -229
- package/js/src/timex.d.ts +198 -0
- package/js/src/timex.js +198 -197
- package/js/src/tokocrypto.d.ts +214 -0
- package/js/src/tokocrypto.js +214 -213
- package/js/src/tradeogre.d.ts +92 -0
- package/js/src/tradeogre.js +92 -91
- package/js/src/upbit.d.ts +243 -0
- package/js/src/upbit.js +243 -242
- package/js/src/vertex.d.ts +258 -0
- package/js/src/vertex.js +258 -258
- package/js/src/wavesexchange.d.ts +176 -0
- package/js/src/wavesexchange.js +176 -172
- package/js/src/wazirx.d.ts +168 -0
- package/js/src/wazirx.js +168 -168
- package/js/src/whitebit.d.ts +361 -0
- package/js/src/whitebit.js +361 -361
- package/js/src/woo.d.ts +571 -0
- package/js/src/woo.js +571 -572
- package/js/src/woofipro.d.ts +392 -0
- package/js/src/woofipro.js +392 -391
- package/js/src/xt.d.ts +439 -4
- package/js/src/xt.js +436 -435
- package/js/src/yobit.d.ts +159 -0
- package/js/src/yobit.js +159 -158
- package/js/src/zaif.d.ts +103 -0
- package/js/src/zaif.js +103 -103
- package/js/src/zonda.d.ts +168 -0
- package/js/src/zonda.js +168 -168
- package/package.json +1 -1
package/dist/cjs/src/coinex.js
CHANGED
|
@@ -522,6 +522,7 @@ class coinex extends coinex$1 {
|
|
|
522
522
|
'3008': errors.RequestTimeout,
|
|
523
523
|
'3109': errors.InsufficientFunds,
|
|
524
524
|
'3127': errors.InvalidOrder,
|
|
525
|
+
'3600': errors.OrderNotFound,
|
|
525
526
|
'3606': errors.InvalidOrder,
|
|
526
527
|
'3610': errors.ExchangeError,
|
|
527
528
|
'3612': errors.InvalidOrder,
|
|
@@ -569,15 +570,15 @@ class coinex extends coinex$1 {
|
|
|
569
570
|
},
|
|
570
571
|
});
|
|
571
572
|
}
|
|
573
|
+
/**
|
|
574
|
+
* @method
|
|
575
|
+
* @name coinex#fetchCurrencies
|
|
576
|
+
* @description fetches all available currencies on an exchange
|
|
577
|
+
* @see https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/list-all-deposit-withdrawal-config
|
|
578
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
579
|
+
* @returns {object} an associative dictionary of currencies
|
|
580
|
+
*/
|
|
572
581
|
async fetchCurrencies(params = {}) {
|
|
573
|
-
/**
|
|
574
|
-
* @method
|
|
575
|
-
* @name coinex#fetchCurrencies
|
|
576
|
-
* @description fetches all available currencies on an exchange
|
|
577
|
-
* @see https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/list-all-deposit-withdrawal-config
|
|
578
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
579
|
-
* @returns {object} an associative dictionary of currencies
|
|
580
|
-
*/
|
|
581
582
|
const response = await this.v2PublicGetAssetsAllDepositWithdrawConfig(params);
|
|
582
583
|
//
|
|
583
584
|
// {
|
|
@@ -696,16 +697,16 @@ class coinex extends coinex$1 {
|
|
|
696
697
|
}
|
|
697
698
|
return result;
|
|
698
699
|
}
|
|
700
|
+
/**
|
|
701
|
+
* @method
|
|
702
|
+
* @name coinex#fetchMarkets
|
|
703
|
+
* @description retrieves data on all markets for coinex
|
|
704
|
+
* @see https://docs.coinex.com/api/v2/spot/market/http/list-market
|
|
705
|
+
* @see https://docs.coinex.com/api/v2/futures/market/http/list-market
|
|
706
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
707
|
+
* @returns {object[]} an array of objects representing market data
|
|
708
|
+
*/
|
|
699
709
|
async fetchMarkets(params = {}) {
|
|
700
|
-
/**
|
|
701
|
-
* @method
|
|
702
|
-
* @name coinex#fetchMarkets
|
|
703
|
-
* @description retrieves data on all markets for coinex
|
|
704
|
-
* @see https://docs.coinex.com/api/v2/spot/market/http/list-market
|
|
705
|
-
* @see https://docs.coinex.com/api/v2/futures/market/http/list-market
|
|
706
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
707
|
-
* @returns {object[]} an array of objects representing market data
|
|
708
|
-
*/
|
|
709
710
|
const promisesUnresolved = [
|
|
710
711
|
this.fetchSpotMarkets(params),
|
|
711
712
|
this.fetchContractMarkets(params),
|
|
@@ -960,17 +961,17 @@ class coinex extends coinex$1 {
|
|
|
960
961
|
'info': ticker,
|
|
961
962
|
}, market);
|
|
962
963
|
}
|
|
964
|
+
/**
|
|
965
|
+
* @method
|
|
966
|
+
* @name coinex#fetchTicker
|
|
967
|
+
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
968
|
+
* @see https://docs.coinex.com/api/v2/spot/market/http/list-market-ticker
|
|
969
|
+
* @see https://docs.coinex.com/api/v2/futures/market/http/list-market-ticker
|
|
970
|
+
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
971
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
972
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
973
|
+
*/
|
|
963
974
|
async fetchTicker(symbol, params = {}) {
|
|
964
|
-
/**
|
|
965
|
-
* @method
|
|
966
|
-
* @name coinex#fetchTicker
|
|
967
|
-
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
968
|
-
* @see https://docs.coinex.com/api/v2/spot/market/http/list-market-ticker
|
|
969
|
-
* @see https://docs.coinex.com/api/v2/futures/market/http/list-market-ticker
|
|
970
|
-
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
971
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
972
|
-
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
973
|
-
*/
|
|
974
975
|
await this.loadMarkets();
|
|
975
976
|
const market = this.market(symbol);
|
|
976
977
|
const request = {
|
|
@@ -1034,17 +1035,17 @@ class coinex extends coinex$1 {
|
|
|
1034
1035
|
const result = this.safeDict(data, 0, {});
|
|
1035
1036
|
return this.parseTicker(result, market);
|
|
1036
1037
|
}
|
|
1038
|
+
/**
|
|
1039
|
+
* @method
|
|
1040
|
+
* @name coinex#fetchTickers
|
|
1041
|
+
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
1042
|
+
* @see https://docs.coinex.com/api/v2/spot/market/http/list-market-ticker
|
|
1043
|
+
* @see https://docs.coinex.com/api/v2/futures/market/http/list-market-ticker
|
|
1044
|
+
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1045
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1046
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1047
|
+
*/
|
|
1037
1048
|
async fetchTickers(symbols = undefined, params = {}) {
|
|
1038
|
-
/**
|
|
1039
|
-
* @method
|
|
1040
|
-
* @name coinex#fetchTickers
|
|
1041
|
-
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
1042
|
-
* @see https://docs.coinex.com/api/v2/spot/market/http/list-market-ticker
|
|
1043
|
-
* @see https://docs.coinex.com/api/v2/futures/market/http/list-market-ticker
|
|
1044
|
-
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1045
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1046
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1047
|
-
*/
|
|
1048
1049
|
await this.loadMarkets();
|
|
1049
1050
|
symbols = this.marketSymbols(symbols);
|
|
1050
1051
|
let market = undefined;
|
|
@@ -1110,15 +1111,15 @@ class coinex extends coinex$1 {
|
|
|
1110
1111
|
const data = this.safeList(response, 'data', []);
|
|
1111
1112
|
return this.parseTickers(data, symbols);
|
|
1112
1113
|
}
|
|
1114
|
+
/**
|
|
1115
|
+
* @method
|
|
1116
|
+
* @name coinex#fetchTime
|
|
1117
|
+
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
1118
|
+
* @see https://docs.coinex.com/api/v2/common/http/time
|
|
1119
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1120
|
+
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
1121
|
+
*/
|
|
1113
1122
|
async fetchTime(params = {}) {
|
|
1114
|
-
/**
|
|
1115
|
-
* @method
|
|
1116
|
-
* @name coinex#fetchTime
|
|
1117
|
-
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
1118
|
-
* @see https://docs.coinex.com/api/v2/common/http/time
|
|
1119
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1120
|
-
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
1121
|
-
*/
|
|
1122
1123
|
const response = await this.v2PublicGetTime(params);
|
|
1123
1124
|
//
|
|
1124
1125
|
// {
|
|
@@ -1132,18 +1133,18 @@ class coinex extends coinex$1 {
|
|
|
1132
1133
|
const data = this.safeDict(response, 'data', {});
|
|
1133
1134
|
return this.safeInteger(data, 'timestamp');
|
|
1134
1135
|
}
|
|
1136
|
+
/**
|
|
1137
|
+
* @method
|
|
1138
|
+
* @name coinex#fetchOrderBook
|
|
1139
|
+
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
1140
|
+
* @see https://docs.coinex.com/api/v2/spot/market/http/list-market-depth
|
|
1141
|
+
* @see https://docs.coinex.com/api/v2/futures/market/http/list-market-depth
|
|
1142
|
+
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1143
|
+
* @param {int} [limit] the maximum amount of order book entries to return
|
|
1144
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1145
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
1146
|
+
*/
|
|
1135
1147
|
async fetchOrderBook(symbol, limit = 20, params = {}) {
|
|
1136
|
-
/**
|
|
1137
|
-
* @method
|
|
1138
|
-
* @name coinex#fetchOrderBook
|
|
1139
|
-
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
1140
|
-
* @see https://docs.coinex.com/api/v2/spot/market/http/list-market-depth
|
|
1141
|
-
* @see https://docs.coinex.com/api/v2/futures/market/http/list-market-depth
|
|
1142
|
-
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1143
|
-
* @param {int} [limit] the maximum amount of order book entries to return
|
|
1144
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1145
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
1146
|
-
*/
|
|
1147
1148
|
await this.loadMarkets();
|
|
1148
1149
|
const market = this.market(symbol);
|
|
1149
1150
|
if (limit === undefined) {
|
|
@@ -1289,19 +1290,19 @@ class coinex extends coinex$1 {
|
|
|
1289
1290
|
'fee': fee,
|
|
1290
1291
|
}, market);
|
|
1291
1292
|
}
|
|
1293
|
+
/**
|
|
1294
|
+
* @method
|
|
1295
|
+
* @name coinex#fetchTrades
|
|
1296
|
+
* @description get the list of the most recent trades for a particular symbol
|
|
1297
|
+
* @see https://docs.coinex.com/api/v2/spot/market/http/list-market-deals
|
|
1298
|
+
* @see https://docs.coinex.com/api/v2/futures/market/http/list-market-deals
|
|
1299
|
+
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
1300
|
+
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1301
|
+
* @param {int} [limit] the maximum amount of trades to fetch
|
|
1302
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1303
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
1304
|
+
*/
|
|
1292
1305
|
async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
1293
|
-
/**
|
|
1294
|
-
* @method
|
|
1295
|
-
* @name coinex#fetchTrades
|
|
1296
|
-
* @description get the list of the most recent trades for a particular symbol
|
|
1297
|
-
* @see https://docs.coinex.com/api/v2/spot/market/http/list-market-deals
|
|
1298
|
-
* @see https://docs.coinex.com/api/v2/futures/market/http/list-market-deals
|
|
1299
|
-
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
1300
|
-
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1301
|
-
* @param {int} [limit] the maximum amount of trades to fetch
|
|
1302
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1303
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
1304
|
-
*/
|
|
1305
1306
|
await this.loadMarkets();
|
|
1306
1307
|
const market = this.market(symbol);
|
|
1307
1308
|
const request = {
|
|
@@ -1337,17 +1338,17 @@ class coinex extends coinex$1 {
|
|
|
1337
1338
|
//
|
|
1338
1339
|
return this.parseTrades(response['data'], market, since, limit);
|
|
1339
1340
|
}
|
|
1341
|
+
/**
|
|
1342
|
+
* @method
|
|
1343
|
+
* @name coinex#fetchTradingFee
|
|
1344
|
+
* @description fetch the trading fees for a market
|
|
1345
|
+
* @see https://docs.coinex.com/api/v2/spot/market/http/list-market
|
|
1346
|
+
* @see https://docs.coinex.com/api/v2/futures/market/http/list-market
|
|
1347
|
+
* @param {string} symbol unified market symbol
|
|
1348
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1349
|
+
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
1350
|
+
*/
|
|
1340
1351
|
async fetchTradingFee(symbol, params = {}) {
|
|
1341
|
-
/**
|
|
1342
|
-
* @method
|
|
1343
|
-
* @name coinex#fetchTradingFee
|
|
1344
|
-
* @description fetch the trading fees for a market
|
|
1345
|
-
* @see https://docs.coinex.com/api/v2/spot/market/http/list-market
|
|
1346
|
-
* @see https://docs.coinex.com/api/v2/futures/market/http/list-market
|
|
1347
|
-
* @param {string} symbol unified market symbol
|
|
1348
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1349
|
-
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
1350
|
-
*/
|
|
1351
1352
|
await this.loadMarkets();
|
|
1352
1353
|
const market = this.market(symbol);
|
|
1353
1354
|
const request = {
|
|
@@ -1405,16 +1406,16 @@ class coinex extends coinex$1 {
|
|
|
1405
1406
|
const result = this.safeDict(data, 0, {});
|
|
1406
1407
|
return this.parseTradingFee(result, market);
|
|
1407
1408
|
}
|
|
1409
|
+
/**
|
|
1410
|
+
* @method
|
|
1411
|
+
* @name coinex#fetchTradingFees
|
|
1412
|
+
* @description fetch the trading fees for multiple markets
|
|
1413
|
+
* @see https://docs.coinex.com/api/v2/spot/market/http/list-market
|
|
1414
|
+
* @see https://docs.coinex.com/api/v2/futures/market/http/list-market
|
|
1415
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1416
|
+
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
1417
|
+
*/
|
|
1408
1418
|
async fetchTradingFees(params = {}) {
|
|
1409
|
-
/**
|
|
1410
|
-
* @method
|
|
1411
|
-
* @name coinex#fetchTradingFees
|
|
1412
|
-
* @description fetch the trading fees for multiple markets
|
|
1413
|
-
* @see https://docs.coinex.com/api/v2/spot/market/http/list-market
|
|
1414
|
-
* @see https://docs.coinex.com/api/v2/futures/market/http/list-market
|
|
1415
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1416
|
-
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
1417
|
-
*/
|
|
1418
1419
|
await this.loadMarkets();
|
|
1419
1420
|
let type = undefined;
|
|
1420
1421
|
[type, params] = this.handleMarketTypeAndParams('fetchTradingFees', undefined, params);
|
|
@@ -1511,20 +1512,20 @@ class coinex extends coinex$1 {
|
|
|
1511
1512
|
this.safeNumber(ohlcv, 'value'),
|
|
1512
1513
|
];
|
|
1513
1514
|
}
|
|
1515
|
+
/**
|
|
1516
|
+
* @method
|
|
1517
|
+
* @name coinex#fetchOHLCV
|
|
1518
|
+
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1519
|
+
* @see https://docs.coinex.com/api/v2/spot/market/http/list-market-kline
|
|
1520
|
+
* @see https://docs.coinex.com/api/v2/futures/market/http/list-market-kline
|
|
1521
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1522
|
+
* @param {string} timeframe the length of time each candle represents
|
|
1523
|
+
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
1524
|
+
* @param {int} [limit] the maximum amount of candles to fetch
|
|
1525
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1526
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
1527
|
+
*/
|
|
1514
1528
|
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
1515
|
-
/**
|
|
1516
|
-
* @method
|
|
1517
|
-
* @name coinex#fetchOHLCV
|
|
1518
|
-
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1519
|
-
* @see https://docs.coinex.com/api/v2/spot/market/http/list-market-kline
|
|
1520
|
-
* @see https://docs.coinex.com/api/v2/futures/market/http/list-market-kline
|
|
1521
|
-
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1522
|
-
* @param {string} timeframe the length of time each candle represents
|
|
1523
|
-
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
1524
|
-
* @param {int} [limit] the maximum amount of candles to fetch
|
|
1525
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1526
|
-
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
1527
|
-
*/
|
|
1528
1529
|
await this.loadMarkets();
|
|
1529
1530
|
const market = this.market(symbol);
|
|
1530
1531
|
const request = {
|
|
@@ -1708,19 +1709,19 @@ class coinex extends coinex$1 {
|
|
|
1708
1709
|
}
|
|
1709
1710
|
return this.safeBalance(result);
|
|
1710
1711
|
}
|
|
1712
|
+
/**
|
|
1713
|
+
* @method
|
|
1714
|
+
* @name coinex#fetchBalance
|
|
1715
|
+
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
1716
|
+
* @see https://docs.coinex.com/api/v2/assets/balance/http/get-spot-balance // spot
|
|
1717
|
+
* @see https://docs.coinex.com/api/v2/assets/balance/http/get-futures-balance // swap
|
|
1718
|
+
* @see https://docs.coinex.com/api/v2/assets/balance/http/get-marigin-balance // margin
|
|
1719
|
+
* @see https://docs.coinex.com/api/v2/assets/balance/http/get-financial-balance // financial
|
|
1720
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1721
|
+
* @param {string} [params.type] 'margin', 'swap', 'financial', or 'spot'
|
|
1722
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
1723
|
+
*/
|
|
1711
1724
|
async fetchBalance(params = {}) {
|
|
1712
|
-
/**
|
|
1713
|
-
* @method
|
|
1714
|
-
* @name coinex#fetchBalance
|
|
1715
|
-
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
1716
|
-
* @see https://docs.coinex.com/api/v2/assets/balance/http/get-spot-balance // spot
|
|
1717
|
-
* @see https://docs.coinex.com/api/v2/assets/balance/http/get-futures-balance // swap
|
|
1718
|
-
* @see https://docs.coinex.com/api/v2/assets/balance/http/get-marigin-balance // margin
|
|
1719
|
-
* @see https://docs.coinex.com/api/v2/assets/balance/http/get-financial-balance // financial
|
|
1720
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1721
|
-
* @param {string} [params.type] 'margin', 'swap', 'financial', or 'spot'
|
|
1722
|
-
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
1723
|
-
*/
|
|
1724
1725
|
let marketType = undefined;
|
|
1725
1726
|
[marketType, params] = this.handleMarketTypeAndParams('fetchBalance', undefined, params);
|
|
1726
1727
|
let marginMode = undefined;
|
|
@@ -2019,18 +2020,18 @@ class coinex extends coinex$1 {
|
|
|
2019
2020
|
'info': order,
|
|
2020
2021
|
}, market);
|
|
2021
2022
|
}
|
|
2023
|
+
/**
|
|
2024
|
+
* @method
|
|
2025
|
+
* @name coinex#createMarketBuyOrderWithCost
|
|
2026
|
+
* @description create a market buy order by providing the symbol and cost
|
|
2027
|
+
* @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot003_trade003_market_order
|
|
2028
|
+
* @see https://docs.coinex.com/api/v2/spot/order/http/put-order
|
|
2029
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
2030
|
+
* @param {float} cost how much you want to trade in units of the quote currency
|
|
2031
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2032
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2033
|
+
*/
|
|
2022
2034
|
async createMarketBuyOrderWithCost(symbol, cost, params = {}) {
|
|
2023
|
-
/**
|
|
2024
|
-
* @method
|
|
2025
|
-
* @name coinex#createMarketBuyOrderWithCost
|
|
2026
|
-
* @description create a market buy order by providing the symbol and cost
|
|
2027
|
-
* @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot003_trade003_market_order
|
|
2028
|
-
* @see https://docs.coinex.com/api/v2/spot/order/http/put-order
|
|
2029
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
2030
|
-
* @param {float} cost how much you want to trade in units of the quote currency
|
|
2031
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2032
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2033
|
-
*/
|
|
2034
2035
|
await this.loadMarkets();
|
|
2035
2036
|
const market = this.market(symbol);
|
|
2036
2037
|
if (!market['spot']) {
|
|
@@ -2148,32 +2149,32 @@ class coinex extends coinex$1 {
|
|
|
2148
2149
|
params = this.omit(params, ['reduceOnly', 'timeInForce', 'postOnly', 'stopPrice', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice']);
|
|
2149
2150
|
return this.extend(request, params);
|
|
2150
2151
|
}
|
|
2152
|
+
/**
|
|
2153
|
+
* @method
|
|
2154
|
+
* @name coinex#createOrder
|
|
2155
|
+
* @description create a trade order
|
|
2156
|
+
* @see https://docs.coinex.com/api/v2/spot/order/http/put-order
|
|
2157
|
+
* @see https://docs.coinex.com/api/v2/spot/order/http/put-stop-order
|
|
2158
|
+
* @see https://docs.coinex.com/api/v2/futures/order/http/put-order
|
|
2159
|
+
* @see https://docs.coinex.com/api/v2/futures/order/http/put-stop-order
|
|
2160
|
+
* @see https://docs.coinex.com/api/v2/futures/position/http/close-position
|
|
2161
|
+
* @see https://docs.coinex.com/api/v2/futures/position/http/set-position-stop-loss
|
|
2162
|
+
* @see https://docs.coinex.com/api/v2/futures/position/http/set-position-take-profit
|
|
2163
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
2164
|
+
* @param {string} type 'market' or 'limit'
|
|
2165
|
+
* @param {string} side 'buy' or 'sell'
|
|
2166
|
+
* @param {float} amount how much you want to trade in units of the base currency
|
|
2167
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
2168
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2169
|
+
* @param {float} [params.triggerPrice] price to trigger stop orders
|
|
2170
|
+
* @param {float} [params.stopLossPrice] price to trigger stop loss orders
|
|
2171
|
+
* @param {float} [params.takeProfitPrice] price to trigger take profit orders
|
|
2172
|
+
* @param {string} [params.timeInForce] 'GTC', 'IOC', 'FOK', 'PO'
|
|
2173
|
+
* @param {boolean} [params.postOnly] set to true if you wish to make a post only order
|
|
2174
|
+
* @param {boolean} [params.reduceOnly] *contract only* indicates if this order is to reduce the size of a position
|
|
2175
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2176
|
+
*/
|
|
2151
2177
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
2152
|
-
/**
|
|
2153
|
-
* @method
|
|
2154
|
-
* @name coinex#createOrder
|
|
2155
|
-
* @description create a trade order
|
|
2156
|
-
* @see https://docs.coinex.com/api/v2/spot/order/http/put-order
|
|
2157
|
-
* @see https://docs.coinex.com/api/v2/spot/order/http/put-stop-order
|
|
2158
|
-
* @see https://docs.coinex.com/api/v2/futures/order/http/put-order
|
|
2159
|
-
* @see https://docs.coinex.com/api/v2/futures/order/http/put-stop-order
|
|
2160
|
-
* @see https://docs.coinex.com/api/v2/futures/position/http/close-position
|
|
2161
|
-
* @see https://docs.coinex.com/api/v2/futures/position/http/set-position-stop-loss
|
|
2162
|
-
* @see https://docs.coinex.com/api/v2/futures/position/http/set-position-take-profit
|
|
2163
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
2164
|
-
* @param {string} type 'market' or 'limit'
|
|
2165
|
-
* @param {string} side 'buy' or 'sell'
|
|
2166
|
-
* @param {float} amount how much you want to trade in units of the base currency
|
|
2167
|
-
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
2168
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2169
|
-
* @param {float} [params.triggerPrice] price to trigger stop orders
|
|
2170
|
-
* @param {float} [params.stopLossPrice] price to trigger stop loss orders
|
|
2171
|
-
* @param {float} [params.takeProfitPrice] price to trigger take profit orders
|
|
2172
|
-
* @param {string} [params.timeInForce] 'GTC', 'IOC', 'FOK', 'PO'
|
|
2173
|
-
* @param {boolean} [params.postOnly] set to true if you wish to make a post only order
|
|
2174
|
-
* @param {boolean} [params.reduceOnly] *contract only* indicates if this order is to reduce the size of a position
|
|
2175
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2176
|
-
*/
|
|
2177
2178
|
await this.loadMarkets();
|
|
2178
2179
|
const market = this.market(symbol);
|
|
2179
2180
|
const reduceOnly = this.safeBool(params, 'reduceOnly');
|
|
@@ -2397,19 +2398,19 @@ class coinex extends coinex$1 {
|
|
|
2397
2398
|
const data = this.safeDict(response, 'data', {});
|
|
2398
2399
|
return this.parseOrder(data, market);
|
|
2399
2400
|
}
|
|
2401
|
+
/**
|
|
2402
|
+
* @method
|
|
2403
|
+
* @name coinex#createOrders
|
|
2404
|
+
* @description create a list of trade orders (all orders should be of the same symbol)
|
|
2405
|
+
* @see https://docs.coinex.com/api/v2/spot/order/http/put-multi-order
|
|
2406
|
+
* @see https://docs.coinex.com/api/v2/spot/order/http/put-multi-stop-order
|
|
2407
|
+
* @see https://docs.coinex.com/api/v2/futures/order/http/put-multi-order
|
|
2408
|
+
* @see https://docs.coinex.com/api/v2/futures/order/http/put-multi-stop-order
|
|
2409
|
+
* @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
|
|
2410
|
+
* @param {object} [params] extra parameters specific to the api endpoint
|
|
2411
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2412
|
+
*/
|
|
2400
2413
|
async createOrders(orders, params = {}) {
|
|
2401
|
-
/**
|
|
2402
|
-
* @method
|
|
2403
|
-
* @name coinex#createOrders
|
|
2404
|
-
* @description create a list of trade orders (all orders should be of the same symbol)
|
|
2405
|
-
* @see https://docs.coinex.com/api/v2/spot/order/http/put-multi-order
|
|
2406
|
-
* @see https://docs.coinex.com/api/v2/spot/order/http/put-multi-stop-order
|
|
2407
|
-
* @see https://docs.coinex.com/api/v2/futures/order/http/put-multi-order
|
|
2408
|
-
* @see https://docs.coinex.com/api/v2/futures/order/http/put-multi-stop-order
|
|
2409
|
-
* @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
|
|
2410
|
-
* @param {object} [params] extra parameters specific to the api endpoint
|
|
2411
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2412
|
-
*/
|
|
2413
2414
|
await this.loadMarkets();
|
|
2414
2415
|
const ordersRequests = [];
|
|
2415
2416
|
let symbol = undefined;
|
|
@@ -2604,21 +2605,21 @@ class coinex extends coinex$1 {
|
|
|
2604
2605
|
}
|
|
2605
2606
|
return results;
|
|
2606
2607
|
}
|
|
2608
|
+
/**
|
|
2609
|
+
* @method
|
|
2610
|
+
* @name coinex#cancelOrders
|
|
2611
|
+
* @description cancel multiple orders
|
|
2612
|
+
* @see https://docs.coinex.com/api/v2/spot/order/http/cancel-batch-order
|
|
2613
|
+
* @see https://docs.coinex.com/api/v2/spot/order/http/cancel-batch-stop-order
|
|
2614
|
+
* @see https://docs.coinex.com/api/v2/futures/order/http/cancel-batch-order
|
|
2615
|
+
* @see https://docs.coinex.com/api/v2/futures/order/http/cancel-batch-stop-order
|
|
2616
|
+
* @param {string[]} ids order ids
|
|
2617
|
+
* @param {string} symbol unified market symbol
|
|
2618
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2619
|
+
* @param {boolean} [params.trigger] set to true for canceling stop orders
|
|
2620
|
+
* @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2621
|
+
*/
|
|
2607
2622
|
async cancelOrders(ids, symbol = undefined, params = {}) {
|
|
2608
|
-
/**
|
|
2609
|
-
* @method
|
|
2610
|
-
* @name coinex#cancelOrders
|
|
2611
|
-
* @description cancel multiple orders
|
|
2612
|
-
* @see https://docs.coinex.com/api/v2/spot/order/http/cancel-batch-order
|
|
2613
|
-
* @see https://docs.coinex.com/api/v2/spot/order/http/cancel-batch-stop-order
|
|
2614
|
-
* @see https://docs.coinex.com/api/v2/futures/order/http/cancel-batch-order
|
|
2615
|
-
* @see https://docs.coinex.com/api/v2/futures/order/http/cancel-batch-stop-order
|
|
2616
|
-
* @param {string[]} ids order ids
|
|
2617
|
-
* @param {string} symbol unified market symbol
|
|
2618
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2619
|
-
* @param {boolean} [params.trigger] set to true for canceling stop orders
|
|
2620
|
-
* @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2621
|
-
*/
|
|
2622
2623
|
if (symbol === undefined) {
|
|
2623
2624
|
throw new errors.ArgumentsRequired(this.id + ' cancelOrders() requires a symbol argument');
|
|
2624
2625
|
}
|
|
@@ -2630,11 +2631,15 @@ class coinex extends coinex$1 {
|
|
|
2630
2631
|
const stop = this.safeBool2(params, 'stop', 'trigger');
|
|
2631
2632
|
params = this.omit(params, ['stop', 'trigger']);
|
|
2632
2633
|
let response = undefined;
|
|
2634
|
+
const requestIds = [];
|
|
2635
|
+
for (let i = 0; i < ids.length; i++) {
|
|
2636
|
+
requestIds.push(parseInt(ids[i]));
|
|
2637
|
+
}
|
|
2633
2638
|
if (stop) {
|
|
2634
|
-
request['stop_ids'] =
|
|
2639
|
+
request['stop_ids'] = requestIds;
|
|
2635
2640
|
}
|
|
2636
2641
|
else {
|
|
2637
|
-
request['order_ids'] =
|
|
2642
|
+
request['order_ids'] = requestIds;
|
|
2638
2643
|
}
|
|
2639
2644
|
if (market['spot']) {
|
|
2640
2645
|
if (stop) {
|
|
@@ -2787,25 +2792,25 @@ class coinex extends coinex$1 {
|
|
|
2787
2792
|
}
|
|
2788
2793
|
return results;
|
|
2789
2794
|
}
|
|
2795
|
+
/**
|
|
2796
|
+
* @method
|
|
2797
|
+
* @name coinex#editOrder
|
|
2798
|
+
* @description edit a trade order
|
|
2799
|
+
* @see https://docs.coinex.com/api/v2/spot/order/http/edit-order
|
|
2800
|
+
* @see https://docs.coinex.com/api/v2/spot/order/http/edit-stop-order
|
|
2801
|
+
* @see https://docs.coinex.com/api/v2/futures/order/http/edit-order
|
|
2802
|
+
* @see https://docs.coinex.com/api/v2/futures/order/http/edit-stop-order
|
|
2803
|
+
* @param {string} id order id
|
|
2804
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
2805
|
+
* @param {string} type 'market' or 'limit'
|
|
2806
|
+
* @param {string} side 'buy' or 'sell'
|
|
2807
|
+
* @param {float} amount how much of the currency you want to trade in units of the base currency
|
|
2808
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
2809
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2810
|
+
* @param {float} [params.triggerPrice] the price to trigger stop orders
|
|
2811
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2812
|
+
*/
|
|
2790
2813
|
async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
2791
|
-
/**
|
|
2792
|
-
* @method
|
|
2793
|
-
* @name coinex#editOrder
|
|
2794
|
-
* @description edit a trade order
|
|
2795
|
-
* @see https://docs.coinex.com/api/v2/spot/order/http/edit-order
|
|
2796
|
-
* @see https://docs.coinex.com/api/v2/spot/order/http/edit-stop-order
|
|
2797
|
-
* @see https://docs.coinex.com/api/v2/futures/order/http/edit-order
|
|
2798
|
-
* @see https://docs.coinex.com/api/v2/futures/order/http/edit-stop-order
|
|
2799
|
-
* @param {string} id order id
|
|
2800
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
2801
|
-
* @param {string} type 'market' or 'limit'
|
|
2802
|
-
* @param {string} side 'buy' or 'sell'
|
|
2803
|
-
* @param {float} amount how much of the currency you want to trade in units of the base currency
|
|
2804
|
-
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
2805
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2806
|
-
* @param {float} [params.triggerPrice] the price to trigger stop orders
|
|
2807
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2808
|
-
*/
|
|
2809
2814
|
if (symbol === undefined) {
|
|
2810
2815
|
throw new errors.ArgumentsRequired(this.id + ' editOrder() requires a symbol argument');
|
|
2811
2816
|
}
|
|
@@ -2935,26 +2940,26 @@ class coinex extends coinex$1 {
|
|
|
2935
2940
|
const data = this.safeDict(response, 'data', {});
|
|
2936
2941
|
return this.parseOrder(data, market);
|
|
2937
2942
|
}
|
|
2943
|
+
/**
|
|
2944
|
+
* @method
|
|
2945
|
+
* @name coinex#cancelOrder
|
|
2946
|
+
* @description cancels an open order
|
|
2947
|
+
* @see https://docs.coinex.com/api/v2/spot/order/http/cancel-order
|
|
2948
|
+
* @see https://docs.coinex.com/api/v2/spot/order/http/cancel-stop-order
|
|
2949
|
+
* @see https://docs.coinex.com/api/v2/spot/order/http/cancel-order-by-client-id
|
|
2950
|
+
* @see https://docs.coinex.com/api/v2/spot/order/http/cancel-stop-order-by-client-id
|
|
2951
|
+
* @see https://docs.coinex.com/api/v2/futures/order/http/cancel-order
|
|
2952
|
+
* @see https://docs.coinex.com/api/v2/futures/order/http/cancel-stop-order
|
|
2953
|
+
* @see https://docs.coinex.com/api/v2/futures/order/http/cancel-order-by-client-id
|
|
2954
|
+
* @see https://docs.coinex.com/api/v2/futures/order/http/cancel-stop-order-by-client-id
|
|
2955
|
+
* @param {string} id order id
|
|
2956
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
2957
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2958
|
+
* @param {string} [params.clientOrderId] client order id, defaults to id if not passed
|
|
2959
|
+
* @param {boolean} [params.trigger] set to true for canceling a trigger order
|
|
2960
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2961
|
+
*/
|
|
2938
2962
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
2939
|
-
/**
|
|
2940
|
-
* @method
|
|
2941
|
-
* @name coinex#cancelOrder
|
|
2942
|
-
* @description cancels an open order
|
|
2943
|
-
* @see https://docs.coinex.com/api/v2/spot/order/http/cancel-order
|
|
2944
|
-
* @see https://docs.coinex.com/api/v2/spot/order/http/cancel-stop-order
|
|
2945
|
-
* @see https://docs.coinex.com/api/v2/spot/order/http/cancel-order-by-client-id
|
|
2946
|
-
* @see https://docs.coinex.com/api/v2/spot/order/http/cancel-stop-order-by-client-id
|
|
2947
|
-
* @see https://docs.coinex.com/api/v2/futures/order/http/cancel-order
|
|
2948
|
-
* @see https://docs.coinex.com/api/v2/futures/order/http/cancel-stop-order
|
|
2949
|
-
* @see https://docs.coinex.com/api/v2/futures/order/http/cancel-order-by-client-id
|
|
2950
|
-
* @see https://docs.coinex.com/api/v2/futures/order/http/cancel-stop-order-by-client-id
|
|
2951
|
-
* @param {string} id order id
|
|
2952
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
2953
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2954
|
-
* @param {string} [params.clientOrderId] client order id, defaults to id if not passed
|
|
2955
|
-
* @param {boolean} [params.trigger] set to true for canceling a trigger order
|
|
2956
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2957
|
-
*/
|
|
2958
2963
|
if (symbol === undefined) {
|
|
2959
2964
|
throw new errors.ArgumentsRequired(this.id + ' cancelOrder() requires a symbol argument');
|
|
2960
2965
|
}
|
|
@@ -3239,18 +3244,18 @@ class coinex extends coinex$1 {
|
|
|
3239
3244
|
}
|
|
3240
3245
|
return this.parseOrder(data, market);
|
|
3241
3246
|
}
|
|
3247
|
+
/**
|
|
3248
|
+
* @method
|
|
3249
|
+
* @name coinex#cancelAllOrders
|
|
3250
|
+
* @description cancel all open orders in a market
|
|
3251
|
+
* @see https://docs.coinex.com/api/v2/spot/order/http/cancel-all-order
|
|
3252
|
+
* @see https://docs.coinex.com/api/v2/futures/order/http/cancel-all-order
|
|
3253
|
+
* @param {string} symbol unified market symbol of the market to cancel orders in
|
|
3254
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3255
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' for canceling spot margin orders
|
|
3256
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3257
|
+
*/
|
|
3242
3258
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
3243
|
-
/**
|
|
3244
|
-
* @method
|
|
3245
|
-
* @name coinex#cancelAllOrders
|
|
3246
|
-
* @description cancel all open orders in a market
|
|
3247
|
-
* @see https://docs.coinex.com/api/v2/spot/order/http/cancel-all-order
|
|
3248
|
-
* @see https://docs.coinex.com/api/v2/futures/order/http/cancel-all-order
|
|
3249
|
-
* @param {string} symbol unified market symbol of the market to cancel orders in
|
|
3250
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3251
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' for canceling spot margin orders
|
|
3252
|
-
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3253
|
-
*/
|
|
3254
3259
|
if (symbol === undefined) {
|
|
3255
3260
|
throw new errors.ArgumentsRequired(this.id + ' cancelAllOrders() requires a symbol argument');
|
|
3256
3261
|
}
|
|
@@ -3287,17 +3292,18 @@ class coinex extends coinex$1 {
|
|
|
3287
3292
|
}),
|
|
3288
3293
|
];
|
|
3289
3294
|
}
|
|
3295
|
+
/**
|
|
3296
|
+
* @method
|
|
3297
|
+
* @name coinex#fetchOrder
|
|
3298
|
+
* @description fetches information on an order made by the user
|
|
3299
|
+
* @see https://docs.coinex.com/api/v2/spot/order/http/get-order-status
|
|
3300
|
+
* @see https://docs.coinex.com/api/v2/futures/order/http/get-order-status
|
|
3301
|
+
* @param {string} id order id
|
|
3302
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
3303
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3304
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3305
|
+
*/
|
|
3290
3306
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
3291
|
-
/**
|
|
3292
|
-
* @method
|
|
3293
|
-
* @name coinex#fetchOrder
|
|
3294
|
-
* @description fetches information on an order made by the user
|
|
3295
|
-
* @see https://docs.coinex.com/api/v2/spot/order/http/get-order-status
|
|
3296
|
-
* @see https://docs.coinex.com/api/v2/futures/order/http/get-order-status
|
|
3297
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
3298
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3299
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3300
|
-
*/
|
|
3301
3307
|
if (symbol === undefined) {
|
|
3302
3308
|
throw new errors.ArgumentsRequired(this.id + ' fetchOrder() requires a symbol argument');
|
|
3303
3309
|
}
|
|
@@ -3376,22 +3382,24 @@ class coinex extends coinex$1 {
|
|
|
3376
3382
|
const data = this.safeDict(response, 'data', {});
|
|
3377
3383
|
return this.parseOrder(data, market);
|
|
3378
3384
|
}
|
|
3385
|
+
/**
|
|
3386
|
+
* @method
|
|
3387
|
+
* @name coinex#fetchOrdersByStatus
|
|
3388
|
+
* @description fetch a list of orders
|
|
3389
|
+
* @see https://docs.coinex.com/api/v2/spot/order/http/list-finished-order
|
|
3390
|
+
* @see https://docs.coinex.com/api/v2/spot/order/http/list-finished-stop-order
|
|
3391
|
+
* @see https://docs.coinex.com/api/v2/futures/order/http/list-finished-order
|
|
3392
|
+
* @see https://docs.coinex.com/api/v2/futures/order/http/list-finished-stop-order
|
|
3393
|
+
* @param {string} status order status to fetch for
|
|
3394
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
3395
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
3396
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
3397
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3398
|
+
* @param {boolean} [params.trigger] set to true for fetching trigger orders
|
|
3399
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' for fetching spot margin orders
|
|
3400
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3401
|
+
*/
|
|
3379
3402
|
async fetchOrdersByStatus(status, symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3380
|
-
/**
|
|
3381
|
-
* @method
|
|
3382
|
-
* @name coinex#fetchOrdersByStatus
|
|
3383
|
-
* @description fetch a list of orders
|
|
3384
|
-
* @see https://docs.coinex.com/api/v2/spot/order/http/list-finished-order
|
|
3385
|
-
* @see https://docs.coinex.com/api/v2/spot/order/http/list-finished-stop-order
|
|
3386
|
-
* @see https://docs.coinex.com/api/v2/futures/order/http/list-finished-order
|
|
3387
|
-
* @see https://docs.coinex.com/api/v2/futures/order/http/list-finished-stop-order
|
|
3388
|
-
* @param {string} symbol unified market symbol of the market orders were made in
|
|
3389
|
-
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
3390
|
-
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
3391
|
-
* @param {boolean} [params.trigger] set to true for fetching trigger orders
|
|
3392
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' for fetching spot margin orders
|
|
3393
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3394
|
-
*/
|
|
3395
3403
|
await this.loadMarkets();
|
|
3396
3404
|
const request = {};
|
|
3397
3405
|
let market = undefined;
|
|
@@ -3696,58 +3704,59 @@ class coinex extends coinex$1 {
|
|
|
3696
3704
|
const data = this.safeList(response, 'data', []);
|
|
3697
3705
|
return this.parseOrders(data, market, since, limit);
|
|
3698
3706
|
}
|
|
3707
|
+
/**
|
|
3708
|
+
* @method
|
|
3709
|
+
* @name coinex#fetchOpenOrders
|
|
3710
|
+
* @description fetch all unfilled currently open orders
|
|
3711
|
+
* @see https://docs.coinex.com/api/v2/spot/order/http/list-pending-order
|
|
3712
|
+
* @see https://docs.coinex.com/api/v2/spot/order/http/list-pending-stop-order
|
|
3713
|
+
* @see https://docs.coinex.com/api/v2/futures/order/http/list-pending-order
|
|
3714
|
+
* @see https://docs.coinex.com/api/v2/futures/order/http/list-pending-stop-order
|
|
3715
|
+
* @param {string} symbol unified market symbol
|
|
3716
|
+
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
3717
|
+
* @param {int} [limit] the maximum number of open order structures to retrieve
|
|
3718
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3719
|
+
* @param {boolean} [params.trigger] set to true for fetching trigger orders
|
|
3720
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' for fetching spot margin orders
|
|
3721
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3722
|
+
*/
|
|
3699
3723
|
async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3700
|
-
/**
|
|
3701
|
-
* @method
|
|
3702
|
-
* @name coinex#fetchOpenOrders
|
|
3703
|
-
* @description fetch all unfilled currently open orders
|
|
3704
|
-
* @see https://docs.coinex.com/api/v2/spot/order/http/list-pending-order
|
|
3705
|
-
* @see https://docs.coinex.com/api/v2/spot/order/http/list-pending-stop-order
|
|
3706
|
-
* @see https://docs.coinex.com/api/v2/futures/order/http/list-pending-order
|
|
3707
|
-
* @see https://docs.coinex.com/api/v2/futures/order/http/list-pending-stop-order
|
|
3708
|
-
* @param {string} symbol unified market symbol
|
|
3709
|
-
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
3710
|
-
* @param {int} [limit] the maximum number of open order structures to retrieve
|
|
3711
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3712
|
-
* @param {boolean} [params.trigger] set to true for fetching trigger orders
|
|
3713
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' for fetching spot margin orders
|
|
3714
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3715
|
-
*/
|
|
3716
3724
|
const openOrders = await this.fetchOrdersByStatus('pending', symbol, since, limit, params);
|
|
3717
3725
|
for (let i = 0; i < openOrders.length; i++) {
|
|
3718
3726
|
openOrders[i]['status'] = 'open';
|
|
3719
3727
|
}
|
|
3720
3728
|
return openOrders;
|
|
3721
3729
|
}
|
|
3730
|
+
/**
|
|
3731
|
+
* @method
|
|
3732
|
+
* @name coinex#fetchClosedOrders
|
|
3733
|
+
* @description fetches information on multiple closed orders made by the user
|
|
3734
|
+
* @see https://docs.coinex.com/api/v2/spot/order/http/list-finished-order
|
|
3735
|
+
* @see https://docs.coinex.com/api/v2/spot/order/http/list-finished-stop-order
|
|
3736
|
+
* @see https://docs.coinex.com/api/v2/futures/order/http/list-finished-order
|
|
3737
|
+
* @see https://docs.coinex.com/api/v2/futures/order/http/list-finished-stop-order
|
|
3738
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
3739
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
3740
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
3741
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3742
|
+
* @param {boolean} [params.trigger] set to true for fetching trigger orders
|
|
3743
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' for fetching spot margin orders
|
|
3744
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3745
|
+
*/
|
|
3722
3746
|
async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3723
|
-
/**
|
|
3724
|
-
* @method
|
|
3725
|
-
* @name coinex#fetchClosedOrders
|
|
3726
|
-
* @description fetches information on multiple closed orders made by the user
|
|
3727
|
-
* @see https://docs.coinex.com/api/v2/spot/order/http/list-finished-order
|
|
3728
|
-
* @see https://docs.coinex.com/api/v2/spot/order/http/list-finished-stop-order
|
|
3729
|
-
* @see https://docs.coinex.com/api/v2/futures/order/http/list-finished-order
|
|
3730
|
-
* @see https://docs.coinex.com/api/v2/futures/order/http/list-finished-stop-order
|
|
3731
|
-
* @param {string} symbol unified market symbol of the market orders were made in
|
|
3732
|
-
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
3733
|
-
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
3734
|
-
* @param {boolean} [params.trigger] set to true for fetching trigger orders
|
|
3735
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' for fetching spot margin orders
|
|
3736
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3737
|
-
*/
|
|
3738
3747
|
return await this.fetchOrdersByStatus('finished', symbol, since, limit, params);
|
|
3739
3748
|
}
|
|
3749
|
+
/**
|
|
3750
|
+
* @method
|
|
3751
|
+
* @name coinex#createDepositAddress
|
|
3752
|
+
* @description create a currency deposit address
|
|
3753
|
+
* @see https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/update-deposit-address
|
|
3754
|
+
* @param {string} code unified currency code of the currency for the deposit address
|
|
3755
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3756
|
+
* @param {string} [params.network] the blockchain network to create a deposit address on
|
|
3757
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
3758
|
+
*/
|
|
3740
3759
|
async createDepositAddress(code, params = {}) {
|
|
3741
|
-
/**
|
|
3742
|
-
* @method
|
|
3743
|
-
* @name coinex#createDepositAddress
|
|
3744
|
-
* @description create a currency deposit address
|
|
3745
|
-
* @see https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/update-deposit-address
|
|
3746
|
-
* @param {string} code unified currency code of the currency for the deposit address
|
|
3747
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3748
|
-
* @param {string} [params.network] the blockchain network to create a deposit address on
|
|
3749
|
-
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
3750
|
-
*/
|
|
3751
3760
|
await this.loadMarkets();
|
|
3752
3761
|
const currency = this.currency(code);
|
|
3753
3762
|
const network = this.safeString2(params, 'chain', 'network');
|
|
@@ -3773,17 +3782,17 @@ class coinex extends coinex$1 {
|
|
|
3773
3782
|
const data = this.safeDict(response, 'data', {});
|
|
3774
3783
|
return this.parseDepositAddress(data, currency);
|
|
3775
3784
|
}
|
|
3785
|
+
/**
|
|
3786
|
+
* @method
|
|
3787
|
+
* @name coinex#fetchDepositAddress
|
|
3788
|
+
* @description fetch the deposit address for a currency associated with this account
|
|
3789
|
+
* @see https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/get-deposit-address
|
|
3790
|
+
* @param {string} code unified currency code
|
|
3791
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3792
|
+
* @param {string} [params.network] the blockchain network to create a deposit address on
|
|
3793
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
3794
|
+
*/
|
|
3776
3795
|
async fetchDepositAddress(code, params = {}) {
|
|
3777
|
-
/**
|
|
3778
|
-
* @method
|
|
3779
|
-
* @name coinex#fetchDepositAddress
|
|
3780
|
-
* @description fetch the deposit address for a currency associated with this account
|
|
3781
|
-
* @see https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/get-deposit-address
|
|
3782
|
-
* @param {string} code unified currency code
|
|
3783
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3784
|
-
* @param {string} [params.network] the blockchain network to create a deposit address on
|
|
3785
|
-
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
3786
|
-
*/
|
|
3787
3796
|
await this.loadMarkets();
|
|
3788
3797
|
const currency = this.currency(code);
|
|
3789
3798
|
const request = {
|
|
@@ -3836,21 +3845,21 @@ class coinex extends coinex$1 {
|
|
|
3836
3845
|
'tag': tag,
|
|
3837
3846
|
};
|
|
3838
3847
|
}
|
|
3848
|
+
/**
|
|
3849
|
+
* @method
|
|
3850
|
+
* @name coinex#fetchMyTrades
|
|
3851
|
+
* @description fetch all trades made by the user
|
|
3852
|
+
* @see https://docs.coinex.com/api/v2/spot/deal/http/list-user-deals
|
|
3853
|
+
* @see https://docs.coinex.com/api/v2/futures/deal/http/list-user-deals
|
|
3854
|
+
* @param {string} symbol unified market symbol
|
|
3855
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
3856
|
+
* @param {int} [limit] the maximum number of trade structures to retrieve
|
|
3857
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3858
|
+
* @param {int} [params.until] timestamp in ms of the latest trades
|
|
3859
|
+
* @param {string} [params.side] the side of the trades, either 'buy' or 'sell', required for swap
|
|
3860
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
3861
|
+
*/
|
|
3839
3862
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3840
|
-
/**
|
|
3841
|
-
* @method
|
|
3842
|
-
* @name coinex#fetchMyTrades
|
|
3843
|
-
* @description fetch all trades made by the user
|
|
3844
|
-
* @see https://docs.coinex.com/api/v2/spot/deal/http/list-user-deals
|
|
3845
|
-
* @see https://docs.coinex.com/api/v2/futures/deal/http/list-user-deals
|
|
3846
|
-
* @param {string} symbol unified market symbol
|
|
3847
|
-
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
3848
|
-
* @param {int} [limit] the maximum number of trade structures to retrieve
|
|
3849
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3850
|
-
* @param {int} [params.until] timestamp in ms of the latest trades
|
|
3851
|
-
* @param {string} [params.side] the side of the trades, either 'buy' or 'sell', required for swap
|
|
3852
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
3853
|
-
*/
|
|
3854
3863
|
if (symbol === undefined) {
|
|
3855
3864
|
throw new errors.ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol argument');
|
|
3856
3865
|
}
|
|
@@ -3926,18 +3935,18 @@ class coinex extends coinex$1 {
|
|
|
3926
3935
|
const data = this.safeList(response, 'data', []);
|
|
3927
3936
|
return this.parseTrades(data, market, since, limit);
|
|
3928
3937
|
}
|
|
3938
|
+
/**
|
|
3939
|
+
* @method
|
|
3940
|
+
* @name coinex#fetchPositions
|
|
3941
|
+
* @description fetch all open positions
|
|
3942
|
+
* @see https://docs.coinex.com/api/v2/futures/position/http/list-pending-position
|
|
3943
|
+
* @see https://docs.coinex.com/api/v2/futures/position/http/list-finished-position
|
|
3944
|
+
* @param {string[]} [symbols] list of unified market symbols
|
|
3945
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3946
|
+
* @param {string} [params.method] the method to use 'v2PrivateGetFuturesPendingPosition' or 'v2PrivateGetFuturesFinishedPosition' default is 'v2PrivateGetFuturesPendingPosition'
|
|
3947
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
3948
|
+
*/
|
|
3929
3949
|
async fetchPositions(symbols = undefined, params = {}) {
|
|
3930
|
-
/**
|
|
3931
|
-
* @method
|
|
3932
|
-
* @name coinex#fetchPositions
|
|
3933
|
-
* @description fetch all open positions
|
|
3934
|
-
* @see https://docs.coinex.com/api/v2/futures/position/http/list-pending-position
|
|
3935
|
-
* @see https://docs.coinex.com/api/v2/futures/position/http/list-finished-position
|
|
3936
|
-
* @param {string[]} [symbols] list of unified market symbols
|
|
3937
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3938
|
-
* @param {string} [params.method] the method to use 'v2PrivateGetFuturesPendingPosition' or 'v2PrivateGetFuturesFinishedPosition' default is 'v2PrivateGetFuturesPendingPosition'
|
|
3939
|
-
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
3940
|
-
*/
|
|
3941
3950
|
await this.loadMarkets();
|
|
3942
3951
|
let defaultMethod = undefined;
|
|
3943
3952
|
[defaultMethod, params] = this.handleOptionAndParams(params, 'fetchPositions', 'method', 'v2PrivateGetFuturesPendingPosition');
|
|
@@ -4018,16 +4027,16 @@ class coinex extends coinex$1 {
|
|
|
4018
4027
|
}
|
|
4019
4028
|
return this.filterByArrayPositions(result, 'symbol', symbols, false);
|
|
4020
4029
|
}
|
|
4030
|
+
/**
|
|
4031
|
+
* @method
|
|
4032
|
+
* @name coinex#fetchPosition
|
|
4033
|
+
* @description fetch data on a single open contract trade position
|
|
4034
|
+
* @see https://docs.coinex.com/api/v2/futures/position/http/list-pending-position
|
|
4035
|
+
* @param {string} symbol unified market symbol of the market the position is held in
|
|
4036
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4037
|
+
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
4038
|
+
*/
|
|
4021
4039
|
async fetchPosition(symbol, params = {}) {
|
|
4022
|
-
/**
|
|
4023
|
-
* @method
|
|
4024
|
-
* @name coinex#fetchPosition
|
|
4025
|
-
* @description fetch data on a single open contract trade position
|
|
4026
|
-
* @see https://docs.coinex.com/api/v2/futures/position/http/list-pending-position
|
|
4027
|
-
* @param {string} symbol unified market symbol of the market the position is held in
|
|
4028
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4029
|
-
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
4030
|
-
*/
|
|
4031
4040
|
await this.loadMarkets();
|
|
4032
4041
|
const market = this.market(symbol);
|
|
4033
4042
|
const request = {
|
|
@@ -4150,18 +4159,18 @@ class coinex extends coinex$1 {
|
|
|
4150
4159
|
'takeProfitPrice': this.omitZero(this.safeString(position, 'take_profit_price')),
|
|
4151
4160
|
});
|
|
4152
4161
|
}
|
|
4162
|
+
/**
|
|
4163
|
+
* @method
|
|
4164
|
+
* @name coinex#setMarginMode
|
|
4165
|
+
* @description set margin mode to 'cross' or 'isolated'
|
|
4166
|
+
* @see https://docs.coinex.com/api/v2/futures/position/http/adjust-position-leverage
|
|
4167
|
+
* @param {string} marginMode 'cross' or 'isolated'
|
|
4168
|
+
* @param {string} symbol unified market symbol
|
|
4169
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4170
|
+
* @param {int} params.leverage the rate of leverage
|
|
4171
|
+
* @returns {object} response from the exchange
|
|
4172
|
+
*/
|
|
4153
4173
|
async setMarginMode(marginMode, symbol = undefined, params = {}) {
|
|
4154
|
-
/**
|
|
4155
|
-
* @method
|
|
4156
|
-
* @name coinex#setMarginMode
|
|
4157
|
-
* @description set margin mode to 'cross' or 'isolated'
|
|
4158
|
-
* @see https://docs.coinex.com/api/v2/futures/position/http/adjust-position-leverage
|
|
4159
|
-
* @param {string} marginMode 'cross' or 'isolated'
|
|
4160
|
-
* @param {string} symbol unified market symbol
|
|
4161
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4162
|
-
* @param {int} params.leverage the rate of leverage
|
|
4163
|
-
* @returns {object} response from the exchange
|
|
4164
|
-
*/
|
|
4165
4174
|
if (symbol === undefined) {
|
|
4166
4175
|
throw new errors.ArgumentsRequired(this.id + ' setMarginMode() requires a symbol argument');
|
|
4167
4176
|
}
|
|
@@ -4200,18 +4209,18 @@ class coinex extends coinex$1 {
|
|
|
4200
4209
|
// }
|
|
4201
4210
|
//
|
|
4202
4211
|
}
|
|
4212
|
+
/**
|
|
4213
|
+
* @method
|
|
4214
|
+
* @name coinex#setLeverage
|
|
4215
|
+
* @see https://docs.coinex.com/api/v2/futures/position/http/adjust-position-leverage
|
|
4216
|
+
* @description set the level of leverage for a market
|
|
4217
|
+
* @param {float} leverage the rate of leverage
|
|
4218
|
+
* @param {string} symbol unified market symbol
|
|
4219
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4220
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' (default is 'cross')
|
|
4221
|
+
* @returns {object} response from the exchange
|
|
4222
|
+
*/
|
|
4203
4223
|
async setLeverage(leverage, symbol = undefined, params = {}) {
|
|
4204
|
-
/**
|
|
4205
|
-
* @method
|
|
4206
|
-
* @name coinex#setLeverage
|
|
4207
|
-
* @see https://docs.coinex.com/api/v2/futures/position/http/adjust-position-leverage
|
|
4208
|
-
* @description set the level of leverage for a market
|
|
4209
|
-
* @param {float} leverage the rate of leverage
|
|
4210
|
-
* @param {string} symbol unified market symbol
|
|
4211
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4212
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' (default is 'cross')
|
|
4213
|
-
* @returns {object} response from the exchange
|
|
4214
|
-
*/
|
|
4215
4224
|
if (symbol === undefined) {
|
|
4216
4225
|
throw new errors.ArgumentsRequired(this.id + ' setLeverage() requires a symbol argument');
|
|
4217
4226
|
}
|
|
@@ -4245,16 +4254,16 @@ class coinex extends coinex$1 {
|
|
|
4245
4254
|
// }
|
|
4246
4255
|
//
|
|
4247
4256
|
}
|
|
4257
|
+
/**
|
|
4258
|
+
* @method
|
|
4259
|
+
* @name coinex#fetchLeverageTiers
|
|
4260
|
+
* @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
|
|
4261
|
+
* @see https://docs.coinex.com/api/v2/futures/market/http/list-market-position-level
|
|
4262
|
+
* @param {string[]|undefined} symbols list of unified market symbols
|
|
4263
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4264
|
+
* @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}, indexed by market symbols
|
|
4265
|
+
*/
|
|
4248
4266
|
async fetchLeverageTiers(symbols = undefined, params = {}) {
|
|
4249
|
-
/**
|
|
4250
|
-
* @method
|
|
4251
|
-
* @name coinex#fetchLeverageTiers
|
|
4252
|
-
* @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
|
|
4253
|
-
* @see https://docs.coinex.com/api/v2/futures/market/http/list-market-position-level
|
|
4254
|
-
* @param {string[]|undefined} symbols list of unified market symbols
|
|
4255
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4256
|
-
* @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}, indexed by market symbols
|
|
4257
|
-
*/
|
|
4258
4267
|
await this.loadMarkets();
|
|
4259
4268
|
const request = {};
|
|
4260
4269
|
if (symbols !== undefined) {
|
|
@@ -4301,6 +4310,7 @@ class coinex extends coinex$1 {
|
|
|
4301
4310
|
const maxNotional = this.safeNumber(tier, 'amount');
|
|
4302
4311
|
tiers.push({
|
|
4303
4312
|
'tier': this.sum(i, 1),
|
|
4313
|
+
'symbol': this.safeSymbol(marketId, market, undefined, 'swap'),
|
|
4304
4314
|
'currency': market['linear'] ? market['base'] : market['quote'],
|
|
4305
4315
|
'minNotional': minNotional,
|
|
4306
4316
|
'maxNotional': maxNotional,
|
|
@@ -4443,44 +4453,44 @@ class coinex extends coinex$1 {
|
|
|
4443
4453
|
'datetime': this.iso8601(timestamp),
|
|
4444
4454
|
};
|
|
4445
4455
|
}
|
|
4456
|
+
/**
|
|
4457
|
+
* @method
|
|
4458
|
+
* @name coinex#addMargin
|
|
4459
|
+
* @description add margin
|
|
4460
|
+
* @see https://docs.coinex.com/api/v2/futures/position/http/adjust-position-margin
|
|
4461
|
+
* @param {string} symbol unified market symbol
|
|
4462
|
+
* @param {float} amount amount of margin to add
|
|
4463
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4464
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
|
|
4465
|
+
*/
|
|
4446
4466
|
async addMargin(symbol, amount, params = {}) {
|
|
4447
|
-
/**
|
|
4448
|
-
* @method
|
|
4449
|
-
* @name coinex#addMargin
|
|
4450
|
-
* @description add margin
|
|
4451
|
-
* @see https://docs.coinex.com/api/v2/futures/position/http/adjust-position-margin
|
|
4452
|
-
* @param {string} symbol unified market symbol
|
|
4453
|
-
* @param {float} amount amount of margin to add
|
|
4454
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4455
|
-
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
|
|
4456
|
-
*/
|
|
4457
4467
|
return await this.modifyMarginHelper(symbol, amount, 'add', params);
|
|
4458
4468
|
}
|
|
4469
|
+
/**
|
|
4470
|
+
* @method
|
|
4471
|
+
* @name coinex#reduceMargin
|
|
4472
|
+
* @description remove margin from a position
|
|
4473
|
+
* @see https://docs.coinex.com/api/v2/futures/position/http/adjust-position-margin
|
|
4474
|
+
* @param {string} symbol unified market symbol
|
|
4475
|
+
* @param {float} amount the amount of margin to remove
|
|
4476
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4477
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
|
|
4478
|
+
*/
|
|
4459
4479
|
async reduceMargin(symbol, amount, params = {}) {
|
|
4460
|
-
/**
|
|
4461
|
-
* @method
|
|
4462
|
-
* @name coinex#reduceMargin
|
|
4463
|
-
* @description remove margin from a position
|
|
4464
|
-
* @see https://docs.coinex.com/api/v2/futures/position/http/adjust-position-margin
|
|
4465
|
-
* @param {string} symbol unified market symbol
|
|
4466
|
-
* @param {float} amount the amount of margin to remove
|
|
4467
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4468
|
-
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
|
|
4469
|
-
*/
|
|
4470
4480
|
return await this.modifyMarginHelper(symbol, amount, 'reduce', params);
|
|
4471
4481
|
}
|
|
4482
|
+
/**
|
|
4483
|
+
* @method
|
|
4484
|
+
* @name coinex#fetchFundingHistory
|
|
4485
|
+
* @description fetch the history of funding fee payments paid and received on this account
|
|
4486
|
+
* @see https://docs.coinex.com/api/v2/futures/position/http/list-position-funding-history
|
|
4487
|
+
* @param {string} symbol unified market symbol
|
|
4488
|
+
* @param {int} [since] the earliest time in ms to fetch funding history for
|
|
4489
|
+
* @param {int} [limit] the maximum number of funding history structures to retrieve
|
|
4490
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4491
|
+
* @returns {object} a [funding history structure]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
|
|
4492
|
+
*/
|
|
4472
4493
|
async fetchFundingHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
4473
|
-
/**
|
|
4474
|
-
* @method
|
|
4475
|
-
* @name coinex#fetchFundingHistory
|
|
4476
|
-
* @description fetch the history of funding fee payments paid and received on this account
|
|
4477
|
-
* @see https://docs.coinex.com/api/v2/futures/position/http/list-position-funding-history
|
|
4478
|
-
* @param {string} symbol unified market symbol
|
|
4479
|
-
* @param {int} [since] the earliest time in ms to fetch funding history for
|
|
4480
|
-
* @param {int} [limit] the maximum number of funding history structures to retrieve
|
|
4481
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4482
|
-
* @returns {object} a [funding history structure]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
|
|
4483
|
-
*/
|
|
4484
4494
|
if (symbol === undefined) {
|
|
4485
4495
|
throw new errors.ArgumentsRequired(this.id + ' fetchFundingHistory() requires a symbol argument');
|
|
4486
4496
|
}
|
|
@@ -4538,16 +4548,16 @@ class coinex extends coinex$1 {
|
|
|
4538
4548
|
}
|
|
4539
4549
|
return result;
|
|
4540
4550
|
}
|
|
4551
|
+
/**
|
|
4552
|
+
* @method
|
|
4553
|
+
* @name coinex#fetchFundingRate
|
|
4554
|
+
* @description fetch the current funding rate
|
|
4555
|
+
* @see https://docs.coinex.com/api/v2/futures/market/http/list-market-funding-rate
|
|
4556
|
+
* @param {string} symbol unified market symbol
|
|
4557
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4558
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
4559
|
+
*/
|
|
4541
4560
|
async fetchFundingRate(symbol, params = {}) {
|
|
4542
|
-
/**
|
|
4543
|
-
* @method
|
|
4544
|
-
* @name coinex#fetchFundingRate
|
|
4545
|
-
* @description fetch the current funding rate
|
|
4546
|
-
* @see https://docs.coinex.com/api/v2/futures/market/http/list-market-funding-rate
|
|
4547
|
-
* @param {string} symbol unified market symbol
|
|
4548
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4549
|
-
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
4550
|
-
*/
|
|
4551
4561
|
await this.loadMarkets();
|
|
4552
4562
|
const market = this.market(symbol);
|
|
4553
4563
|
if (!market['swap']) {
|
|
@@ -4579,16 +4589,16 @@ class coinex extends coinex$1 {
|
|
|
4579
4589
|
const first = this.safeDict(data, 0, {});
|
|
4580
4590
|
return this.parseFundingRate(first, market);
|
|
4581
4591
|
}
|
|
4592
|
+
/**
|
|
4593
|
+
* @method
|
|
4594
|
+
* @name coinex#fetchFundingInterval
|
|
4595
|
+
* @description fetch the current funding rate interval
|
|
4596
|
+
* @see https://docs.coinex.com/api/v2/futures/market/http/list-market-funding-rate
|
|
4597
|
+
* @param {string} symbol unified market symbol
|
|
4598
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4599
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
4600
|
+
*/
|
|
4582
4601
|
async fetchFundingInterval(symbol, params = {}) {
|
|
4583
|
-
/**
|
|
4584
|
-
* @method
|
|
4585
|
-
* @name coinex#fetchFundingInterval
|
|
4586
|
-
* @description fetch the current funding rate interval
|
|
4587
|
-
* @see https://docs.coinex.com/api/v2/futures/market/http/list-market-funding-rate
|
|
4588
|
-
* @param {string} symbol unified market symbol
|
|
4589
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4590
|
-
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
4591
|
-
*/
|
|
4592
4602
|
return await this.fetchFundingRate(symbol, params);
|
|
4593
4603
|
}
|
|
4594
4604
|
parseFundingRate(contract, market = undefined) {
|
|
@@ -4643,16 +4653,16 @@ class coinex extends coinex$1 {
|
|
|
4643
4653
|
};
|
|
4644
4654
|
return this.safeString(intervals, interval, interval);
|
|
4645
4655
|
}
|
|
4656
|
+
/**
|
|
4657
|
+
* @method
|
|
4658
|
+
* @name coinex#fetchFundingRates
|
|
4659
|
+
* @description fetch the current funding rates for multiple markets
|
|
4660
|
+
* @see https://docs.coinex.com/api/v2/futures/market/http/list-market-funding-rate
|
|
4661
|
+
* @param {string[]} symbols unified market symbols
|
|
4662
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4663
|
+
* @returns {object[]} an array of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
4664
|
+
*/
|
|
4646
4665
|
async fetchFundingRates(symbols = undefined, params = {}) {
|
|
4647
|
-
/**
|
|
4648
|
-
* @method
|
|
4649
|
-
* @name coinex#fetchFundingRates
|
|
4650
|
-
* @description fetch the current funding rates for multiple markets
|
|
4651
|
-
* @see https://docs.coinex.com/api/v2/futures/market/http/list-market-funding-rate
|
|
4652
|
-
* @param {string[]} symbols unified market symbols
|
|
4653
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4654
|
-
* @returns {object[]} an array of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
4655
|
-
*/
|
|
4656
4666
|
await this.loadMarkets();
|
|
4657
4667
|
symbols = this.marketSymbols(symbols);
|
|
4658
4668
|
const request = {};
|
|
@@ -4689,20 +4699,20 @@ class coinex extends coinex$1 {
|
|
|
4689
4699
|
const result = this.parseFundingRates(data, market);
|
|
4690
4700
|
return this.filterByArray(result, 'symbol', symbols);
|
|
4691
4701
|
}
|
|
4702
|
+
/**
|
|
4703
|
+
* @method
|
|
4704
|
+
* @name coinex#withdraw
|
|
4705
|
+
* @description make a withdrawal
|
|
4706
|
+
* @see https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/withdrawal
|
|
4707
|
+
* @param {string} code unified currency code
|
|
4708
|
+
* @param {float} amount the amount to withdraw
|
|
4709
|
+
* @param {string} address the address to withdraw to
|
|
4710
|
+
* @param {string} tag
|
|
4711
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4712
|
+
* @param {string} [params.network] unified network code
|
|
4713
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
4714
|
+
*/
|
|
4692
4715
|
async withdraw(code, amount, address, tag = undefined, params = {}) {
|
|
4693
|
-
/**
|
|
4694
|
-
* @method
|
|
4695
|
-
* @name coinex#withdraw
|
|
4696
|
-
* @description make a withdrawal
|
|
4697
|
-
* @see https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/withdrawal
|
|
4698
|
-
* @param {string} code unified currency code
|
|
4699
|
-
* @param {float} amount the amount to withdraw
|
|
4700
|
-
* @param {string} address the address to withdraw to
|
|
4701
|
-
* @param {string} tag
|
|
4702
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4703
|
-
* @param {string} [params.network] unified network code
|
|
4704
|
-
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
4705
|
-
*/
|
|
4706
4716
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
4707
4717
|
this.checkAddress(address);
|
|
4708
4718
|
await this.loadMarkets();
|
|
@@ -4764,20 +4774,20 @@ class coinex extends coinex$1 {
|
|
|
4764
4774
|
};
|
|
4765
4775
|
return this.safeString(statuses, status, status);
|
|
4766
4776
|
}
|
|
4777
|
+
/**
|
|
4778
|
+
* @method
|
|
4779
|
+
* @name coinex#fetchFundingRateHistory
|
|
4780
|
+
* @description fetches historical funding rate prices
|
|
4781
|
+
* @see https://docs.coinex.com/api/v2/futures/market/http/list-market-funding-rate-history
|
|
4782
|
+
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
4783
|
+
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
4784
|
+
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
4785
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4786
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
4787
|
+
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
4788
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
4789
|
+
*/
|
|
4767
4790
|
async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
4768
|
-
/**
|
|
4769
|
-
* @method
|
|
4770
|
-
* @name coinex#fetchFundingRateHistory
|
|
4771
|
-
* @description fetches historical funding rate prices
|
|
4772
|
-
* @see https://docs.coinex.com/api/v2/futures/market/http/list-market-funding-rate-history
|
|
4773
|
-
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
4774
|
-
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
4775
|
-
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
4776
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4777
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
4778
|
-
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
4779
|
-
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
4780
|
-
*/
|
|
4781
4791
|
if (symbol === undefined) {
|
|
4782
4792
|
throw new errors.ArgumentsRequired(this.id + ' fetchFundingRateHistory() requires a symbol argument');
|
|
4783
4793
|
}
|
|
@@ -4941,20 +4951,20 @@ class coinex extends coinex$1 {
|
|
|
4941
4951
|
'internal': internal,
|
|
4942
4952
|
};
|
|
4943
4953
|
}
|
|
4954
|
+
/**
|
|
4955
|
+
* @method
|
|
4956
|
+
* @name coinex#transfer
|
|
4957
|
+
* @description transfer currency internally between wallets on the same account
|
|
4958
|
+
* @see https://docs.coinex.com/api/v2/assets/transfer/http/transfer
|
|
4959
|
+
* @param {string} code unified currency code
|
|
4960
|
+
* @param {float} amount amount to transfer
|
|
4961
|
+
* @param {string} fromAccount account to transfer from
|
|
4962
|
+
* @param {string} toAccount account to transfer to
|
|
4963
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4964
|
+
* @param {string} [params.symbol] unified ccxt symbol, required when either the fromAccount or toAccount is margin
|
|
4965
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
4966
|
+
*/
|
|
4944
4967
|
async transfer(code, amount, fromAccount, toAccount, params = {}) {
|
|
4945
|
-
/**
|
|
4946
|
-
* @method
|
|
4947
|
-
* @name coinex#transfer
|
|
4948
|
-
* @description transfer currency internally between wallets on the same account
|
|
4949
|
-
* @see https://docs.coinex.com/api/v2/assets/transfer/http/transfer
|
|
4950
|
-
* @param {string} code unified currency code
|
|
4951
|
-
* @param {float} amount amount to transfer
|
|
4952
|
-
* @param {string} fromAccount account to transfer from
|
|
4953
|
-
* @param {string} toAccount account to transfer to
|
|
4954
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4955
|
-
* @param {string} [params.symbol] unified ccxt symbol, required when either the fromAccount or toAccount is margin
|
|
4956
|
-
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
4957
|
-
*/
|
|
4958
4968
|
await this.loadMarkets();
|
|
4959
4969
|
const currency = this.currency(code);
|
|
4960
4970
|
const amountToPrecision = this.currencyToPrecision(code, amount);
|
|
@@ -5019,19 +5029,19 @@ class coinex extends coinex$1 {
|
|
|
5019
5029
|
'status': this.parseTransferStatus(this.safeString2(transfer, 'code', 'status')),
|
|
5020
5030
|
};
|
|
5021
5031
|
}
|
|
5032
|
+
/**
|
|
5033
|
+
* @method
|
|
5034
|
+
* @name coinex#fetchTransfers
|
|
5035
|
+
* @description fetch a history of internal transfers made on an account
|
|
5036
|
+
* @see https://docs.coinex.com/api/v2/assets/transfer/http/list-transfer-history
|
|
5037
|
+
* @param {string} code unified currency code of the currency transferred
|
|
5038
|
+
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
5039
|
+
* @param {int} [limit] the maximum number of transfer structures to retrieve
|
|
5040
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5041
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' for fetching transfers to and from your margin account
|
|
5042
|
+
* @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
5043
|
+
*/
|
|
5022
5044
|
async fetchTransfers(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
5023
|
-
/**
|
|
5024
|
-
* @method
|
|
5025
|
-
* @name coinex#fetchTransfers
|
|
5026
|
-
* @description fetch a history of internal transfers made on an account
|
|
5027
|
-
* @see https://docs.coinex.com/api/v2/assets/transfer/http/list-transfer-history
|
|
5028
|
-
* @param {string} code unified currency code of the currency transferred
|
|
5029
|
-
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
5030
|
-
* @param {int} [limit] the maximum number of transfer structures to retrieve
|
|
5031
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5032
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' for fetching transfers to and from your margin account
|
|
5033
|
-
* @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
5034
|
-
*/
|
|
5035
5045
|
await this.loadMarkets();
|
|
5036
5046
|
if (code === undefined) {
|
|
5037
5047
|
throw new errors.ArgumentsRequired(this.id + ' fetchTransfers() requires a code argument');
|
|
@@ -5079,18 +5089,18 @@ class coinex extends coinex$1 {
|
|
|
5079
5089
|
const data = this.safeList(response, 'data', []);
|
|
5080
5090
|
return this.parseTransfers(data, currency, since, limit);
|
|
5081
5091
|
}
|
|
5092
|
+
/**
|
|
5093
|
+
* @method
|
|
5094
|
+
* @name coinex#fetchWithdrawals
|
|
5095
|
+
* @description fetch all withdrawals made from an account
|
|
5096
|
+
* @see https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/list-withdrawal-history
|
|
5097
|
+
* @param {string} [code] unified currency code
|
|
5098
|
+
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
5099
|
+
* @param {int} [limit] the maximum number of withdrawal structures to retrieve
|
|
5100
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5101
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
5102
|
+
*/
|
|
5082
5103
|
async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
5083
|
-
/**
|
|
5084
|
-
* @method
|
|
5085
|
-
* @name coinex#fetchWithdrawals
|
|
5086
|
-
* @description fetch all withdrawals made from an account
|
|
5087
|
-
* @see https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/list-withdrawal-history
|
|
5088
|
-
* @param {string} [code] unified currency code
|
|
5089
|
-
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
5090
|
-
* @param {int} [limit] the maximum number of withdrawal structures to retrieve
|
|
5091
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5092
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
5093
|
-
*/
|
|
5094
5104
|
await this.loadMarkets();
|
|
5095
5105
|
const request = {};
|
|
5096
5106
|
let currency = undefined;
|
|
@@ -5137,18 +5147,18 @@ class coinex extends coinex$1 {
|
|
|
5137
5147
|
const data = this.safeList(response, 'data', []);
|
|
5138
5148
|
return this.parseTransactions(data, currency, since, limit);
|
|
5139
5149
|
}
|
|
5150
|
+
/**
|
|
5151
|
+
* @method
|
|
5152
|
+
* @name coinex#fetchDeposits
|
|
5153
|
+
* @description fetch all deposits made to an account
|
|
5154
|
+
* @see https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/list-deposit-history
|
|
5155
|
+
* @param {string} [code] unified currency code
|
|
5156
|
+
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
5157
|
+
* @param {int} [limit] the maximum number of deposit structures to retrieve
|
|
5158
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5159
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
5160
|
+
*/
|
|
5140
5161
|
async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
5141
|
-
/**
|
|
5142
|
-
* @method
|
|
5143
|
-
* @name coinex#fetchDeposits
|
|
5144
|
-
* @description fetch all deposits made to an account
|
|
5145
|
-
* @see https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/list-deposit-history
|
|
5146
|
-
* @param {string} [code] unified currency code
|
|
5147
|
-
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
5148
|
-
* @param {int} [limit] the maximum number of deposit structures to retrieve
|
|
5149
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5150
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
5151
|
-
*/
|
|
5152
5162
|
await this.loadMarkets();
|
|
5153
5163
|
const request = {};
|
|
5154
5164
|
let currency = undefined;
|
|
@@ -5227,17 +5237,17 @@ class coinex extends coinex$1 {
|
|
|
5227
5237
|
'info': info,
|
|
5228
5238
|
};
|
|
5229
5239
|
}
|
|
5240
|
+
/**
|
|
5241
|
+
* @method
|
|
5242
|
+
* @name coinex#fetchIsolatedBorrowRate
|
|
5243
|
+
* @description fetch the rate of interest to borrow a currency for margin trading
|
|
5244
|
+
* @see https://docs.coinex.com/api/v2/assets/loan-flat/http/list-margin-interest-limit
|
|
5245
|
+
* @param {string} symbol unified symbol of the market to fetch the borrow rate for
|
|
5246
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5247
|
+
* @param {string} params.code unified currency code
|
|
5248
|
+
* @returns {object} an [isolated borrow rate structure]{@link https://docs.ccxt.com/#/?id=isolated-borrow-rate-structure}
|
|
5249
|
+
*/
|
|
5230
5250
|
async fetchIsolatedBorrowRate(symbol, params = {}) {
|
|
5231
|
-
/**
|
|
5232
|
-
* @method
|
|
5233
|
-
* @name coinex#fetchIsolatedBorrowRate
|
|
5234
|
-
* @description fetch the rate of interest to borrow a currency for margin trading
|
|
5235
|
-
* @see https://docs.coinex.com/api/v2/assets/loan-flat/http/list-margin-interest-limit
|
|
5236
|
-
* @param {string} symbol unified symbol of the market to fetch the borrow rate for
|
|
5237
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5238
|
-
* @param {string} params.code unified currency code
|
|
5239
|
-
* @returns {object} an [isolated borrow rate structure]{@link https://docs.ccxt.com/#/?id=isolated-borrow-rate-structure}
|
|
5240
|
-
*/
|
|
5241
5251
|
await this.loadMarkets();
|
|
5242
5252
|
const code = this.safeString(params, 'code');
|
|
5243
5253
|
if (code === undefined) {
|
|
@@ -5268,19 +5278,19 @@ class coinex extends coinex$1 {
|
|
|
5268
5278
|
const data = this.safeDict(response, 'data', {});
|
|
5269
5279
|
return this.parseIsolatedBorrowRate(data, market);
|
|
5270
5280
|
}
|
|
5281
|
+
/**
|
|
5282
|
+
* @method
|
|
5283
|
+
* @name coinex#fetchBorrowInterest
|
|
5284
|
+
* @description fetch the interest owed by the user for borrowing currency for margin trading
|
|
5285
|
+
* @see https://docs.coinex.com/api/v2/assets/loan-flat/http/list-margin-borrow-history
|
|
5286
|
+
* @param {string} [code] unified currency code
|
|
5287
|
+
* @param {string} [symbol] unified market symbol when fetch interest in isolated markets
|
|
5288
|
+
* @param {int} [since] the earliest time in ms to fetch borrrow interest for
|
|
5289
|
+
* @param {int} [limit] the maximum number of structures to retrieve
|
|
5290
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5291
|
+
* @returns {object[]} a list of [borrow interest structures]{@link https://docs.ccxt.com/#/?id=borrow-interest-structure}
|
|
5292
|
+
*/
|
|
5271
5293
|
async fetchBorrowInterest(code = undefined, symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
5272
|
-
/**
|
|
5273
|
-
* @method
|
|
5274
|
-
* @name coinex#fetchBorrowInterest
|
|
5275
|
-
* @description fetch the interest owed by the user for borrowing currency for margin trading
|
|
5276
|
-
* @see https://docs.coinex.com/api/v2/assets/loan-flat/http/list-margin-borrow-history
|
|
5277
|
-
* @param {string} [code] unified currency code
|
|
5278
|
-
* @param {string} [symbol] unified market symbol when fetch interest in isolated markets
|
|
5279
|
-
* @param {int} [since] the earliest time in ms to fetch borrrow interest for
|
|
5280
|
-
* @param {int} [limit] the maximum number of structures to retrieve
|
|
5281
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5282
|
-
* @returns {object[]} a list of [borrow interest structures]{@link https://docs.ccxt.com/#/?id=borrow-interest-structure}
|
|
5283
|
-
*/
|
|
5284
5294
|
await this.loadMarkets();
|
|
5285
5295
|
const request = {};
|
|
5286
5296
|
let market = undefined;
|
|
@@ -5350,19 +5360,19 @@ class coinex extends coinex$1 {
|
|
|
5350
5360
|
'datetime': this.iso8601(timestamp),
|
|
5351
5361
|
};
|
|
5352
5362
|
}
|
|
5363
|
+
/**
|
|
5364
|
+
* @method
|
|
5365
|
+
* @name coinex#borrowIsolatedMargin
|
|
5366
|
+
* @description create a loan to borrow margin
|
|
5367
|
+
* @see https://docs.coinex.com/api/v2/assets/loan-flat/http/margin-borrow
|
|
5368
|
+
* @param {string} symbol unified market symbol, required for coinex
|
|
5369
|
+
* @param {string} code unified currency code of the currency to borrow
|
|
5370
|
+
* @param {float} amount the amount to borrow
|
|
5371
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5372
|
+
* @param {boolean} [params.isAutoRenew] whether to renew the margin loan automatically or not, default is false
|
|
5373
|
+
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
5374
|
+
*/
|
|
5353
5375
|
async borrowIsolatedMargin(symbol, code, amount, params = {}) {
|
|
5354
|
-
/**
|
|
5355
|
-
* @method
|
|
5356
|
-
* @name coinex#borrowIsolatedMargin
|
|
5357
|
-
* @description create a loan to borrow margin
|
|
5358
|
-
* @see https://docs.coinex.com/api/v2/assets/loan-flat/http/margin-borrow
|
|
5359
|
-
* @param {string} symbol unified market symbol, required for coinex
|
|
5360
|
-
* @param {string} code unified currency code of the currency to borrow
|
|
5361
|
-
* @param {float} amount the amount to borrow
|
|
5362
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5363
|
-
* @param {boolean} [params.isAutoRenew] whether to renew the margin loan automatically or not, default is false
|
|
5364
|
-
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
5365
|
-
*/
|
|
5366
5376
|
await this.loadMarkets();
|
|
5367
5377
|
const market = this.market(symbol);
|
|
5368
5378
|
const currency = this.currency(code);
|
|
@@ -5398,19 +5408,19 @@ class coinex extends coinex$1 {
|
|
|
5398
5408
|
'symbol': symbol,
|
|
5399
5409
|
});
|
|
5400
5410
|
}
|
|
5411
|
+
/**
|
|
5412
|
+
* @method
|
|
5413
|
+
* @name coinex#repayIsolatedMargin
|
|
5414
|
+
* @description repay borrowed margin and interest
|
|
5415
|
+
* @see https://docs.coinex.com/api/v2/assets/loan-flat/http/margin-repay
|
|
5416
|
+
* @param {string} symbol unified market symbol, required for coinex
|
|
5417
|
+
* @param {string} code unified currency code of the currency to repay
|
|
5418
|
+
* @param {float} amount the amount to repay
|
|
5419
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5420
|
+
* @param {string} [params.borrow_id] extra parameter that is not required
|
|
5421
|
+
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
5422
|
+
*/
|
|
5401
5423
|
async repayIsolatedMargin(symbol, code, amount, params = {}) {
|
|
5402
|
-
/**
|
|
5403
|
-
* @method
|
|
5404
|
-
* @name coinex#repayIsolatedMargin
|
|
5405
|
-
* @description repay borrowed margin and interest
|
|
5406
|
-
* @see https://docs.coinex.com/api/v2/assets/loan-flat/http/margin-repay
|
|
5407
|
-
* @param {string} symbol unified market symbol, required for coinex
|
|
5408
|
-
* @param {string} code unified currency code of the currency to repay
|
|
5409
|
-
* @param {float} amount the amount to repay
|
|
5410
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5411
|
-
* @param {string} [params.borrow_id] extra parameter that is not required
|
|
5412
|
-
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
5413
|
-
*/
|
|
5414
5424
|
await this.loadMarkets();
|
|
5415
5425
|
const market = this.market(symbol);
|
|
5416
5426
|
const currency = this.currency(code);
|
|
@@ -5460,16 +5470,16 @@ class coinex extends coinex$1 {
|
|
|
5460
5470
|
'info': info,
|
|
5461
5471
|
};
|
|
5462
5472
|
}
|
|
5473
|
+
/**
|
|
5474
|
+
* @method
|
|
5475
|
+
* @name coinex#fetchDepositWithdrawFee
|
|
5476
|
+
* @description fetch the fee for deposits and withdrawals
|
|
5477
|
+
* @see https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/get-deposit-withdrawal-config
|
|
5478
|
+
* @param {string} code unified currency code
|
|
5479
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5480
|
+
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
5481
|
+
*/
|
|
5463
5482
|
async fetchDepositWithdrawFee(code, params = {}) {
|
|
5464
|
-
/**
|
|
5465
|
-
* @method
|
|
5466
|
-
* @name coinex#fetchDepositWithdrawFee
|
|
5467
|
-
* @description fetch the fee for deposits and withdrawals
|
|
5468
|
-
* @see https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/get-deposit-withdrawal-config
|
|
5469
|
-
* @param {string} code unified currency code
|
|
5470
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5471
|
-
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
5472
|
-
*/
|
|
5473
5483
|
await this.loadMarkets();
|
|
5474
5484
|
const currency = this.currency(code);
|
|
5475
5485
|
const request = {
|
|
@@ -5580,17 +5590,17 @@ class coinex extends coinex$1 {
|
|
|
5580
5590
|
}
|
|
5581
5591
|
return result;
|
|
5582
5592
|
}
|
|
5593
|
+
/**
|
|
5594
|
+
* @method
|
|
5595
|
+
* @name coinex#fetchLeverage
|
|
5596
|
+
* @description fetch the set leverage for a market
|
|
5597
|
+
* @see https://docs.coinex.com/api/v2/assets/loan-flat/http/list-margin-interest-limit
|
|
5598
|
+
* @param {string} symbol unified market symbol
|
|
5599
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5600
|
+
* @param {string} params.code unified currency code
|
|
5601
|
+
* @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
5602
|
+
*/
|
|
5583
5603
|
async fetchLeverage(symbol, params = {}) {
|
|
5584
|
-
/**
|
|
5585
|
-
* @method
|
|
5586
|
-
* @name coinex#fetchLeverage
|
|
5587
|
-
* @description fetch the set leverage for a market
|
|
5588
|
-
* @see https://docs.coinex.com/api/v2/assets/loan-flat/http/list-margin-interest-limit
|
|
5589
|
-
* @param {string} symbol unified market symbol
|
|
5590
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5591
|
-
* @param {string} params.code unified currency code
|
|
5592
|
-
* @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
5593
|
-
*/
|
|
5594
5604
|
await this.loadMarkets();
|
|
5595
5605
|
const code = this.safeString(params, 'code');
|
|
5596
5606
|
if (code === undefined) {
|
|
@@ -5642,19 +5652,19 @@ class coinex extends coinex$1 {
|
|
|
5642
5652
|
'shortLeverage': leverageValue,
|
|
5643
5653
|
};
|
|
5644
5654
|
}
|
|
5655
|
+
/**
|
|
5656
|
+
* @method
|
|
5657
|
+
* @name coinex#fetchPositionHistory
|
|
5658
|
+
* @description fetches historical positions
|
|
5659
|
+
* @see https://docs.coinex.com/api/v2/futures/position/http/list-finished-position
|
|
5660
|
+
* @param {string} symbol unified contract symbol
|
|
5661
|
+
* @param {int} [since] the earliest time in ms to fetch positions for
|
|
5662
|
+
* @param {int} [limit] the maximum amount of records to fetch, default is 10
|
|
5663
|
+
* @param {object} [params] extra parameters specific to the exchange api endpoint
|
|
5664
|
+
* @param {int} [params.until] the latest time in ms to fetch positions for
|
|
5665
|
+
* @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
5666
|
+
*/
|
|
5645
5667
|
async fetchPositionHistory(symbol, since = undefined, limit = undefined, params = {}) {
|
|
5646
|
-
/**
|
|
5647
|
-
* @method
|
|
5648
|
-
* @name coinex#fetchPositionHistory
|
|
5649
|
-
* @description fetches historical positions
|
|
5650
|
-
* @see https://docs.coinex.com/api/v2/futures/position/http/list-finished-position
|
|
5651
|
-
* @param {string} symbol unified contract symbol
|
|
5652
|
-
* @param {int} [since] the earliest time in ms to fetch positions for
|
|
5653
|
-
* @param {int} [limit] the maximum amount of records to fetch, default is 10
|
|
5654
|
-
* @param {object} [params] extra parameters specific to the exchange api endpoint
|
|
5655
|
-
* @param {int} [params.until] the latest time in ms to fetch positions for
|
|
5656
|
-
* @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
5657
|
-
*/
|
|
5658
5668
|
await this.loadMarkets();
|
|
5659
5669
|
const market = this.market(symbol);
|
|
5660
5670
|
let request = {
|
|
@@ -5716,21 +5726,21 @@ class coinex extends coinex$1 {
|
|
|
5716
5726
|
const positions = this.parsePositions(records);
|
|
5717
5727
|
return this.filterBySymbolSinceLimit(positions, symbol, since, limit);
|
|
5718
5728
|
}
|
|
5729
|
+
/**
|
|
5730
|
+
* @method
|
|
5731
|
+
* @name coinex#closePosition
|
|
5732
|
+
* @description closes an open position for a market
|
|
5733
|
+
* @see https://docs.coinex.com/api/v2/futures/position/http/close-position
|
|
5734
|
+
* @param {string} symbol unified CCXT market symbol
|
|
5735
|
+
* @param {string} [side] buy or sell, not used by coinex
|
|
5736
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5737
|
+
* @param {string} params.type required by coinex, one of: limit, market, maker_only, ioc or fok, default is *market*
|
|
5738
|
+
* @param {string} [params.price] the price to fulfill the order, ignored in market orders
|
|
5739
|
+
* @param {string} [params.amount] the amount to trade in units of the base currency
|
|
5740
|
+
* @param {string} [params.clientOrderId] the client id of the order
|
|
5741
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
5742
|
+
*/
|
|
5719
5743
|
async closePosition(symbol, side = undefined, params = {}) {
|
|
5720
|
-
/**
|
|
5721
|
-
* @method
|
|
5722
|
-
* @name coinex#closePosition
|
|
5723
|
-
* @description closes an open position for a market
|
|
5724
|
-
* @see https://docs.coinex.com/api/v2/futures/position/http/close-position
|
|
5725
|
-
* @param {string} symbol unified CCXT market symbol
|
|
5726
|
-
* @param {string} [side] buy or sell, not used by coinex
|
|
5727
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5728
|
-
* @param {string} params.type required by coinex, one of: limit, market, maker_only, ioc or fok, default is *market*
|
|
5729
|
-
* @param {string} [params.price] the price to fulfill the order, ignored in market orders
|
|
5730
|
-
* @param {string} [params.amount] the amount to trade in units of the base currency
|
|
5731
|
-
* @param {string} [params.clientOrderId] the client id of the order
|
|
5732
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
5733
|
-
*/
|
|
5734
5744
|
await this.loadMarkets();
|
|
5735
5745
|
const market = this.market(symbol);
|
|
5736
5746
|
const type = this.safeString(params, 'type', 'market');
|
|
@@ -5923,21 +5933,21 @@ class coinex extends coinex$1 {
|
|
|
5923
5933
|
}
|
|
5924
5934
|
return undefined;
|
|
5925
5935
|
}
|
|
5936
|
+
/**
|
|
5937
|
+
* @method
|
|
5938
|
+
* @name coinex#fetchMarginAdjustmentHistory
|
|
5939
|
+
* @description fetches the history of margin added or reduced from contract isolated positions
|
|
5940
|
+
* @see https://docs.coinex.com/api/v2/futures/position/http/list-position-margin-history
|
|
5941
|
+
* @param {string} symbol unified market symbol
|
|
5942
|
+
* @param {string} [type] not used by coinex fetchMarginAdjustmentHistory
|
|
5943
|
+
* @param {int} [since] timestamp in ms of the earliest change to fetch
|
|
5944
|
+
* @param {int} [limit] the maximum amount of changes to fetch, default is 10
|
|
5945
|
+
* @param {object} params extra parameters specific to the exchange api endpoint
|
|
5946
|
+
* @param {int} [params.until] timestamp in ms of the latest change to fetch
|
|
5947
|
+
* @param {int} [params.positionId] the id of the position that you want to retrieve margin adjustment history for
|
|
5948
|
+
* @returns {object[]} a list of [margin structures]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
5949
|
+
*/
|
|
5926
5950
|
async fetchMarginAdjustmentHistory(symbol = undefined, type = undefined, since = undefined, limit = undefined, params = {}) {
|
|
5927
|
-
/**
|
|
5928
|
-
* @method
|
|
5929
|
-
* @name coinex#fetchMarginAdjustmentHistory
|
|
5930
|
-
* @description fetches the history of margin added or reduced from contract isolated positions
|
|
5931
|
-
* @see https://docs.coinex.com/api/v2/futures/position/http/list-position-margin-history
|
|
5932
|
-
* @param {string} symbol unified market symbol
|
|
5933
|
-
* @param {string} [type] not used by coinex fetchMarginAdjustmentHistory
|
|
5934
|
-
* @param {int} [since] timestamp in ms of the earliest change to fetch
|
|
5935
|
-
* @param {int} [limit] the maximum amount of changes to fetch, default is 10
|
|
5936
|
-
* @param {object} params extra parameters specific to the exchange api endpoint
|
|
5937
|
-
* @param {int} [params.until] timestamp in ms of the latest change to fetch
|
|
5938
|
-
* @param {int} [params.positionId] the id of the position that you want to retrieve margin adjustment history for
|
|
5939
|
-
* @returns {object[]} a list of [margin structures]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
5940
|
-
*/
|
|
5941
5951
|
await this.loadMarkets();
|
|
5942
5952
|
if (symbol === undefined) {
|
|
5943
5953
|
throw new errors.ArgumentsRequired(this.id + ' fetchMarginAdjustmentHistory() requires a symbol argument');
|