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/hitbtc.js
CHANGED
|
@@ -655,15 +655,15 @@ export default class hitbtc extends Exchange {
|
|
|
655
655
|
nonce() {
|
|
656
656
|
return this.milliseconds();
|
|
657
657
|
}
|
|
658
|
+
/**
|
|
659
|
+
* @method
|
|
660
|
+
* @name hitbtc#fetchMarkets
|
|
661
|
+
* @description retrieves data on all markets for hitbtc
|
|
662
|
+
* @see https://api.hitbtc.com/#symbols
|
|
663
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
664
|
+
* @returns {object[]} an array of objects representing market data
|
|
665
|
+
*/
|
|
658
666
|
async fetchMarkets(params = {}) {
|
|
659
|
-
/**
|
|
660
|
-
* @method
|
|
661
|
-
* @name hitbtc#fetchMarkets
|
|
662
|
-
* @description retrieves data on all markets for hitbtc
|
|
663
|
-
* @see https://api.hitbtc.com/#symbols
|
|
664
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
665
|
-
* @returns {object[]} an array of objects representing market data
|
|
666
|
-
*/
|
|
667
667
|
const response = await this.publicGetPublicSymbol(params);
|
|
668
668
|
//
|
|
669
669
|
// {
|
|
@@ -799,15 +799,15 @@ export default class hitbtc extends Exchange {
|
|
|
799
799
|
}
|
|
800
800
|
return result;
|
|
801
801
|
}
|
|
802
|
+
/**
|
|
803
|
+
* @method
|
|
804
|
+
* @name hitbtc#fetchCurrencies
|
|
805
|
+
* @description fetches all available currencies on an exchange
|
|
806
|
+
* @see https://api.hitbtc.com/#currencies
|
|
807
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
808
|
+
* @returns {object} an associative dictionary of currencies
|
|
809
|
+
*/
|
|
802
810
|
async fetchCurrencies(params = {}) {
|
|
803
|
-
/**
|
|
804
|
-
* @method
|
|
805
|
-
* @name hitbtc#fetchCurrencies
|
|
806
|
-
* @description fetches all available currencies on an exchange
|
|
807
|
-
* @see https://api.hitbtc.com/#currencies
|
|
808
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
809
|
-
* @returns {object} an associative dictionary of currencies
|
|
810
|
-
*/
|
|
811
811
|
const response = await this.publicGetPublicCurrency(params);
|
|
812
812
|
//
|
|
813
813
|
// {
|
|
@@ -913,16 +913,16 @@ export default class hitbtc extends Exchange {
|
|
|
913
913
|
}
|
|
914
914
|
return result;
|
|
915
915
|
}
|
|
916
|
+
/**
|
|
917
|
+
* @method
|
|
918
|
+
* @name hitbtc#createDepositAddress
|
|
919
|
+
* @description create a currency deposit address
|
|
920
|
+
* @see https://api.hitbtc.com/#generate-deposit-crypto-address
|
|
921
|
+
* @param {string} code unified currency code of the currency for the deposit address
|
|
922
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
923
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
924
|
+
*/
|
|
916
925
|
async createDepositAddress(code, params = {}) {
|
|
917
|
-
/**
|
|
918
|
-
* @method
|
|
919
|
-
* @name hitbtc#createDepositAddress
|
|
920
|
-
* @description create a currency deposit address
|
|
921
|
-
* @see https://api.hitbtc.com/#generate-deposit-crypto-address
|
|
922
|
-
* @param {string} code unified currency code of the currency for the deposit address
|
|
923
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
924
|
-
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
925
|
-
*/
|
|
926
926
|
await this.loadMarkets();
|
|
927
927
|
const currency = this.currency(code);
|
|
928
928
|
const request = {
|
|
@@ -950,16 +950,16 @@ export default class hitbtc extends Exchange {
|
|
|
950
950
|
'info': response,
|
|
951
951
|
};
|
|
952
952
|
}
|
|
953
|
+
/**
|
|
954
|
+
* @method
|
|
955
|
+
* @name hitbtc#fetchDepositAddress
|
|
956
|
+
* @description fetch the deposit address for a currency associated with this account
|
|
957
|
+
* @see https://api.hitbtc.com/#get-deposit-crypto-address
|
|
958
|
+
* @param {string} code unified currency code
|
|
959
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
960
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
961
|
+
*/
|
|
953
962
|
async fetchDepositAddress(code, params = {}) {
|
|
954
|
-
/**
|
|
955
|
-
* @method
|
|
956
|
-
* @name hitbtc#fetchDepositAddress
|
|
957
|
-
* @description fetch the deposit address for a currency associated with this account
|
|
958
|
-
* @see https://api.hitbtc.com/#get-deposit-crypto-address
|
|
959
|
-
* @param {string} code unified currency code
|
|
960
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
961
|
-
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
962
|
-
*/
|
|
963
963
|
await this.loadMarkets();
|
|
964
964
|
const currency = this.currency(code);
|
|
965
965
|
const request = {
|
|
@@ -1004,17 +1004,17 @@ export default class hitbtc extends Exchange {
|
|
|
1004
1004
|
}
|
|
1005
1005
|
return this.safeBalance(result);
|
|
1006
1006
|
}
|
|
1007
|
+
/**
|
|
1008
|
+
* @method
|
|
1009
|
+
* @name hitbtc#fetchBalance
|
|
1010
|
+
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
1011
|
+
* @see https://api.hitbtc.com/#wallet-balance
|
|
1012
|
+
* @see https://api.hitbtc.com/#get-spot-trading-balance
|
|
1013
|
+
* @see https://api.hitbtc.com/#get-trading-balance
|
|
1014
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1015
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
1016
|
+
*/
|
|
1007
1017
|
async fetchBalance(params = {}) {
|
|
1008
|
-
/**
|
|
1009
|
-
* @method
|
|
1010
|
-
* @name hitbtc#fetchBalance
|
|
1011
|
-
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
1012
|
-
* @see https://api.hitbtc.com/#wallet-balance
|
|
1013
|
-
* @see https://api.hitbtc.com/#get-spot-trading-balance
|
|
1014
|
-
* @see https://api.hitbtc.com/#get-trading-balance
|
|
1015
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1016
|
-
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
1017
|
-
*/
|
|
1018
1018
|
const type = this.safeStringLower(params, 'type', 'spot');
|
|
1019
1019
|
params = this.omit(params, ['type']);
|
|
1020
1020
|
const accountsByType = this.safeValue(this.options, 'accountsByType', {});
|
|
@@ -1046,16 +1046,16 @@ export default class hitbtc extends Exchange {
|
|
|
1046
1046
|
//
|
|
1047
1047
|
return this.parseBalance(response);
|
|
1048
1048
|
}
|
|
1049
|
+
/**
|
|
1050
|
+
* @method
|
|
1051
|
+
* @name hitbtc#fetchTicker
|
|
1052
|
+
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1053
|
+
* @see https://api.hitbtc.com/#tickers
|
|
1054
|
+
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1055
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1056
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1057
|
+
*/
|
|
1049
1058
|
async fetchTicker(symbol, params = {}) {
|
|
1050
|
-
/**
|
|
1051
|
-
* @method
|
|
1052
|
-
* @name hitbtc#fetchTicker
|
|
1053
|
-
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1054
|
-
* @see https://api.hitbtc.com/#tickers
|
|
1055
|
-
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1056
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1057
|
-
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1058
|
-
*/
|
|
1059
1059
|
await this.loadMarkets();
|
|
1060
1060
|
const market = this.market(symbol);
|
|
1061
1061
|
const request = {
|
|
@@ -1077,16 +1077,16 @@ export default class hitbtc extends Exchange {
|
|
|
1077
1077
|
//
|
|
1078
1078
|
return this.parseTicker(response, market);
|
|
1079
1079
|
}
|
|
1080
|
+
/**
|
|
1081
|
+
* @method
|
|
1082
|
+
* @name hitbtc#fetchTickers
|
|
1083
|
+
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
1084
|
+
* @see https://api.hitbtc.com/#tickers
|
|
1085
|
+
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1086
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1087
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1088
|
+
*/
|
|
1080
1089
|
async fetchTickers(symbols = undefined, params = {}) {
|
|
1081
|
-
/**
|
|
1082
|
-
* @method
|
|
1083
|
-
* @name hitbtc#fetchTickers
|
|
1084
|
-
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
1085
|
-
* @see https://api.hitbtc.com/#tickers
|
|
1086
|
-
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1087
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1088
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1089
|
-
*/
|
|
1090
1090
|
await this.loadMarkets();
|
|
1091
1091
|
symbols = this.marketSymbols(symbols);
|
|
1092
1092
|
const request = {};
|
|
@@ -1165,18 +1165,18 @@ export default class hitbtc extends Exchange {
|
|
|
1165
1165
|
'info': ticker,
|
|
1166
1166
|
}, market);
|
|
1167
1167
|
}
|
|
1168
|
+
/**
|
|
1169
|
+
* @method
|
|
1170
|
+
* @name hitbtc#fetchTrades
|
|
1171
|
+
* @description get the list of most recent trades for a particular symbol
|
|
1172
|
+
* @see https://api.hitbtc.com/#trades
|
|
1173
|
+
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
1174
|
+
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1175
|
+
* @param {int} [limit] the maximum amount of trades to fetch
|
|
1176
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1177
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
1178
|
+
*/
|
|
1168
1179
|
async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
1169
|
-
/**
|
|
1170
|
-
* @method
|
|
1171
|
-
* @name hitbtc#fetchTrades
|
|
1172
|
-
* @description get the list of most recent trades for a particular symbol
|
|
1173
|
-
* @see https://api.hitbtc.com/#trades
|
|
1174
|
-
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
1175
|
-
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1176
|
-
* @param {int} [limit] the maximum amount of trades to fetch
|
|
1177
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1178
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
1179
|
-
*/
|
|
1180
1180
|
await this.loadMarkets();
|
|
1181
1181
|
let market = undefined;
|
|
1182
1182
|
const request = {};
|
|
@@ -1209,22 +1209,22 @@ export default class hitbtc extends Exchange {
|
|
|
1209
1209
|
}
|
|
1210
1210
|
return trades;
|
|
1211
1211
|
}
|
|
1212
|
+
/**
|
|
1213
|
+
* @method
|
|
1214
|
+
* @name hitbtc#fetchMyTrades
|
|
1215
|
+
* @description fetch all trades made by the user
|
|
1216
|
+
* @see https://api.hitbtc.com/#spot-trades-history
|
|
1217
|
+
* @see https://api.hitbtc.com/#futures-trades-history
|
|
1218
|
+
* @see https://api.hitbtc.com/#margin-trades-history
|
|
1219
|
+
* @param {string} symbol unified market symbol
|
|
1220
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1221
|
+
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
1222
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1223
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
1224
|
+
* @param {bool} [params.margin] true for fetching margin trades
|
|
1225
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1226
|
+
*/
|
|
1212
1227
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1213
|
-
/**
|
|
1214
|
-
* @method
|
|
1215
|
-
* @name hitbtc#fetchMyTrades
|
|
1216
|
-
* @description fetch all trades made by the user
|
|
1217
|
-
* @see https://api.hitbtc.com/#spot-trades-history
|
|
1218
|
-
* @see https://api.hitbtc.com/#futures-trades-history
|
|
1219
|
-
* @see https://api.hitbtc.com/#margin-trades-history
|
|
1220
|
-
* @param {string} symbol unified market symbol
|
|
1221
|
-
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1222
|
-
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
1223
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1224
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
1225
|
-
* @param {bool} [params.margin] true for fetching margin trades
|
|
1226
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1227
|
-
*/
|
|
1228
1228
|
await this.loadMarkets();
|
|
1229
1229
|
let market = undefined;
|
|
1230
1230
|
const request = {};
|
|
@@ -1512,59 +1512,59 @@ export default class hitbtc extends Exchange {
|
|
|
1512
1512
|
'fee': fee,
|
|
1513
1513
|
};
|
|
1514
1514
|
}
|
|
1515
|
+
/**
|
|
1516
|
+
* @method
|
|
1517
|
+
* @name hitbtc#fetchDepositsWithdrawals
|
|
1518
|
+
* @description fetch history of deposits and withdrawals
|
|
1519
|
+
* @see https://api.hitbtc.com/#get-transactions-history
|
|
1520
|
+
* @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
|
|
1521
|
+
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
1522
|
+
* @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
|
|
1523
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1524
|
+
* @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1525
|
+
*/
|
|
1515
1526
|
async fetchDepositsWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1516
|
-
/**
|
|
1517
|
-
* @method
|
|
1518
|
-
* @name hitbtc#fetchDepositsWithdrawals
|
|
1519
|
-
* @description fetch history of deposits and withdrawals
|
|
1520
|
-
* @see https://api.hitbtc.com/#get-transactions-history
|
|
1521
|
-
* @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
|
|
1522
|
-
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
1523
|
-
* @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
|
|
1524
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1525
|
-
* @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1526
|
-
*/
|
|
1527
1527
|
return await this.fetchTransactionsHelper('DEPOSIT,WITHDRAW', code, since, limit, params);
|
|
1528
1528
|
}
|
|
1529
|
+
/**
|
|
1530
|
+
* @method
|
|
1531
|
+
* @name hitbtc#fetchDeposits
|
|
1532
|
+
* @description fetch all deposits made to an account
|
|
1533
|
+
* @see https://api.hitbtc.com/#get-transactions-history
|
|
1534
|
+
* @param {string} code unified currency code
|
|
1535
|
+
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
1536
|
+
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
1537
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1538
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1539
|
+
*/
|
|
1529
1540
|
async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1530
|
-
/**
|
|
1531
|
-
* @method
|
|
1532
|
-
* @name hitbtc#fetchDeposits
|
|
1533
|
-
* @description fetch all deposits made to an account
|
|
1534
|
-
* @see https://api.hitbtc.com/#get-transactions-history
|
|
1535
|
-
* @param {string} code unified currency code
|
|
1536
|
-
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
1537
|
-
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
1538
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1539
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1540
|
-
*/
|
|
1541
1541
|
return await this.fetchTransactionsHelper('DEPOSIT', code, since, limit, params);
|
|
1542
1542
|
}
|
|
1543
|
+
/**
|
|
1544
|
+
* @method
|
|
1545
|
+
* @name hitbtc#fetchWithdrawals
|
|
1546
|
+
* @description fetch all withdrawals made from an account
|
|
1547
|
+
* @see https://api.hitbtc.com/#get-transactions-history
|
|
1548
|
+
* @param {string} code unified currency code
|
|
1549
|
+
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
1550
|
+
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
1551
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1552
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1553
|
+
*/
|
|
1543
1554
|
async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1544
|
-
/**
|
|
1545
|
-
* @method
|
|
1546
|
-
* @name hitbtc#fetchWithdrawals
|
|
1547
|
-
* @description fetch all withdrawals made from an account
|
|
1548
|
-
* @see https://api.hitbtc.com/#get-transactions-history
|
|
1549
|
-
* @param {string} code unified currency code
|
|
1550
|
-
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
1551
|
-
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
1552
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1553
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1554
|
-
*/
|
|
1555
1555
|
return await this.fetchTransactionsHelper('WITHDRAW', code, since, limit, params);
|
|
1556
1556
|
}
|
|
1557
|
+
/**
|
|
1558
|
+
* @method
|
|
1559
|
+
* @name hitbtc#fetchOrderBooks
|
|
1560
|
+
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data for multiple markets
|
|
1561
|
+
* @see https://api.hitbtc.com/#order-books
|
|
1562
|
+
* @param {string[]} [symbols] list of unified market symbols, all symbols fetched if undefined, default is undefined
|
|
1563
|
+
* @param {int} [limit] max number of entries per orderbook to return, default is undefined
|
|
1564
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1565
|
+
* @returns {object} a dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbol
|
|
1566
|
+
*/
|
|
1557
1567
|
async fetchOrderBooks(symbols = undefined, limit = undefined, params = {}) {
|
|
1558
|
-
/**
|
|
1559
|
-
* @method
|
|
1560
|
-
* @name hitbtc#fetchOrderBooks
|
|
1561
|
-
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data for multiple markets
|
|
1562
|
-
* @see https://api.hitbtc.com/#order-books
|
|
1563
|
-
* @param {string[]|undefined} symbols list of unified market symbols, all symbols fetched if undefined, default is undefined
|
|
1564
|
-
* @param {int} [limit] max number of entries per orderbook to return, default is undefined
|
|
1565
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1566
|
-
* @returns {object} a dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbol
|
|
1567
|
-
*/
|
|
1568
1568
|
await this.loadMarkets();
|
|
1569
1569
|
const request = {};
|
|
1570
1570
|
if (symbols !== undefined) {
|
|
@@ -1586,17 +1586,17 @@ export default class hitbtc extends Exchange {
|
|
|
1586
1586
|
}
|
|
1587
1587
|
return result;
|
|
1588
1588
|
}
|
|
1589
|
+
/**
|
|
1590
|
+
* @method
|
|
1591
|
+
* @name hitbtc#fetchOrderBook
|
|
1592
|
+
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
1593
|
+
* @see https://api.hitbtc.com/#order-books
|
|
1594
|
+
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1595
|
+
* @param {int} [limit] the maximum amount of order book entries to return
|
|
1596
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1597
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
1598
|
+
*/
|
|
1589
1599
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
1590
|
-
/**
|
|
1591
|
-
* @method
|
|
1592
|
-
* @name hitbtc#fetchOrderBook
|
|
1593
|
-
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
1594
|
-
* @see https://api.hitbtc.com/#order-books
|
|
1595
|
-
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1596
|
-
* @param {int} [limit] the maximum amount of order book entries to return
|
|
1597
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1598
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
1599
|
-
*/
|
|
1600
1600
|
await this.loadMarkets();
|
|
1601
1601
|
const market = this.market(symbol);
|
|
1602
1602
|
const request = {
|
|
@@ -1630,17 +1630,17 @@ export default class hitbtc extends Exchange {
|
|
|
1630
1630
|
'tierBased': undefined,
|
|
1631
1631
|
};
|
|
1632
1632
|
}
|
|
1633
|
+
/**
|
|
1634
|
+
* @method
|
|
1635
|
+
* @name hitbtc#fetchTradingFee
|
|
1636
|
+
* @description fetch the trading fees for a market
|
|
1637
|
+
* @see https://api.hitbtc.com/#get-trading-commission
|
|
1638
|
+
* @see https://api.hitbtc.com/#get-trading-commission-2
|
|
1639
|
+
* @param {string} symbol unified market symbol
|
|
1640
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1641
|
+
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
1642
|
+
*/
|
|
1633
1643
|
async fetchTradingFee(symbol, params = {}) {
|
|
1634
|
-
/**
|
|
1635
|
-
* @method
|
|
1636
|
-
* @name hitbtc#fetchTradingFee
|
|
1637
|
-
* @description fetch the trading fees for a market
|
|
1638
|
-
* @see https://api.hitbtc.com/#get-trading-commission
|
|
1639
|
-
* @see https://api.hitbtc.com/#get-trading-commission-2
|
|
1640
|
-
* @param {string} symbol unified market symbol
|
|
1641
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1642
|
-
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
1643
|
-
*/
|
|
1644
1644
|
await this.loadMarkets();
|
|
1645
1645
|
const market = this.market(symbol);
|
|
1646
1646
|
const request = {
|
|
@@ -1664,16 +1664,16 @@ export default class hitbtc extends Exchange {
|
|
|
1664
1664
|
//
|
|
1665
1665
|
return this.parseTradingFee(response, market);
|
|
1666
1666
|
}
|
|
1667
|
+
/**
|
|
1668
|
+
* @method
|
|
1669
|
+
* @name hitbtc#fetchTradingFees
|
|
1670
|
+
* @description fetch the trading fees for multiple markets
|
|
1671
|
+
* @see https://api.hitbtc.com/#get-all-trading-commissions
|
|
1672
|
+
* @see https://api.hitbtc.com/#get-all-trading-commissions-2
|
|
1673
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1674
|
+
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
1675
|
+
*/
|
|
1667
1676
|
async fetchTradingFees(params = {}) {
|
|
1668
|
-
/**
|
|
1669
|
-
* @method
|
|
1670
|
-
* @name hitbtc#fetchTradingFees
|
|
1671
|
-
* @description fetch the trading fees for multiple markets
|
|
1672
|
-
* @see https://api.hitbtc.com/#get-all-trading-commissions
|
|
1673
|
-
* @see https://api.hitbtc.com/#get-all-trading-commissions-2
|
|
1674
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1675
|
-
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
1676
|
-
*/
|
|
1677
1677
|
await this.loadMarkets();
|
|
1678
1678
|
const [marketType, query] = this.handleMarketTypeAndParams('fetchTradingFees', undefined, params);
|
|
1679
1679
|
let response = undefined;
|
|
@@ -1703,24 +1703,24 @@ export default class hitbtc extends Exchange {
|
|
|
1703
1703
|
}
|
|
1704
1704
|
return result;
|
|
1705
1705
|
}
|
|
1706
|
+
/**
|
|
1707
|
+
* @method
|
|
1708
|
+
* @name hitbtc#fetchOHLCV
|
|
1709
|
+
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1710
|
+
* @see https://api.hitbtc.com/#candles
|
|
1711
|
+
* @see https://api.hitbtc.com/#futures-index-price-candles
|
|
1712
|
+
* @see https://api.hitbtc.com/#futures-mark-price-candles
|
|
1713
|
+
* @see https://api.hitbtc.com/#futures-premium-index-candles
|
|
1714
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1715
|
+
* @param {string} timeframe the length of time each candle represents
|
|
1716
|
+
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
1717
|
+
* @param {int} [limit] the maximum amount of candles to fetch
|
|
1718
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1719
|
+
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
1720
|
+
* @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)
|
|
1721
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
1722
|
+
*/
|
|
1706
1723
|
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
1707
|
-
/**
|
|
1708
|
-
* @method
|
|
1709
|
-
* @name hitbtc#fetchOHLCV
|
|
1710
|
-
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1711
|
-
* @see https://api.hitbtc.com/#candles
|
|
1712
|
-
* @see https://api.hitbtc.com/#futures-index-price-candles
|
|
1713
|
-
* @see https://api.hitbtc.com/#futures-mark-price-candles
|
|
1714
|
-
* @see https://api.hitbtc.com/#futures-premium-index-candles
|
|
1715
|
-
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1716
|
-
* @param {string} timeframe the length of time each candle represents
|
|
1717
|
-
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
1718
|
-
* @param {int} [limit] the maximum amount of candles to fetch
|
|
1719
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1720
|
-
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
1721
|
-
* @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)
|
|
1722
|
-
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
1723
|
-
*/
|
|
1724
1724
|
await this.loadMarkets();
|
|
1725
1725
|
let paginate = false;
|
|
1726
1726
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchOHLCV', 'paginate');
|
|
@@ -1816,22 +1816,22 @@ export default class hitbtc extends Exchange {
|
|
|
1816
1816
|
this.safeNumber(ohlcv, 'volume'),
|
|
1817
1817
|
];
|
|
1818
1818
|
}
|
|
1819
|
+
/**
|
|
1820
|
+
* @method
|
|
1821
|
+
* @name hitbtc#fetchClosedOrders
|
|
1822
|
+
* @description fetches information on multiple closed orders made by the user
|
|
1823
|
+
* @see https://api.hitbtc.com/#spot-orders-history
|
|
1824
|
+
* @see https://api.hitbtc.com/#futures-orders-history
|
|
1825
|
+
* @see https://api.hitbtc.com/#margin-orders-history
|
|
1826
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
1827
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1828
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
1829
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1830
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
1831
|
+
* @param {bool} [params.margin] true for fetching margin orders
|
|
1832
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1833
|
+
*/
|
|
1819
1834
|
async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1820
|
-
/**
|
|
1821
|
-
* @method
|
|
1822
|
-
* @name hitbtc#fetchClosedOrders
|
|
1823
|
-
* @description fetches information on multiple closed orders made by the user
|
|
1824
|
-
* @see https://api.hitbtc.com/#spot-orders-history
|
|
1825
|
-
* @see https://api.hitbtc.com/#futures-orders-history
|
|
1826
|
-
* @see https://api.hitbtc.com/#margin-orders-history
|
|
1827
|
-
* @param {string} symbol unified market symbol of the market orders were made in
|
|
1828
|
-
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1829
|
-
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
1830
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1831
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
1832
|
-
* @param {bool} [params.margin] true for fetching margin orders
|
|
1833
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1834
|
-
*/
|
|
1835
1835
|
await this.loadMarkets();
|
|
1836
1836
|
let market = undefined;
|
|
1837
1837
|
const request = {};
|
|
@@ -1871,20 +1871,21 @@ export default class hitbtc extends Exchange {
|
|
|
1871
1871
|
const parsed = this.parseOrders(response, market, since, limit);
|
|
1872
1872
|
return this.filterByArray(parsed, 'status', ['closed', 'canceled'], false);
|
|
1873
1873
|
}
|
|
1874
|
+
/**
|
|
1875
|
+
* @method
|
|
1876
|
+
* @name hitbtc#fetchOrder
|
|
1877
|
+
* @description fetches information on an order made by the user
|
|
1878
|
+
* @see https://api.hitbtc.com/#spot-orders-history
|
|
1879
|
+
* @see https://api.hitbtc.com/#futures-orders-history
|
|
1880
|
+
* @see https://api.hitbtc.com/#margin-orders-history
|
|
1881
|
+
* @param {string} id order id
|
|
1882
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
1883
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1884
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
1885
|
+
* @param {bool} [params.margin] true for fetching a margin order
|
|
1886
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1887
|
+
*/
|
|
1874
1888
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
1875
|
-
/**
|
|
1876
|
-
* @method
|
|
1877
|
-
* @name hitbtc#fetchOrder
|
|
1878
|
-
* @description fetches information on an order made by the user
|
|
1879
|
-
* @see https://api.hitbtc.com/#spot-orders-history
|
|
1880
|
-
* @see https://api.hitbtc.com/#futures-orders-history
|
|
1881
|
-
* @see https://api.hitbtc.com/#margin-orders-history
|
|
1882
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
1883
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1884
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
1885
|
-
* @param {bool} [params.margin] true for fetching a margin order
|
|
1886
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1887
|
-
*/
|
|
1888
1889
|
await this.loadMarkets();
|
|
1889
1890
|
let market = undefined;
|
|
1890
1891
|
if (symbol !== undefined) {
|
|
@@ -1938,23 +1939,23 @@ export default class hitbtc extends Exchange {
|
|
|
1938
1939
|
const order = this.safeDict(response, 0);
|
|
1939
1940
|
return this.parseOrder(order, market);
|
|
1940
1941
|
}
|
|
1942
|
+
/**
|
|
1943
|
+
* @method
|
|
1944
|
+
* @name hitbtc#fetchOrderTrades
|
|
1945
|
+
* @description fetch all the trades made from a single order
|
|
1946
|
+
* @see https://api.hitbtc.com/#spot-trades-history
|
|
1947
|
+
* @see https://api.hitbtc.com/#futures-trades-history
|
|
1948
|
+
* @see https://api.hitbtc.com/#margin-trades-history
|
|
1949
|
+
* @param {string} id order id
|
|
1950
|
+
* @param {string} symbol unified market symbol
|
|
1951
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1952
|
+
* @param {int} [limit] the maximum number of trades to retrieve
|
|
1953
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1954
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
1955
|
+
* @param {bool} [params.margin] true for fetching margin trades
|
|
1956
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1957
|
+
*/
|
|
1941
1958
|
async fetchOrderTrades(id, symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1942
|
-
/**
|
|
1943
|
-
* @method
|
|
1944
|
-
* @name hitbtc#fetchOrderTrades
|
|
1945
|
-
* @description fetch all the trades made from a single order
|
|
1946
|
-
* @see https://api.hitbtc.com/#spot-trades-history
|
|
1947
|
-
* @see https://api.hitbtc.com/#futures-trades-history
|
|
1948
|
-
* @see https://api.hitbtc.com/#margin-trades-history
|
|
1949
|
-
* @param {string} id order id
|
|
1950
|
-
* @param {string} symbol unified market symbol
|
|
1951
|
-
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1952
|
-
* @param {int} [limit] the maximum number of trades to retrieve
|
|
1953
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1954
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
1955
|
-
* @param {bool} [params.margin] true for fetching margin trades
|
|
1956
|
-
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1957
|
-
*/
|
|
1958
1959
|
await this.loadMarkets();
|
|
1959
1960
|
let market = undefined;
|
|
1960
1961
|
if (symbol !== undefined) {
|
|
@@ -2026,22 +2027,22 @@ export default class hitbtc extends Exchange {
|
|
|
2026
2027
|
//
|
|
2027
2028
|
return this.parseTrades(response, market, since, limit);
|
|
2028
2029
|
}
|
|
2030
|
+
/**
|
|
2031
|
+
* @method
|
|
2032
|
+
* @name hitbtc#fetchOpenOrders
|
|
2033
|
+
* @description fetch all unfilled currently open orders
|
|
2034
|
+
* @see https://api.hitbtc.com/#get-all-active-spot-orders
|
|
2035
|
+
* @see https://api.hitbtc.com/#get-active-futures-orders
|
|
2036
|
+
* @see https://api.hitbtc.com/#get-active-margin-orders
|
|
2037
|
+
* @param {string} symbol unified market symbol
|
|
2038
|
+
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
2039
|
+
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
2040
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2041
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
2042
|
+
* @param {bool} [params.margin] true for fetching open margin orders
|
|
2043
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2044
|
+
*/
|
|
2029
2045
|
async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2030
|
-
/**
|
|
2031
|
-
* @method
|
|
2032
|
-
* @name hitbtc#fetchOpenOrders
|
|
2033
|
-
* @description fetch all unfilled currently open orders
|
|
2034
|
-
* @see https://api.hitbtc.com/#get-all-active-spot-orders
|
|
2035
|
-
* @see https://api.hitbtc.com/#get-active-futures-orders
|
|
2036
|
-
* @see https://api.hitbtc.com/#get-active-margin-orders
|
|
2037
|
-
* @param {string} symbol unified market symbol
|
|
2038
|
-
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
2039
|
-
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
2040
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2041
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
2042
|
-
* @param {bool} [params.margin] true for fetching open margin orders
|
|
2043
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2044
|
-
*/
|
|
2045
2046
|
await this.loadMarkets();
|
|
2046
2047
|
let market = undefined;
|
|
2047
2048
|
const request = {};
|
|
@@ -2093,21 +2094,21 @@ export default class hitbtc extends Exchange {
|
|
|
2093
2094
|
//
|
|
2094
2095
|
return this.parseOrders(response, market, since, limit);
|
|
2095
2096
|
}
|
|
2097
|
+
/**
|
|
2098
|
+
* @method
|
|
2099
|
+
* @name hitbtc#fetchOpenOrder
|
|
2100
|
+
* @description fetch an open order by it's id
|
|
2101
|
+
* @see https://api.hitbtc.com/#get-active-spot-order
|
|
2102
|
+
* @see https://api.hitbtc.com/#get-active-futures-order
|
|
2103
|
+
* @see https://api.hitbtc.com/#get-active-margin-order
|
|
2104
|
+
* @param {string} id order id
|
|
2105
|
+
* @param {string} symbol unified market symbol, default is undefined
|
|
2106
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2107
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
2108
|
+
* @param {bool} [params.margin] true for fetching an open margin order
|
|
2109
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2110
|
+
*/
|
|
2096
2111
|
async fetchOpenOrder(id, symbol = undefined, params = {}) {
|
|
2097
|
-
/**
|
|
2098
|
-
* @method
|
|
2099
|
-
* @name hitbtc#fetchOpenOrder
|
|
2100
|
-
* @description fetch an open order by it's id
|
|
2101
|
-
* @see https://api.hitbtc.com/#get-active-spot-order
|
|
2102
|
-
* @see https://api.hitbtc.com/#get-active-futures-order
|
|
2103
|
-
* @see https://api.hitbtc.com/#get-active-margin-order
|
|
2104
|
-
* @param {string} id order id
|
|
2105
|
-
* @param {string} symbol unified market symbol, default is undefined
|
|
2106
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2107
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
2108
|
-
* @param {bool} [params.margin] true for fetching an open margin order
|
|
2109
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2110
|
-
*/
|
|
2111
2112
|
await this.loadMarkets();
|
|
2112
2113
|
let market = undefined;
|
|
2113
2114
|
if (symbol !== undefined) {
|
|
@@ -2141,20 +2142,20 @@ export default class hitbtc extends Exchange {
|
|
|
2141
2142
|
}
|
|
2142
2143
|
return this.parseOrder(response, market);
|
|
2143
2144
|
}
|
|
2145
|
+
/**
|
|
2146
|
+
* @method
|
|
2147
|
+
* @name hitbtc#cancelAllOrders
|
|
2148
|
+
* @description cancel all open orders
|
|
2149
|
+
* @see https://api.hitbtc.com/#cancel-all-spot-orders
|
|
2150
|
+
* @see https://api.hitbtc.com/#cancel-futures-orders
|
|
2151
|
+
* @see https://api.hitbtc.com/#cancel-all-margin-orders
|
|
2152
|
+
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
2153
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2154
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
2155
|
+
* @param {bool} [params.margin] true for canceling margin orders
|
|
2156
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2157
|
+
*/
|
|
2144
2158
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
2145
|
-
/**
|
|
2146
|
-
* @method
|
|
2147
|
-
* @name hitbtc#cancelAllOrders
|
|
2148
|
-
* @description cancel all open orders
|
|
2149
|
-
* @see https://api.hitbtc.com/#cancel-all-spot-orders
|
|
2150
|
-
* @see https://api.hitbtc.com/#cancel-futures-orders
|
|
2151
|
-
* @see https://api.hitbtc.com/#cancel-all-margin-orders
|
|
2152
|
-
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
2153
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2154
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
2155
|
-
* @param {bool} [params.margin] true for canceling margin orders
|
|
2156
|
-
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2157
|
-
*/
|
|
2158
2159
|
await this.loadMarkets();
|
|
2159
2160
|
let market = undefined;
|
|
2160
2161
|
const request = {};
|
|
@@ -2187,21 +2188,21 @@ export default class hitbtc extends Exchange {
|
|
|
2187
2188
|
}
|
|
2188
2189
|
return this.parseOrders(response, market);
|
|
2189
2190
|
}
|
|
2191
|
+
/**
|
|
2192
|
+
* @method
|
|
2193
|
+
* @name hitbtc#cancelOrder
|
|
2194
|
+
* @description cancels an open order
|
|
2195
|
+
* @see https://api.hitbtc.com/#cancel-spot-order
|
|
2196
|
+
* @see https://api.hitbtc.com/#cancel-futures-order
|
|
2197
|
+
* @see https://api.hitbtc.com/#cancel-margin-order
|
|
2198
|
+
* @param {string} id order id
|
|
2199
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
2200
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2201
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
2202
|
+
* @param {bool} [params.margin] true for canceling a margin order
|
|
2203
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2204
|
+
*/
|
|
2190
2205
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
2191
|
-
/**
|
|
2192
|
-
* @method
|
|
2193
|
-
* @name hitbtc#cancelOrder
|
|
2194
|
-
* @description cancels an open order
|
|
2195
|
-
* @see https://api.hitbtc.com/#cancel-spot-order
|
|
2196
|
-
* @see https://api.hitbtc.com/#cancel-futures-order
|
|
2197
|
-
* @see https://api.hitbtc.com/#cancel-margin-order
|
|
2198
|
-
* @param {string} id order id
|
|
2199
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
2200
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2201
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
2202
|
-
* @param {bool} [params.margin] true for canceling a margin order
|
|
2203
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2204
|
-
*/
|
|
2205
2206
|
await this.loadMarkets();
|
|
2206
2207
|
let market = undefined;
|
|
2207
2208
|
const request = {
|
|
@@ -2276,27 +2277,27 @@ export default class hitbtc extends Exchange {
|
|
|
2276
2277
|
}
|
|
2277
2278
|
return this.parseOrder(response, market);
|
|
2278
2279
|
}
|
|
2280
|
+
/**
|
|
2281
|
+
* @method
|
|
2282
|
+
* @name hitbtc#createOrder
|
|
2283
|
+
* @description create a trade order
|
|
2284
|
+
* @see https://api.hitbtc.com/#create-new-spot-order
|
|
2285
|
+
* @see https://api.hitbtc.com/#create-margin-order
|
|
2286
|
+
* @see https://api.hitbtc.com/#create-futures-order
|
|
2287
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
2288
|
+
* @param {string} type 'market' or 'limit'
|
|
2289
|
+
* @param {string} side 'buy' or 'sell'
|
|
2290
|
+
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
2291
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
2292
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2293
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported for spot-margin, swap supports both, default is 'cross'
|
|
2294
|
+
* @param {bool} [params.margin] true for creating a margin order
|
|
2295
|
+
* @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
|
|
2296
|
+
* @param {bool} [params.postOnly] if true, the order will only be posted to the order book and not executed immediately
|
|
2297
|
+
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", "Day", "GTD"
|
|
2298
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2299
|
+
*/
|
|
2279
2300
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
2280
|
-
/**
|
|
2281
|
-
* @method
|
|
2282
|
-
* @name hitbtc#createOrder
|
|
2283
|
-
* @description create a trade order
|
|
2284
|
-
* @see https://api.hitbtc.com/#create-new-spot-order
|
|
2285
|
-
* @see https://api.hitbtc.com/#create-margin-order
|
|
2286
|
-
* @see https://api.hitbtc.com/#create-futures-order
|
|
2287
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
2288
|
-
* @param {string} type 'market' or 'limit'
|
|
2289
|
-
* @param {string} side 'buy' or 'sell'
|
|
2290
|
-
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
2291
|
-
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
2292
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2293
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported for spot-margin, swap supports both, default is 'cross'
|
|
2294
|
-
* @param {bool} [params.margin] true for creating a margin order
|
|
2295
|
-
* @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
|
|
2296
|
-
* @param {bool} [params.postOnly] if true, the order will only be posted to the order book and not executed immediately
|
|
2297
|
-
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", "Day", "GTD"
|
|
2298
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2299
|
-
*/
|
|
2300
2301
|
await this.loadMarkets();
|
|
2301
2302
|
const market = this.market(symbol);
|
|
2302
2303
|
let request = undefined;
|
|
@@ -2519,17 +2520,17 @@ export default class hitbtc extends Exchange {
|
|
|
2519
2520
|
'stopLossPrice': undefined,
|
|
2520
2521
|
}, market);
|
|
2521
2522
|
}
|
|
2523
|
+
/**
|
|
2524
|
+
* @method
|
|
2525
|
+
* @name hitbtc#fetchMarginModes
|
|
2526
|
+
* @description fetches margin mode of the user
|
|
2527
|
+
* @see https://api.hitbtc.com/#get-margin-position-parameters
|
|
2528
|
+
* @see https://api.hitbtc.com/#get-futures-position-parameters
|
|
2529
|
+
* @param {string[]} symbols unified market symbols
|
|
2530
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2531
|
+
* @returns {object} a list of [margin mode structures]{@link https://docs.ccxt.com/#/?id=margin-mode-structure}
|
|
2532
|
+
*/
|
|
2522
2533
|
async fetchMarginModes(symbols = undefined, params = {}) {
|
|
2523
|
-
/**
|
|
2524
|
-
* @method
|
|
2525
|
-
* @name hitbtc#fetchMarginModes
|
|
2526
|
-
* @description fetches margin mode of the user
|
|
2527
|
-
* @see https://api.hitbtc.com/#get-margin-position-parameters
|
|
2528
|
-
* @see https://api.hitbtc.com/#get-futures-position-parameters
|
|
2529
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
2530
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2531
|
-
* @returns {object} a list of [margin mode structures]{@link https://docs.ccxt.com/#/?id=margin-mode-structure}
|
|
2532
|
-
*/
|
|
2533
2534
|
await this.loadMarkets();
|
|
2534
2535
|
let market = undefined;
|
|
2535
2536
|
if (symbols !== undefined) {
|
|
@@ -2593,19 +2594,19 @@ export default class hitbtc extends Exchange {
|
|
|
2593
2594
|
'marginMode': this.safeStringLower(marginMode, 'margin_mode'),
|
|
2594
2595
|
};
|
|
2595
2596
|
}
|
|
2597
|
+
/**
|
|
2598
|
+
* @method
|
|
2599
|
+
* @name hitbtc#transfer
|
|
2600
|
+
* @description transfer currency internally between wallets on the same account
|
|
2601
|
+
* @see https://api.hitbtc.com/#transfer-between-wallet-and-exchange
|
|
2602
|
+
* @param {string} code unified currency code
|
|
2603
|
+
* @param {float} amount amount to transfer
|
|
2604
|
+
* @param {string} fromAccount account to transfer from
|
|
2605
|
+
* @param {string} toAccount account to transfer to
|
|
2606
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2607
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
2608
|
+
*/
|
|
2596
2609
|
async transfer(code, amount, fromAccount, toAccount, params = {}) {
|
|
2597
|
-
/**
|
|
2598
|
-
* @method
|
|
2599
|
-
* @name hitbtc#transfer
|
|
2600
|
-
* @description transfer currency internally between wallets on the same account
|
|
2601
|
-
* @see https://api.hitbtc.com/#transfer-between-wallet-and-exchange
|
|
2602
|
-
* @param {string} code unified currency code
|
|
2603
|
-
* @param {float} amount amount to transfer
|
|
2604
|
-
* @param {string} fromAccount account to transfer from
|
|
2605
|
-
* @param {string} toAccount account to transfer to
|
|
2606
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2607
|
-
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
2608
|
-
*/
|
|
2609
2610
|
// account can be "spot", "wallet", or "derivatives"
|
|
2610
2611
|
await this.loadMarkets();
|
|
2611
2612
|
const currency = this.currency(code);
|
|
@@ -2680,19 +2681,19 @@ export default class hitbtc extends Exchange {
|
|
|
2680
2681
|
'info': response,
|
|
2681
2682
|
};
|
|
2682
2683
|
}
|
|
2684
|
+
/**
|
|
2685
|
+
* @method
|
|
2686
|
+
* @name hitbtc#withdraw
|
|
2687
|
+
* @description make a withdrawal
|
|
2688
|
+
* @see https://api.hitbtc.com/#withdraw-crypto
|
|
2689
|
+
* @param {string} code unified currency code
|
|
2690
|
+
* @param {float} amount the amount to withdraw
|
|
2691
|
+
* @param {string} address the address to withdraw to
|
|
2692
|
+
* @param {string} tag
|
|
2693
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2694
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2695
|
+
*/
|
|
2683
2696
|
async withdraw(code, amount, address, tag = undefined, params = {}) {
|
|
2684
|
-
/**
|
|
2685
|
-
* @method
|
|
2686
|
-
* @name hitbtc#withdraw
|
|
2687
|
-
* @description make a withdrawal
|
|
2688
|
-
* @see https://api.hitbtc.com/#withdraw-crypto
|
|
2689
|
-
* @param {string} code unified currency code
|
|
2690
|
-
* @param {float} amount the amount to withdraw
|
|
2691
|
-
* @param {string} address the address to withdraw to
|
|
2692
|
-
* @param {string} tag
|
|
2693
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2694
|
-
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2695
|
-
*/
|
|
2696
2697
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
2697
2698
|
await this.loadMarkets();
|
|
2698
2699
|
this.checkAddress(address);
|
|
@@ -2727,16 +2728,16 @@ export default class hitbtc extends Exchange {
|
|
|
2727
2728
|
//
|
|
2728
2729
|
return this.parseTransaction(response, currency);
|
|
2729
2730
|
}
|
|
2731
|
+
/**
|
|
2732
|
+
* @method
|
|
2733
|
+
* @name hitbtc#fetchFundingRates
|
|
2734
|
+
* @description fetches funding rates for multiple markets
|
|
2735
|
+
* @see https://api.hitbtc.com/#futures-info
|
|
2736
|
+
* @param {string[]} symbols unified symbols of the markets to fetch the funding rates for, all market funding rates are returned if not assigned
|
|
2737
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2738
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
2739
|
+
*/
|
|
2730
2740
|
async fetchFundingRates(symbols = undefined, params = {}) {
|
|
2731
|
-
/**
|
|
2732
|
-
* @method
|
|
2733
|
-
* @name hitbtc#fetchFundingRates
|
|
2734
|
-
* @description fetches funding rates for multiple markets
|
|
2735
|
-
* @see https://api.hitbtc.com/#futures-info
|
|
2736
|
-
* @param {string[]} symbols unified symbols of the markets to fetch the funding rates for, all market funding rates are returned if not assigned
|
|
2737
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2738
|
-
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
2739
|
-
*/
|
|
2740
2741
|
await this.loadMarkets();
|
|
2741
2742
|
let market = undefined;
|
|
2742
2743
|
const request = {};
|
|
@@ -2781,20 +2782,20 @@ export default class hitbtc extends Exchange {
|
|
|
2781
2782
|
}
|
|
2782
2783
|
return this.filterByArray(fundingRates, 'symbol', symbols);
|
|
2783
2784
|
}
|
|
2785
|
+
/**
|
|
2786
|
+
* @method
|
|
2787
|
+
* @name hitbtc#fetchFundingRateHistory
|
|
2788
|
+
* @see https://api.hitbtc.com/#funding-history
|
|
2789
|
+
* @description fetches historical funding rate prices
|
|
2790
|
+
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
2791
|
+
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
2792
|
+
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
2793
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2794
|
+
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
2795
|
+
* @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)
|
|
2796
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
2797
|
+
*/
|
|
2784
2798
|
async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2785
|
-
/**
|
|
2786
|
-
* @method
|
|
2787
|
-
* @name hitbtc#fetchFundingRateHistory
|
|
2788
|
-
* @see https://api.hitbtc.com/#funding-history
|
|
2789
|
-
* @description fetches historical funding rate prices
|
|
2790
|
-
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
2791
|
-
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
2792
|
-
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
2793
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2794
|
-
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
2795
|
-
* @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)
|
|
2796
|
-
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
2797
|
-
*/
|
|
2798
2799
|
await this.loadMarkets();
|
|
2799
2800
|
let paginate = false;
|
|
2800
2801
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchFundingRateHistory', 'paginate');
|
|
@@ -2862,19 +2863,19 @@ export default class hitbtc extends Exchange {
|
|
|
2862
2863
|
const sorted = this.sortBy(rates, 'timestamp');
|
|
2863
2864
|
return this.filterBySymbolSinceLimit(sorted, symbol, since, limit);
|
|
2864
2865
|
}
|
|
2866
|
+
/**
|
|
2867
|
+
* @method
|
|
2868
|
+
* @name hitbtc#fetchPositions
|
|
2869
|
+
* @description fetch all open positions
|
|
2870
|
+
* @see https://api.hitbtc.com/#get-futures-margin-accounts
|
|
2871
|
+
* @see https://api.hitbtc.com/#get-all-margin-accounts
|
|
2872
|
+
* @param {string[]|undefined} symbols not used by hitbtc fetchPositions ()
|
|
2873
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2874
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported, defaults to spot-margin endpoint if this is set
|
|
2875
|
+
* @param {bool} [params.margin] true for fetching spot-margin positions
|
|
2876
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
2877
|
+
*/
|
|
2865
2878
|
async fetchPositions(symbols = undefined, params = {}) {
|
|
2866
|
-
/**
|
|
2867
|
-
* @method
|
|
2868
|
-
* @name hitbtc#fetchPositions
|
|
2869
|
-
* @description fetch all open positions
|
|
2870
|
-
* @see https://api.hitbtc.com/#get-futures-margin-accounts
|
|
2871
|
-
* @see https://api.hitbtc.com/#get-all-margin-accounts
|
|
2872
|
-
* @param {string[]|undefined} symbols not used by hitbtc fetchPositions ()
|
|
2873
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2874
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported, defaults to spot-margin endpoint if this is set
|
|
2875
|
-
* @param {bool} [params.margin] true for fetching spot-margin positions
|
|
2876
|
-
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
2877
|
-
*/
|
|
2878
2879
|
await this.loadMarkets();
|
|
2879
2880
|
const request = {};
|
|
2880
2881
|
let marketType = undefined;
|
|
@@ -2938,19 +2939,19 @@ export default class hitbtc extends Exchange {
|
|
|
2938
2939
|
}
|
|
2939
2940
|
return result;
|
|
2940
2941
|
}
|
|
2942
|
+
/**
|
|
2943
|
+
* @method
|
|
2944
|
+
* @name hitbtc#fetchPosition
|
|
2945
|
+
* @description fetch data on a single open contract trade position
|
|
2946
|
+
* @see https://api.hitbtc.com/#get-futures-margin-account
|
|
2947
|
+
* @see https://api.hitbtc.com/#get-isolated-margin-account
|
|
2948
|
+
* @param {string} symbol unified market symbol of the market the position is held in, default is undefined
|
|
2949
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2950
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported, defaults to spot-margin endpoint if this is set
|
|
2951
|
+
* @param {bool} [params.margin] true for fetching a spot-margin position
|
|
2952
|
+
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
2953
|
+
*/
|
|
2941
2954
|
async fetchPosition(symbol, params = {}) {
|
|
2942
|
-
/**
|
|
2943
|
-
* @method
|
|
2944
|
-
* @name hitbtc#fetchPosition
|
|
2945
|
-
* @description fetch data on a single open contract trade position
|
|
2946
|
-
* @see https://api.hitbtc.com/#get-futures-margin-account
|
|
2947
|
-
* @see https://api.hitbtc.com/#get-isolated-margin-account
|
|
2948
|
-
* @param {string} symbol unified market symbol of the market the position is held in, default is undefined
|
|
2949
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2950
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported, defaults to spot-margin endpoint if this is set
|
|
2951
|
-
* @param {bool} [params.margin] true for fetching a spot-margin position
|
|
2952
|
-
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
2953
|
-
*/
|
|
2954
2955
|
await this.loadMarkets();
|
|
2955
2956
|
const market = this.market(symbol);
|
|
2956
2957
|
const request = {
|
|
@@ -3123,16 +3124,16 @@ export default class hitbtc extends Exchange {
|
|
|
3123
3124
|
'info': interest,
|
|
3124
3125
|
}, market);
|
|
3125
3126
|
}
|
|
3127
|
+
/**
|
|
3128
|
+
* @method
|
|
3129
|
+
* @name hitbtc#fetchOpenInterest
|
|
3130
|
+
* @description Retrieves the open interest of a derivative trading pair
|
|
3131
|
+
* @see https://api.hitbtc.com/#futures-info
|
|
3132
|
+
* @param {string} symbol Unified CCXT market symbol
|
|
3133
|
+
* @param {object} [params] exchange specific parameters
|
|
3134
|
+
* @returns {object} an open interest structure{@link https://docs.ccxt.com/#/?id=interest-history-structure}
|
|
3135
|
+
*/
|
|
3126
3136
|
async fetchOpenInterest(symbol, params = {}) {
|
|
3127
|
-
/**
|
|
3128
|
-
* @method
|
|
3129
|
-
* @name hitbtc#fetchOpenInterest
|
|
3130
|
-
* @description Retrieves the open interest of a derivative trading pair
|
|
3131
|
-
* @see https://api.hitbtc.com/#futures-info
|
|
3132
|
-
* @param {string} symbol Unified CCXT market symbol
|
|
3133
|
-
* @param {object} [params] exchange specific parameters
|
|
3134
|
-
* @returns {object} an open interest structure{@link https://docs.ccxt.com/#/?id=interest-history-structure}
|
|
3135
|
-
*/
|
|
3136
3137
|
await this.loadMarkets();
|
|
3137
3138
|
const market = this.market(symbol);
|
|
3138
3139
|
if (!market['swap']) {
|
|
@@ -3159,16 +3160,16 @@ export default class hitbtc extends Exchange {
|
|
|
3159
3160
|
//
|
|
3160
3161
|
return this.parseOpenInterest(response, market);
|
|
3161
3162
|
}
|
|
3163
|
+
/**
|
|
3164
|
+
* @method
|
|
3165
|
+
* @name hitbtc#fetchFundingRate
|
|
3166
|
+
* @description fetch the current funding rate
|
|
3167
|
+
* @see https://api.hitbtc.com/#futures-info
|
|
3168
|
+
* @param {string} symbol unified market symbol
|
|
3169
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3170
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
3171
|
+
*/
|
|
3162
3172
|
async fetchFundingRate(symbol, params = {}) {
|
|
3163
|
-
/**
|
|
3164
|
-
* @method
|
|
3165
|
-
* @name hitbtc#fetchFundingRate
|
|
3166
|
-
* @description fetch the current funding rate
|
|
3167
|
-
* @see https://api.hitbtc.com/#futures-info
|
|
3168
|
-
* @param {string} symbol unified market symbol
|
|
3169
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3170
|
-
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
3171
|
-
*/
|
|
3172
3173
|
await this.loadMarkets();
|
|
3173
3174
|
const market = this.market(symbol);
|
|
3174
3175
|
if (!market['swap']) {
|
|
@@ -3333,54 +3334,54 @@ export default class hitbtc extends Exchange {
|
|
|
3333
3334
|
'datetime': datetime,
|
|
3334
3335
|
};
|
|
3335
3336
|
}
|
|
3337
|
+
/**
|
|
3338
|
+
* @method
|
|
3339
|
+
* @name hitbtc#reduceMargin
|
|
3340
|
+
* @description remove margin from a position
|
|
3341
|
+
* @see https://api.hitbtc.com/#create-update-margin-account-2
|
|
3342
|
+
* @see https://api.hitbtc.com/#create-update-margin-account
|
|
3343
|
+
* @param {string} symbol unified market symbol
|
|
3344
|
+
* @param {float} amount the amount of margin to remove
|
|
3345
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3346
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported, defaults to the spot-margin endpoint if this is set
|
|
3347
|
+
* @param {bool} [params.margin] true for reducing spot-margin
|
|
3348
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
|
|
3349
|
+
*/
|
|
3336
3350
|
async reduceMargin(symbol, amount, params = {}) {
|
|
3337
|
-
/**
|
|
3338
|
-
* @method
|
|
3339
|
-
* @name hitbtc#reduceMargin
|
|
3340
|
-
* @description remove margin from a position
|
|
3341
|
-
* @see https://api.hitbtc.com/#create-update-margin-account-2
|
|
3342
|
-
* @see https://api.hitbtc.com/#create-update-margin-account
|
|
3343
|
-
* @param {string} symbol unified market symbol
|
|
3344
|
-
* @param {float} amount the amount of margin to remove
|
|
3345
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3346
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported, defaults to the spot-margin endpoint if this is set
|
|
3347
|
-
* @param {bool} [params.margin] true for reducing spot-margin
|
|
3348
|
-
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
|
|
3349
|
-
*/
|
|
3350
3351
|
if (this.numberToString(amount) !== '0') {
|
|
3351
3352
|
throw new BadRequest(this.id + ' reduceMargin() on hitbtc requires the amount to be 0 and that will remove the entire margin amount');
|
|
3352
3353
|
}
|
|
3353
3354
|
return await this.modifyMarginHelper(symbol, amount, 'reduce', params);
|
|
3354
3355
|
}
|
|
3356
|
+
/**
|
|
3357
|
+
* @method
|
|
3358
|
+
* @name hitbtc#addMargin
|
|
3359
|
+
* @description add margin
|
|
3360
|
+
* @see https://api.hitbtc.com/#create-update-margin-account-2
|
|
3361
|
+
* @see https://api.hitbtc.com/#create-update-margin-account
|
|
3362
|
+
* @param {string} symbol unified market symbol
|
|
3363
|
+
* @param {float} amount amount of margin to add
|
|
3364
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3365
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported, defaults to the spot-margin endpoint if this is set
|
|
3366
|
+
* @param {bool} [params.margin] true for adding spot-margin
|
|
3367
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
|
|
3368
|
+
*/
|
|
3355
3369
|
async addMargin(symbol, amount, params = {}) {
|
|
3356
|
-
/**
|
|
3357
|
-
* @method
|
|
3358
|
-
* @name hitbtc#addMargin
|
|
3359
|
-
* @description add margin
|
|
3360
|
-
* @see https://api.hitbtc.com/#create-update-margin-account-2
|
|
3361
|
-
* @see https://api.hitbtc.com/#create-update-margin-account
|
|
3362
|
-
* @param {string} symbol unified market symbol
|
|
3363
|
-
* @param {float} amount amount of margin to add
|
|
3364
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3365
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported, defaults to the spot-margin endpoint if this is set
|
|
3366
|
-
* @param {bool} [params.margin] true for adding spot-margin
|
|
3367
|
-
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
|
|
3368
|
-
*/
|
|
3369
3370
|
return await this.modifyMarginHelper(symbol, amount, 'add', params);
|
|
3370
3371
|
}
|
|
3372
|
+
/**
|
|
3373
|
+
* @method
|
|
3374
|
+
* @name hitbtc#fetchLeverage
|
|
3375
|
+
* @description fetch the set leverage for a market
|
|
3376
|
+
* @see https://api.hitbtc.com/#get-futures-margin-account
|
|
3377
|
+
* @see https://api.hitbtc.com/#get-isolated-margin-account
|
|
3378
|
+
* @param {string} symbol unified market symbol
|
|
3379
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3380
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported, defaults to the spot-margin endpoint if this is set
|
|
3381
|
+
* @param {bool} [params.margin] true for fetching spot-margin leverage
|
|
3382
|
+
* @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
3383
|
+
*/
|
|
3371
3384
|
async fetchLeverage(symbol, params = {}) {
|
|
3372
|
-
/**
|
|
3373
|
-
* @method
|
|
3374
|
-
* @name hitbtc#fetchLeverage
|
|
3375
|
-
* @description fetch the set leverage for a market
|
|
3376
|
-
* @see https://api.hitbtc.com/#get-futures-margin-account
|
|
3377
|
-
* @see https://api.hitbtc.com/#get-isolated-margin-account
|
|
3378
|
-
* @param {string} symbol unified market symbol
|
|
3379
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3380
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported, defaults to the spot-margin endpoint if this is set
|
|
3381
|
-
* @param {bool} [params.margin] true for fetching spot-margin leverage
|
|
3382
|
-
* @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
3383
|
-
*/
|
|
3384
3385
|
await this.loadMarkets();
|
|
3385
3386
|
const market = this.market(symbol);
|
|
3386
3387
|
const request = {
|
|
@@ -3450,17 +3451,17 @@ export default class hitbtc extends Exchange {
|
|
|
3450
3451
|
'shortLeverage': leverageValue,
|
|
3451
3452
|
};
|
|
3452
3453
|
}
|
|
3454
|
+
/**
|
|
3455
|
+
* @method
|
|
3456
|
+
* @name hitbtc#setLeverage
|
|
3457
|
+
* @description set the level of leverage for a market
|
|
3458
|
+
* @see https://api.hitbtc.com/#create-update-margin-account-2
|
|
3459
|
+
* @param {float} leverage the rate of leverage
|
|
3460
|
+
* @param {string} symbol unified market symbol
|
|
3461
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3462
|
+
* @returns {object} response from the exchange
|
|
3463
|
+
*/
|
|
3453
3464
|
async setLeverage(leverage, symbol = undefined, params = {}) {
|
|
3454
|
-
/**
|
|
3455
|
-
* @method
|
|
3456
|
-
* @name hitbtc#setLeverage
|
|
3457
|
-
* @description set the level of leverage for a market
|
|
3458
|
-
* @see https://api.hitbtc.com/#create-update-margin-account-2
|
|
3459
|
-
* @param {float} leverage the rate of leverage
|
|
3460
|
-
* @param {string} symbol unified market symbol
|
|
3461
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3462
|
-
* @returns {object} response from the exchange
|
|
3463
|
-
*/
|
|
3464
3465
|
if (symbol === undefined) {
|
|
3465
3466
|
throw new ArgumentsRequired(this.id + ' setLeverage() requires a symbol argument');
|
|
3466
3467
|
}
|
|
@@ -3485,16 +3486,16 @@ export default class hitbtc extends Exchange {
|
|
|
3485
3486
|
};
|
|
3486
3487
|
return await this.privatePutFuturesAccountIsolatedSymbol(this.extend(request, params));
|
|
3487
3488
|
}
|
|
3489
|
+
/**
|
|
3490
|
+
* @method
|
|
3491
|
+
* @name hitbtc#fetchDepositWithdrawFees
|
|
3492
|
+
* @description fetch deposit and withdraw fees
|
|
3493
|
+
* @see https://api.hitbtc.com/#currencies
|
|
3494
|
+
* @param {string[]|undefined} codes list of unified currency codes
|
|
3495
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3496
|
+
* @returns {object[]} a list of [fees structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
3497
|
+
*/
|
|
3488
3498
|
async fetchDepositWithdrawFees(codes = undefined, params = {}) {
|
|
3489
|
-
/**
|
|
3490
|
-
* @method
|
|
3491
|
-
* @name hitbtc#fetchDepositWithdrawFees
|
|
3492
|
-
* @description fetch deposit and withdraw fees
|
|
3493
|
-
* @see https://api.hitbtc.com/#currencies
|
|
3494
|
-
* @param {string[]|undefined} codes list of unified currency codes
|
|
3495
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3496
|
-
* @returns {object[]} a list of [fees structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
3497
|
-
*/
|
|
3498
3499
|
await this.loadMarkets();
|
|
3499
3500
|
const response = await this.publicGetPublicCurrency(params);
|
|
3500
3501
|
//
|
|
@@ -3574,17 +3575,19 @@ export default class hitbtc extends Exchange {
|
|
|
3574
3575
|
}
|
|
3575
3576
|
return result;
|
|
3576
3577
|
}
|
|
3578
|
+
/**
|
|
3579
|
+
* @method
|
|
3580
|
+
* @name hitbtc#closePosition
|
|
3581
|
+
* @description closes open positions for a market
|
|
3582
|
+
* @see https://api.hitbtc.com/#close-all-futures-margin-positions
|
|
3583
|
+
* @param {string} symbol unified ccxt market symbol
|
|
3584
|
+
* @param {string} side 'buy' or 'sell'
|
|
3585
|
+
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
3586
|
+
* @param {string} [params.symbol] *required* unified market symbol
|
|
3587
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated', default is 'cross'
|
|
3588
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3589
|
+
*/
|
|
3577
3590
|
async closePosition(symbol, side = undefined, params = {}) {
|
|
3578
|
-
/**
|
|
3579
|
-
* @method
|
|
3580
|
-
* @name hitbtc#closePosition
|
|
3581
|
-
* @description closes open positions for a market
|
|
3582
|
-
* @see https://api.hitbtc.com/#close-all-futures-margin-positions
|
|
3583
|
-
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
3584
|
-
* @param {string} [params.symbol] *required* unified market symbol
|
|
3585
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated', default is 'cross'
|
|
3586
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3587
|
-
*/
|
|
3588
3591
|
await this.loadMarkets();
|
|
3589
3592
|
let marginMode = undefined;
|
|
3590
3593
|
[marginMode, params] = this.handleMarginModeAndParams('closePosition', params, 'cross');
|