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/blofin.js
CHANGED
|
@@ -352,15 +352,15 @@ export default class blofin extends Exchange {
|
|
|
352
352
|
},
|
|
353
353
|
});
|
|
354
354
|
}
|
|
355
|
+
/**
|
|
356
|
+
* @method
|
|
357
|
+
* @name blofin#fetchMarkets
|
|
358
|
+
* @description retrieves data on all markets for blofin
|
|
359
|
+
* @see https://blofin.com/docs#get-instruments
|
|
360
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
361
|
+
* @returns {object[]} an array of objects representing market data
|
|
362
|
+
*/
|
|
355
363
|
async fetchMarkets(params = {}) {
|
|
356
|
-
/**
|
|
357
|
-
* @method
|
|
358
|
-
* @name blofin#fetchMarkets
|
|
359
|
-
* @description retrieves data on all markets for blofin
|
|
360
|
-
* @see https://blofin.com/docs#get-instruments
|
|
361
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
362
|
-
* @returns {object[]} an array of objects representing market data
|
|
363
|
-
*/
|
|
364
364
|
const response = await this.publicGetMarketInstruments(params);
|
|
365
365
|
const data = this.safeList(response, 'data', []);
|
|
366
366
|
return this.parseMarkets(data);
|
|
@@ -445,17 +445,17 @@ export default class blofin extends Exchange {
|
|
|
445
445
|
'info': market,
|
|
446
446
|
});
|
|
447
447
|
}
|
|
448
|
+
/**
|
|
449
|
+
* @method
|
|
450
|
+
* @name blofin#fetchOrderBook
|
|
451
|
+
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
452
|
+
* @see https://blofin.com/docs#get-order-book
|
|
453
|
+
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
454
|
+
* @param {int} [limit] the maximum amount of order book entries to return
|
|
455
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
456
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
457
|
+
*/
|
|
448
458
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
449
|
-
/**
|
|
450
|
-
* @method
|
|
451
|
-
* @name blofin#fetchOrderBook
|
|
452
|
-
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
453
|
-
* @see https://blofin.com/docs#get-order-book
|
|
454
|
-
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
455
|
-
* @param {int} [limit] the maximum amount of order book entries to return
|
|
456
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
457
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
458
|
-
*/
|
|
459
459
|
await this.loadMarkets();
|
|
460
460
|
const market = this.market(symbol);
|
|
461
461
|
const request = {
|
|
@@ -548,16 +548,16 @@ export default class blofin extends Exchange {
|
|
|
548
548
|
'info': ticker,
|
|
549
549
|
}, market);
|
|
550
550
|
}
|
|
551
|
+
/**
|
|
552
|
+
* @method
|
|
553
|
+
* @name blofin#fetchTicker
|
|
554
|
+
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
555
|
+
* @see https://blofin.com/docs#get-tickers
|
|
556
|
+
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
557
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
558
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
559
|
+
*/
|
|
551
560
|
async fetchTicker(symbol, params = {}) {
|
|
552
|
-
/**
|
|
553
|
-
* @method
|
|
554
|
-
* @name blofin#fetchTicker
|
|
555
|
-
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
556
|
-
* @see https://blofin.com/docs#get-tickers
|
|
557
|
-
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
558
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
559
|
-
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
560
|
-
*/
|
|
561
561
|
await this.loadMarkets();
|
|
562
562
|
const market = this.market(symbol);
|
|
563
563
|
const request = {
|
|
@@ -568,17 +568,17 @@ export default class blofin extends Exchange {
|
|
|
568
568
|
const first = this.safeDict(data, 0, {});
|
|
569
569
|
return this.parseTicker(first, market);
|
|
570
570
|
}
|
|
571
|
+
/**
|
|
572
|
+
* @method
|
|
573
|
+
* @name blofin#fetchMarkPrice
|
|
574
|
+
* @description fetches mark price for the market
|
|
575
|
+
* @see https://docs.blofin.com/index.html#get-mark-price
|
|
576
|
+
* @param {string} symbol unified market symbol
|
|
577
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
578
|
+
* @param {string} [params.subType] "linear" or "inverse"
|
|
579
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
580
|
+
*/
|
|
571
581
|
async fetchMarkPrice(symbol, params = {}) {
|
|
572
|
-
/**
|
|
573
|
-
* @method
|
|
574
|
-
* @name blofin#fetchMarkPrice
|
|
575
|
-
* @description fetches mark price for the market
|
|
576
|
-
* @see https://docs.blofin.com/index.html#get-mark-price
|
|
577
|
-
* @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
578
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
579
|
-
* @param {string} [params.subType] "linear" or "inverse"
|
|
580
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
581
|
-
*/
|
|
582
582
|
await this.loadMarkets();
|
|
583
583
|
const market = this.market(symbol);
|
|
584
584
|
const request = {
|
|
@@ -589,16 +589,16 @@ export default class blofin extends Exchange {
|
|
|
589
589
|
const first = this.safeDict(data, 0, {});
|
|
590
590
|
return this.parseTicker(first, market);
|
|
591
591
|
}
|
|
592
|
+
/**
|
|
593
|
+
* @method
|
|
594
|
+
* @name blofin#fetchTickers
|
|
595
|
+
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
596
|
+
* @see https://blofin.com/docs#get-tickers
|
|
597
|
+
* @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
598
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
599
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
600
|
+
*/
|
|
592
601
|
async fetchTickers(symbols = undefined, params = {}) {
|
|
593
|
-
/**
|
|
594
|
-
* @method
|
|
595
|
-
* @name blofin#fetchTickers
|
|
596
|
-
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
597
|
-
* @see https://blofin.com/docs#get-tickers
|
|
598
|
-
* @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
599
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
600
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
601
|
-
*/
|
|
602
602
|
await this.loadMarkets();
|
|
603
603
|
symbols = this.marketSymbols(symbols);
|
|
604
604
|
const response = await this.publicGetMarketTickers(params);
|
|
@@ -666,19 +666,19 @@ export default class blofin extends Exchange {
|
|
|
666
666
|
'fee': fee,
|
|
667
667
|
}, market);
|
|
668
668
|
}
|
|
669
|
+
/**
|
|
670
|
+
* @method
|
|
671
|
+
* @name blofin#fetchTrades
|
|
672
|
+
* @description get the list of most recent trades for a particular symbol
|
|
673
|
+
* @see https://blofin.com/docs#get-trades
|
|
674
|
+
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
675
|
+
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
676
|
+
* @param {int} [limit] the maximum amount of trades to fetch
|
|
677
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
678
|
+
* @param {boolean} [params.paginate] *only applies to publicGetMarketHistoryTrades* default false, when true will automatically paginate by calling this endpoint multiple times
|
|
679
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
680
|
+
*/
|
|
669
681
|
async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
670
|
-
/**
|
|
671
|
-
* @method
|
|
672
|
-
* @name blofin#fetchTrades
|
|
673
|
-
* @description get the list of most recent trades for a particular symbol
|
|
674
|
-
* @see https://blofin.com/docs#get-trades
|
|
675
|
-
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
676
|
-
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
677
|
-
* @param {int} [limit] the maximum amount of trades to fetch
|
|
678
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
679
|
-
* @param {boolean} [params.paginate] *only applies to publicGetMarketHistoryTrades* default false, when true will automatically paginate by calling this endpoint multiple times
|
|
680
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
681
|
-
*/
|
|
682
682
|
await this.loadMarkets();
|
|
683
683
|
let paginate = false;
|
|
684
684
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchTrades', 'paginate');
|
|
@@ -724,21 +724,21 @@ export default class blofin extends Exchange {
|
|
|
724
724
|
this.safeNumber(ohlcv, 6),
|
|
725
725
|
];
|
|
726
726
|
}
|
|
727
|
+
/**
|
|
728
|
+
* @method
|
|
729
|
+
* @name blofin#fetchOHLCV
|
|
730
|
+
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
731
|
+
* @see https://blofin.com/docs#get-candlesticks
|
|
732
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
733
|
+
* @param {string} timeframe the length of time each candle represents
|
|
734
|
+
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
735
|
+
* @param {int} [limit] the maximum amount of candles to fetch
|
|
736
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
737
|
+
* @param {int} [params.until] timestamp in ms of the latest candle to fetch
|
|
738
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
739
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
740
|
+
*/
|
|
727
741
|
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
728
|
-
/**
|
|
729
|
-
* @method
|
|
730
|
-
* @name blofin#fetchOHLCV
|
|
731
|
-
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
732
|
-
* @see https://blofin.com/docs#get-candlesticks
|
|
733
|
-
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
734
|
-
* @param {string} timeframe the length of time each candle represents
|
|
735
|
-
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
736
|
-
* @param {int} [limit] the maximum amount of candles to fetch
|
|
737
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
738
|
-
* @param {int} [params.until] timestamp in ms of the latest candle to fetch
|
|
739
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
740
|
-
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
741
|
-
*/
|
|
742
742
|
await this.loadMarkets();
|
|
743
743
|
const market = this.market(symbol);
|
|
744
744
|
let paginate = false;
|
|
@@ -764,19 +764,19 @@ export default class blofin extends Exchange {
|
|
|
764
764
|
const data = this.safeList(response, 'data', []);
|
|
765
765
|
return this.parseOHLCVs(data, market, timeframe, since, limit);
|
|
766
766
|
}
|
|
767
|
+
/**
|
|
768
|
+
* @method
|
|
769
|
+
* @name blofin#fetchFundingRateHistory
|
|
770
|
+
* @description fetches historical funding rate prices
|
|
771
|
+
* @see https://blofin.com/docs#get-funding-rate-history
|
|
772
|
+
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
773
|
+
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
774
|
+
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
775
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
776
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
777
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
778
|
+
*/
|
|
767
779
|
async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
768
|
-
/**
|
|
769
|
-
* @method
|
|
770
|
-
* @name blofin#fetchFundingRateHistory
|
|
771
|
-
* @description fetches historical funding rate prices
|
|
772
|
-
* @see https://blofin.com/docs#get-funding-rate-history
|
|
773
|
-
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
774
|
-
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
775
|
-
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
776
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
777
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
778
|
-
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
779
|
-
*/
|
|
780
780
|
if (symbol === undefined) {
|
|
781
781
|
throw new ArgumentsRequired(this.id + ' fetchFundingRateHistory() requires a symbol argument');
|
|
782
782
|
}
|
|
@@ -846,16 +846,16 @@ export default class blofin extends Exchange {
|
|
|
846
846
|
'interval': undefined,
|
|
847
847
|
};
|
|
848
848
|
}
|
|
849
|
+
/**
|
|
850
|
+
* @method
|
|
851
|
+
* @name blofin#fetchFundingRate
|
|
852
|
+
* @description fetch the current funding rate
|
|
853
|
+
* @see https://blofin.com/docs#get-funding-rate
|
|
854
|
+
* @param {string} symbol unified market symbol
|
|
855
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
856
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
857
|
+
*/
|
|
849
858
|
async fetchFundingRate(symbol, params = {}) {
|
|
850
|
-
/**
|
|
851
|
-
* @method
|
|
852
|
-
* @name blofin#fetchFundingRate
|
|
853
|
-
* @description fetch the current funding rate
|
|
854
|
-
* @see https://blofin.com/docs#get-funding-rate
|
|
855
|
-
* @param {string} symbol unified market symbol
|
|
856
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
857
|
-
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
858
|
-
*/
|
|
859
859
|
await this.loadMarkets();
|
|
860
860
|
const market = this.market(symbol);
|
|
861
861
|
if (!market['swap']) {
|
|
@@ -989,17 +989,17 @@ export default class blofin extends Exchange {
|
|
|
989
989
|
'tierBased': undefined,
|
|
990
990
|
};
|
|
991
991
|
}
|
|
992
|
+
/**
|
|
993
|
+
* @method
|
|
994
|
+
* @name blofin#fetchBalance
|
|
995
|
+
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
996
|
+
* @see https://blofin.com/docs#get-balance
|
|
997
|
+
* @see https://blofin.com/docs#get-futures-account-balance
|
|
998
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
999
|
+
* @param {string} [params.accountType] the type of account to fetch the balance for, either 'funding' or 'futures' or 'copy_trading' or 'earn'
|
|
1000
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
1001
|
+
*/
|
|
992
1002
|
async fetchBalance(params = {}) {
|
|
993
|
-
/**
|
|
994
|
-
* @method
|
|
995
|
-
* @name blofin#fetchBalance
|
|
996
|
-
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
997
|
-
* @see https://blofin.com/docs#get-balance
|
|
998
|
-
* @see https://blofin.com/docs#get-futures-account-balance
|
|
999
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1000
|
-
* @param {string} [params.accountType] the type of account to fetch the balance for, either 'funding' or 'futures' or 'copy_trading' or 'earn'
|
|
1001
|
-
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
1002
|
-
*/
|
|
1003
1003
|
await this.loadMarkets();
|
|
1004
1004
|
const accountType = this.safeString2(params, 'accountType', 'type');
|
|
1005
1005
|
params = this.omit(params, ['accountType', 'type']);
|
|
@@ -1199,34 +1199,34 @@ export default class blofin extends Exchange {
|
|
|
1199
1199
|
'reduceOnly': reduceOnly,
|
|
1200
1200
|
}, market);
|
|
1201
1201
|
}
|
|
1202
|
+
/**
|
|
1203
|
+
* @method
|
|
1204
|
+
* @name blofin#createOrder
|
|
1205
|
+
* @description create a trade order
|
|
1206
|
+
* @see https://blofin.com/docs#place-order
|
|
1207
|
+
* @see https://blofin.com/docs#place-tpsl-order
|
|
1208
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
1209
|
+
* @param {string} type 'market' or 'limit' or 'post_only' or 'ioc' or 'fok'
|
|
1210
|
+
* @param {string} side 'buy' or 'sell'
|
|
1211
|
+
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1212
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1213
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1214
|
+
* @param {bool} [params.reduceOnly] a mark to reduce the position size for margin, swap and future orders
|
|
1215
|
+
* @param {bool} [params.postOnly] true to place a post only order
|
|
1216
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated', default is 'cross'
|
|
1217
|
+
* @param {float} [params.stopLossPrice] stop loss trigger price (will use privatePostTradeOrderTpsl)
|
|
1218
|
+
* @param {float} [params.takeProfitPrice] take profit trigger price (will use privatePostTradeOrderTpsl)
|
|
1219
|
+
* @param {string} [params.positionSide] *stopLossPrice/takeProfitPrice orders only* 'long' or 'short' or 'net' default is 'net'
|
|
1220
|
+
* @param {string} [params.clientOrderId] a unique id for the order
|
|
1221
|
+
* @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered
|
|
1222
|
+
* @param {float} [params.takeProfit.triggerPrice] take profit trigger price
|
|
1223
|
+
* @param {float} [params.takeProfit.price] take profit order price (if not provided the order will be a market order)
|
|
1224
|
+
* @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered
|
|
1225
|
+
* @param {float} [params.stopLoss.triggerPrice] stop loss trigger price
|
|
1226
|
+
* @param {float} [params.stopLoss.price] stop loss order price (if not provided the order will be a market order)
|
|
1227
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1228
|
+
*/
|
|
1202
1229
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
1203
|
-
/**
|
|
1204
|
-
* @method
|
|
1205
|
-
* @name blofin#createOrder
|
|
1206
|
-
* @description create a trade order
|
|
1207
|
-
* @see https://blofin.com/docs#place-order
|
|
1208
|
-
* @see https://blofin.com/docs#place-tpsl-order
|
|
1209
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
1210
|
-
* @param {string} type 'market' or 'limit' or 'post_only' or 'ioc' or 'fok'
|
|
1211
|
-
* @param {string} side 'buy' or 'sell'
|
|
1212
|
-
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1213
|
-
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1214
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1215
|
-
* @param {bool} [params.reduceOnly] a mark to reduce the position size for margin, swap and future orders
|
|
1216
|
-
* @param {bool} [params.postOnly] true to place a post only order
|
|
1217
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated', default is 'cross'
|
|
1218
|
-
* @param {float} [params.stopLossPrice] stop loss trigger price (will use privatePostTradeOrderTpsl)
|
|
1219
|
-
* @param {float} [params.takeProfitPrice] take profit trigger price (will use privatePostTradeOrderTpsl)
|
|
1220
|
-
* @param {string} [param.positionSide] *stopLossPrice/takeProfitPrice orders only* 'long' or 'short' or 'net' default is 'net'
|
|
1221
|
-
* @param {string} [params.clientOrderId] a unique id for the order
|
|
1222
|
-
* @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered
|
|
1223
|
-
* @param {float} [params.takeProfit.triggerPrice] take profit trigger price
|
|
1224
|
-
* @param {float} [params.takeProfit.price] take profit order price (if not provided the order will be a market order)
|
|
1225
|
-
* @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered
|
|
1226
|
-
* @param {float} [params.stopLoss.triggerPrice] stop loss trigger price
|
|
1227
|
-
* @param {float} [params.stopLoss.price] stop loss order price (if not provided the order will be a market order)
|
|
1228
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1229
|
-
*/
|
|
1230
1230
|
await this.loadMarkets();
|
|
1231
1231
|
const market = this.market(symbol);
|
|
1232
1232
|
const tpsl = this.safeBool(params, 'tpsl', false);
|
|
@@ -1292,19 +1292,19 @@ export default class blofin extends Exchange {
|
|
|
1292
1292
|
params = this.omit(params, ['stopLossPrice', 'takeProfitPrice']);
|
|
1293
1293
|
return this.extend(request, params);
|
|
1294
1294
|
}
|
|
1295
|
+
/**
|
|
1296
|
+
* @method
|
|
1297
|
+
* @name blofin#cancelOrder
|
|
1298
|
+
* @description cancels an open order
|
|
1299
|
+
* @see https://blofin.com/docs#cancel-order
|
|
1300
|
+
* @see https://blofin.com/docs#cancel-tpsl-order
|
|
1301
|
+
* @param {string} id order id
|
|
1302
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
1303
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1304
|
+
* @param {boolean} [params.trigger] True if cancelling a trigger/conditional order/tp sl orders
|
|
1305
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1306
|
+
*/
|
|
1295
1307
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
1296
|
-
/**
|
|
1297
|
-
* @method
|
|
1298
|
-
* @name blofin#cancelOrder
|
|
1299
|
-
* @description cancels an open order
|
|
1300
|
-
* @see https://blofin.com/docs#cancel-order
|
|
1301
|
-
* @see https://blofin.com/docs#cancel-tpsl-order
|
|
1302
|
-
* @param {string} id order id
|
|
1303
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
1304
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1305
|
-
* @param {boolean} [params.trigger] True if cancelling a trigger/conditional order/tp sl orders
|
|
1306
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1307
|
-
*/
|
|
1308
1308
|
if (symbol === undefined) {
|
|
1309
1309
|
throw new ArgumentsRequired(this.id + ' cancelOrder() requires a symbol argument');
|
|
1310
1310
|
}
|
|
@@ -1337,15 +1337,16 @@ export default class blofin extends Exchange {
|
|
|
1337
1337
|
const order = this.safeDict(data, 0);
|
|
1338
1338
|
return this.parseOrder(order, market);
|
|
1339
1339
|
}
|
|
1340
|
+
/**
|
|
1341
|
+
* @method
|
|
1342
|
+
* @name blofin#createOrders
|
|
1343
|
+
* @description create a list of trade orders
|
|
1344
|
+
* @see https://blofin.com/docs#place-multiple-orders
|
|
1345
|
+
* @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
|
|
1346
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1347
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1348
|
+
*/
|
|
1340
1349
|
async createOrders(orders, params = {}) {
|
|
1341
|
-
/**
|
|
1342
|
-
* @method
|
|
1343
|
-
* @name blofin#createOrders
|
|
1344
|
-
* @description create a list of trade orders
|
|
1345
|
-
* @see https://blofin.com/docs#place-multiple-orders
|
|
1346
|
-
* @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
|
|
1347
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1348
|
-
*/
|
|
1349
1350
|
await this.loadMarkets();
|
|
1350
1351
|
const ordersRequests = [];
|
|
1351
1352
|
for (let i = 0; i < orders.length; i++) {
|
|
@@ -1364,21 +1365,21 @@ export default class blofin extends Exchange {
|
|
|
1364
1365
|
const data = this.safeList(response, 'data', []);
|
|
1365
1366
|
return this.parseOrders(data);
|
|
1366
1367
|
}
|
|
1368
|
+
/**
|
|
1369
|
+
* @method
|
|
1370
|
+
* @name blofin#fetchOpenOrders
|
|
1371
|
+
* @description Fetch orders that are still open
|
|
1372
|
+
* @see https://blofin.com/docs#get-active-orders
|
|
1373
|
+
* @see https://blofin.com/docs#get-active-tpsl-orders
|
|
1374
|
+
* @param {string} symbol unified market symbol
|
|
1375
|
+
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1376
|
+
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1377
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1378
|
+
* @param {bool} [params.stop] True if fetching trigger or conditional orders
|
|
1379
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
1380
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1381
|
+
*/
|
|
1367
1382
|
async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1368
|
-
/**
|
|
1369
|
-
* @method
|
|
1370
|
-
* @name blofin#fetchOpenOrders
|
|
1371
|
-
* @description Fetch orders that are still open
|
|
1372
|
-
* @see https://blofin.com/docs#get-active-orders
|
|
1373
|
-
* @see https://blofin.com/docs#get-active-tpsl-orders
|
|
1374
|
-
* @param {string} symbol unified market symbol
|
|
1375
|
-
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1376
|
-
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1377
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1378
|
-
* @param {bool} [params.stop] True if fetching trigger or conditional orders
|
|
1379
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
1380
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1381
|
-
*/
|
|
1382
1383
|
await this.loadMarkets();
|
|
1383
1384
|
let paginate = false;
|
|
1384
1385
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchOpenOrders', 'paginate');
|
|
@@ -1408,20 +1409,20 @@ export default class blofin extends Exchange {
|
|
|
1408
1409
|
const data = this.safeList(response, 'data', []);
|
|
1409
1410
|
return this.parseOrders(data, market, since, limit);
|
|
1410
1411
|
}
|
|
1412
|
+
/**
|
|
1413
|
+
* @method
|
|
1414
|
+
* @name blofin#fetchMyTrades
|
|
1415
|
+
* @description fetch all trades made by the user
|
|
1416
|
+
* @see https://blofin.com/docs#get-trade-history
|
|
1417
|
+
* @param {string} symbol unified market symbol
|
|
1418
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1419
|
+
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
1420
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1421
|
+
* @param {int} [params.until] Timestamp in ms of the latest time to retrieve trades for
|
|
1422
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
1423
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1424
|
+
*/
|
|
1411
1425
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1412
|
-
/**
|
|
1413
|
-
* @method
|
|
1414
|
-
* @name blofin#fetchMyTrades
|
|
1415
|
-
* @description fetch all trades made by the user
|
|
1416
|
-
* @see https://blofin.com/docs#get-trade-history
|
|
1417
|
-
* @param {string} symbol unified market symbol
|
|
1418
|
-
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1419
|
-
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
1420
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1421
|
-
* @param {int} [params.until] Timestamp in ms of the latest time to retrieve trades for
|
|
1422
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
1423
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1424
|
-
*/
|
|
1425
1426
|
await this.loadMarkets();
|
|
1426
1427
|
let paginate = false;
|
|
1427
1428
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchMyTrades', 'paginate');
|
|
@@ -1442,20 +1443,20 @@ export default class blofin extends Exchange {
|
|
|
1442
1443
|
const data = this.safeList(response, 'data', []);
|
|
1443
1444
|
return this.parseTrades(data, market, since, limit);
|
|
1444
1445
|
}
|
|
1446
|
+
/**
|
|
1447
|
+
* @method
|
|
1448
|
+
* @name blofin#fetchDeposits
|
|
1449
|
+
* @description fetch all deposits made to an account
|
|
1450
|
+
* @see https://blofin.com/docs#get-deposite-history
|
|
1451
|
+
* @param {string} code unified currency code
|
|
1452
|
+
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
1453
|
+
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
1454
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1455
|
+
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
1456
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
1457
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1458
|
+
*/
|
|
1445
1459
|
async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1446
|
-
/**
|
|
1447
|
-
* @method
|
|
1448
|
-
* @name blofin#fetchDeposits
|
|
1449
|
-
* @description fetch all deposits made to an account
|
|
1450
|
-
* @see https://blofin.com/docs#get-deposite-history
|
|
1451
|
-
* @param {string} code unified currency code
|
|
1452
|
-
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
1453
|
-
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
1454
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1455
|
-
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
1456
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
1457
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1458
|
-
*/
|
|
1459
1460
|
await this.loadMarkets();
|
|
1460
1461
|
let paginate = false;
|
|
1461
1462
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchDeposits', 'paginate');
|
|
@@ -1479,20 +1480,20 @@ export default class blofin extends Exchange {
|
|
|
1479
1480
|
const data = this.safeList(response, 'data', []);
|
|
1480
1481
|
return this.parseTransactions(data, currency, since, limit, params);
|
|
1481
1482
|
}
|
|
1483
|
+
/**
|
|
1484
|
+
* @method
|
|
1485
|
+
* @name blofin#fetchWithdrawals
|
|
1486
|
+
* @description fetch all withdrawals made from an account
|
|
1487
|
+
* @see https://blofin.com/docs#get-withdraw-history
|
|
1488
|
+
* @param {string} code unified currency code
|
|
1489
|
+
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
1490
|
+
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
1491
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1492
|
+
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
1493
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
1494
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1495
|
+
*/
|
|
1482
1496
|
async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1483
|
-
/**
|
|
1484
|
-
* @method
|
|
1485
|
-
* @name blofin#fetchWithdrawals
|
|
1486
|
-
* @description fetch all withdrawals made from an account
|
|
1487
|
-
* @see https://blofin.com/docs#get-withdraw-history
|
|
1488
|
-
* @param {string} code unified currency code
|
|
1489
|
-
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
1490
|
-
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
1491
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1492
|
-
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
1493
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
1494
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1495
|
-
*/
|
|
1496
1497
|
await this.loadMarkets();
|
|
1497
1498
|
let paginate = false;
|
|
1498
1499
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchWithdrawals', 'paginate');
|
|
@@ -1516,21 +1517,21 @@ export default class blofin extends Exchange {
|
|
|
1516
1517
|
const data = this.safeList(response, 'data', []);
|
|
1517
1518
|
return this.parseTransactions(data, currency, since, limit, params);
|
|
1518
1519
|
}
|
|
1520
|
+
/**
|
|
1521
|
+
* @method
|
|
1522
|
+
* @name blofin#fetchLedger
|
|
1523
|
+
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
1524
|
+
* @see https://blofin.com/docs#get-funds-transfer-history
|
|
1525
|
+
* @param {string} [code] unified currency code, default is undefined
|
|
1526
|
+
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
1527
|
+
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
1528
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1529
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
1530
|
+
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
1531
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
1532
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
1533
|
+
*/
|
|
1519
1534
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1520
|
-
/**
|
|
1521
|
-
* @method
|
|
1522
|
-
* @name blofin#fetchLedger
|
|
1523
|
-
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
1524
|
-
* @see https://blofin.com/docs#get-funds-transfer-history
|
|
1525
|
-
* @param {string} [code] unified currency code, default is undefined
|
|
1526
|
-
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
1527
|
-
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
1528
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1529
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
1530
|
-
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
1531
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
1532
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
1533
|
-
*/
|
|
1534
1535
|
await this.loadMarkets();
|
|
1535
1536
|
let paginate = false;
|
|
1536
1537
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchLedger', 'paginate');
|
|
@@ -1701,18 +1702,18 @@ export default class blofin extends Exchange {
|
|
|
1701
1702
|
return ids;
|
|
1702
1703
|
}
|
|
1703
1704
|
}
|
|
1705
|
+
/**
|
|
1706
|
+
* @method
|
|
1707
|
+
* @name blofin#cancelOrders
|
|
1708
|
+
* @description cancel multiple orders
|
|
1709
|
+
* @see https://blofin.com/docs#cancel-multiple-orders
|
|
1710
|
+
* @param {string[]} ids order ids
|
|
1711
|
+
* @param {string} symbol unified market symbol
|
|
1712
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1713
|
+
* @param {boolean} [params.trigger] whether the order is a stop/trigger order
|
|
1714
|
+
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1715
|
+
*/
|
|
1704
1716
|
async cancelOrders(ids, symbol = undefined, params = {}) {
|
|
1705
|
-
/**
|
|
1706
|
-
* @method
|
|
1707
|
-
* @name blofin#cancelOrders
|
|
1708
|
-
* @description cancel multiple orders
|
|
1709
|
-
* @see https://blofin.com/docs#cancel-multiple-orders
|
|
1710
|
-
* @param {string[]} ids order ids
|
|
1711
|
-
* @param {string} symbol unified market symbol
|
|
1712
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1713
|
-
* @param {boolean} [params.trigger] whether the order is a stop/trigger order
|
|
1714
|
-
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1715
|
-
*/
|
|
1716
1717
|
// TODO : the original endpoint signature differs, according to that you can skip individual symbol and assign ids in batch. At this moment, `params` is not being used too.
|
|
1717
1718
|
if (symbol === undefined) {
|
|
1718
1719
|
throw new ArgumentsRequired(this.id + ' cancelOrders() requires a symbol argument');
|
|
@@ -1772,19 +1773,19 @@ export default class blofin extends Exchange {
|
|
|
1772
1773
|
const ordersData = this.safeList(response, 'data', []);
|
|
1773
1774
|
return this.parseOrders(ordersData, market, undefined, undefined, params);
|
|
1774
1775
|
}
|
|
1776
|
+
/**
|
|
1777
|
+
* @method
|
|
1778
|
+
* @name blofin#transfer
|
|
1779
|
+
* @description transfer currency internally between wallets on the same account
|
|
1780
|
+
* @see https://blofin.com/docs#funds-transfer
|
|
1781
|
+
* @param {string} code unified currency code
|
|
1782
|
+
* @param {float} amount amount to transfer
|
|
1783
|
+
* @param {string} fromAccount account to transfer from (funding, swap, copy_trading, earn)
|
|
1784
|
+
* @param {string} toAccount account to transfer to (funding, swap, copy_trading, earn)
|
|
1785
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1786
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
1787
|
+
*/
|
|
1775
1788
|
async transfer(code, amount, fromAccount, toAccount, params = {}) {
|
|
1776
|
-
/**
|
|
1777
|
-
* @method
|
|
1778
|
-
* @name blofin#transfer
|
|
1779
|
-
* @description transfer currency internally between wallets on the same account
|
|
1780
|
-
* @see https://blofin.com/docs#funds-transfer
|
|
1781
|
-
* @param {string} code unified currency code
|
|
1782
|
-
* @param {float} amount amount to transfer
|
|
1783
|
-
* @param {string} fromAccount account to transfer from (funding, swap, copy_trading, earn)
|
|
1784
|
-
* @param {string} toAccount account to transfer to (funding, swap, copy_trading, earn)
|
|
1785
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1786
|
-
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
1787
|
-
*/
|
|
1788
1789
|
await this.loadMarkets();
|
|
1789
1790
|
const currency = this.currency(code);
|
|
1790
1791
|
const accountsByType = this.safeDict(this.options, 'accountsByType', {});
|
|
@@ -1814,17 +1815,17 @@ export default class blofin extends Exchange {
|
|
|
1814
1815
|
'status': undefined,
|
|
1815
1816
|
};
|
|
1816
1817
|
}
|
|
1818
|
+
/**
|
|
1819
|
+
* @method
|
|
1820
|
+
* @name blofin#fetchPosition
|
|
1821
|
+
* @description fetch data on a single open contract trade position
|
|
1822
|
+
* @see https://blofin.com/docs#get-positions
|
|
1823
|
+
* @param {string} symbol unified market symbol of the market the position is held in, default is undefined
|
|
1824
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1825
|
+
* @param {string} [params.instType] MARGIN, SWAP, FUTURES, OPTION
|
|
1826
|
+
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
1827
|
+
*/
|
|
1817
1828
|
async fetchPosition(symbol, params = {}) {
|
|
1818
|
-
/**
|
|
1819
|
-
* @method
|
|
1820
|
-
* @name blofin#fetchPosition
|
|
1821
|
-
* @description fetch data on a single open contract trade position
|
|
1822
|
-
* @see https://blofin.com/docs#get-positions
|
|
1823
|
-
* @param {string} symbol unified market symbol of the market the position is held in, default is undefined
|
|
1824
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1825
|
-
* @param {string} [params.instType] MARGIN, SWAP, FUTURES, OPTION
|
|
1826
|
-
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
1827
|
-
*/
|
|
1828
1829
|
await this.loadMarkets();
|
|
1829
1830
|
const market = this.market(symbol);
|
|
1830
1831
|
const request = {
|
|
@@ -1838,17 +1839,17 @@ export default class blofin extends Exchange {
|
|
|
1838
1839
|
}
|
|
1839
1840
|
return this.parsePosition(position, market);
|
|
1840
1841
|
}
|
|
1842
|
+
/**
|
|
1843
|
+
* @method
|
|
1844
|
+
* @name blofin#fetchPosition
|
|
1845
|
+
* @description fetch data on a single open contract trade position
|
|
1846
|
+
* @see https://blofin.com/docs#get-positions
|
|
1847
|
+
* @param {string[]} [symbols] list of unified market symbols
|
|
1848
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1849
|
+
* @param {string} [params.instType] MARGIN, SWAP, FUTURES, OPTION
|
|
1850
|
+
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
1851
|
+
*/
|
|
1841
1852
|
async fetchPositions(symbols = undefined, params = {}) {
|
|
1842
|
-
/**
|
|
1843
|
-
* @method
|
|
1844
|
-
* @name blofin#fetchPosition
|
|
1845
|
-
* @description fetch data on a single open contract trade position
|
|
1846
|
-
* @see https://blofin.com/docs#get-positions
|
|
1847
|
-
* @param {string[]} [symbols] list of unified market symbols
|
|
1848
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1849
|
-
* @param {string} [params.instType] MARGIN, SWAP, FUTURES, OPTION
|
|
1850
|
-
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
1851
|
-
*/
|
|
1852
1853
|
await this.loadMarkets();
|
|
1853
1854
|
symbols = this.marketSymbols(symbols);
|
|
1854
1855
|
const response = await this.privateGetAccountPositions(params);
|
|
@@ -1973,17 +1974,17 @@ export default class blofin extends Exchange {
|
|
|
1973
1974
|
'takeProfitPrice': undefined,
|
|
1974
1975
|
});
|
|
1975
1976
|
}
|
|
1977
|
+
/**
|
|
1978
|
+
* @method
|
|
1979
|
+
* @name blofin#fetchLeverages
|
|
1980
|
+
* @description fetch the set leverage for all contract markets
|
|
1981
|
+
* @see https://docs.blofin.com/index.html#get-multiple-leverage
|
|
1982
|
+
* @param {string[]} symbols a list of unified market symbols, required on blofin
|
|
1983
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1984
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
1985
|
+
* @returns {object} a list of [leverage structures]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
1986
|
+
*/
|
|
1976
1987
|
async fetchLeverages(symbols = undefined, params = {}) {
|
|
1977
|
-
/**
|
|
1978
|
-
* @method
|
|
1979
|
-
* @name blofin#fetchLeverages
|
|
1980
|
-
* @description fetch the set leverage for all contract markets
|
|
1981
|
-
* @see https://docs.blofin.com/index.html#get-multiple-leverage
|
|
1982
|
-
* @param {string[]} symbols a list of unified market symbols, required on blofin
|
|
1983
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1984
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
1985
|
-
* @returns {object} a list of [leverage structures]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
1986
|
-
*/
|
|
1987
1988
|
await this.loadMarkets();
|
|
1988
1989
|
if (symbols === undefined) {
|
|
1989
1990
|
throw new ArgumentsRequired(this.id + ' fetchLeverages() requires a symbols argument');
|
|
@@ -2029,17 +2030,17 @@ export default class blofin extends Exchange {
|
|
|
2029
2030
|
const leverages = this.safeList(response, 'data', []);
|
|
2030
2031
|
return this.parseLeverages(leverages, symbols, 'instId');
|
|
2031
2032
|
}
|
|
2033
|
+
/**
|
|
2034
|
+
* @method
|
|
2035
|
+
* @name blofin#fetchLeverage
|
|
2036
|
+
* @description fetch the set leverage for a market
|
|
2037
|
+
* @see https://docs.blofin.com/index.html#get-leverage
|
|
2038
|
+
* @param {string} symbol unified market symbol
|
|
2039
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2040
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
2041
|
+
* @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
2042
|
+
*/
|
|
2032
2043
|
async fetchLeverage(symbol, params = {}) {
|
|
2033
|
-
/**
|
|
2034
|
-
* @method
|
|
2035
|
-
* @name blofin#fetchLeverage
|
|
2036
|
-
* @description fetch the set leverage for a market
|
|
2037
|
-
* @see https://docs.blofin.com/index.html#get-leverage
|
|
2038
|
-
* @param {string} symbol unified market symbol
|
|
2039
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2040
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
2041
|
-
* @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
2042
|
-
*/
|
|
2043
2044
|
await this.loadMarkets();
|
|
2044
2045
|
let marginMode = undefined;
|
|
2045
2046
|
[marginMode, params] = this.handleMarginModeAndParams('fetchLeverage', params);
|
|
@@ -2080,18 +2081,18 @@ export default class blofin extends Exchange {
|
|
|
2080
2081
|
'shortLeverage': leverageValue,
|
|
2081
2082
|
};
|
|
2082
2083
|
}
|
|
2084
|
+
/**
|
|
2085
|
+
* @method
|
|
2086
|
+
* @name blofin#setLeverage
|
|
2087
|
+
* @description set the level of leverage for a market
|
|
2088
|
+
* @see https://blofin.com/docs#set-leverage
|
|
2089
|
+
* @param {int} leverage the rate of leverage
|
|
2090
|
+
* @param {string} symbol unified market symbol
|
|
2091
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2092
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
2093
|
+
* @returns {object} response from the exchange
|
|
2094
|
+
*/
|
|
2083
2095
|
async setLeverage(leverage, symbol = undefined, params = {}) {
|
|
2084
|
-
/**
|
|
2085
|
-
* @method
|
|
2086
|
-
* @name blofin#setLeverage
|
|
2087
|
-
* @description set the level of leverage for a market
|
|
2088
|
-
* @see https://blofin.com/docs#set-leverage
|
|
2089
|
-
* @param {int} leverage the rate of leverage
|
|
2090
|
-
* @param {string} symbol unified market symbol
|
|
2091
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2092
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
2093
|
-
* @returns {object} response from the exchange
|
|
2094
|
-
*/
|
|
2095
2096
|
if (symbol === undefined) {
|
|
2096
2097
|
throw new ArgumentsRequired(this.id + ' setLeverage() requires a symbol argument');
|
|
2097
2098
|
}
|
|
@@ -2115,24 +2116,24 @@ export default class blofin extends Exchange {
|
|
|
2115
2116
|
const response = await this.privatePostAccountSetLeverage(this.extend(request, params));
|
|
2116
2117
|
return response;
|
|
2117
2118
|
}
|
|
2119
|
+
/**
|
|
2120
|
+
* @method
|
|
2121
|
+
* @name blofin#closePosition
|
|
2122
|
+
* @description closes open positions for a market
|
|
2123
|
+
* @see https://blofin.com/docs#close-positions
|
|
2124
|
+
* @param {string} symbol Unified CCXT market symbol
|
|
2125
|
+
* @param {string} [side] 'buy' or 'sell', leave as undefined in net mode
|
|
2126
|
+
* @param {object} [params] extra parameters specific to the blofin api endpoint
|
|
2127
|
+
* @param {string} [params.clientOrderId] a unique identifier for the order
|
|
2128
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated', default is 'cross;
|
|
2129
|
+
* @param {string} [params.code] *required in the case of closing cross MARGIN position for Single-currency margin* margin currency
|
|
2130
|
+
*
|
|
2131
|
+
* EXCHANGE SPECIFIC PARAMETERS
|
|
2132
|
+
* @param {boolean} [params.autoCxl] whether any pending orders for closing out needs to be automatically canceled when close position via a market order. false or true, the default is false
|
|
2133
|
+
* @param {string} [params.tag] order tag a combination of case-sensitive alphanumerics, all numbers, or all letters of up to 16 characters
|
|
2134
|
+
* @returns {object[]} [A list of position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
2135
|
+
*/
|
|
2118
2136
|
async closePosition(symbol, side = undefined, params = {}) {
|
|
2119
|
-
/**
|
|
2120
|
-
* @method
|
|
2121
|
-
* @name blofin#closePosition
|
|
2122
|
-
* @description closes open positions for a market
|
|
2123
|
-
* @see https://blofin.com/docs#close-positions
|
|
2124
|
-
* @param {string} symbol Unified CCXT market symbol
|
|
2125
|
-
* @param {string} [side] 'buy' or 'sell', leave as undefined in net mode
|
|
2126
|
-
* @param {object} [params] extra parameters specific to the blofin api endpoint
|
|
2127
|
-
* @param {string} [params.clientOrderId] a unique identifier for the order
|
|
2128
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated', default is 'cross;
|
|
2129
|
-
* @param {string} [params.code] *required in the case of closing cross MARGIN position for Single-currency margin* margin currency
|
|
2130
|
-
*
|
|
2131
|
-
* EXCHANGE SPECIFIC PARAMETERS
|
|
2132
|
-
* @param {boolean} [params.autoCxl] whether any pending orders for closing out needs to be automatically canceled when close position via a market order. false or true, the default is false
|
|
2133
|
-
* @param {string} [params.tag] order tag a combination of case-sensitive alphanumerics, all numbers, or all letters of up to 16 characters
|
|
2134
|
-
* @returns {object[]} [A list of position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
2135
|
-
*/
|
|
2136
2137
|
await this.loadMarkets();
|
|
2137
2138
|
const market = this.market(symbol);
|
|
2138
2139
|
const clientOrderId = this.safeString(params, 'clientOrderId');
|
|
@@ -2148,21 +2149,21 @@ export default class blofin extends Exchange {
|
|
|
2148
2149
|
const response = await this.privatePostTradeClosePosition(this.extend(request, params));
|
|
2149
2150
|
return this.safeDict(response, 'data');
|
|
2150
2151
|
}
|
|
2152
|
+
/**
|
|
2153
|
+
* @method
|
|
2154
|
+
* @name blofin#fetchClosedOrders
|
|
2155
|
+
* @description fetches information on multiple closed orders made by the user
|
|
2156
|
+
* @see https://blofin.com/docs#get-order-history
|
|
2157
|
+
* @see https://blofin.com/docs#get-tpsl-order-history
|
|
2158
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
2159
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
2160
|
+
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
2161
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2162
|
+
* @param {bool} [params.stop] True if fetching trigger or conditional orders
|
|
2163
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
2164
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2165
|
+
*/
|
|
2151
2166
|
async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2152
|
-
/**
|
|
2153
|
-
* @method
|
|
2154
|
-
* @name blofin#fetchClosedOrders
|
|
2155
|
-
* @description fetches information on multiple closed orders made by the user
|
|
2156
|
-
* @see https://blofin.com/docs#get-order-history
|
|
2157
|
-
* @see https://blofin.com/docs#get-tpsl-order-history
|
|
2158
|
-
* @param {string} symbol unified market symbol of the market orders were made in
|
|
2159
|
-
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
2160
|
-
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
2161
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2162
|
-
* @param {bool} [params.stop] True if fetching trigger or conditional orders
|
|
2163
|
-
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
2164
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2165
|
-
*/
|
|
2166
2167
|
await this.loadMarkets();
|
|
2167
2168
|
let paginate = false;
|
|
2168
2169
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchClosedOrders', 'paginate');
|
|
@@ -2195,16 +2196,16 @@ export default class blofin extends Exchange {
|
|
|
2195
2196
|
const data = this.safeList(response, 'data', []);
|
|
2196
2197
|
return this.parseOrders(data, market, since, limit);
|
|
2197
2198
|
}
|
|
2199
|
+
/**
|
|
2200
|
+
* @method
|
|
2201
|
+
* @name blofin#fetchMarginMode
|
|
2202
|
+
* @description fetches the margin mode of a trading pair
|
|
2203
|
+
* @see https://docs.blofin.com/index.html#get-margin-mode
|
|
2204
|
+
* @param {string} symbol unified symbol of the market to fetch the margin mode for
|
|
2205
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2206
|
+
* @returns {object} a [margin mode structure]{@link https://docs.ccxt.com/#/?id=margin-mode-structure}
|
|
2207
|
+
*/
|
|
2198
2208
|
async fetchMarginMode(symbol, params = {}) {
|
|
2199
|
-
/**
|
|
2200
|
-
* @method
|
|
2201
|
-
* @name blofin#fetchMarginMode
|
|
2202
|
-
* @description fetches the margin mode of a trading pair
|
|
2203
|
-
* @see https://docs.blofin.com/index.html#get-margin-mode
|
|
2204
|
-
* @param {string} symbol unified symbol of the market to fetch the margin mode for
|
|
2205
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2206
|
-
* @returns {object} a [margin mode structure]{@link https://docs.ccxt.com/#/?id=margin-mode-structure}
|
|
2207
|
-
*/
|
|
2208
2209
|
await this.loadMarkets();
|
|
2209
2210
|
const market = this.market(symbol);
|
|
2210
2211
|
const response = await this.privateGetAccountMarginMode(params);
|