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