ccxt 4.4.30 → 4.4.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -3
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +123 -123
- package/dist/cjs/src/alpaca.js +237 -237
- package/dist/cjs/src/ascendex.js +342 -341
- package/dist/cjs/src/bigone.js +242 -242
- package/dist/cjs/src/binance.js +1339 -1291
- package/dist/cjs/src/bingx.js +639 -639
- package/dist/cjs/src/bit2c.js +111 -111
- package/dist/cjs/src/bitbank.js +142 -142
- package/dist/cjs/src/bitbns.js +140 -140
- package/dist/cjs/src/bitfinex.js +231 -231
- package/dist/cjs/src/bitfinex2.js +403 -403
- package/dist/cjs/src/bitflyer.js +184 -184
- package/dist/cjs/src/bitget.js +848 -846
- package/dist/cjs/src/bithumb.js +125 -124
- package/dist/cjs/src/bitmart.js +525 -525
- package/dist/cjs/src/bitmex.js +317 -317
- package/dist/cjs/src/bitopro.js +221 -221
- package/dist/cjs/src/bitrue.js +315 -315
- package/dist/cjs/src/bitso.js +220 -220
- package/dist/cjs/src/bitstamp.js +251 -251
- package/dist/cjs/src/bitteam.js +183 -183
- package/dist/cjs/src/bitvavo.js +247 -251
- package/dist/cjs/src/bl3p.js +82 -82
- package/dist/cjs/src/blockchaincom.js +211 -211
- package/dist/cjs/src/blofin.js +332 -331
- package/dist/cjs/src/btcalpha.js +166 -166
- package/dist/cjs/src/btcbox.js +108 -108
- package/dist/cjs/src/btcmarkets.js +198 -198
- package/dist/cjs/src/btcturk.js +124 -124
- package/dist/cjs/src/bybit.js +906 -900
- package/dist/cjs/src/cex.js +227 -226
- package/dist/cjs/src/coinbase.js +481 -481
- package/dist/cjs/src/coinbaseexchange.js +274 -274
- package/dist/cjs/src/coinbaseinternational.js +304 -304
- package/dist/cjs/src/coincatch.js +650 -650
- package/dist/cjs/src/coincheck.js +113 -113
- package/dist/cjs/src/coinex.js +611 -601
- package/dist/cjs/src/coinlist.js +304 -303
- package/dist/cjs/src/coinmate.js +162 -161
- package/dist/cjs/src/coinmetro.js +187 -187
- package/dist/cjs/src/coinone.js +124 -123
- package/dist/cjs/src/coinsph.js +237 -237
- package/dist/cjs/src/coinspot.js +82 -82
- package/dist/cjs/src/cryptocom.js +342 -341
- package/dist/cjs/src/currencycom.js +225 -224
- package/dist/cjs/src/delta.js +320 -320
- package/dist/cjs/src/deribit.js +411 -408
- package/dist/cjs/src/digifinex.js +432 -431
- package/dist/cjs/src/exmo.js +328 -327
- package/dist/cjs/src/gate.js +830 -791
- package/dist/cjs/src/gemini.js +199 -198
- package/dist/cjs/src/hashkey.js +520 -517
- package/dist/cjs/src/hitbtc.js +465 -462
- package/dist/cjs/src/hollaex.js +253 -252
- package/dist/cjs/src/htx.js +791 -848
- package/dist/cjs/src/huobijp.js +219 -218
- package/dist/cjs/src/hyperliquid.js +421 -417
- package/dist/cjs/src/idex.js +238 -237
- package/dist/cjs/src/independentreserve.js +133 -132
- package/dist/cjs/src/indodax.js +177 -171
- package/dist/cjs/src/kraken.js +381 -377
- package/dist/cjs/src/krakenfutures.js +285 -279
- package/dist/cjs/src/kucoin.js +632 -622
- package/dist/cjs/src/kucoinfutures.js +533 -457
- package/dist/cjs/src/kuna.js +283 -282
- package/dist/cjs/src/latoken.js +211 -210
- package/dist/cjs/src/lbank.js +268 -267
- package/dist/cjs/src/luno.js +174 -173
- package/dist/cjs/src/lykke.js +172 -171
- package/dist/cjs/src/mercado.js +123 -122
- package/dist/cjs/src/mexc.js +650 -646
- package/dist/cjs/src/ndax.js +229 -228
- package/dist/cjs/src/novadax.js +230 -229
- package/dist/cjs/src/oceanex.js +187 -186
- package/dist/cjs/src/okcoin.js +286 -285
- package/dist/cjs/src/okx.js +909 -904
- package/dist/cjs/src/onetrading.js +218 -218
- package/dist/cjs/src/oxfun.js +335 -334
- package/dist/cjs/src/p2b.js +154 -154
- package/dist/cjs/src/paradex.js +249 -244
- package/dist/cjs/src/paymium.js +101 -101
- package/dist/cjs/src/phemex.js +388 -390
- package/dist/cjs/src/poloniex.js +270 -270
- package/dist/cjs/src/poloniexfutures.js +250 -250
- package/dist/cjs/src/pro/alpaca.js +64 -64
- package/dist/cjs/src/pro/ascendex.js +64 -64
- package/dist/cjs/src/pro/binance.js +546 -543
- package/dist/cjs/src/pro/bingx.js +116 -116
- package/dist/cjs/src/pro/bitfinex.js +42 -42
- package/dist/cjs/src/pro/bitfinex2.js +66 -66
- package/dist/cjs/src/pro/bitget.js +188 -181
- package/dist/cjs/src/pro/bithumb.js +40 -40
- package/dist/cjs/src/pro/bitmart.js +121 -119
- package/dist/cjs/src/pro/bitmex.js +135 -133
- package/dist/cjs/src/pro/bitopro.js +49 -49
- package/dist/cjs/src/pro/bitrue.js +19 -19
- package/dist/cjs/src/pro/bitstamp.js +29 -29
- package/dist/cjs/src/pro/bitvavo.js +299 -301
- package/dist/cjs/src/pro/blockchaincom.js +62 -62
- package/dist/cjs/src/pro/blofin.js +132 -130
- package/dist/cjs/src/pro/bybit.js +317 -313
- package/dist/cjs/src/pro/cex.js +168 -168
- package/dist/cjs/src/pro/coinbase.js +93 -91
- package/dist/cjs/src/pro/coinbaseexchange.js +95 -95
- package/dist/cjs/src/pro/coinbaseinternational.js +111 -111
- package/dist/cjs/src/pro/coincatch.js +150 -143
- package/dist/cjs/src/pro/coincheck.js +21 -21
- package/dist/cjs/src/pro/coinex.js +110 -110
- package/dist/cjs/src/pro/coinone.js +30 -30
- package/dist/cjs/src/pro/cryptocom.js +227 -227
- package/dist/cjs/src/pro/currencycom.js +45 -45
- package/dist/cjs/src/pro/deribit.js +127 -127
- package/dist/cjs/src/pro/exmo.js +66 -66
- package/dist/cjs/src/pro/gate.js +287 -283
- package/dist/cjs/src/pro/gemini.js +74 -74
- package/dist/cjs/src/pro/hashkey.js +87 -85
- package/dist/cjs/src/pro/hitbtc.js +190 -190
- package/dist/cjs/src/pro/hollaex.js +51 -51
- package/dist/cjs/src/pro/htx.js +96 -94
- package/dist/cjs/src/pro/huobijp.js +38 -38
- package/dist/cjs/src/pro/hyperliquid.js +151 -150
- package/dist/cjs/src/pro/idex.js +48 -48
- package/dist/cjs/src/pro/independentreserve.js +19 -19
- package/dist/cjs/src/pro/kraken.js +167 -167
- package/dist/cjs/src/pro/krakenfutures.js +137 -138
- package/dist/cjs/src/pro/kucoin.js +167 -168
- package/dist/cjs/src/pro/kucoinfutures.js +147 -147
- package/dist/cjs/src/pro/lbank.js +95 -95
- package/dist/cjs/src/pro/luno.js +21 -21
- package/dist/cjs/src/pro/mexc.js +102 -103
- package/dist/cjs/src/pro/ndax.js +42 -42
- package/dist/cjs/src/pro/okcoin.js +61 -61
- package/dist/cjs/src/pro/okx.js +332 -330
- package/dist/cjs/src/pro/onetrading.js +71 -71
- package/dist/cjs/src/pro/oxfun.js +193 -191
- package/dist/cjs/src/pro/p2b.js +77 -77
- package/dist/cjs/src/pro/paradex.js +39 -39
- package/dist/cjs/src/pro/phemex.js +94 -94
- package/dist/cjs/src/pro/poloniex.js +171 -171
- package/dist/cjs/src/pro/poloniexfutures.js +62 -62
- package/dist/cjs/src/pro/probit.js +63 -63
- package/dist/cjs/src/pro/upbit.js +80 -80
- package/dist/cjs/src/pro/vertex.js +65 -63
- package/dist/cjs/src/pro/wazirx.js +70 -70
- package/dist/cjs/src/pro/whitebit.js +83 -83
- package/dist/cjs/src/pro/woo.js +106 -104
- package/dist/cjs/src/pro/woofipro.js +105 -103
- package/dist/cjs/src/pro/xt.js +119 -119
- package/dist/cjs/src/probit.js +229 -229
- package/dist/cjs/src/timex.js +198 -197
- package/dist/cjs/src/tokocrypto.js +214 -213
- package/dist/cjs/src/tradeogre.js +92 -91
- package/dist/cjs/src/upbit.js +243 -242
- package/dist/cjs/src/vertex.js +258 -258
- package/dist/cjs/src/wavesexchange.js +176 -172
- package/dist/cjs/src/wazirx.js +168 -168
- package/dist/cjs/src/whitebit.js +361 -361
- package/dist/cjs/src/woo.js +571 -572
- package/dist/cjs/src/woofipro.js +392 -391
- package/dist/cjs/src/xt.js +436 -435
- package/dist/cjs/src/yobit.js +159 -158
- package/dist/cjs/src/zaif.js +103 -103
- package/dist/cjs/src/zonda.js +168 -168
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/ace.d.ts +123 -0
- package/js/src/ace.js +123 -123
- package/js/src/alpaca.d.ts +237 -0
- package/js/src/alpaca.js +237 -237
- package/js/src/ascendex.d.ts +339 -0
- package/js/src/ascendex.js +342 -341
- package/js/src/base/types.d.ts +1 -0
- package/js/src/bigone.d.ts +242 -0
- package/js/src/bigone.js +242 -242
- package/js/src/binance.d.ts +1306 -0
- package/js/src/binance.js +1339 -1291
- package/js/src/bingx.d.ts +639 -0
- package/js/src/bingx.js +639 -639
- package/js/src/bit2c.d.ts +111 -0
- package/js/src/bit2c.js +111 -111
- package/js/src/bitbank.d.ts +142 -0
- package/js/src/bitbank.js +142 -142
- package/js/src/bitbns.d.ts +140 -0
- package/js/src/bitbns.js +140 -140
- package/js/src/bitfinex.d.ts +231 -0
- package/js/src/bitfinex.js +231 -231
- package/js/src/bitfinex2.d.ts +403 -0
- package/js/src/bitfinex2.js +403 -403
- package/js/src/bitflyer.d.ts +184 -0
- package/js/src/bitflyer.js +184 -184
- package/js/src/bitget.d.ts +846 -0
- package/js/src/bitget.js +848 -846
- package/js/src/bithumb.d.ts +125 -0
- package/js/src/bithumb.js +125 -124
- package/js/src/bitmart.d.ts +525 -0
- package/js/src/bitmart.js +525 -525
- package/js/src/bitmex.d.ts +317 -0
- package/js/src/bitmex.js +317 -317
- package/js/src/bitopro.d.ts +221 -0
- package/js/src/bitopro.js +221 -221
- package/js/src/bitrue.d.ts +315 -0
- package/js/src/bitrue.js +315 -315
- package/js/src/bitso.d.ts +220 -0
- package/js/src/bitso.js +220 -220
- package/js/src/bitstamp.d.ts +251 -0
- package/js/src/bitstamp.js +251 -251
- package/js/src/bitteam.d.ts +183 -0
- package/js/src/bitteam.js +183 -183
- package/js/src/bitvavo.d.ts +247 -0
- package/js/src/bitvavo.js +247 -251
- package/js/src/bl3p.d.ts +82 -0
- package/js/src/bl3p.js +82 -82
- package/js/src/blockchaincom.d.ts +211 -0
- package/js/src/blockchaincom.js +211 -211
- package/js/src/blofin.d.ts +332 -0
- package/js/src/blofin.js +332 -331
- package/js/src/btcalpha.d.ts +166 -0
- package/js/src/btcalpha.js +166 -166
- package/js/src/btcbox.d.ts +108 -0
- package/js/src/btcbox.js +108 -108
- package/js/src/btcmarkets.d.ts +198 -0
- package/js/src/btcmarkets.js +198 -198
- package/js/src/btcturk.d.ts +124 -0
- package/js/src/btcturk.js +124 -124
- package/js/src/bybit.d.ts +906 -1
- package/js/src/bybit.js +906 -900
- package/js/src/cex.d.ts +227 -0
- package/js/src/cex.js +227 -226
- package/js/src/coinbase.d.ts +481 -0
- package/js/src/coinbase.js +481 -481
- package/js/src/coinbaseexchange.d.ts +274 -0
- package/js/src/coinbaseexchange.js +274 -274
- package/js/src/coinbaseinternational.d.ts +304 -0
- package/js/src/coinbaseinternational.js +304 -304
- package/js/src/coincatch.d.ts +646 -0
- package/js/src/coincatch.js +650 -650
- package/js/src/coincheck.d.ts +113 -0
- package/js/src/coincheck.js +113 -113
- package/js/src/coinex.d.ts +603 -0
- package/js/src/coinex.js +611 -601
- package/js/src/coinlist.d.ts +304 -0
- package/js/src/coinlist.js +304 -303
- package/js/src/coinmate.d.ts +162 -0
- package/js/src/coinmate.js +162 -161
- package/js/src/coinmetro.d.ts +187 -0
- package/js/src/coinmetro.js +187 -187
- package/js/src/coinone.d.ts +124 -0
- package/js/src/coinone.js +124 -123
- package/js/src/coinsph.d.ts +237 -0
- package/js/src/coinsph.js +237 -237
- package/js/src/coinspot.d.ts +82 -0
- package/js/src/coinspot.js +82 -82
- package/js/src/cryptocom.d.ts +342 -0
- package/js/src/cryptocom.js +342 -341
- package/js/src/currencycom.d.ts +225 -0
- package/js/src/currencycom.js +225 -224
- package/js/src/delta.d.ts +320 -0
- package/js/src/delta.js +320 -320
- package/js/src/deribit.d.ts +411 -0
- package/js/src/deribit.js +411 -408
- package/js/src/digifinex.d.ts +430 -0
- package/js/src/digifinex.js +432 -431
- package/js/src/exmo.d.ts +328 -0
- package/js/src/exmo.js +328 -327
- package/js/src/gate.d.ts +803 -1
- package/js/src/gate.js +830 -791
- package/js/src/gemini.d.ts +199 -0
- package/js/src/gemini.js +199 -198
- package/js/src/hashkey.d.ts +516 -0
- package/js/src/hashkey.js +520 -517
- package/js/src/hitbtc.d.ts +465 -0
- package/js/src/hitbtc.js +465 -462
- package/js/src/hollaex.d.ts +253 -0
- package/js/src/hollaex.js +253 -252
- package/js/src/htx.d.ts +765 -2
- package/js/src/htx.js +791 -848
- package/js/src/huobijp.d.ts +219 -0
- package/js/src/huobijp.js +219 -218
- package/js/src/hyperliquid.d.ts +419 -0
- package/js/src/hyperliquid.js +421 -417
- package/js/src/idex.d.ts +238 -0
- package/js/src/idex.js +238 -237
- package/js/src/independentreserve.d.ts +133 -0
- package/js/src/independentreserve.js +133 -132
- package/js/src/indodax.d.ts +171 -0
- package/js/src/indodax.js +177 -171
- package/js/src/kraken.d.ts +381 -0
- package/js/src/kraken.js +381 -377
- package/js/src/krakenfutures.d.ts +282 -0
- package/js/src/krakenfutures.js +285 -279
- package/js/src/kucoin.d.ts +613 -0
- package/js/src/kucoin.js +632 -622
- package/js/src/kucoinfutures.d.ts +441 -0
- package/js/src/kucoinfutures.js +533 -457
- package/js/src/kuna.d.ts +283 -0
- package/js/src/kuna.js +283 -282
- package/js/src/latoken.d.ts +211 -0
- package/js/src/latoken.js +211 -210
- package/js/src/lbank.d.ts +268 -0
- package/js/src/lbank.js +268 -267
- package/js/src/luno.d.ts +174 -0
- package/js/src/luno.js +174 -173
- package/js/src/lykke.d.ts +172 -0
- package/js/src/lykke.js +172 -171
- package/js/src/mercado.d.ts +123 -0
- package/js/src/mercado.js +123 -122
- package/js/src/mexc.d.ts +647 -0
- package/js/src/mexc.js +650 -646
- package/js/src/ndax.d.ts +229 -0
- package/js/src/ndax.js +229 -228
- package/js/src/novadax.d.ts +230 -0
- package/js/src/novadax.js +230 -229
- package/js/src/oceanex.d.ts +187 -0
- package/js/src/oceanex.js +187 -186
- package/js/src/okcoin.d.ts +286 -0
- package/js/src/okcoin.js +286 -285
- package/js/src/okx.d.ts +907 -0
- package/js/src/okx.js +909 -904
- package/js/src/onetrading.d.ts +218 -0
- package/js/src/onetrading.js +218 -218
- package/js/src/oxfun.d.ts +336 -3
- package/js/src/oxfun.js +335 -334
- package/js/src/p2b.d.ts +154 -0
- package/js/src/p2b.js +154 -154
- package/js/src/paradex.d.ts +241 -0
- package/js/src/paradex.js +249 -244
- package/js/src/paymium.d.ts +101 -0
- package/js/src/paymium.js +101 -101
- package/js/src/phemex.d.ts +366 -0
- package/js/src/phemex.js +388 -390
- package/js/src/poloniex.d.ts +270 -0
- package/js/src/poloniex.js +270 -270
- package/js/src/poloniexfutures.d.ts +250 -0
- package/js/src/poloniexfutures.js +250 -250
- package/js/src/pro/alpaca.d.ts +64 -0
- package/js/src/pro/alpaca.js +64 -64
- package/js/src/pro/ascendex.d.ts +64 -0
- package/js/src/pro/ascendex.js +64 -64
- package/js/src/pro/binance.d.ts +546 -0
- package/js/src/pro/binance.js +546 -543
- package/js/src/pro/bingx.d.ts +116 -0
- package/js/src/pro/bingx.js +116 -116
- package/js/src/pro/bitfinex.d.ts +42 -0
- package/js/src/pro/bitfinex.js +42 -42
- package/js/src/pro/bitfinex2.d.ts +66 -0
- package/js/src/pro/bitfinex2.js +66 -66
- package/js/src/pro/bitget.d.ts +187 -0
- package/js/src/pro/bitget.js +188 -181
- package/js/src/pro/bithumb.d.ts +40 -0
- package/js/src/pro/bithumb.js +40 -40
- package/js/src/pro/bitmart.d.ts +121 -0
- package/js/src/pro/bitmart.js +121 -119
- package/js/src/pro/bitmex.d.ts +135 -0
- package/js/src/pro/bitmex.js +135 -133
- package/js/src/pro/bitopro.d.ts +49 -0
- package/js/src/pro/bitopro.js +49 -49
- package/js/src/pro/bitrue.d.ts +19 -0
- package/js/src/pro/bitrue.js +19 -19
- package/js/src/pro/bitstamp.d.ts +29 -0
- package/js/src/pro/bitstamp.js +29 -29
- package/js/src/pro/bitvavo.d.ts +254 -1
- package/js/src/pro/bitvavo.js +299 -301
- package/js/src/pro/blockchaincom.d.ts +62 -0
- package/js/src/pro/blockchaincom.js +62 -62
- package/js/src/pro/blofin.d.ts +132 -0
- package/js/src/pro/blofin.js +132 -130
- package/js/src/pro/bybit.d.ts +317 -0
- package/js/src/pro/bybit.js +317 -313
- package/js/src/pro/cex.d.ts +168 -0
- package/js/src/pro/cex.js +168 -168
- package/js/src/pro/coinbase.d.ts +93 -0
- package/js/src/pro/coinbase.js +93 -91
- package/js/src/pro/coinbaseexchange.d.ts +95 -0
- package/js/src/pro/coinbaseexchange.js +95 -95
- package/js/src/pro/coinbaseinternational.d.ts +111 -0
- package/js/src/pro/coinbaseinternational.js +111 -111
- package/js/src/pro/coincatch.d.ts +150 -0
- package/js/src/pro/coincatch.js +150 -143
- package/js/src/pro/coincheck.d.ts +21 -0
- package/js/src/pro/coincheck.js +21 -21
- package/js/src/pro/coinex.d.ts +110 -0
- package/js/src/pro/coinex.js +110 -110
- package/js/src/pro/coinone.d.ts +30 -0
- package/js/src/pro/coinone.js +30 -30
- package/js/src/pro/cryptocom.d.ts +227 -0
- package/js/src/pro/cryptocom.js +227 -227
- package/js/src/pro/currencycom.d.ts +45 -0
- package/js/src/pro/currencycom.js +45 -45
- package/js/src/pro/deribit.d.ts +127 -0
- package/js/src/pro/deribit.js +127 -127
- package/js/src/pro/exmo.d.ts +66 -0
- package/js/src/pro/exmo.js +66 -66
- package/js/src/pro/gate.d.ts +287 -0
- package/js/src/pro/gate.js +287 -283
- package/js/src/pro/gemini.d.ts +74 -0
- package/js/src/pro/gemini.js +74 -74
- package/js/src/pro/hashkey.d.ts +87 -0
- package/js/src/pro/hashkey.js +87 -85
- package/js/src/pro/hitbtc.d.ts +190 -0
- package/js/src/pro/hitbtc.js +190 -190
- package/js/src/pro/hollaex.d.ts +51 -0
- package/js/src/pro/hollaex.js +51 -51
- package/js/src/pro/htx.d.ts +96 -0
- package/js/src/pro/htx.js +96 -94
- package/js/src/pro/huobijp.d.ts +38 -0
- package/js/src/pro/huobijp.js +38 -38
- package/js/src/pro/hyperliquid.d.ts +151 -0
- package/js/src/pro/hyperliquid.js +151 -150
- package/js/src/pro/idex.d.ts +48 -0
- package/js/src/pro/idex.js +48 -48
- package/js/src/pro/independentreserve.d.ts +19 -0
- package/js/src/pro/independentreserve.js +19 -19
- package/js/src/pro/kraken.d.ts +167 -0
- package/js/src/pro/kraken.js +167 -167
- package/js/src/pro/krakenfutures.d.ts +137 -0
- package/js/src/pro/krakenfutures.js +137 -138
- package/js/src/pro/kucoin.d.ts +167 -0
- package/js/src/pro/kucoin.js +167 -168
- package/js/src/pro/kucoinfutures.d.ts +147 -0
- package/js/src/pro/kucoinfutures.js +147 -147
- package/js/src/pro/lbank.d.ts +95 -0
- package/js/src/pro/lbank.js +95 -95
- package/js/src/pro/luno.d.ts +21 -0
- package/js/src/pro/luno.js +21 -21
- package/js/src/pro/mexc.d.ts +101 -0
- package/js/src/pro/mexc.js +102 -103
- package/js/src/pro/ndax.d.ts +42 -0
- package/js/src/pro/ndax.js +42 -42
- package/js/src/pro/okcoin.d.ts +61 -0
- package/js/src/pro/okcoin.js +61 -61
- package/js/src/pro/okx.d.ts +332 -0
- package/js/src/pro/okx.js +332 -330
- package/js/src/pro/onetrading.d.ts +71 -0
- package/js/src/pro/onetrading.js +71 -71
- package/js/src/pro/oxfun.d.ts +193 -0
- package/js/src/pro/oxfun.js +193 -191
- package/js/src/pro/p2b.d.ts +77 -0
- package/js/src/pro/p2b.js +77 -77
- package/js/src/pro/paradex.d.ts +39 -0
- package/js/src/pro/paradex.js +39 -39
- package/js/src/pro/phemex.d.ts +94 -0
- package/js/src/pro/phemex.js +94 -94
- package/js/src/pro/poloniex.d.ts +171 -0
- package/js/src/pro/poloniex.js +171 -171
- package/js/src/pro/poloniexfutures.d.ts +62 -0
- package/js/src/pro/poloniexfutures.js +62 -62
- package/js/src/pro/probit.d.ts +63 -0
- package/js/src/pro/probit.js +63 -63
- package/js/src/pro/upbit.d.ts +80 -0
- package/js/src/pro/upbit.js +80 -80
- package/js/src/pro/vertex.d.ts +65 -0
- package/js/src/pro/vertex.js +65 -63
- package/js/src/pro/wazirx.d.ts +70 -0
- package/js/src/pro/wazirx.js +70 -70
- package/js/src/pro/whitebit.d.ts +83 -0
- package/js/src/pro/whitebit.js +83 -83
- package/js/src/pro/woo.d.ts +106 -0
- package/js/src/pro/woo.js +106 -104
- package/js/src/pro/woofipro.d.ts +105 -0
- package/js/src/pro/woofipro.js +105 -103
- package/js/src/pro/xt.d.ts +119 -0
- package/js/src/pro/xt.js +119 -119
- package/js/src/probit.d.ts +229 -0
- package/js/src/probit.js +229 -229
- package/js/src/timex.d.ts +198 -0
- package/js/src/timex.js +198 -197
- package/js/src/tokocrypto.d.ts +214 -0
- package/js/src/tokocrypto.js +214 -213
- package/js/src/tradeogre.d.ts +92 -0
- package/js/src/tradeogre.js +92 -91
- package/js/src/upbit.d.ts +243 -0
- package/js/src/upbit.js +243 -242
- package/js/src/vertex.d.ts +258 -0
- package/js/src/vertex.js +258 -258
- package/js/src/wavesexchange.d.ts +176 -0
- package/js/src/wavesexchange.js +176 -172
- package/js/src/wazirx.d.ts +168 -0
- package/js/src/wazirx.js +168 -168
- package/js/src/whitebit.d.ts +361 -0
- package/js/src/whitebit.js +361 -361
- package/js/src/woo.d.ts +571 -0
- package/js/src/woo.js +571 -572
- package/js/src/woofipro.d.ts +392 -0
- package/js/src/woofipro.js +392 -391
- package/js/src/xt.d.ts +439 -4
- package/js/src/xt.js +436 -435
- package/js/src/yobit.d.ts +159 -0
- package/js/src/yobit.js +159 -158
- package/js/src/zaif.d.ts +103 -0
- package/js/src/zaif.js +103 -103
- package/js/src/zonda.d.ts +168 -0
- package/js/src/zonda.js +168 -168
- package/package.json +1 -1
package/dist/cjs/src/hitbtc.js
CHANGED
|
@@ -652,15 +652,15 @@ class hitbtc extends hitbtc$1 {
|
|
|
652
652
|
nonce() {
|
|
653
653
|
return this.milliseconds();
|
|
654
654
|
}
|
|
655
|
+
/**
|
|
656
|
+
* @method
|
|
657
|
+
* @name hitbtc#fetchMarkets
|
|
658
|
+
* @description retrieves data on all markets for hitbtc
|
|
659
|
+
* @see https://api.hitbtc.com/#symbols
|
|
660
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
661
|
+
* @returns {object[]} an array of objects representing market data
|
|
662
|
+
*/
|
|
655
663
|
async fetchMarkets(params = {}) {
|
|
656
|
-
/**
|
|
657
|
-
* @method
|
|
658
|
-
* @name hitbtc#fetchMarkets
|
|
659
|
-
* @description retrieves data on all markets for hitbtc
|
|
660
|
-
* @see https://api.hitbtc.com/#symbols
|
|
661
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
662
|
-
* @returns {object[]} an array of objects representing market data
|
|
663
|
-
*/
|
|
664
664
|
const response = await this.publicGetPublicSymbol(params);
|
|
665
665
|
//
|
|
666
666
|
// {
|
|
@@ -796,15 +796,15 @@ class hitbtc extends hitbtc$1 {
|
|
|
796
796
|
}
|
|
797
797
|
return result;
|
|
798
798
|
}
|
|
799
|
+
/**
|
|
800
|
+
* @method
|
|
801
|
+
* @name hitbtc#fetchCurrencies
|
|
802
|
+
* @description fetches all available currencies on an exchange
|
|
803
|
+
* @see https://api.hitbtc.com/#currencies
|
|
804
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
805
|
+
* @returns {object} an associative dictionary of currencies
|
|
806
|
+
*/
|
|
799
807
|
async fetchCurrencies(params = {}) {
|
|
800
|
-
/**
|
|
801
|
-
* @method
|
|
802
|
-
* @name hitbtc#fetchCurrencies
|
|
803
|
-
* @description fetches all available currencies on an exchange
|
|
804
|
-
* @see https://api.hitbtc.com/#currencies
|
|
805
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
806
|
-
* @returns {object} an associative dictionary of currencies
|
|
807
|
-
*/
|
|
808
808
|
const response = await this.publicGetPublicCurrency(params);
|
|
809
809
|
//
|
|
810
810
|
// {
|
|
@@ -910,16 +910,16 @@ class hitbtc extends hitbtc$1 {
|
|
|
910
910
|
}
|
|
911
911
|
return result;
|
|
912
912
|
}
|
|
913
|
+
/**
|
|
914
|
+
* @method
|
|
915
|
+
* @name hitbtc#createDepositAddress
|
|
916
|
+
* @description create a currency deposit address
|
|
917
|
+
* @see https://api.hitbtc.com/#generate-deposit-crypto-address
|
|
918
|
+
* @param {string} code unified currency code of the currency for the deposit address
|
|
919
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
920
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
921
|
+
*/
|
|
913
922
|
async createDepositAddress(code, params = {}) {
|
|
914
|
-
/**
|
|
915
|
-
* @method
|
|
916
|
-
* @name hitbtc#createDepositAddress
|
|
917
|
-
* @description create a currency deposit address
|
|
918
|
-
* @see https://api.hitbtc.com/#generate-deposit-crypto-address
|
|
919
|
-
* @param {string} code unified currency code of the currency for the deposit address
|
|
920
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
921
|
-
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
922
|
-
*/
|
|
923
923
|
await this.loadMarkets();
|
|
924
924
|
const currency = this.currency(code);
|
|
925
925
|
const request = {
|
|
@@ -947,16 +947,16 @@ class hitbtc extends hitbtc$1 {
|
|
|
947
947
|
'info': response,
|
|
948
948
|
};
|
|
949
949
|
}
|
|
950
|
+
/**
|
|
951
|
+
* @method
|
|
952
|
+
* @name hitbtc#fetchDepositAddress
|
|
953
|
+
* @description fetch the deposit address for a currency associated with this account
|
|
954
|
+
* @see https://api.hitbtc.com/#get-deposit-crypto-address
|
|
955
|
+
* @param {string} code unified currency code
|
|
956
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
957
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
958
|
+
*/
|
|
950
959
|
async fetchDepositAddress(code, params = {}) {
|
|
951
|
-
/**
|
|
952
|
-
* @method
|
|
953
|
-
* @name hitbtc#fetchDepositAddress
|
|
954
|
-
* @description fetch the deposit address for a currency associated with this account
|
|
955
|
-
* @see https://api.hitbtc.com/#get-deposit-crypto-address
|
|
956
|
-
* @param {string} code unified currency code
|
|
957
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
958
|
-
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
959
|
-
*/
|
|
960
960
|
await this.loadMarkets();
|
|
961
961
|
const currency = this.currency(code);
|
|
962
962
|
const request = {
|
|
@@ -1001,17 +1001,17 @@ class hitbtc extends hitbtc$1 {
|
|
|
1001
1001
|
}
|
|
1002
1002
|
return this.safeBalance(result);
|
|
1003
1003
|
}
|
|
1004
|
+
/**
|
|
1005
|
+
* @method
|
|
1006
|
+
* @name hitbtc#fetchBalance
|
|
1007
|
+
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
1008
|
+
* @see https://api.hitbtc.com/#wallet-balance
|
|
1009
|
+
* @see https://api.hitbtc.com/#get-spot-trading-balance
|
|
1010
|
+
* @see https://api.hitbtc.com/#get-trading-balance
|
|
1011
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1012
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
1013
|
+
*/
|
|
1004
1014
|
async fetchBalance(params = {}) {
|
|
1005
|
-
/**
|
|
1006
|
-
* @method
|
|
1007
|
-
* @name hitbtc#fetchBalance
|
|
1008
|
-
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
1009
|
-
* @see https://api.hitbtc.com/#wallet-balance
|
|
1010
|
-
* @see https://api.hitbtc.com/#get-spot-trading-balance
|
|
1011
|
-
* @see https://api.hitbtc.com/#get-trading-balance
|
|
1012
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1013
|
-
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
1014
|
-
*/
|
|
1015
1015
|
const type = this.safeStringLower(params, 'type', 'spot');
|
|
1016
1016
|
params = this.omit(params, ['type']);
|
|
1017
1017
|
const accountsByType = this.safeValue(this.options, 'accountsByType', {});
|
|
@@ -1043,16 +1043,16 @@ class hitbtc extends hitbtc$1 {
|
|
|
1043
1043
|
//
|
|
1044
1044
|
return this.parseBalance(response);
|
|
1045
1045
|
}
|
|
1046
|
+
/**
|
|
1047
|
+
* @method
|
|
1048
|
+
* @name hitbtc#fetchTicker
|
|
1049
|
+
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1050
|
+
* @see https://api.hitbtc.com/#tickers
|
|
1051
|
+
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1052
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1053
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1054
|
+
*/
|
|
1046
1055
|
async fetchTicker(symbol, params = {}) {
|
|
1047
|
-
/**
|
|
1048
|
-
* @method
|
|
1049
|
-
* @name hitbtc#fetchTicker
|
|
1050
|
-
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1051
|
-
* @see https://api.hitbtc.com/#tickers
|
|
1052
|
-
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1053
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1054
|
-
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1055
|
-
*/
|
|
1056
1056
|
await this.loadMarkets();
|
|
1057
1057
|
const market = this.market(symbol);
|
|
1058
1058
|
const request = {
|
|
@@ -1074,16 +1074,16 @@ class hitbtc extends hitbtc$1 {
|
|
|
1074
1074
|
//
|
|
1075
1075
|
return this.parseTicker(response, market);
|
|
1076
1076
|
}
|
|
1077
|
+
/**
|
|
1078
|
+
* @method
|
|
1079
|
+
* @name hitbtc#fetchTickers
|
|
1080
|
+
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
1081
|
+
* @see https://api.hitbtc.com/#tickers
|
|
1082
|
+
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1083
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1084
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1085
|
+
*/
|
|
1077
1086
|
async fetchTickers(symbols = undefined, params = {}) {
|
|
1078
|
-
/**
|
|
1079
|
-
* @method
|
|
1080
|
-
* @name hitbtc#fetchTickers
|
|
1081
|
-
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
1082
|
-
* @see https://api.hitbtc.com/#tickers
|
|
1083
|
-
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1084
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1085
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1086
|
-
*/
|
|
1087
1087
|
await this.loadMarkets();
|
|
1088
1088
|
symbols = this.marketSymbols(symbols);
|
|
1089
1089
|
const request = {};
|
|
@@ -1162,18 +1162,18 @@ class hitbtc extends hitbtc$1 {
|
|
|
1162
1162
|
'info': ticker,
|
|
1163
1163
|
}, market);
|
|
1164
1164
|
}
|
|
1165
|
+
/**
|
|
1166
|
+
* @method
|
|
1167
|
+
* @name hitbtc#fetchTrades
|
|
1168
|
+
* @description get the list of most recent trades for a particular symbol
|
|
1169
|
+
* @see https://api.hitbtc.com/#trades
|
|
1170
|
+
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
1171
|
+
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1172
|
+
* @param {int} [limit] the maximum amount of trades to fetch
|
|
1173
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1174
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
1175
|
+
*/
|
|
1165
1176
|
async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
1166
|
-
/**
|
|
1167
|
-
* @method
|
|
1168
|
-
* @name hitbtc#fetchTrades
|
|
1169
|
-
* @description get the list of most recent trades for a particular symbol
|
|
1170
|
-
* @see https://api.hitbtc.com/#trades
|
|
1171
|
-
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
1172
|
-
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1173
|
-
* @param {int} [limit] the maximum amount of trades to fetch
|
|
1174
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1175
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
1176
|
-
*/
|
|
1177
1177
|
await this.loadMarkets();
|
|
1178
1178
|
let market = undefined;
|
|
1179
1179
|
const request = {};
|
|
@@ -1206,22 +1206,22 @@ class hitbtc extends hitbtc$1 {
|
|
|
1206
1206
|
}
|
|
1207
1207
|
return trades;
|
|
1208
1208
|
}
|
|
1209
|
+
/**
|
|
1210
|
+
* @method
|
|
1211
|
+
* @name hitbtc#fetchMyTrades
|
|
1212
|
+
* @description fetch all trades made by the user
|
|
1213
|
+
* @see https://api.hitbtc.com/#spot-trades-history
|
|
1214
|
+
* @see https://api.hitbtc.com/#futures-trades-history
|
|
1215
|
+
* @see https://api.hitbtc.com/#margin-trades-history
|
|
1216
|
+
* @param {string} symbol unified market symbol
|
|
1217
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1218
|
+
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
1219
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1220
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
1221
|
+
* @param {bool} [params.margin] true for fetching margin trades
|
|
1222
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1223
|
+
*/
|
|
1209
1224
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1210
|
-
/**
|
|
1211
|
-
* @method
|
|
1212
|
-
* @name hitbtc#fetchMyTrades
|
|
1213
|
-
* @description fetch all trades made by the user
|
|
1214
|
-
* @see https://api.hitbtc.com/#spot-trades-history
|
|
1215
|
-
* @see https://api.hitbtc.com/#futures-trades-history
|
|
1216
|
-
* @see https://api.hitbtc.com/#margin-trades-history
|
|
1217
|
-
* @param {string} symbol unified market symbol
|
|
1218
|
-
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1219
|
-
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
1220
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1221
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
1222
|
-
* @param {bool} [params.margin] true for fetching margin trades
|
|
1223
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1224
|
-
*/
|
|
1225
1225
|
await this.loadMarkets();
|
|
1226
1226
|
let market = undefined;
|
|
1227
1227
|
const request = {};
|
|
@@ -1509,59 +1509,59 @@ class hitbtc extends hitbtc$1 {
|
|
|
1509
1509
|
'fee': fee,
|
|
1510
1510
|
};
|
|
1511
1511
|
}
|
|
1512
|
+
/**
|
|
1513
|
+
* @method
|
|
1514
|
+
* @name hitbtc#fetchDepositsWithdrawals
|
|
1515
|
+
* @description fetch history of deposits and withdrawals
|
|
1516
|
+
* @see https://api.hitbtc.com/#get-transactions-history
|
|
1517
|
+
* @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
|
|
1518
|
+
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
1519
|
+
* @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
|
|
1520
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1521
|
+
* @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1522
|
+
*/
|
|
1512
1523
|
async fetchDepositsWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1513
|
-
/**
|
|
1514
|
-
* @method
|
|
1515
|
-
* @name hitbtc#fetchDepositsWithdrawals
|
|
1516
|
-
* @description fetch history of deposits and withdrawals
|
|
1517
|
-
* @see https://api.hitbtc.com/#get-transactions-history
|
|
1518
|
-
* @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
|
|
1519
|
-
* @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
|
|
1520
|
-
* @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
|
|
1521
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1522
|
-
* @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1523
|
-
*/
|
|
1524
1524
|
return await this.fetchTransactionsHelper('DEPOSIT,WITHDRAW', code, since, limit, params);
|
|
1525
1525
|
}
|
|
1526
|
+
/**
|
|
1527
|
+
* @method
|
|
1528
|
+
* @name hitbtc#fetchDeposits
|
|
1529
|
+
* @description fetch all deposits made to an account
|
|
1530
|
+
* @see https://api.hitbtc.com/#get-transactions-history
|
|
1531
|
+
* @param {string} code unified currency code
|
|
1532
|
+
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
1533
|
+
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
1534
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1535
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1536
|
+
*/
|
|
1526
1537
|
async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1527
|
-
/**
|
|
1528
|
-
* @method
|
|
1529
|
-
* @name hitbtc#fetchDeposits
|
|
1530
|
-
* @description fetch all deposits made to an account
|
|
1531
|
-
* @see https://api.hitbtc.com/#get-transactions-history
|
|
1532
|
-
* @param {string} code unified currency code
|
|
1533
|
-
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
1534
|
-
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
1535
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1536
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1537
|
-
*/
|
|
1538
1538
|
return await this.fetchTransactionsHelper('DEPOSIT', code, since, limit, params);
|
|
1539
1539
|
}
|
|
1540
|
+
/**
|
|
1541
|
+
* @method
|
|
1542
|
+
* @name hitbtc#fetchWithdrawals
|
|
1543
|
+
* @description fetch all withdrawals made from an account
|
|
1544
|
+
* @see https://api.hitbtc.com/#get-transactions-history
|
|
1545
|
+
* @param {string} code unified currency code
|
|
1546
|
+
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
1547
|
+
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
1548
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1549
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1550
|
+
*/
|
|
1540
1551
|
async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1541
|
-
/**
|
|
1542
|
-
* @method
|
|
1543
|
-
* @name hitbtc#fetchWithdrawals
|
|
1544
|
-
* @description fetch all withdrawals made from an account
|
|
1545
|
-
* @see https://api.hitbtc.com/#get-transactions-history
|
|
1546
|
-
* @param {string} code unified currency code
|
|
1547
|
-
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
1548
|
-
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
1549
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1550
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1551
|
-
*/
|
|
1552
1552
|
return await this.fetchTransactionsHelper('WITHDRAW', code, since, limit, params);
|
|
1553
1553
|
}
|
|
1554
|
+
/**
|
|
1555
|
+
* @method
|
|
1556
|
+
* @name hitbtc#fetchOrderBooks
|
|
1557
|
+
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data for multiple markets
|
|
1558
|
+
* @see https://api.hitbtc.com/#order-books
|
|
1559
|
+
* @param {string[]} [symbols] list of unified market symbols, all symbols fetched if undefined, default is undefined
|
|
1560
|
+
* @param {int} [limit] max number of entries per orderbook to return, default is undefined
|
|
1561
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1562
|
+
* @returns {object} a dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbol
|
|
1563
|
+
*/
|
|
1554
1564
|
async fetchOrderBooks(symbols = undefined, limit = undefined, params = {}) {
|
|
1555
|
-
/**
|
|
1556
|
-
* @method
|
|
1557
|
-
* @name hitbtc#fetchOrderBooks
|
|
1558
|
-
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data for multiple markets
|
|
1559
|
-
* @see https://api.hitbtc.com/#order-books
|
|
1560
|
-
* @param {string[]|undefined} symbols list of unified market symbols, all symbols fetched if undefined, default is undefined
|
|
1561
|
-
* @param {int} [limit] max number of entries per orderbook to return, default is undefined
|
|
1562
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1563
|
-
* @returns {object} a dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbol
|
|
1564
|
-
*/
|
|
1565
1565
|
await this.loadMarkets();
|
|
1566
1566
|
const request = {};
|
|
1567
1567
|
if (symbols !== undefined) {
|
|
@@ -1583,17 +1583,17 @@ class hitbtc extends hitbtc$1 {
|
|
|
1583
1583
|
}
|
|
1584
1584
|
return result;
|
|
1585
1585
|
}
|
|
1586
|
+
/**
|
|
1587
|
+
* @method
|
|
1588
|
+
* @name hitbtc#fetchOrderBook
|
|
1589
|
+
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
1590
|
+
* @see https://api.hitbtc.com/#order-books
|
|
1591
|
+
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1592
|
+
* @param {int} [limit] the maximum amount of order book entries to return
|
|
1593
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1594
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
1595
|
+
*/
|
|
1586
1596
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
1587
|
-
/**
|
|
1588
|
-
* @method
|
|
1589
|
-
* @name hitbtc#fetchOrderBook
|
|
1590
|
-
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
1591
|
-
* @see https://api.hitbtc.com/#order-books
|
|
1592
|
-
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1593
|
-
* @param {int} [limit] the maximum amount of order book entries to return
|
|
1594
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1595
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
1596
|
-
*/
|
|
1597
1597
|
await this.loadMarkets();
|
|
1598
1598
|
const market = this.market(symbol);
|
|
1599
1599
|
const request = {
|
|
@@ -1627,17 +1627,17 @@ class hitbtc extends hitbtc$1 {
|
|
|
1627
1627
|
'tierBased': undefined,
|
|
1628
1628
|
};
|
|
1629
1629
|
}
|
|
1630
|
+
/**
|
|
1631
|
+
* @method
|
|
1632
|
+
* @name hitbtc#fetchTradingFee
|
|
1633
|
+
* @description fetch the trading fees for a market
|
|
1634
|
+
* @see https://api.hitbtc.com/#get-trading-commission
|
|
1635
|
+
* @see https://api.hitbtc.com/#get-trading-commission-2
|
|
1636
|
+
* @param {string} symbol unified market symbol
|
|
1637
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1638
|
+
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
1639
|
+
*/
|
|
1630
1640
|
async fetchTradingFee(symbol, params = {}) {
|
|
1631
|
-
/**
|
|
1632
|
-
* @method
|
|
1633
|
-
* @name hitbtc#fetchTradingFee
|
|
1634
|
-
* @description fetch the trading fees for a market
|
|
1635
|
-
* @see https://api.hitbtc.com/#get-trading-commission
|
|
1636
|
-
* @see https://api.hitbtc.com/#get-trading-commission-2
|
|
1637
|
-
* @param {string} symbol unified market symbol
|
|
1638
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1639
|
-
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
1640
|
-
*/
|
|
1641
1641
|
await this.loadMarkets();
|
|
1642
1642
|
const market = this.market(symbol);
|
|
1643
1643
|
const request = {
|
|
@@ -1661,16 +1661,16 @@ class hitbtc extends hitbtc$1 {
|
|
|
1661
1661
|
//
|
|
1662
1662
|
return this.parseTradingFee(response, market);
|
|
1663
1663
|
}
|
|
1664
|
+
/**
|
|
1665
|
+
* @method
|
|
1666
|
+
* @name hitbtc#fetchTradingFees
|
|
1667
|
+
* @description fetch the trading fees for multiple markets
|
|
1668
|
+
* @see https://api.hitbtc.com/#get-all-trading-commissions
|
|
1669
|
+
* @see https://api.hitbtc.com/#get-all-trading-commissions-2
|
|
1670
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1671
|
+
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
1672
|
+
*/
|
|
1664
1673
|
async fetchTradingFees(params = {}) {
|
|
1665
|
-
/**
|
|
1666
|
-
* @method
|
|
1667
|
-
* @name hitbtc#fetchTradingFees
|
|
1668
|
-
* @description fetch the trading fees for multiple markets
|
|
1669
|
-
* @see https://api.hitbtc.com/#get-all-trading-commissions
|
|
1670
|
-
* @see https://api.hitbtc.com/#get-all-trading-commissions-2
|
|
1671
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1672
|
-
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
1673
|
-
*/
|
|
1674
1674
|
await this.loadMarkets();
|
|
1675
1675
|
const [marketType, query] = this.handleMarketTypeAndParams('fetchTradingFees', undefined, params);
|
|
1676
1676
|
let response = undefined;
|
|
@@ -1700,24 +1700,24 @@ class hitbtc extends hitbtc$1 {
|
|
|
1700
1700
|
}
|
|
1701
1701
|
return result;
|
|
1702
1702
|
}
|
|
1703
|
+
/**
|
|
1704
|
+
* @method
|
|
1705
|
+
* @name hitbtc#fetchOHLCV
|
|
1706
|
+
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1707
|
+
* @see https://api.hitbtc.com/#candles
|
|
1708
|
+
* @see https://api.hitbtc.com/#futures-index-price-candles
|
|
1709
|
+
* @see https://api.hitbtc.com/#futures-mark-price-candles
|
|
1710
|
+
* @see https://api.hitbtc.com/#futures-premium-index-candles
|
|
1711
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1712
|
+
* @param {string} timeframe the length of time each candle represents
|
|
1713
|
+
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
1714
|
+
* @param {int} [limit] the maximum amount of candles to fetch
|
|
1715
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1716
|
+
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
1717
|
+
* @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)
|
|
1718
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
1719
|
+
*/
|
|
1703
1720
|
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
1704
|
-
/**
|
|
1705
|
-
* @method
|
|
1706
|
-
* @name hitbtc#fetchOHLCV
|
|
1707
|
-
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1708
|
-
* @see https://api.hitbtc.com/#candles
|
|
1709
|
-
* @see https://api.hitbtc.com/#futures-index-price-candles
|
|
1710
|
-
* @see https://api.hitbtc.com/#futures-mark-price-candles
|
|
1711
|
-
* @see https://api.hitbtc.com/#futures-premium-index-candles
|
|
1712
|
-
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1713
|
-
* @param {string} timeframe the length of time each candle represents
|
|
1714
|
-
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
1715
|
-
* @param {int} [limit] the maximum amount of candles to fetch
|
|
1716
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1717
|
-
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
1718
|
-
* @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)
|
|
1719
|
-
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
1720
|
-
*/
|
|
1721
1721
|
await this.loadMarkets();
|
|
1722
1722
|
let paginate = false;
|
|
1723
1723
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchOHLCV', 'paginate');
|
|
@@ -1813,22 +1813,22 @@ class hitbtc extends hitbtc$1 {
|
|
|
1813
1813
|
this.safeNumber(ohlcv, 'volume'),
|
|
1814
1814
|
];
|
|
1815
1815
|
}
|
|
1816
|
+
/**
|
|
1817
|
+
* @method
|
|
1818
|
+
* @name hitbtc#fetchClosedOrders
|
|
1819
|
+
* @description fetches information on multiple closed orders made by the user
|
|
1820
|
+
* @see https://api.hitbtc.com/#spot-orders-history
|
|
1821
|
+
* @see https://api.hitbtc.com/#futures-orders-history
|
|
1822
|
+
* @see https://api.hitbtc.com/#margin-orders-history
|
|
1823
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
1824
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1825
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
1826
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1827
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
1828
|
+
* @param {bool} [params.margin] true for fetching margin orders
|
|
1829
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1830
|
+
*/
|
|
1816
1831
|
async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1817
|
-
/**
|
|
1818
|
-
* @method
|
|
1819
|
-
* @name hitbtc#fetchClosedOrders
|
|
1820
|
-
* @description fetches information on multiple closed orders made by the user
|
|
1821
|
-
* @see https://api.hitbtc.com/#spot-orders-history
|
|
1822
|
-
* @see https://api.hitbtc.com/#futures-orders-history
|
|
1823
|
-
* @see https://api.hitbtc.com/#margin-orders-history
|
|
1824
|
-
* @param {string} symbol unified market symbol of the market orders were made in
|
|
1825
|
-
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1826
|
-
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
1827
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1828
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
1829
|
-
* @param {bool} [params.margin] true for fetching margin orders
|
|
1830
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1831
|
-
*/
|
|
1832
1832
|
await this.loadMarkets();
|
|
1833
1833
|
let market = undefined;
|
|
1834
1834
|
const request = {};
|
|
@@ -1868,20 +1868,21 @@ class hitbtc extends hitbtc$1 {
|
|
|
1868
1868
|
const parsed = this.parseOrders(response, market, since, limit);
|
|
1869
1869
|
return this.filterByArray(parsed, 'status', ['closed', 'canceled'], false);
|
|
1870
1870
|
}
|
|
1871
|
+
/**
|
|
1872
|
+
* @method
|
|
1873
|
+
* @name hitbtc#fetchOrder
|
|
1874
|
+
* @description fetches information on an order made by the user
|
|
1875
|
+
* @see https://api.hitbtc.com/#spot-orders-history
|
|
1876
|
+
* @see https://api.hitbtc.com/#futures-orders-history
|
|
1877
|
+
* @see https://api.hitbtc.com/#margin-orders-history
|
|
1878
|
+
* @param {string} id order id
|
|
1879
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
1880
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1881
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
1882
|
+
* @param {bool} [params.margin] true for fetching a margin order
|
|
1883
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1884
|
+
*/
|
|
1871
1885
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
1872
|
-
/**
|
|
1873
|
-
* @method
|
|
1874
|
-
* @name hitbtc#fetchOrder
|
|
1875
|
-
* @description fetches information on an order made by the user
|
|
1876
|
-
* @see https://api.hitbtc.com/#spot-orders-history
|
|
1877
|
-
* @see https://api.hitbtc.com/#futures-orders-history
|
|
1878
|
-
* @see https://api.hitbtc.com/#margin-orders-history
|
|
1879
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
1880
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1881
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
1882
|
-
* @param {bool} [params.margin] true for fetching a margin order
|
|
1883
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1884
|
-
*/
|
|
1885
1886
|
await this.loadMarkets();
|
|
1886
1887
|
let market = undefined;
|
|
1887
1888
|
if (symbol !== undefined) {
|
|
@@ -1935,23 +1936,23 @@ class hitbtc extends hitbtc$1 {
|
|
|
1935
1936
|
const order = this.safeDict(response, 0);
|
|
1936
1937
|
return this.parseOrder(order, market);
|
|
1937
1938
|
}
|
|
1939
|
+
/**
|
|
1940
|
+
* @method
|
|
1941
|
+
* @name hitbtc#fetchOrderTrades
|
|
1942
|
+
* @description fetch all the trades made from a single order
|
|
1943
|
+
* @see https://api.hitbtc.com/#spot-trades-history
|
|
1944
|
+
* @see https://api.hitbtc.com/#futures-trades-history
|
|
1945
|
+
* @see https://api.hitbtc.com/#margin-trades-history
|
|
1946
|
+
* @param {string} id order id
|
|
1947
|
+
* @param {string} symbol unified market symbol
|
|
1948
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1949
|
+
* @param {int} [limit] the maximum number of trades to retrieve
|
|
1950
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1951
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
1952
|
+
* @param {bool} [params.margin] true for fetching margin trades
|
|
1953
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1954
|
+
*/
|
|
1938
1955
|
async fetchOrderTrades(id, symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1939
|
-
/**
|
|
1940
|
-
* @method
|
|
1941
|
-
* @name hitbtc#fetchOrderTrades
|
|
1942
|
-
* @description fetch all the trades made from a single order
|
|
1943
|
-
* @see https://api.hitbtc.com/#spot-trades-history
|
|
1944
|
-
* @see https://api.hitbtc.com/#futures-trades-history
|
|
1945
|
-
* @see https://api.hitbtc.com/#margin-trades-history
|
|
1946
|
-
* @param {string} id order id
|
|
1947
|
-
* @param {string} symbol unified market symbol
|
|
1948
|
-
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1949
|
-
* @param {int} [limit] the maximum number of trades to retrieve
|
|
1950
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1951
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
1952
|
-
* @param {bool} [params.margin] true for fetching margin trades
|
|
1953
|
-
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
1954
|
-
*/
|
|
1955
1956
|
await this.loadMarkets();
|
|
1956
1957
|
let market = undefined;
|
|
1957
1958
|
if (symbol !== undefined) {
|
|
@@ -2023,22 +2024,22 @@ class hitbtc extends hitbtc$1 {
|
|
|
2023
2024
|
//
|
|
2024
2025
|
return this.parseTrades(response, market, since, limit);
|
|
2025
2026
|
}
|
|
2027
|
+
/**
|
|
2028
|
+
* @method
|
|
2029
|
+
* @name hitbtc#fetchOpenOrders
|
|
2030
|
+
* @description fetch all unfilled currently open orders
|
|
2031
|
+
* @see https://api.hitbtc.com/#get-all-active-spot-orders
|
|
2032
|
+
* @see https://api.hitbtc.com/#get-active-futures-orders
|
|
2033
|
+
* @see https://api.hitbtc.com/#get-active-margin-orders
|
|
2034
|
+
* @param {string} symbol unified market symbol
|
|
2035
|
+
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
2036
|
+
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
2037
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2038
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
2039
|
+
* @param {bool} [params.margin] true for fetching open margin orders
|
|
2040
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2041
|
+
*/
|
|
2026
2042
|
async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2027
|
-
/**
|
|
2028
|
-
* @method
|
|
2029
|
-
* @name hitbtc#fetchOpenOrders
|
|
2030
|
-
* @description fetch all unfilled currently open orders
|
|
2031
|
-
* @see https://api.hitbtc.com/#get-all-active-spot-orders
|
|
2032
|
-
* @see https://api.hitbtc.com/#get-active-futures-orders
|
|
2033
|
-
* @see https://api.hitbtc.com/#get-active-margin-orders
|
|
2034
|
-
* @param {string} symbol unified market symbol
|
|
2035
|
-
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
2036
|
-
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
2037
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2038
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
2039
|
-
* @param {bool} [params.margin] true for fetching open margin orders
|
|
2040
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2041
|
-
*/
|
|
2042
2043
|
await this.loadMarkets();
|
|
2043
2044
|
let market = undefined;
|
|
2044
2045
|
const request = {};
|
|
@@ -2090,21 +2091,21 @@ class hitbtc extends hitbtc$1 {
|
|
|
2090
2091
|
//
|
|
2091
2092
|
return this.parseOrders(response, market, since, limit);
|
|
2092
2093
|
}
|
|
2094
|
+
/**
|
|
2095
|
+
* @method
|
|
2096
|
+
* @name hitbtc#fetchOpenOrder
|
|
2097
|
+
* @description fetch an open order by it's id
|
|
2098
|
+
* @see https://api.hitbtc.com/#get-active-spot-order
|
|
2099
|
+
* @see https://api.hitbtc.com/#get-active-futures-order
|
|
2100
|
+
* @see https://api.hitbtc.com/#get-active-margin-order
|
|
2101
|
+
* @param {string} id order id
|
|
2102
|
+
* @param {string} symbol unified market symbol, default is undefined
|
|
2103
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2104
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
2105
|
+
* @param {bool} [params.margin] true for fetching an open margin order
|
|
2106
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2107
|
+
*/
|
|
2093
2108
|
async fetchOpenOrder(id, symbol = undefined, params = {}) {
|
|
2094
|
-
/**
|
|
2095
|
-
* @method
|
|
2096
|
-
* @name hitbtc#fetchOpenOrder
|
|
2097
|
-
* @description fetch an open order by it's id
|
|
2098
|
-
* @see https://api.hitbtc.com/#get-active-spot-order
|
|
2099
|
-
* @see https://api.hitbtc.com/#get-active-futures-order
|
|
2100
|
-
* @see https://api.hitbtc.com/#get-active-margin-order
|
|
2101
|
-
* @param {string} id order id
|
|
2102
|
-
* @param {string} symbol unified market symbol, default is undefined
|
|
2103
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2104
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
2105
|
-
* @param {bool} [params.margin] true for fetching an open margin order
|
|
2106
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2107
|
-
*/
|
|
2108
2109
|
await this.loadMarkets();
|
|
2109
2110
|
let market = undefined;
|
|
2110
2111
|
if (symbol !== undefined) {
|
|
@@ -2138,20 +2139,20 @@ class hitbtc extends hitbtc$1 {
|
|
|
2138
2139
|
}
|
|
2139
2140
|
return this.parseOrder(response, market);
|
|
2140
2141
|
}
|
|
2142
|
+
/**
|
|
2143
|
+
* @method
|
|
2144
|
+
* @name hitbtc#cancelAllOrders
|
|
2145
|
+
* @description cancel all open orders
|
|
2146
|
+
* @see https://api.hitbtc.com/#cancel-all-spot-orders
|
|
2147
|
+
* @see https://api.hitbtc.com/#cancel-futures-orders
|
|
2148
|
+
* @see https://api.hitbtc.com/#cancel-all-margin-orders
|
|
2149
|
+
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
2150
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2151
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
2152
|
+
* @param {bool} [params.margin] true for canceling margin orders
|
|
2153
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2154
|
+
*/
|
|
2141
2155
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
2142
|
-
/**
|
|
2143
|
-
* @method
|
|
2144
|
-
* @name hitbtc#cancelAllOrders
|
|
2145
|
-
* @description cancel all open orders
|
|
2146
|
-
* @see https://api.hitbtc.com/#cancel-all-spot-orders
|
|
2147
|
-
* @see https://api.hitbtc.com/#cancel-futures-orders
|
|
2148
|
-
* @see https://api.hitbtc.com/#cancel-all-margin-orders
|
|
2149
|
-
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
2150
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2151
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
2152
|
-
* @param {bool} [params.margin] true for canceling margin orders
|
|
2153
|
-
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2154
|
-
*/
|
|
2155
2156
|
await this.loadMarkets();
|
|
2156
2157
|
let market = undefined;
|
|
2157
2158
|
const request = {};
|
|
@@ -2184,21 +2185,21 @@ class hitbtc extends hitbtc$1 {
|
|
|
2184
2185
|
}
|
|
2185
2186
|
return this.parseOrders(response, market);
|
|
2186
2187
|
}
|
|
2188
|
+
/**
|
|
2189
|
+
* @method
|
|
2190
|
+
* @name hitbtc#cancelOrder
|
|
2191
|
+
* @description cancels an open order
|
|
2192
|
+
* @see https://api.hitbtc.com/#cancel-spot-order
|
|
2193
|
+
* @see https://api.hitbtc.com/#cancel-futures-order
|
|
2194
|
+
* @see https://api.hitbtc.com/#cancel-margin-order
|
|
2195
|
+
* @param {string} id order id
|
|
2196
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
2197
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2198
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
2199
|
+
* @param {bool} [params.margin] true for canceling a margin order
|
|
2200
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2201
|
+
*/
|
|
2187
2202
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
2188
|
-
/**
|
|
2189
|
-
* @method
|
|
2190
|
-
* @name hitbtc#cancelOrder
|
|
2191
|
-
* @description cancels an open order
|
|
2192
|
-
* @see https://api.hitbtc.com/#cancel-spot-order
|
|
2193
|
-
* @see https://api.hitbtc.com/#cancel-futures-order
|
|
2194
|
-
* @see https://api.hitbtc.com/#cancel-margin-order
|
|
2195
|
-
* @param {string} id order id
|
|
2196
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
2197
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2198
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported
|
|
2199
|
-
* @param {bool} [params.margin] true for canceling a margin order
|
|
2200
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2201
|
-
*/
|
|
2202
2203
|
await this.loadMarkets();
|
|
2203
2204
|
let market = undefined;
|
|
2204
2205
|
const request = {
|
|
@@ -2273,27 +2274,27 @@ class hitbtc extends hitbtc$1 {
|
|
|
2273
2274
|
}
|
|
2274
2275
|
return this.parseOrder(response, market);
|
|
2275
2276
|
}
|
|
2277
|
+
/**
|
|
2278
|
+
* @method
|
|
2279
|
+
* @name hitbtc#createOrder
|
|
2280
|
+
* @description create a trade order
|
|
2281
|
+
* @see https://api.hitbtc.com/#create-new-spot-order
|
|
2282
|
+
* @see https://api.hitbtc.com/#create-margin-order
|
|
2283
|
+
* @see https://api.hitbtc.com/#create-futures-order
|
|
2284
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
2285
|
+
* @param {string} type 'market' or 'limit'
|
|
2286
|
+
* @param {string} side 'buy' or 'sell'
|
|
2287
|
+
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
2288
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
2289
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2290
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported for spot-margin, swap supports both, default is 'cross'
|
|
2291
|
+
* @param {bool} [params.margin] true for creating a margin order
|
|
2292
|
+
* @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
|
|
2293
|
+
* @param {bool} [params.postOnly] if true, the order will only be posted to the order book and not executed immediately
|
|
2294
|
+
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", "Day", "GTD"
|
|
2295
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2296
|
+
*/
|
|
2276
2297
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
2277
|
-
/**
|
|
2278
|
-
* @method
|
|
2279
|
-
* @name hitbtc#createOrder
|
|
2280
|
-
* @description create a trade order
|
|
2281
|
-
* @see https://api.hitbtc.com/#create-new-spot-order
|
|
2282
|
-
* @see https://api.hitbtc.com/#create-margin-order
|
|
2283
|
-
* @see https://api.hitbtc.com/#create-futures-order
|
|
2284
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
2285
|
-
* @param {string} type 'market' or 'limit'
|
|
2286
|
-
* @param {string} side 'buy' or 'sell'
|
|
2287
|
-
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
2288
|
-
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
2289
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2290
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported for spot-margin, swap supports both, default is 'cross'
|
|
2291
|
-
* @param {bool} [params.margin] true for creating a margin order
|
|
2292
|
-
* @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
|
|
2293
|
-
* @param {bool} [params.postOnly] if true, the order will only be posted to the order book and not executed immediately
|
|
2294
|
-
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", "Day", "GTD"
|
|
2295
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2296
|
-
*/
|
|
2297
2298
|
await this.loadMarkets();
|
|
2298
2299
|
const market = this.market(symbol);
|
|
2299
2300
|
let request = undefined;
|
|
@@ -2516,17 +2517,17 @@ class hitbtc extends hitbtc$1 {
|
|
|
2516
2517
|
'stopLossPrice': undefined,
|
|
2517
2518
|
}, market);
|
|
2518
2519
|
}
|
|
2520
|
+
/**
|
|
2521
|
+
* @method
|
|
2522
|
+
* @name hitbtc#fetchMarginModes
|
|
2523
|
+
* @description fetches margin mode of the user
|
|
2524
|
+
* @see https://api.hitbtc.com/#get-margin-position-parameters
|
|
2525
|
+
* @see https://api.hitbtc.com/#get-futures-position-parameters
|
|
2526
|
+
* @param {string[]} symbols unified market symbols
|
|
2527
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2528
|
+
* @returns {object} a list of [margin mode structures]{@link https://docs.ccxt.com/#/?id=margin-mode-structure}
|
|
2529
|
+
*/
|
|
2519
2530
|
async fetchMarginModes(symbols = undefined, params = {}) {
|
|
2520
|
-
/**
|
|
2521
|
-
* @method
|
|
2522
|
-
* @name hitbtc#fetchMarginModes
|
|
2523
|
-
* @description fetches margin mode of the user
|
|
2524
|
-
* @see https://api.hitbtc.com/#get-margin-position-parameters
|
|
2525
|
-
* @see https://api.hitbtc.com/#get-futures-position-parameters
|
|
2526
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
2527
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2528
|
-
* @returns {object} a list of [margin mode structures]{@link https://docs.ccxt.com/#/?id=margin-mode-structure}
|
|
2529
|
-
*/
|
|
2530
2531
|
await this.loadMarkets();
|
|
2531
2532
|
let market = undefined;
|
|
2532
2533
|
if (symbols !== undefined) {
|
|
@@ -2590,19 +2591,19 @@ class hitbtc extends hitbtc$1 {
|
|
|
2590
2591
|
'marginMode': this.safeStringLower(marginMode, 'margin_mode'),
|
|
2591
2592
|
};
|
|
2592
2593
|
}
|
|
2594
|
+
/**
|
|
2595
|
+
* @method
|
|
2596
|
+
* @name hitbtc#transfer
|
|
2597
|
+
* @description transfer currency internally between wallets on the same account
|
|
2598
|
+
* @see https://api.hitbtc.com/#transfer-between-wallet-and-exchange
|
|
2599
|
+
* @param {string} code unified currency code
|
|
2600
|
+
* @param {float} amount amount to transfer
|
|
2601
|
+
* @param {string} fromAccount account to transfer from
|
|
2602
|
+
* @param {string} toAccount account to transfer to
|
|
2603
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2604
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
2605
|
+
*/
|
|
2593
2606
|
async transfer(code, amount, fromAccount, toAccount, params = {}) {
|
|
2594
|
-
/**
|
|
2595
|
-
* @method
|
|
2596
|
-
* @name hitbtc#transfer
|
|
2597
|
-
* @description transfer currency internally between wallets on the same account
|
|
2598
|
-
* @see https://api.hitbtc.com/#transfer-between-wallet-and-exchange
|
|
2599
|
-
* @param {string} code unified currency code
|
|
2600
|
-
* @param {float} amount amount to transfer
|
|
2601
|
-
* @param {string} fromAccount account to transfer from
|
|
2602
|
-
* @param {string} toAccount account to transfer to
|
|
2603
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2604
|
-
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
2605
|
-
*/
|
|
2606
2607
|
// account can be "spot", "wallet", or "derivatives"
|
|
2607
2608
|
await this.loadMarkets();
|
|
2608
2609
|
const currency = this.currency(code);
|
|
@@ -2677,19 +2678,19 @@ class hitbtc extends hitbtc$1 {
|
|
|
2677
2678
|
'info': response,
|
|
2678
2679
|
};
|
|
2679
2680
|
}
|
|
2681
|
+
/**
|
|
2682
|
+
* @method
|
|
2683
|
+
* @name hitbtc#withdraw
|
|
2684
|
+
* @description make a withdrawal
|
|
2685
|
+
* @see https://api.hitbtc.com/#withdraw-crypto
|
|
2686
|
+
* @param {string} code unified currency code
|
|
2687
|
+
* @param {float} amount the amount to withdraw
|
|
2688
|
+
* @param {string} address the address to withdraw to
|
|
2689
|
+
* @param {string} tag
|
|
2690
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2691
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2692
|
+
*/
|
|
2680
2693
|
async withdraw(code, amount, address, tag = undefined, params = {}) {
|
|
2681
|
-
/**
|
|
2682
|
-
* @method
|
|
2683
|
-
* @name hitbtc#withdraw
|
|
2684
|
-
* @description make a withdrawal
|
|
2685
|
-
* @see https://api.hitbtc.com/#withdraw-crypto
|
|
2686
|
-
* @param {string} code unified currency code
|
|
2687
|
-
* @param {float} amount the amount to withdraw
|
|
2688
|
-
* @param {string} address the address to withdraw to
|
|
2689
|
-
* @param {string} tag
|
|
2690
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2691
|
-
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2692
|
-
*/
|
|
2693
2694
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
2694
2695
|
await this.loadMarkets();
|
|
2695
2696
|
this.checkAddress(address);
|
|
@@ -2724,16 +2725,16 @@ class hitbtc extends hitbtc$1 {
|
|
|
2724
2725
|
//
|
|
2725
2726
|
return this.parseTransaction(response, currency);
|
|
2726
2727
|
}
|
|
2728
|
+
/**
|
|
2729
|
+
* @method
|
|
2730
|
+
* @name hitbtc#fetchFundingRates
|
|
2731
|
+
* @description fetches funding rates for multiple markets
|
|
2732
|
+
* @see https://api.hitbtc.com/#futures-info
|
|
2733
|
+
* @param {string[]} symbols unified symbols of the markets to fetch the funding rates for, all market funding rates are returned if not assigned
|
|
2734
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2735
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
2736
|
+
*/
|
|
2727
2737
|
async fetchFundingRates(symbols = undefined, params = {}) {
|
|
2728
|
-
/**
|
|
2729
|
-
* @method
|
|
2730
|
-
* @name hitbtc#fetchFundingRates
|
|
2731
|
-
* @description fetches funding rates for multiple markets
|
|
2732
|
-
* @see https://api.hitbtc.com/#futures-info
|
|
2733
|
-
* @param {string[]} symbols unified symbols of the markets to fetch the funding rates for, all market funding rates are returned if not assigned
|
|
2734
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2735
|
-
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
2736
|
-
*/
|
|
2737
2738
|
await this.loadMarkets();
|
|
2738
2739
|
let market = undefined;
|
|
2739
2740
|
const request = {};
|
|
@@ -2778,20 +2779,20 @@ class hitbtc extends hitbtc$1 {
|
|
|
2778
2779
|
}
|
|
2779
2780
|
return this.filterByArray(fundingRates, 'symbol', symbols);
|
|
2780
2781
|
}
|
|
2782
|
+
/**
|
|
2783
|
+
* @method
|
|
2784
|
+
* @name hitbtc#fetchFundingRateHistory
|
|
2785
|
+
* @see https://api.hitbtc.com/#funding-history
|
|
2786
|
+
* @description fetches historical funding rate prices
|
|
2787
|
+
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
2788
|
+
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
2789
|
+
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
2790
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2791
|
+
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
2792
|
+
* @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)
|
|
2793
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
2794
|
+
*/
|
|
2781
2795
|
async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2782
|
-
/**
|
|
2783
|
-
* @method
|
|
2784
|
-
* @name hitbtc#fetchFundingRateHistory
|
|
2785
|
-
* @see https://api.hitbtc.com/#funding-history
|
|
2786
|
-
* @description fetches historical funding rate prices
|
|
2787
|
-
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
2788
|
-
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
2789
|
-
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
2790
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2791
|
-
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
2792
|
-
* @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)
|
|
2793
|
-
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
2794
|
-
*/
|
|
2795
2796
|
await this.loadMarkets();
|
|
2796
2797
|
let paginate = false;
|
|
2797
2798
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchFundingRateHistory', 'paginate');
|
|
@@ -2859,19 +2860,19 @@ class hitbtc extends hitbtc$1 {
|
|
|
2859
2860
|
const sorted = this.sortBy(rates, 'timestamp');
|
|
2860
2861
|
return this.filterBySymbolSinceLimit(sorted, symbol, since, limit);
|
|
2861
2862
|
}
|
|
2863
|
+
/**
|
|
2864
|
+
* @method
|
|
2865
|
+
* @name hitbtc#fetchPositions
|
|
2866
|
+
* @description fetch all open positions
|
|
2867
|
+
* @see https://api.hitbtc.com/#get-futures-margin-accounts
|
|
2868
|
+
* @see https://api.hitbtc.com/#get-all-margin-accounts
|
|
2869
|
+
* @param {string[]|undefined} symbols not used by hitbtc fetchPositions ()
|
|
2870
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2871
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported, defaults to spot-margin endpoint if this is set
|
|
2872
|
+
* @param {bool} [params.margin] true for fetching spot-margin positions
|
|
2873
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
2874
|
+
*/
|
|
2862
2875
|
async fetchPositions(symbols = undefined, params = {}) {
|
|
2863
|
-
/**
|
|
2864
|
-
* @method
|
|
2865
|
-
* @name hitbtc#fetchPositions
|
|
2866
|
-
* @description fetch all open positions
|
|
2867
|
-
* @see https://api.hitbtc.com/#get-futures-margin-accounts
|
|
2868
|
-
* @see https://api.hitbtc.com/#get-all-margin-accounts
|
|
2869
|
-
* @param {string[]|undefined} symbols not used by hitbtc fetchPositions ()
|
|
2870
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2871
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported, defaults to spot-margin endpoint if this is set
|
|
2872
|
-
* @param {bool} [params.margin] true for fetching spot-margin positions
|
|
2873
|
-
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
2874
|
-
*/
|
|
2875
2876
|
await this.loadMarkets();
|
|
2876
2877
|
const request = {};
|
|
2877
2878
|
let marketType = undefined;
|
|
@@ -2935,19 +2936,19 @@ class hitbtc extends hitbtc$1 {
|
|
|
2935
2936
|
}
|
|
2936
2937
|
return result;
|
|
2937
2938
|
}
|
|
2939
|
+
/**
|
|
2940
|
+
* @method
|
|
2941
|
+
* @name hitbtc#fetchPosition
|
|
2942
|
+
* @description fetch data on a single open contract trade position
|
|
2943
|
+
* @see https://api.hitbtc.com/#get-futures-margin-account
|
|
2944
|
+
* @see https://api.hitbtc.com/#get-isolated-margin-account
|
|
2945
|
+
* @param {string} symbol unified market symbol of the market the position is held in, default is undefined
|
|
2946
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2947
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported, defaults to spot-margin endpoint if this is set
|
|
2948
|
+
* @param {bool} [params.margin] true for fetching a spot-margin position
|
|
2949
|
+
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
2950
|
+
*/
|
|
2938
2951
|
async fetchPosition(symbol, params = {}) {
|
|
2939
|
-
/**
|
|
2940
|
-
* @method
|
|
2941
|
-
* @name hitbtc#fetchPosition
|
|
2942
|
-
* @description fetch data on a single open contract trade position
|
|
2943
|
-
* @see https://api.hitbtc.com/#get-futures-margin-account
|
|
2944
|
-
* @see https://api.hitbtc.com/#get-isolated-margin-account
|
|
2945
|
-
* @param {string} symbol unified market symbol of the market the position is held in, default is undefined
|
|
2946
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2947
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported, defaults to spot-margin endpoint if this is set
|
|
2948
|
-
* @param {bool} [params.margin] true for fetching a spot-margin position
|
|
2949
|
-
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
2950
|
-
*/
|
|
2951
2952
|
await this.loadMarkets();
|
|
2952
2953
|
const market = this.market(symbol);
|
|
2953
2954
|
const request = {
|
|
@@ -3120,16 +3121,16 @@ class hitbtc extends hitbtc$1 {
|
|
|
3120
3121
|
'info': interest,
|
|
3121
3122
|
}, market);
|
|
3122
3123
|
}
|
|
3124
|
+
/**
|
|
3125
|
+
* @method
|
|
3126
|
+
* @name hitbtc#fetchOpenInterest
|
|
3127
|
+
* @description Retrieves the open interest of a derivative trading pair
|
|
3128
|
+
* @see https://api.hitbtc.com/#futures-info
|
|
3129
|
+
* @param {string} symbol Unified CCXT market symbol
|
|
3130
|
+
* @param {object} [params] exchange specific parameters
|
|
3131
|
+
* @returns {object} an open interest structure{@link https://docs.ccxt.com/#/?id=interest-history-structure}
|
|
3132
|
+
*/
|
|
3123
3133
|
async fetchOpenInterest(symbol, params = {}) {
|
|
3124
|
-
/**
|
|
3125
|
-
* @method
|
|
3126
|
-
* @name hitbtc#fetchOpenInterest
|
|
3127
|
-
* @description Retrieves the open interest of a derivative trading pair
|
|
3128
|
-
* @see https://api.hitbtc.com/#futures-info
|
|
3129
|
-
* @param {string} symbol Unified CCXT market symbol
|
|
3130
|
-
* @param {object} [params] exchange specific parameters
|
|
3131
|
-
* @returns {object} an open interest structure{@link https://docs.ccxt.com/#/?id=interest-history-structure}
|
|
3132
|
-
*/
|
|
3133
3134
|
await this.loadMarkets();
|
|
3134
3135
|
const market = this.market(symbol);
|
|
3135
3136
|
if (!market['swap']) {
|
|
@@ -3156,16 +3157,16 @@ class hitbtc extends hitbtc$1 {
|
|
|
3156
3157
|
//
|
|
3157
3158
|
return this.parseOpenInterest(response, market);
|
|
3158
3159
|
}
|
|
3160
|
+
/**
|
|
3161
|
+
* @method
|
|
3162
|
+
* @name hitbtc#fetchFundingRate
|
|
3163
|
+
* @description fetch the current funding rate
|
|
3164
|
+
* @see https://api.hitbtc.com/#futures-info
|
|
3165
|
+
* @param {string} symbol unified market symbol
|
|
3166
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3167
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
3168
|
+
*/
|
|
3159
3169
|
async fetchFundingRate(symbol, params = {}) {
|
|
3160
|
-
/**
|
|
3161
|
-
* @method
|
|
3162
|
-
* @name hitbtc#fetchFundingRate
|
|
3163
|
-
* @description fetch the current funding rate
|
|
3164
|
-
* @see https://api.hitbtc.com/#futures-info
|
|
3165
|
-
* @param {string} symbol unified market symbol
|
|
3166
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3167
|
-
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
3168
|
-
*/
|
|
3169
3170
|
await this.loadMarkets();
|
|
3170
3171
|
const market = this.market(symbol);
|
|
3171
3172
|
if (!market['swap']) {
|
|
@@ -3330,54 +3331,54 @@ class hitbtc extends hitbtc$1 {
|
|
|
3330
3331
|
'datetime': datetime,
|
|
3331
3332
|
};
|
|
3332
3333
|
}
|
|
3334
|
+
/**
|
|
3335
|
+
* @method
|
|
3336
|
+
* @name hitbtc#reduceMargin
|
|
3337
|
+
* @description remove margin from a position
|
|
3338
|
+
* @see https://api.hitbtc.com/#create-update-margin-account-2
|
|
3339
|
+
* @see https://api.hitbtc.com/#create-update-margin-account
|
|
3340
|
+
* @param {string} symbol unified market symbol
|
|
3341
|
+
* @param {float} amount the amount of margin to remove
|
|
3342
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3343
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported, defaults to the spot-margin endpoint if this is set
|
|
3344
|
+
* @param {bool} [params.margin] true for reducing spot-margin
|
|
3345
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
|
|
3346
|
+
*/
|
|
3333
3347
|
async reduceMargin(symbol, amount, params = {}) {
|
|
3334
|
-
/**
|
|
3335
|
-
* @method
|
|
3336
|
-
* @name hitbtc#reduceMargin
|
|
3337
|
-
* @description remove margin from a position
|
|
3338
|
-
* @see https://api.hitbtc.com/#create-update-margin-account-2
|
|
3339
|
-
* @see https://api.hitbtc.com/#create-update-margin-account
|
|
3340
|
-
* @param {string} symbol unified market symbol
|
|
3341
|
-
* @param {float} amount the amount of margin to remove
|
|
3342
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3343
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported, defaults to the spot-margin endpoint if this is set
|
|
3344
|
-
* @param {bool} [params.margin] true for reducing spot-margin
|
|
3345
|
-
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
|
|
3346
|
-
*/
|
|
3347
3348
|
if (this.numberToString(amount) !== '0') {
|
|
3348
3349
|
throw new errors.BadRequest(this.id + ' reduceMargin() on hitbtc requires the amount to be 0 and that will remove the entire margin amount');
|
|
3349
3350
|
}
|
|
3350
3351
|
return await this.modifyMarginHelper(symbol, amount, 'reduce', params);
|
|
3351
3352
|
}
|
|
3353
|
+
/**
|
|
3354
|
+
* @method
|
|
3355
|
+
* @name hitbtc#addMargin
|
|
3356
|
+
* @description add margin
|
|
3357
|
+
* @see https://api.hitbtc.com/#create-update-margin-account-2
|
|
3358
|
+
* @see https://api.hitbtc.com/#create-update-margin-account
|
|
3359
|
+
* @param {string} symbol unified market symbol
|
|
3360
|
+
* @param {float} amount amount of margin to add
|
|
3361
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3362
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported, defaults to the spot-margin endpoint if this is set
|
|
3363
|
+
* @param {bool} [params.margin] true for adding spot-margin
|
|
3364
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
|
|
3365
|
+
*/
|
|
3352
3366
|
async addMargin(symbol, amount, params = {}) {
|
|
3353
|
-
/**
|
|
3354
|
-
* @method
|
|
3355
|
-
* @name hitbtc#addMargin
|
|
3356
|
-
* @description add margin
|
|
3357
|
-
* @see https://api.hitbtc.com/#create-update-margin-account-2
|
|
3358
|
-
* @see https://api.hitbtc.com/#create-update-margin-account
|
|
3359
|
-
* @param {string} symbol unified market symbol
|
|
3360
|
-
* @param {float} amount amount of margin to add
|
|
3361
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3362
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported, defaults to the spot-margin endpoint if this is set
|
|
3363
|
-
* @param {bool} [params.margin] true for adding spot-margin
|
|
3364
|
-
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
|
|
3365
|
-
*/
|
|
3366
3367
|
return await this.modifyMarginHelper(symbol, amount, 'add', params);
|
|
3367
3368
|
}
|
|
3369
|
+
/**
|
|
3370
|
+
* @method
|
|
3371
|
+
* @name hitbtc#fetchLeverage
|
|
3372
|
+
* @description fetch the set leverage for a market
|
|
3373
|
+
* @see https://api.hitbtc.com/#get-futures-margin-account
|
|
3374
|
+
* @see https://api.hitbtc.com/#get-isolated-margin-account
|
|
3375
|
+
* @param {string} symbol unified market symbol
|
|
3376
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3377
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported, defaults to the spot-margin endpoint if this is set
|
|
3378
|
+
* @param {bool} [params.margin] true for fetching spot-margin leverage
|
|
3379
|
+
* @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
3380
|
+
*/
|
|
3368
3381
|
async fetchLeverage(symbol, params = {}) {
|
|
3369
|
-
/**
|
|
3370
|
-
* @method
|
|
3371
|
-
* @name hitbtc#fetchLeverage
|
|
3372
|
-
* @description fetch the set leverage for a market
|
|
3373
|
-
* @see https://api.hitbtc.com/#get-futures-margin-account
|
|
3374
|
-
* @see https://api.hitbtc.com/#get-isolated-margin-account
|
|
3375
|
-
* @param {string} symbol unified market symbol
|
|
3376
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3377
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported, defaults to the spot-margin endpoint if this is set
|
|
3378
|
-
* @param {bool} [params.margin] true for fetching spot-margin leverage
|
|
3379
|
-
* @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
3380
|
-
*/
|
|
3381
3382
|
await this.loadMarkets();
|
|
3382
3383
|
const market = this.market(symbol);
|
|
3383
3384
|
const request = {
|
|
@@ -3447,17 +3448,17 @@ class hitbtc extends hitbtc$1 {
|
|
|
3447
3448
|
'shortLeverage': leverageValue,
|
|
3448
3449
|
};
|
|
3449
3450
|
}
|
|
3451
|
+
/**
|
|
3452
|
+
* @method
|
|
3453
|
+
* @name hitbtc#setLeverage
|
|
3454
|
+
* @description set the level of leverage for a market
|
|
3455
|
+
* @see https://api.hitbtc.com/#create-update-margin-account-2
|
|
3456
|
+
* @param {float} leverage the rate of leverage
|
|
3457
|
+
* @param {string} symbol unified market symbol
|
|
3458
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3459
|
+
* @returns {object} response from the exchange
|
|
3460
|
+
*/
|
|
3450
3461
|
async setLeverage(leverage, symbol = undefined, params = {}) {
|
|
3451
|
-
/**
|
|
3452
|
-
* @method
|
|
3453
|
-
* @name hitbtc#setLeverage
|
|
3454
|
-
* @description set the level of leverage for a market
|
|
3455
|
-
* @see https://api.hitbtc.com/#create-update-margin-account-2
|
|
3456
|
-
* @param {float} leverage the rate of leverage
|
|
3457
|
-
* @param {string} symbol unified market symbol
|
|
3458
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3459
|
-
* @returns {object} response from the exchange
|
|
3460
|
-
*/
|
|
3461
3462
|
if (symbol === undefined) {
|
|
3462
3463
|
throw new errors.ArgumentsRequired(this.id + ' setLeverage() requires a symbol argument');
|
|
3463
3464
|
}
|
|
@@ -3482,16 +3483,16 @@ class hitbtc extends hitbtc$1 {
|
|
|
3482
3483
|
};
|
|
3483
3484
|
return await this.privatePutFuturesAccountIsolatedSymbol(this.extend(request, params));
|
|
3484
3485
|
}
|
|
3486
|
+
/**
|
|
3487
|
+
* @method
|
|
3488
|
+
* @name hitbtc#fetchDepositWithdrawFees
|
|
3489
|
+
* @description fetch deposit and withdraw fees
|
|
3490
|
+
* @see https://api.hitbtc.com/#currencies
|
|
3491
|
+
* @param {string[]|undefined} codes list of unified currency codes
|
|
3492
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3493
|
+
* @returns {object[]} a list of [fees structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
3494
|
+
*/
|
|
3485
3495
|
async fetchDepositWithdrawFees(codes = undefined, params = {}) {
|
|
3486
|
-
/**
|
|
3487
|
-
* @method
|
|
3488
|
-
* @name hitbtc#fetchDepositWithdrawFees
|
|
3489
|
-
* @description fetch deposit and withdraw fees
|
|
3490
|
-
* @see https://api.hitbtc.com/#currencies
|
|
3491
|
-
* @param {string[]|undefined} codes list of unified currency codes
|
|
3492
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3493
|
-
* @returns {object[]} a list of [fees structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
3494
|
-
*/
|
|
3495
3496
|
await this.loadMarkets();
|
|
3496
3497
|
const response = await this.publicGetPublicCurrency(params);
|
|
3497
3498
|
//
|
|
@@ -3571,17 +3572,19 @@ class hitbtc extends hitbtc$1 {
|
|
|
3571
3572
|
}
|
|
3572
3573
|
return result;
|
|
3573
3574
|
}
|
|
3575
|
+
/**
|
|
3576
|
+
* @method
|
|
3577
|
+
* @name hitbtc#closePosition
|
|
3578
|
+
* @description closes open positions for a market
|
|
3579
|
+
* @see https://api.hitbtc.com/#close-all-futures-margin-positions
|
|
3580
|
+
* @param {string} symbol unified ccxt market symbol
|
|
3581
|
+
* @param {string} side 'buy' or 'sell'
|
|
3582
|
+
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
3583
|
+
* @param {string} [params.symbol] *required* unified market symbol
|
|
3584
|
+
* @param {string} [params.marginMode] 'cross' or 'isolated', default is 'cross'
|
|
3585
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3586
|
+
*/
|
|
3574
3587
|
async closePosition(symbol, side = undefined, params = {}) {
|
|
3575
|
-
/**
|
|
3576
|
-
* @method
|
|
3577
|
-
* @name hitbtc#closePosition
|
|
3578
|
-
* @description closes open positions for a market
|
|
3579
|
-
* @see https://api.hitbtc.com/#close-all-futures-margin-positions
|
|
3580
|
-
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
3581
|
-
* @param {string} [params.symbol] *required* unified market symbol
|
|
3582
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated', default is 'cross'
|
|
3583
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3584
|
-
*/
|
|
3585
3588
|
await this.loadMarkets();
|
|
3586
3589
|
let marginMode = undefined;
|
|
3587
3590
|
[marginMode, params] = this.handleMarginModeAndParams('closePosition', params, 'cross');
|