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/digifinex.js
CHANGED
|
@@ -352,14 +352,14 @@ export default class digifinex extends Exchange {
|
|
|
352
352
|
},
|
|
353
353
|
});
|
|
354
354
|
}
|
|
355
|
+
/**
|
|
356
|
+
* @method
|
|
357
|
+
* @name digifinex#fetchCurrencies
|
|
358
|
+
* @description fetches all available currencies on an exchange
|
|
359
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
360
|
+
* @returns {object} an associative dictionary of currencies
|
|
361
|
+
*/
|
|
355
362
|
async fetchCurrencies(params = {}) {
|
|
356
|
-
/**
|
|
357
|
-
* @method
|
|
358
|
-
* @name digifinex#fetchCurrencies
|
|
359
|
-
* @description fetches all available currencies on an exchange
|
|
360
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
361
|
-
* @returns {object} an associative dictionary of currencies
|
|
362
|
-
*/
|
|
363
363
|
const response = await this.publicSpotGetCurrencies(params);
|
|
364
364
|
//
|
|
365
365
|
// {
|
|
@@ -522,14 +522,14 @@ export default class digifinex extends Exchange {
|
|
|
522
522
|
}
|
|
523
523
|
return result;
|
|
524
524
|
}
|
|
525
|
+
/**
|
|
526
|
+
* @method
|
|
527
|
+
* @name digifinex#fetchMarkets
|
|
528
|
+
* @description retrieves data on all markets for digifinex
|
|
529
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
530
|
+
* @returns {object[]} an array of objects representing market data
|
|
531
|
+
*/
|
|
525
532
|
async fetchMarkets(params = {}) {
|
|
526
|
-
/**
|
|
527
|
-
* @method
|
|
528
|
-
* @name digifinex#fetchMarkets
|
|
529
|
-
* @description retrieves data on all markets for digifinex
|
|
530
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
531
|
-
* @returns {object[]} an array of objects representing market data
|
|
532
|
-
*/
|
|
533
533
|
const options = this.safeValue(this.options, 'fetchMarkets', {});
|
|
534
534
|
const method = this.safeString(options, 'method', 'fetch_markets_v2');
|
|
535
535
|
if (method === 'fetch_markets_v2') {
|
|
@@ -812,17 +812,17 @@ export default class digifinex extends Exchange {
|
|
|
812
812
|
}
|
|
813
813
|
return this.safeBalance(result);
|
|
814
814
|
}
|
|
815
|
+
/**
|
|
816
|
+
* @method
|
|
817
|
+
* @name digifinex#fetchBalance
|
|
818
|
+
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
819
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#spot-account-assets
|
|
820
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#margin-assets
|
|
821
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#accountbalance
|
|
822
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
823
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
824
|
+
*/
|
|
815
825
|
async fetchBalance(params = {}) {
|
|
816
|
-
/**
|
|
817
|
-
* @method
|
|
818
|
-
* @name digifinex#fetchBalance
|
|
819
|
-
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
820
|
-
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#spot-account-assets
|
|
821
|
-
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#margin-assets
|
|
822
|
-
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#accountbalance
|
|
823
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
824
|
-
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
825
|
-
*/
|
|
826
826
|
await this.loadMarkets();
|
|
827
827
|
let marketType = undefined;
|
|
828
828
|
[marketType, params] = this.handleMarketTypeAndParams('fetchBalance', undefined, params);
|
|
@@ -881,18 +881,18 @@ export default class digifinex extends Exchange {
|
|
|
881
881
|
const balances = this.safeValue(response, balanceRequest, []);
|
|
882
882
|
return this.parseBalance(balances);
|
|
883
883
|
}
|
|
884
|
+
/**
|
|
885
|
+
* @method
|
|
886
|
+
* @name digifinex#fetchOrderBook
|
|
887
|
+
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
888
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#get-orderbook
|
|
889
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#orderbook
|
|
890
|
+
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
891
|
+
* @param {int} [limit] the maximum amount of order book entries to return
|
|
892
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
893
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
894
|
+
*/
|
|
884
895
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
885
|
-
/**
|
|
886
|
-
* @method
|
|
887
|
-
* @name digifinex#fetchOrderBook
|
|
888
|
-
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
889
|
-
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#get-orderbook
|
|
890
|
-
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#orderbook
|
|
891
|
-
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
892
|
-
* @param {int} [limit] the maximum amount of order book entries to return
|
|
893
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
894
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
895
|
-
*/
|
|
896
896
|
await this.loadMarkets();
|
|
897
897
|
const market = this.market(symbol);
|
|
898
898
|
const [marketType, query] = this.handleMarketTypeAndParams('fetchOrderBook', market, params);
|
|
@@ -959,17 +959,17 @@ export default class digifinex extends Exchange {
|
|
|
959
959
|
}
|
|
960
960
|
return this.parseOrderBook(orderBook, market['symbol'], timestamp);
|
|
961
961
|
}
|
|
962
|
+
/**
|
|
963
|
+
* @method
|
|
964
|
+
* @name digifinex#fetchTickers
|
|
965
|
+
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
966
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#ticker-price
|
|
967
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#tickers
|
|
968
|
+
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
969
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
970
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
971
|
+
*/
|
|
962
972
|
async fetchTickers(symbols = undefined, params = {}) {
|
|
963
|
-
/**
|
|
964
|
-
* @method
|
|
965
|
-
* @name digifinex#fetchTickers
|
|
966
|
-
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
967
|
-
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#ticker-price
|
|
968
|
-
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#tickers
|
|
969
|
-
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
970
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
971
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
972
|
-
*/
|
|
973
973
|
await this.loadMarkets();
|
|
974
974
|
symbols = this.marketSymbols(symbols);
|
|
975
975
|
const first = this.safeString(symbols, 0);
|
|
@@ -1048,17 +1048,17 @@ export default class digifinex extends Exchange {
|
|
|
1048
1048
|
}
|
|
1049
1049
|
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
1050
1050
|
}
|
|
1051
|
+
/**
|
|
1052
|
+
* @method
|
|
1053
|
+
* @name digifinex#fetchTicker
|
|
1054
|
+
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1055
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#ticker-price
|
|
1056
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#ticker
|
|
1057
|
+
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1058
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1059
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1060
|
+
*/
|
|
1051
1061
|
async fetchTicker(symbol, params = {}) {
|
|
1052
|
-
/**
|
|
1053
|
-
* @method
|
|
1054
|
-
* @name digifinex#fetchTicker
|
|
1055
|
-
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1056
|
-
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#ticker-price
|
|
1057
|
-
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#ticker
|
|
1058
|
-
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1059
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1060
|
-
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1061
|
-
*/
|
|
1062
1062
|
await this.loadMarkets();
|
|
1063
1063
|
const market = this.market(symbol);
|
|
1064
1064
|
const request = {};
|
|
@@ -1346,14 +1346,14 @@ export default class digifinex extends Exchange {
|
|
|
1346
1346
|
'fee': fee,
|
|
1347
1347
|
}, market);
|
|
1348
1348
|
}
|
|
1349
|
+
/**
|
|
1350
|
+
* @method
|
|
1351
|
+
* @name digifinex#fetchTime
|
|
1352
|
+
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
1353
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1354
|
+
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
1355
|
+
*/
|
|
1349
1356
|
async fetchTime(params = {}) {
|
|
1350
|
-
/**
|
|
1351
|
-
* @method
|
|
1352
|
-
* @name digifinex#fetchTime
|
|
1353
|
-
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
1354
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1355
|
-
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
1356
|
-
*/
|
|
1357
1357
|
const response = await this.publicSpotGetTime(params);
|
|
1358
1358
|
//
|
|
1359
1359
|
// {
|
|
@@ -1363,14 +1363,14 @@ export default class digifinex extends Exchange {
|
|
|
1363
1363
|
//
|
|
1364
1364
|
return this.safeTimestamp(response, 'server_time');
|
|
1365
1365
|
}
|
|
1366
|
+
/**
|
|
1367
|
+
* @method
|
|
1368
|
+
* @name digifinex#fetchStatus
|
|
1369
|
+
* @description the latest known information on the availability of the exchange API
|
|
1370
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1371
|
+
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
1372
|
+
*/
|
|
1366
1373
|
async fetchStatus(params = {}) {
|
|
1367
|
-
/**
|
|
1368
|
-
* @method
|
|
1369
|
-
* @name digifinex#fetchStatus
|
|
1370
|
-
* @description the latest known information on the availability of the exchange API
|
|
1371
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1372
|
-
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
1373
|
-
*/
|
|
1374
1374
|
const response = await this.publicSpotGetPing(params);
|
|
1375
1375
|
//
|
|
1376
1376
|
// {
|
|
@@ -1388,19 +1388,19 @@ export default class digifinex extends Exchange {
|
|
|
1388
1388
|
'info': response,
|
|
1389
1389
|
};
|
|
1390
1390
|
}
|
|
1391
|
+
/**
|
|
1392
|
+
* @method
|
|
1393
|
+
* @name digifinex#fetchTrades
|
|
1394
|
+
* @description get the list of most recent trades for a particular symbol
|
|
1395
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#get-recent-trades
|
|
1396
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#recenttrades
|
|
1397
|
+
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
1398
|
+
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1399
|
+
* @param {int} [limit] the maximum amount of trades to fetch
|
|
1400
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1401
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
1402
|
+
*/
|
|
1391
1403
|
async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
1392
|
-
/**
|
|
1393
|
-
* @method
|
|
1394
|
-
* @name digifinex#fetchTrades
|
|
1395
|
-
* @description get the list of most recent trades for a particular symbol
|
|
1396
|
-
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#get-recent-trades
|
|
1397
|
-
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#recenttrades
|
|
1398
|
-
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
1399
|
-
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1400
|
-
* @param {int} [limit] the maximum amount of trades to fetch
|
|
1401
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1402
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
1403
|
-
*/
|
|
1404
1404
|
await this.loadMarkets();
|
|
1405
1405
|
const market = this.market(symbol);
|
|
1406
1406
|
const request = {};
|
|
@@ -1492,20 +1492,20 @@ export default class digifinex extends Exchange {
|
|
|
1492
1492
|
];
|
|
1493
1493
|
}
|
|
1494
1494
|
}
|
|
1495
|
+
/**
|
|
1496
|
+
* @method
|
|
1497
|
+
* @name digifinex#fetchOHLCV
|
|
1498
|
+
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1499
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#get-candles-data
|
|
1500
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#recentcandle
|
|
1501
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1502
|
+
* @param {string} timeframe the length of time each candle represents
|
|
1503
|
+
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
1504
|
+
* @param {int} [limit] the maximum amount of candles to fetch
|
|
1505
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1506
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
1507
|
+
*/
|
|
1495
1508
|
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
1496
|
-
/**
|
|
1497
|
-
* @method
|
|
1498
|
-
* @name digifinex#fetchOHLCV
|
|
1499
|
-
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1500
|
-
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#get-candles-data
|
|
1501
|
-
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#recentcandle
|
|
1502
|
-
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1503
|
-
* @param {string} timeframe the length of time each candle represents
|
|
1504
|
-
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
1505
|
-
* @param {int} [limit] the maximum amount of candles to fetch
|
|
1506
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1507
|
-
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
1508
|
-
*/
|
|
1509
1509
|
await this.loadMarkets();
|
|
1510
1510
|
const market = this.market(symbol);
|
|
1511
1511
|
const request = {};
|
|
@@ -1574,26 +1574,26 @@ export default class digifinex extends Exchange {
|
|
|
1574
1574
|
}
|
|
1575
1575
|
return this.parseOHLCVs(candles, market, timeframe, since, limit);
|
|
1576
1576
|
}
|
|
1577
|
+
/**
|
|
1578
|
+
* @method
|
|
1579
|
+
* @name digifinex#createOrder
|
|
1580
|
+
* @description create a trade order
|
|
1581
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#create-new-order
|
|
1582
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#orderplace
|
|
1583
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
1584
|
+
* @param {string} type 'market' or 'limit'
|
|
1585
|
+
* @param {string} side 'buy' or 'sell'
|
|
1586
|
+
* @param {float} amount how much you want to trade in units of the base currency, spot market orders use the quote currency, swap requires the number of contracts
|
|
1587
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1588
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1589
|
+
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
|
|
1590
|
+
* @param {bool} [params.postOnly] true or false
|
|
1591
|
+
* @param {bool} [params.reduceOnly] true or false
|
|
1592
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
1593
|
+
* @param {float} [params.cost] *spot market buy only* the quote quantity that can be used as an alternative for the amount
|
|
1594
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1595
|
+
*/
|
|
1577
1596
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
1578
|
-
/**
|
|
1579
|
-
* @method
|
|
1580
|
-
* @name digifinex#createOrder
|
|
1581
|
-
* @description create a trade order
|
|
1582
|
-
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#create-new-order
|
|
1583
|
-
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#orderplace
|
|
1584
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
1585
|
-
* @param {string} type 'market' or 'limit'
|
|
1586
|
-
* @param {string} side 'buy' or 'sell'
|
|
1587
|
-
* @param {float} amount how much you want to trade in units of the base currency, spot market orders use the quote currency, swap requires the number of contracts
|
|
1588
|
-
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1589
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1590
|
-
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
|
|
1591
|
-
* @param {bool} [params.postOnly] true or false
|
|
1592
|
-
* @param {bool} [params.reduceOnly] true or false
|
|
1593
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
1594
|
-
* @param {float} [params.cost] *spot market buy only* the quote quantity that can be used as an alternative for the amount
|
|
1595
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1596
|
-
*/
|
|
1597
1597
|
await this.loadMarkets();
|
|
1598
1598
|
const market = this.market(symbol);
|
|
1599
1599
|
const marginResult = this.handleMarginModeAndParams('createOrder', params);
|
|
@@ -1634,17 +1634,17 @@ export default class digifinex extends Exchange {
|
|
|
1634
1634
|
order['price'] = price;
|
|
1635
1635
|
return order;
|
|
1636
1636
|
}
|
|
1637
|
+
/**
|
|
1638
|
+
* @method
|
|
1639
|
+
* @name digifinex#createOrders
|
|
1640
|
+
* @description create a list of trade orders (all orders should be of the same symbol)
|
|
1641
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#create-multiple-order
|
|
1642
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#batchorder
|
|
1643
|
+
* @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
|
|
1644
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1645
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1646
|
+
*/
|
|
1637
1647
|
async createOrders(orders, params = {}) {
|
|
1638
|
-
/**
|
|
1639
|
-
* @method
|
|
1640
|
-
* @name digifinex#createOrders
|
|
1641
|
-
* @description create a list of trade orders (all orders should be of the same symbol)
|
|
1642
|
-
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#create-multiple-order
|
|
1643
|
-
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#batchorder
|
|
1644
|
-
* @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
|
|
1645
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1646
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1647
|
-
*/
|
|
1648
1648
|
await this.loadMarkets();
|
|
1649
1649
|
const ordersRequests = [];
|
|
1650
1650
|
let symbol = undefined;
|
|
@@ -1848,17 +1848,17 @@ export default class digifinex extends Exchange {
|
|
|
1848
1848
|
params = this.omit(params, ['postOnly']);
|
|
1849
1849
|
return this.extend(request, params);
|
|
1850
1850
|
}
|
|
1851
|
+
/**
|
|
1852
|
+
* @method
|
|
1853
|
+
* @name digifinex#createMarketBuyOrderWithCost
|
|
1854
|
+
* @description create a market buy order by providing the symbol and cost
|
|
1855
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#create-new-order
|
|
1856
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
1857
|
+
* @param {float} cost how much you want to trade in units of the quote currency
|
|
1858
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1859
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1860
|
+
*/
|
|
1851
1861
|
async createMarketBuyOrderWithCost(symbol, cost, params = {}) {
|
|
1852
|
-
/**
|
|
1853
|
-
* @method
|
|
1854
|
-
* @name digifinex#createMarketBuyOrderWithCost
|
|
1855
|
-
* @description create a market buy order by providing the symbol and cost
|
|
1856
|
-
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#create-new-order
|
|
1857
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
1858
|
-
* @param {float} cost how much you want to trade in units of the quote currency
|
|
1859
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1860
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1861
|
-
*/
|
|
1862
1862
|
await this.loadMarkets();
|
|
1863
1863
|
const market = this.market(symbol);
|
|
1864
1864
|
if (!market['spot']) {
|
|
@@ -1867,18 +1867,18 @@ export default class digifinex extends Exchange {
|
|
|
1867
1867
|
params['createMarketBuyOrderRequiresPrice'] = false;
|
|
1868
1868
|
return await this.createOrder(symbol, 'market', 'buy', cost, undefined, params);
|
|
1869
1869
|
}
|
|
1870
|
+
/**
|
|
1871
|
+
* @method
|
|
1872
|
+
* @name digifinex#cancelOrder
|
|
1873
|
+
* @description cancels an open order
|
|
1874
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#cancel-order
|
|
1875
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#cancelorder
|
|
1876
|
+
* @param {string} id order id
|
|
1877
|
+
* @param {string} symbol not used by digifinex cancelOrder ()
|
|
1878
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1879
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1880
|
+
*/
|
|
1870
1881
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
1871
|
-
/**
|
|
1872
|
-
* @method
|
|
1873
|
-
* @name digifinex#cancelOrder
|
|
1874
|
-
* @description cancels an open order
|
|
1875
|
-
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#cancel-order
|
|
1876
|
-
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#cancelorder
|
|
1877
|
-
* @param {string} id order id
|
|
1878
|
-
* @param {string} symbol not used by digifinex cancelOrder ()
|
|
1879
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1880
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1881
|
-
*/
|
|
1882
1882
|
await this.loadMarkets();
|
|
1883
1883
|
let market = undefined;
|
|
1884
1884
|
if (symbol !== undefined) {
|
|
@@ -1974,16 +1974,16 @@ export default class digifinex extends Exchange {
|
|
|
1974
1974
|
}
|
|
1975
1975
|
return result;
|
|
1976
1976
|
}
|
|
1977
|
+
/**
|
|
1978
|
+
* @method
|
|
1979
|
+
* @name digifinex#cancelOrders
|
|
1980
|
+
* @description cancel multiple orders
|
|
1981
|
+
* @param {string[]} ids order ids
|
|
1982
|
+
* @param {string} symbol not used by digifinex cancelOrders ()
|
|
1983
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1984
|
+
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1985
|
+
*/
|
|
1977
1986
|
async cancelOrders(ids, symbol = undefined, params = {}) {
|
|
1978
|
-
/**
|
|
1979
|
-
* @method
|
|
1980
|
-
* @name digifinex#cancelOrders
|
|
1981
|
-
* @description cancel multiple orders
|
|
1982
|
-
* @param {string[]} ids order ids
|
|
1983
|
-
* @param {string} symbol not used by digifinex cancelOrders ()
|
|
1984
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1985
|
-
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1986
|
-
*/
|
|
1987
1987
|
await this.loadMarkets();
|
|
1988
1988
|
const defaultType = this.safeString(this.options, 'defaultType', 'spot');
|
|
1989
1989
|
const orderType = this.safeString(params, 'type', defaultType);
|
|
@@ -2165,19 +2165,19 @@ export default class digifinex extends Exchange {
|
|
|
2165
2165
|
'trades': undefined,
|
|
2166
2166
|
}, market);
|
|
2167
2167
|
}
|
|
2168
|
+
/**
|
|
2169
|
+
* @method
|
|
2170
|
+
* @name digifinex#fetchOpenOrders
|
|
2171
|
+
* @description fetch all unfilled currently open orders
|
|
2172
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#current-active-orders
|
|
2173
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#openorder
|
|
2174
|
+
* @param {string} symbol unified market symbol
|
|
2175
|
+
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
2176
|
+
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
2177
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2178
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2179
|
+
*/
|
|
2168
2180
|
async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2169
|
-
/**
|
|
2170
|
-
* @method
|
|
2171
|
-
* @name digifinex#fetchOpenOrders
|
|
2172
|
-
* @description fetch all unfilled currently open orders
|
|
2173
|
-
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#current-active-orders
|
|
2174
|
-
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#openorder
|
|
2175
|
-
* @param {string} symbol unified market symbol
|
|
2176
|
-
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
2177
|
-
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
2178
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2179
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2180
|
-
*/
|
|
2181
2181
|
await this.loadMarkets();
|
|
2182
2182
|
let market = undefined;
|
|
2183
2183
|
if (symbol !== undefined) {
|
|
@@ -2271,19 +2271,19 @@ export default class digifinex extends Exchange {
|
|
|
2271
2271
|
const data = this.safeList(response, 'data', []);
|
|
2272
2272
|
return this.parseOrders(data, market, since, limit);
|
|
2273
2273
|
}
|
|
2274
|
+
/**
|
|
2275
|
+
* @method
|
|
2276
|
+
* @name digifinex#fetchOrders
|
|
2277
|
+
* @description fetches information on multiple orders made by the user
|
|
2278
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#get-all-orders-including-history-orders
|
|
2279
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#historyorder
|
|
2280
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
2281
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
2282
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
2283
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2284
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2285
|
+
*/
|
|
2274
2286
|
async fetchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2275
|
-
/**
|
|
2276
|
-
* @method
|
|
2277
|
-
* @name digifinex#fetchOrders
|
|
2278
|
-
* @description fetches information on multiple orders made by the user
|
|
2279
|
-
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#get-all-orders-including-history-orders
|
|
2280
|
-
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#historyorder
|
|
2281
|
-
* @param {string} symbol unified market symbol of the market orders were made in
|
|
2282
|
-
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
2283
|
-
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
2284
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2285
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2286
|
-
*/
|
|
2287
2287
|
await this.loadMarkets();
|
|
2288
2288
|
let market = undefined;
|
|
2289
2289
|
if (symbol !== undefined) {
|
|
@@ -2379,18 +2379,18 @@ export default class digifinex extends Exchange {
|
|
|
2379
2379
|
const data = this.safeList(response, 'data', []);
|
|
2380
2380
|
return this.parseOrders(data, market, since, limit);
|
|
2381
2381
|
}
|
|
2382
|
+
/**
|
|
2383
|
+
* @method
|
|
2384
|
+
* @name digifinex#fetchOrder
|
|
2385
|
+
* @description fetches information on an order made by the user
|
|
2386
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#get-order-status
|
|
2387
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#orderinfo
|
|
2388
|
+
* @param {string} id order id
|
|
2389
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
2390
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2391
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2392
|
+
*/
|
|
2382
2393
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
2383
|
-
/**
|
|
2384
|
-
* @method
|
|
2385
|
-
* @name digifinex#fetchOrder
|
|
2386
|
-
* @description fetches information on an order made by the user
|
|
2387
|
-
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#get-order-status
|
|
2388
|
-
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#orderinfo
|
|
2389
|
-
* @param {string} id order id
|
|
2390
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
2391
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2392
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2393
|
-
*/
|
|
2394
2394
|
await this.loadMarkets();
|
|
2395
2395
|
let market = undefined;
|
|
2396
2396
|
if (symbol !== undefined) {
|
|
@@ -2479,19 +2479,19 @@ export default class digifinex extends Exchange {
|
|
|
2479
2479
|
}
|
|
2480
2480
|
return this.parseOrder(order, market);
|
|
2481
2481
|
}
|
|
2482
|
+
/**
|
|
2483
|
+
* @method
|
|
2484
|
+
* @name digifinex#fetchMyTrades
|
|
2485
|
+
* @description fetch all trades made by the user
|
|
2486
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#customer-39-s-trades
|
|
2487
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#historytrade
|
|
2488
|
+
* @param {string} symbol unified market symbol
|
|
2489
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
2490
|
+
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
2491
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2492
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
2493
|
+
*/
|
|
2482
2494
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2483
|
-
/**
|
|
2484
|
-
* @method
|
|
2485
|
-
* @name digifinex#fetchMyTrades
|
|
2486
|
-
* @description fetch all trades made by the user
|
|
2487
|
-
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#customer-39-s-trades
|
|
2488
|
-
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#historytrade
|
|
2489
|
-
* @param {string} symbol unified market symbol
|
|
2490
|
-
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
2491
|
-
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
2492
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2493
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
2494
|
-
*/
|
|
2495
2495
|
await this.loadMarkets();
|
|
2496
2496
|
let market = undefined;
|
|
2497
2497
|
const request = {};
|
|
@@ -2635,19 +2635,19 @@ export default class digifinex extends Exchange {
|
|
|
2635
2635
|
'fee': undefined,
|
|
2636
2636
|
}, currency);
|
|
2637
2637
|
}
|
|
2638
|
+
/**
|
|
2639
|
+
* @method
|
|
2640
|
+
* @name digifinex#fetchLedger
|
|
2641
|
+
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
2642
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#spot-margin-otc-financial-logs
|
|
2643
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#bills
|
|
2644
|
+
* @param {string} [code] unified currency code, default is undefined
|
|
2645
|
+
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
2646
|
+
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
2647
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2648
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
2649
|
+
*/
|
|
2638
2650
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2639
|
-
/**
|
|
2640
|
-
* @method
|
|
2641
|
-
* @name digifinex#fetchLedger
|
|
2642
|
-
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
2643
|
-
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#spot-margin-otc-financial-logs
|
|
2644
|
-
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#bills
|
|
2645
|
-
* @param {string} [code] unified currency code, default is undefined
|
|
2646
|
-
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
2647
|
-
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
2648
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2649
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
2650
|
-
*/
|
|
2651
2651
|
await this.loadMarkets();
|
|
2652
2652
|
const request = {};
|
|
2653
2653
|
let marketType = undefined;
|
|
@@ -2751,15 +2751,15 @@ export default class digifinex extends Exchange {
|
|
|
2751
2751
|
'tag': tag,
|
|
2752
2752
|
};
|
|
2753
2753
|
}
|
|
2754
|
+
/**
|
|
2755
|
+
* @method
|
|
2756
|
+
* @name digifinex#fetchDepositAddress
|
|
2757
|
+
* @description fetch the deposit address for a currency associated with this account
|
|
2758
|
+
* @param {string} code unified currency code
|
|
2759
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2760
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
2761
|
+
*/
|
|
2754
2762
|
async fetchDepositAddress(code, params = {}) {
|
|
2755
|
-
/**
|
|
2756
|
-
* @method
|
|
2757
|
-
* @name digifinex#fetchDepositAddress
|
|
2758
|
-
* @description fetch the deposit address for a currency associated with this account
|
|
2759
|
-
* @param {string} code unified currency code
|
|
2760
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2761
|
-
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
2762
|
-
*/
|
|
2763
2763
|
await this.loadMarkets();
|
|
2764
2764
|
const currency = this.currency(code);
|
|
2765
2765
|
const request = {
|
|
@@ -2833,30 +2833,30 @@ export default class digifinex extends Exchange {
|
|
|
2833
2833
|
const data = this.safeList(response, 'data', []);
|
|
2834
2834
|
return this.parseTransactions(data, currency, since, limit, { 'type': type });
|
|
2835
2835
|
}
|
|
2836
|
+
/**
|
|
2837
|
+
* @method
|
|
2838
|
+
* @name digifinex#fetchDeposits
|
|
2839
|
+
* @description fetch all deposits made to an account
|
|
2840
|
+
* @param {string} code unified currency code
|
|
2841
|
+
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
2842
|
+
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
2843
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2844
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2845
|
+
*/
|
|
2836
2846
|
async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2837
|
-
/**
|
|
2838
|
-
* @method
|
|
2839
|
-
* @name digifinex#fetchDeposits
|
|
2840
|
-
* @description fetch all deposits made to an account
|
|
2841
|
-
* @param {string} code unified currency code
|
|
2842
|
-
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
2843
|
-
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
2844
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2845
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2846
|
-
*/
|
|
2847
2847
|
return await this.fetchTransactionsByType('deposit', code, since, limit, params);
|
|
2848
2848
|
}
|
|
2849
|
+
/**
|
|
2850
|
+
* @method
|
|
2851
|
+
* @name digifinex#fetchWithdrawals
|
|
2852
|
+
* @description fetch all withdrawals made from an account
|
|
2853
|
+
* @param {string} code unified currency code
|
|
2854
|
+
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
2855
|
+
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
2856
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2857
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2858
|
+
*/
|
|
2849
2859
|
async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2850
|
-
/**
|
|
2851
|
-
* @method
|
|
2852
|
-
* @name digifinex#fetchWithdrawals
|
|
2853
|
-
* @description fetch all withdrawals made from an account
|
|
2854
|
-
* @param {string} code unified currency code
|
|
2855
|
-
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
2856
|
-
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
2857
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2858
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2859
|
-
*/
|
|
2860
2860
|
return await this.fetchTransactionsByType('withdrawal', code, since, limit, params);
|
|
2861
2861
|
}
|
|
2862
2862
|
parseTransactionStatus(status) {
|
|
@@ -2982,18 +2982,18 @@ export default class digifinex extends Exchange {
|
|
|
2982
2982
|
'status': this.parseTransferStatus(this.safeString(transfer, 'code')),
|
|
2983
2983
|
};
|
|
2984
2984
|
}
|
|
2985
|
+
/**
|
|
2986
|
+
* @method
|
|
2987
|
+
* @name digifinex#transfer
|
|
2988
|
+
* @description transfer currency internally between wallets on the same account
|
|
2989
|
+
* @param {string} code unified currency code
|
|
2990
|
+
* @param {float} amount amount to transfer
|
|
2991
|
+
* @param {string} fromAccount account to transfer from
|
|
2992
|
+
* @param {string} toAccount account to transfer to
|
|
2993
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2994
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
2995
|
+
*/
|
|
2985
2996
|
async transfer(code, amount, fromAccount, toAccount, params = {}) {
|
|
2986
|
-
/**
|
|
2987
|
-
* @method
|
|
2988
|
-
* @name digifinex#transfer
|
|
2989
|
-
* @description transfer currency internally between wallets on the same account
|
|
2990
|
-
* @param {string} code unified currency code
|
|
2991
|
-
* @param {float} amount amount to transfer
|
|
2992
|
-
* @param {string} fromAccount account to transfer from
|
|
2993
|
-
* @param {string} toAccount account to transfer to
|
|
2994
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2995
|
-
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
2996
|
-
*/
|
|
2997
2997
|
await this.loadMarkets();
|
|
2998
2998
|
const currency = this.currency(code);
|
|
2999
2999
|
const accountsByType = this.safeValue(this.options, 'accountsByType', {});
|
|
@@ -3013,18 +3013,18 @@ export default class digifinex extends Exchange {
|
|
|
3013
3013
|
//
|
|
3014
3014
|
return this.parseTransfer(response, currency);
|
|
3015
3015
|
}
|
|
3016
|
+
/**
|
|
3017
|
+
* @method
|
|
3018
|
+
* @name digifinex#withdraw
|
|
3019
|
+
* @description make a withdrawal
|
|
3020
|
+
* @param {string} code unified currency code
|
|
3021
|
+
* @param {float} amount the amount to withdraw
|
|
3022
|
+
* @param {string} address the address to withdraw to
|
|
3023
|
+
* @param {string} tag
|
|
3024
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3025
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
3026
|
+
*/
|
|
3016
3027
|
async withdraw(code, amount, address, tag = undefined, params = {}) {
|
|
3017
|
-
/**
|
|
3018
|
-
* @method
|
|
3019
|
-
* @name digifinex#withdraw
|
|
3020
|
-
* @description make a withdrawal
|
|
3021
|
-
* @param {string} code unified currency code
|
|
3022
|
-
* @param {float} amount the amount to withdraw
|
|
3023
|
-
* @param {string} address the address to withdraw to
|
|
3024
|
-
* @param {string} tag
|
|
3025
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3026
|
-
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
3027
|
-
*/
|
|
3028
3028
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
3029
3029
|
this.checkAddress(address);
|
|
3030
3030
|
await this.loadMarkets();
|
|
@@ -3114,16 +3114,16 @@ export default class digifinex extends Exchange {
|
|
|
3114
3114
|
'datetime': undefined,
|
|
3115
3115
|
};
|
|
3116
3116
|
}
|
|
3117
|
+
/**
|
|
3118
|
+
* @method
|
|
3119
|
+
* @name digifinex#fetchCrossBorrowRate
|
|
3120
|
+
* @description fetch the rate of interest to borrow a currency for margin trading
|
|
3121
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#margin-assets
|
|
3122
|
+
* @param {string} code unified currency code
|
|
3123
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3124
|
+
* @returns {object} a [borrow rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure}
|
|
3125
|
+
*/
|
|
3117
3126
|
async fetchCrossBorrowRate(code, params = {}) {
|
|
3118
|
-
/**
|
|
3119
|
-
* @method
|
|
3120
|
-
* @name digifinex#fetchCrossBorrowRate
|
|
3121
|
-
* @description fetch the rate of interest to borrow a currency for margin trading
|
|
3122
|
-
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#margin-assets
|
|
3123
|
-
* @param {string} code unified currency code
|
|
3124
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3125
|
-
* @returns {object} a [borrow rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure}
|
|
3126
|
-
*/
|
|
3127
3127
|
await this.loadMarkets();
|
|
3128
3128
|
const request = {};
|
|
3129
3129
|
const response = await this.privateSpotGetMarginAssets(this.extend(request, params));
|
|
@@ -3155,15 +3155,15 @@ export default class digifinex extends Exchange {
|
|
|
3155
3155
|
const currency = this.currency(code);
|
|
3156
3156
|
return this.parseBorrowRate(result, currency);
|
|
3157
3157
|
}
|
|
3158
|
+
/**
|
|
3159
|
+
* @method
|
|
3160
|
+
* @name digifinex#fetchCrossBorrowRates
|
|
3161
|
+
* @description fetch the borrow interest rates of all currencies
|
|
3162
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#margin-assets
|
|
3163
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3164
|
+
* @returns {object} a list of [borrow rate structures]{@link https://docs.ccxt.com/#/?id=borrow-rate-structure}
|
|
3165
|
+
*/
|
|
3158
3166
|
async fetchCrossBorrowRates(params = {}) {
|
|
3159
|
-
/**
|
|
3160
|
-
* @method
|
|
3161
|
-
* @name digifinex#fetchCrossBorrowRates
|
|
3162
|
-
* @description fetch the borrow interest rates of all currencies
|
|
3163
|
-
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#margin-assets
|
|
3164
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3165
|
-
* @returns {object} a list of [borrow rate structures]{@link https://docs.ccxt.com/#/?id=borrow-rate-structure}
|
|
3166
|
-
*/
|
|
3167
3167
|
await this.loadMarkets();
|
|
3168
3168
|
const response = await this.privateSpotGetMarginAssets(params);
|
|
3169
3169
|
//
|
|
@@ -3225,16 +3225,16 @@ export default class digifinex extends Exchange {
|
|
|
3225
3225
|
}
|
|
3226
3226
|
return result;
|
|
3227
3227
|
}
|
|
3228
|
+
/**
|
|
3229
|
+
* @method
|
|
3230
|
+
* @name digifinex#fetchFundingRate
|
|
3231
|
+
* @description fetch the current funding rate
|
|
3232
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#currentfundingrate
|
|
3233
|
+
* @param {string} symbol unified market symbol
|
|
3234
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3235
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
3236
|
+
*/
|
|
3228
3237
|
async fetchFundingRate(symbol, params = {}) {
|
|
3229
|
-
/**
|
|
3230
|
-
* @method
|
|
3231
|
-
* @name digifinex#fetchFundingRate
|
|
3232
|
-
* @description fetch the current funding rate
|
|
3233
|
-
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#currentfundingrate
|
|
3234
|
-
* @param {string} symbol unified market symbol
|
|
3235
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3236
|
-
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
3237
|
-
*/
|
|
3238
3238
|
await this.loadMarkets();
|
|
3239
3239
|
const market = this.market(symbol);
|
|
3240
3240
|
if (!market['swap']) {
|
|
@@ -3259,16 +3259,16 @@ export default class digifinex extends Exchange {
|
|
|
3259
3259
|
const data = this.safeDict(response, 'data', {});
|
|
3260
3260
|
return this.parseFundingRate(data, market);
|
|
3261
3261
|
}
|
|
3262
|
+
/**
|
|
3263
|
+
* @method
|
|
3264
|
+
* @name digifinex#fetchFundingInterval
|
|
3265
|
+
* @description fetch the current funding rate interval
|
|
3266
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#currentfundingrate
|
|
3267
|
+
* @param {string} symbol unified market symbol
|
|
3268
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3269
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
3270
|
+
*/
|
|
3262
3271
|
async fetchFundingInterval(symbol, params = {}) {
|
|
3263
|
-
/**
|
|
3264
|
-
* @method
|
|
3265
|
-
* @name digifinex#fetchFundingInterval
|
|
3266
|
-
* @description fetch the current funding rate interval
|
|
3267
|
-
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#currentfundingrate
|
|
3268
|
-
* @param {string} symbol unified market symbol
|
|
3269
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3270
|
-
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
3271
|
-
*/
|
|
3272
3272
|
return await this.fetchFundingRate(symbol, params);
|
|
3273
3273
|
}
|
|
3274
3274
|
parseFundingRate(contract, market = undefined) {
|
|
@@ -3318,17 +3318,17 @@ export default class digifinex extends Exchange {
|
|
|
3318
3318
|
};
|
|
3319
3319
|
return this.safeString(intervals, interval, interval);
|
|
3320
3320
|
}
|
|
3321
|
+
/**
|
|
3322
|
+
* @method
|
|
3323
|
+
* @name digifinex#fetchFundingRateHistory
|
|
3324
|
+
* @description fetches historical funding rate prices
|
|
3325
|
+
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
3326
|
+
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
3327
|
+
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
3328
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3329
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
3330
|
+
*/
|
|
3321
3331
|
async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3322
|
-
/**
|
|
3323
|
-
* @method
|
|
3324
|
-
* @name digifinex#fetchFundingRateHistory
|
|
3325
|
-
* @description fetches historical funding rate prices
|
|
3326
|
-
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
3327
|
-
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
3328
|
-
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
3329
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3330
|
-
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
3331
|
-
*/
|
|
3332
3332
|
if (symbol === undefined) {
|
|
3333
3333
|
throw new ArgumentsRequired(this.id + ' fetchFundingRateHistory() requires a symbol argument');
|
|
3334
3334
|
}
|
|
@@ -3381,16 +3381,16 @@ export default class digifinex extends Exchange {
|
|
|
3381
3381
|
const sorted = this.sortBy(rates, 'timestamp');
|
|
3382
3382
|
return this.filterBySymbolSinceLimit(sorted, symbol, since, limit);
|
|
3383
3383
|
}
|
|
3384
|
+
/**
|
|
3385
|
+
* @method
|
|
3386
|
+
* @name digifinex#fetchTradingFee
|
|
3387
|
+
* @description fetch the trading fees for a market
|
|
3388
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#tradingfee
|
|
3389
|
+
* @param {string} symbol unified market symbol
|
|
3390
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3391
|
+
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
3392
|
+
*/
|
|
3384
3393
|
async fetchTradingFee(symbol, params = {}) {
|
|
3385
|
-
/**
|
|
3386
|
-
* @method
|
|
3387
|
-
* @name digifinex#fetchTradingFee
|
|
3388
|
-
* @description fetch the trading fees for a market
|
|
3389
|
-
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#tradingfee
|
|
3390
|
-
* @param {string} symbol unified market symbol
|
|
3391
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3392
|
-
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
3393
|
-
*/
|
|
3394
3394
|
await this.loadMarkets();
|
|
3395
3395
|
const market = this.market(symbol);
|
|
3396
3396
|
if (!market['swap']) {
|
|
@@ -3432,17 +3432,17 @@ export default class digifinex extends Exchange {
|
|
|
3432
3432
|
'tierBased': undefined,
|
|
3433
3433
|
};
|
|
3434
3434
|
}
|
|
3435
|
+
/**
|
|
3436
|
+
* @method
|
|
3437
|
+
* @name digifinex#fetchPositions
|
|
3438
|
+
* @description fetch all open positions
|
|
3439
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#margin-positions
|
|
3440
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#positions
|
|
3441
|
+
* @param {string[]|undefined} symbols list of unified market symbols
|
|
3442
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3443
|
+
* @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
3444
|
+
*/
|
|
3435
3445
|
async fetchPositions(symbols = undefined, params = {}) {
|
|
3436
|
-
/**
|
|
3437
|
-
* @method
|
|
3438
|
-
* @name digifinex#fetchPositions
|
|
3439
|
-
* @description fetch all open positions
|
|
3440
|
-
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#margin-positions
|
|
3441
|
-
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#positions
|
|
3442
|
-
* @param {string[]|undefined} symbols list of unified market symbols
|
|
3443
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3444
|
-
* @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
3445
|
-
*/
|
|
3446
3446
|
await this.loadMarkets();
|
|
3447
3447
|
symbols = this.marketSymbols(symbols);
|
|
3448
3448
|
const request = {};
|
|
@@ -3542,17 +3542,17 @@ export default class digifinex extends Exchange {
|
|
|
3542
3542
|
}
|
|
3543
3543
|
return this.filterByArrayPositions(result, 'symbol', symbols, false);
|
|
3544
3544
|
}
|
|
3545
|
+
/**
|
|
3546
|
+
* @method
|
|
3547
|
+
* @name digifinex#fetchPosition
|
|
3548
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#margin-positions
|
|
3549
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#positions
|
|
3550
|
+
* @description fetch data on a single open contract trade position
|
|
3551
|
+
* @param {string} symbol unified market symbol of the market the position is held in
|
|
3552
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3553
|
+
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
3554
|
+
*/
|
|
3545
3555
|
async fetchPosition(symbol, params = {}) {
|
|
3546
|
-
/**
|
|
3547
|
-
* @method
|
|
3548
|
-
* @name digifinex#fetchPosition
|
|
3549
|
-
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#margin-positions
|
|
3550
|
-
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#positions
|
|
3551
|
-
* @description fetch data on a single open contract trade position
|
|
3552
|
-
* @param {string} symbol unified market symbol of the market the position is held in
|
|
3553
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3554
|
-
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
3555
|
-
*/
|
|
3556
3556
|
await this.loadMarkets();
|
|
3557
3557
|
const market = this.market(symbol);
|
|
3558
3558
|
const request = {};
|
|
@@ -3722,19 +3722,19 @@ export default class digifinex extends Exchange {
|
|
|
3722
3722
|
'takeProfitPrice': undefined,
|
|
3723
3723
|
});
|
|
3724
3724
|
}
|
|
3725
|
+
/**
|
|
3726
|
+
* @method
|
|
3727
|
+
* @name digifinex#setLeverage
|
|
3728
|
+
* @description set the level of leverage for a market
|
|
3729
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#setleverage
|
|
3730
|
+
* @param {float} leverage the rate of leverage
|
|
3731
|
+
* @param {string} symbol unified market symbol
|
|
3732
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3733
|
+
* @param {string} [params.marginMode] either 'cross' or 'isolated', default is cross
|
|
3734
|
+
* @param {string} [params.side] either 'long' or 'short', required for isolated markets only
|
|
3735
|
+
* @returns {object} response from the exchange
|
|
3736
|
+
*/
|
|
3725
3737
|
async setLeverage(leverage, symbol = undefined, params = {}) {
|
|
3726
|
-
/**
|
|
3727
|
-
* @method
|
|
3728
|
-
* @name digifinex#setLeverage
|
|
3729
|
-
* @description set the level of leverage for a market
|
|
3730
|
-
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#setleverage
|
|
3731
|
-
* @param {float} leverage the rate of leverage
|
|
3732
|
-
* @param {string} symbol unified market symbol
|
|
3733
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3734
|
-
* @param {string} [params.marginMode] either 'cross' or 'isolated', default is cross
|
|
3735
|
-
* @param {string} [params.side] either 'long' or 'short', required for isolated markets only
|
|
3736
|
-
* @returns {object} response from the exchange
|
|
3737
|
-
*/
|
|
3738
3738
|
if (symbol === undefined) {
|
|
3739
3739
|
throw new ArgumentsRequired(this.id + ' setLeverage() requires a symbol argument');
|
|
3740
3740
|
}
|
|
@@ -3780,18 +3780,18 @@ export default class digifinex extends Exchange {
|
|
|
3780
3780
|
// }
|
|
3781
3781
|
//
|
|
3782
3782
|
}
|
|
3783
|
+
/**
|
|
3784
|
+
* @method
|
|
3785
|
+
* @name digifinex#fetchTransfers
|
|
3786
|
+
* @description fetch the transfer history, only transfers between spot and swap accounts are supported
|
|
3787
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#transferrecord
|
|
3788
|
+
* @param {string} code unified currency code of the currency transferred
|
|
3789
|
+
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
3790
|
+
* @param {int} [limit] the maximum number of transfers to retrieve
|
|
3791
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3792
|
+
* @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
3793
|
+
*/
|
|
3783
3794
|
async fetchTransfers(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3784
|
-
/**
|
|
3785
|
-
* @method
|
|
3786
|
-
* @name digifinex#fetchTransfers
|
|
3787
|
-
* @description fetch the transfer history, only transfers between spot and swap accounts are supported
|
|
3788
|
-
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#transferrecord
|
|
3789
|
-
* @param {string} code unified currency code of the currency transferred
|
|
3790
|
-
* @param {int} [since] the earliest time in ms to fetch transfers for
|
|
3791
|
-
* @param {int} [limit] the maximum number of transfers to retrieve
|
|
3792
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3793
|
-
* @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
3794
|
-
*/
|
|
3795
3795
|
await this.loadMarkets();
|
|
3796
3796
|
let currency = undefined;
|
|
3797
3797
|
const request = {};
|
|
@@ -3824,16 +3824,16 @@ export default class digifinex extends Exchange {
|
|
|
3824
3824
|
const transfers = this.safeList(response, 'data', []);
|
|
3825
3825
|
return this.parseTransfers(transfers, currency, since, limit);
|
|
3826
3826
|
}
|
|
3827
|
+
/**
|
|
3828
|
+
* @method
|
|
3829
|
+
* @name digifinex#fetchLeverageTiers
|
|
3830
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#instruments
|
|
3831
|
+
* @description retrieve information on the maximum leverage, for different trade sizes
|
|
3832
|
+
* @param {string[]|undefined} symbols a list of unified market symbols
|
|
3833
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3834
|
+
* @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}, indexed by market symbols
|
|
3835
|
+
*/
|
|
3827
3836
|
async fetchLeverageTiers(symbols = undefined, params = {}) {
|
|
3828
|
-
/**
|
|
3829
|
-
* @method
|
|
3830
|
-
* @name digifinex#fetchLeverageTiers
|
|
3831
|
-
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#instruments
|
|
3832
|
-
* @description retrieve information on the maximum leverage, for different trade sizes
|
|
3833
|
-
* @param {string[]|undefined} symbols a list of unified market symbols
|
|
3834
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3835
|
-
* @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}, indexed by market symbols
|
|
3836
|
-
*/
|
|
3837
3837
|
await this.loadMarkets();
|
|
3838
3838
|
const response = await this.publicSwapGetPublicInstruments(params);
|
|
3839
3839
|
//
|
|
@@ -3869,16 +3869,16 @@ export default class digifinex extends Exchange {
|
|
|
3869
3869
|
symbols = this.marketSymbols(symbols);
|
|
3870
3870
|
return this.parseLeverageTiers(data, symbols, 'instrument_id');
|
|
3871
3871
|
}
|
|
3872
|
+
/**
|
|
3873
|
+
* @method
|
|
3874
|
+
* @name digifinex#fetchMarketLeverageTiers
|
|
3875
|
+
* @description retrieve information on the maximum leverage, for different trade sizes for a single market
|
|
3876
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#instrument
|
|
3877
|
+
* @param {string} symbol unified market symbol
|
|
3878
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3879
|
+
* @returns {object} a [leverage tiers structure]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}
|
|
3880
|
+
*/
|
|
3872
3881
|
async fetchMarketLeverageTiers(symbol, params = {}) {
|
|
3873
|
-
/**
|
|
3874
|
-
* @method
|
|
3875
|
-
* @name digifinex#fetchMarketLeverageTiers
|
|
3876
|
-
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#instrument
|
|
3877
|
-
* @description retrieve information on the maximum leverage, for different trade sizes for a single market
|
|
3878
|
-
* @param {string} symbol unified market symbol
|
|
3879
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3880
|
-
* @returns {object} a [leverage tiers structure]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}
|
|
3881
|
-
*/
|
|
3882
3882
|
await this.loadMarkets();
|
|
3883
3883
|
const market = this.market(symbol);
|
|
3884
3884
|
if (!market['swap']) {
|
|
@@ -3948,9 +3948,10 @@ export default class digifinex extends Exchange {
|
|
|
3948
3948
|
for (let i = 0; i < brackets.length; i++) {
|
|
3949
3949
|
const tier = brackets[i];
|
|
3950
3950
|
const marketId = this.safeString(info, 'instrument_id');
|
|
3951
|
-
market = this.safeMarket(marketId);
|
|
3951
|
+
market = this.safeMarket(marketId, market);
|
|
3952
3952
|
tiers.push({
|
|
3953
3953
|
'tier': this.sum(i, 1),
|
|
3954
|
+
'symbol': this.safeSymbol(marketId, market, undefined, 'swap'),
|
|
3954
3955
|
'currency': market['settle'],
|
|
3955
3956
|
'minNotional': undefined,
|
|
3956
3957
|
'maxNotional': this.safeNumber(tier, 'max_limit'),
|
|
@@ -3985,16 +3986,16 @@ export default class digifinex extends Exchange {
|
|
|
3985
3986
|
}
|
|
3986
3987
|
return [marginMode, params];
|
|
3987
3988
|
}
|
|
3989
|
+
/**
|
|
3990
|
+
* @method
|
|
3991
|
+
* @name digifinex#fetchDepositWithdrawFees
|
|
3992
|
+
* @description fetch deposit and withdraw fees
|
|
3993
|
+
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#get-currency-deposit-and-withdrawal-information
|
|
3994
|
+
* @param {string[]|undefined} codes not used by fetchDepositWithdrawFees ()
|
|
3995
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3996
|
+
* @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
3997
|
+
*/
|
|
3988
3998
|
async fetchDepositWithdrawFees(codes = undefined, params = {}) {
|
|
3989
|
-
/**
|
|
3990
|
-
* @method
|
|
3991
|
-
* @name digifinex#fetchDepositWithdrawFees
|
|
3992
|
-
* @description fetch deposit and withdraw fees
|
|
3993
|
-
* @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#get-currency-deposit-and-withdrawal-information
|
|
3994
|
-
* @param {string[]|undefined} codes not used by fetchDepositWithdrawFees ()
|
|
3995
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3996
|
-
* @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
3997
|
-
*/
|
|
3998
3999
|
await this.loadMarkets();
|
|
3999
4000
|
const response = await this.publicSpotGetCurrencies(params);
|
|
4000
4001
|
//
|
|
@@ -4100,34 +4101,34 @@ export default class digifinex extends Exchange {
|
|
|
4100
4101
|
}
|
|
4101
4102
|
return depositWithdrawFees;
|
|
4102
4103
|
}
|
|
4104
|
+
/**
|
|
4105
|
+
* @method
|
|
4106
|
+
* @name digifinex#addMargin
|
|
4107
|
+
* @description add margin to a position
|
|
4108
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#positionmargin
|
|
4109
|
+
* @param {string} symbol unified market symbol
|
|
4110
|
+
* @param {float} amount amount of margin to add
|
|
4111
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4112
|
+
* @param {string} params.side the position side: 'long' or 'short'
|
|
4113
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=margin-structure}
|
|
4114
|
+
*/
|
|
4103
4115
|
async addMargin(symbol, amount, params = {}) {
|
|
4104
|
-
/**
|
|
4105
|
-
* @method
|
|
4106
|
-
* @name digifinex#addMargin
|
|
4107
|
-
* @description add margin to a position
|
|
4108
|
-
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#positionmargin
|
|
4109
|
-
* @param {string} symbol unified market symbol
|
|
4110
|
-
* @param {float} amount amount of margin to add
|
|
4111
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4112
|
-
* @param {string} params.side the position side: 'long' or 'short'
|
|
4113
|
-
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=margin-structure}
|
|
4114
|
-
*/
|
|
4115
4116
|
const side = this.safeString(params, 'side');
|
|
4116
4117
|
this.checkRequiredArgument('addMargin', side, 'side', ['long', 'short']);
|
|
4117
4118
|
return await this.modifyMarginHelper(symbol, amount, 1, params);
|
|
4118
4119
|
}
|
|
4120
|
+
/**
|
|
4121
|
+
* @method
|
|
4122
|
+
* @name digifinex#reduceMargin
|
|
4123
|
+
* @description remove margin from a position
|
|
4124
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#positionmargin
|
|
4125
|
+
* @param {string} symbol unified market symbol
|
|
4126
|
+
* @param {float} amount the amount of margin to remove
|
|
4127
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4128
|
+
* @param {string} params.side the position side: 'long' or 'short'
|
|
4129
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=margin-structure}
|
|
4130
|
+
*/
|
|
4119
4131
|
async reduceMargin(symbol, amount, params = {}) {
|
|
4120
|
-
/**
|
|
4121
|
-
* @method
|
|
4122
|
-
* @name digifinex#reduceMargin
|
|
4123
|
-
* @description remove margin from a position
|
|
4124
|
-
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#positionmargin
|
|
4125
|
-
* @param {string} symbol unified market symbol
|
|
4126
|
-
* @param {float} amount the amount of margin to remove
|
|
4127
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4128
|
-
* @param {string} params.side the position side: 'long' or 'short'
|
|
4129
|
-
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=margin-structure}
|
|
4130
|
-
*/
|
|
4131
4132
|
const side = this.safeString(params, 'side');
|
|
4132
4133
|
this.checkRequiredArgument('reduceMargin', side, 'side', ['long', 'short']);
|
|
4133
4134
|
return await this.modifyMarginHelper(symbol, amount, 2, params);
|
|
@@ -4185,19 +4186,19 @@ export default class digifinex extends Exchange {
|
|
|
4185
4186
|
'datetime': undefined,
|
|
4186
4187
|
};
|
|
4187
4188
|
}
|
|
4189
|
+
/**
|
|
4190
|
+
* @method
|
|
4191
|
+
* @name digifinex#fetchFundingHistory
|
|
4192
|
+
* @description fetch the history of funding payments paid and received on this account
|
|
4193
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#funding-fee
|
|
4194
|
+
* @param {string} [symbol] unified market symbol
|
|
4195
|
+
* @param {int} [since] the earliest time in ms to fetch funding history for
|
|
4196
|
+
* @param {int} [limit] the maximum number of funding history structures to retrieve
|
|
4197
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4198
|
+
* @param {int} [params.until] timestamp in ms of the latest funding payment
|
|
4199
|
+
* @returns {object} a [funding history structure]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
|
|
4200
|
+
*/
|
|
4188
4201
|
async fetchFundingHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
4189
|
-
/**
|
|
4190
|
-
* @method
|
|
4191
|
-
* @name digifinex#fetchFundingHistory
|
|
4192
|
-
* @description fetch the history of funding payments paid and received on this account
|
|
4193
|
-
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#funding-fee
|
|
4194
|
-
* @param {string} [symbol] unified market symbol
|
|
4195
|
-
* @param {int} [since] the earliest time in ms to fetch funding history for
|
|
4196
|
-
* @param {int} [limit] the maximum number of funding history structures to retrieve
|
|
4197
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4198
|
-
* @param {int} [params.until] timestamp in ms of the latest funding payment
|
|
4199
|
-
* @returns {object} a [funding history structure]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
|
|
4200
|
-
*/
|
|
4201
4202
|
await this.loadMarkets();
|
|
4202
4203
|
let request = {};
|
|
4203
4204
|
[request, params] = this.handleUntilOption('end_timestamp', request, params);
|
|
@@ -4251,17 +4252,17 @@ export default class digifinex extends Exchange {
|
|
|
4251
4252
|
'amount': this.safeNumber(income, 'amount'),
|
|
4252
4253
|
};
|
|
4253
4254
|
}
|
|
4255
|
+
/**
|
|
4256
|
+
* @method
|
|
4257
|
+
* @name digifinex#setMarginMode
|
|
4258
|
+
* @description set margin mode to 'cross' or 'isolated'
|
|
4259
|
+
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#positionmode
|
|
4260
|
+
* @param {string} marginMode 'cross' or 'isolated'
|
|
4261
|
+
* @param {string} symbol unified market symbol
|
|
4262
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4263
|
+
* @returns {object} response from the exchange
|
|
4264
|
+
*/
|
|
4254
4265
|
async setMarginMode(marginMode, symbol = undefined, params = {}) {
|
|
4255
|
-
/**
|
|
4256
|
-
* @method
|
|
4257
|
-
* @name digifinex#setMarginMode
|
|
4258
|
-
* @description set margin mode to 'cross' or 'isolated'
|
|
4259
|
-
* @see https://docs.digifinex.com/en-ww/swap/v2/rest.html#positionmode
|
|
4260
|
-
* @param {string} marginMode 'cross' or 'isolated'
|
|
4261
|
-
* @param {string} symbol unified market symbol
|
|
4262
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4263
|
-
* @returns {object} response from the exchange
|
|
4264
|
-
*/
|
|
4265
4266
|
if (symbol === undefined) {
|
|
4266
4267
|
throw new ArgumentsRequired(this.id + ' setMarginMode() requires a symbol argument');
|
|
4267
4268
|
}
|