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/hashkey.js
CHANGED
|
@@ -79,6 +79,7 @@ class hashkey extends hashkey$1 {
|
|
|
79
79
|
'fetchLeverageTiers': true,
|
|
80
80
|
'fetchMarginAdjustmentHistory': false,
|
|
81
81
|
'fetchMarginMode': false,
|
|
82
|
+
'fetchMarketLeverageTiers': 'emulated',
|
|
82
83
|
'fetchMarkets': true,
|
|
83
84
|
'fetchMarkOHLCV': false,
|
|
84
85
|
'fetchMyTrades': true,
|
|
@@ -508,15 +509,15 @@ class hashkey extends hashkey$1 {
|
|
|
508
509
|
'precisionMode': number.TICK_SIZE,
|
|
509
510
|
});
|
|
510
511
|
}
|
|
512
|
+
/**
|
|
513
|
+
* @method
|
|
514
|
+
* @name hashkey#fetchTime
|
|
515
|
+
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
516
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/check-server-time
|
|
517
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
518
|
+
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
519
|
+
*/
|
|
511
520
|
async fetchTime(params = {}) {
|
|
512
|
-
/**
|
|
513
|
-
* @method
|
|
514
|
-
* @name hashkey#fetchTime
|
|
515
|
-
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
516
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/check-server-time
|
|
517
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
518
|
-
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
519
|
-
*/
|
|
520
521
|
const response = await this.publicGetApiV1Time(params);
|
|
521
522
|
//
|
|
522
523
|
// {
|
|
@@ -525,15 +526,15 @@ class hashkey extends hashkey$1 {
|
|
|
525
526
|
//
|
|
526
527
|
return this.safeInteger(response, 'serverTime');
|
|
527
528
|
}
|
|
529
|
+
/**
|
|
530
|
+
* @method
|
|
531
|
+
* @name hashkey#fetchStatus
|
|
532
|
+
* @description the latest known information on the availability of the exchange API
|
|
533
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/test-connectivity
|
|
534
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
535
|
+
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
536
|
+
*/
|
|
528
537
|
async fetchStatus(params = {}) {
|
|
529
|
-
/**
|
|
530
|
-
* @method
|
|
531
|
-
* @name hashkey#fetchStatus
|
|
532
|
-
* @description the latest known information on the availability of the exchange API
|
|
533
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/test-connectivity
|
|
534
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
535
|
-
* @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
|
|
536
|
-
*/
|
|
537
538
|
const response = await this.publicGetApiV1Ping(params);
|
|
538
539
|
//
|
|
539
540
|
// {}
|
|
@@ -546,16 +547,16 @@ class hashkey extends hashkey$1 {
|
|
|
546
547
|
'info': response,
|
|
547
548
|
};
|
|
548
549
|
}
|
|
550
|
+
/**
|
|
551
|
+
* @method
|
|
552
|
+
* @name hashkey#fetchMarkets
|
|
553
|
+
* @description retrieves data on all markets for the exchange
|
|
554
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/exchangeinfo
|
|
555
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
556
|
+
* @param {string} [params.symbol] the id of the market to fetch
|
|
557
|
+
* @returns {object[]} an array of objects representing market data
|
|
558
|
+
*/
|
|
549
559
|
async fetchMarkets(params = {}) {
|
|
550
|
-
/**
|
|
551
|
-
* @method
|
|
552
|
-
* @name hashkey#fetchMarkets
|
|
553
|
-
* @description retrieves data on all markets for the exchange
|
|
554
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/exchangeinfo
|
|
555
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
556
|
-
* @param {string} [params.symbol] the id of the market to fetch
|
|
557
|
-
* @returns {object[]} an array of objects representing market data
|
|
558
|
-
*/
|
|
559
560
|
let symbol = undefined;
|
|
560
561
|
const request = {};
|
|
561
562
|
[symbol, params] = this.handleOptionAndParams(params, 'fetchMarkets', 'symbol');
|
|
@@ -1016,15 +1017,15 @@ class hashkey extends hashkey$1 {
|
|
|
1016
1017
|
'info': market,
|
|
1017
1018
|
});
|
|
1018
1019
|
}
|
|
1020
|
+
/**
|
|
1021
|
+
* @method
|
|
1022
|
+
* @name hashkey#fetchCurrencies
|
|
1023
|
+
* @description fetches all available currencies on an exchange
|
|
1024
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/exchangeinfo
|
|
1025
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1026
|
+
* @returns {object} an associative dictionary of currencies
|
|
1027
|
+
*/
|
|
1019
1028
|
async fetchCurrencies(params = {}) {
|
|
1020
|
-
/**
|
|
1021
|
-
* @method
|
|
1022
|
-
* @name hashkey#fetchCurrencies
|
|
1023
|
-
* @description fetches all available currencies on an exchange
|
|
1024
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/exchangeinfo
|
|
1025
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1026
|
-
* @returns {object} an associative dictionary of currencies
|
|
1027
|
-
*/
|
|
1028
1029
|
const response = await this.publicGetApiV1ExchangeInfo(params);
|
|
1029
1030
|
const coins = this.safeList(response, 'coins');
|
|
1030
1031
|
//
|
|
@@ -1127,17 +1128,17 @@ class hashkey extends hashkey$1 {
|
|
|
1127
1128
|
};
|
|
1128
1129
|
return this.safeString(types, type);
|
|
1129
1130
|
}
|
|
1131
|
+
/**
|
|
1132
|
+
* @method
|
|
1133
|
+
* @name hashkey#fetchOrderBook
|
|
1134
|
+
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
1135
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-order-book
|
|
1136
|
+
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1137
|
+
* @param {int} [limit] the maximum amount of order book entries to return (maximum value is 200)
|
|
1138
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1139
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
1140
|
+
*/
|
|
1130
1141
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
1131
|
-
/**
|
|
1132
|
-
* @method
|
|
1133
|
-
* @name hashkey#fetchOrderBook
|
|
1134
|
-
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
1135
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-order-book
|
|
1136
|
-
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1137
|
-
* @param {int} [limit] the maximum amount of order book entries to return (maximum value is 200)
|
|
1138
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1139
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
1140
|
-
*/
|
|
1141
1142
|
await this.loadMarkets();
|
|
1142
1143
|
const market = this.market(symbol);
|
|
1143
1144
|
const request = {
|
|
@@ -1165,18 +1166,18 @@ class hashkey extends hashkey$1 {
|
|
|
1165
1166
|
const timestamp = this.safeInteger(response, 't');
|
|
1166
1167
|
return this.parseOrderBook(response, symbol, timestamp, 'b', 'a');
|
|
1167
1168
|
}
|
|
1169
|
+
/**
|
|
1170
|
+
* @method
|
|
1171
|
+
* @name hashkey#fetchTrades
|
|
1172
|
+
* @description get the list of most recent trades for a particular symbol
|
|
1173
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-recent-trade-list
|
|
1174
|
+
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
1175
|
+
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1176
|
+
* @param {int} [limit] the maximum amount of trades to fetch (maximum value is 100)
|
|
1177
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1178
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
1179
|
+
*/
|
|
1168
1180
|
async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
|
|
1169
|
-
/**
|
|
1170
|
-
* @method
|
|
1171
|
-
* @name hashkey#fetchTrades
|
|
1172
|
-
* @description get the list of most recent trades for a particular symbol
|
|
1173
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-recent-trade-list
|
|
1174
|
-
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
1175
|
-
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
1176
|
-
* @param {int} [limit] the maximum amount of trades to fetch (maximum value is 100)
|
|
1177
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1178
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
1179
|
-
*/
|
|
1180
1181
|
await this.loadMarkets();
|
|
1181
1182
|
const market = this.market(symbol);
|
|
1182
1183
|
const request = {
|
|
@@ -1199,26 +1200,26 @@ class hashkey extends hashkey$1 {
|
|
|
1199
1200
|
//
|
|
1200
1201
|
return this.parseTrades(response, market, since, limit);
|
|
1201
1202
|
}
|
|
1203
|
+
/**
|
|
1204
|
+
* @method
|
|
1205
|
+
* @name hashkey#fetchMyTrades
|
|
1206
|
+
* @description fetch all trades made by the user
|
|
1207
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-account-trade-list
|
|
1208
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/query-futures-trades
|
|
1209
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-sub-account-user
|
|
1210
|
+
* @param {string} symbol *is mandatory for swap markets* unified market symbol
|
|
1211
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1212
|
+
* @param {int} [limit] the maximum amount of trades to fetch (default 200, max 500)
|
|
1213
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1214
|
+
* @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch trades for (default 'spot')
|
|
1215
|
+
* @param {int} [params.until] the latest time in ms to fetch trades for, only supports the last 30 days timeframe
|
|
1216
|
+
* @param {string} [params.fromId] srarting trade id
|
|
1217
|
+
* @param {string} [params.toId] ending trade id
|
|
1218
|
+
* @param {string} [params.clientOrderId] *spot markets only* filter trades by orderId
|
|
1219
|
+
* @param {string} [params.accountId] account id to fetch the orders from
|
|
1220
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
1221
|
+
*/
|
|
1202
1222
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1203
|
-
/**
|
|
1204
|
-
* @method
|
|
1205
|
-
* @name hashkey#fetchMyTrades
|
|
1206
|
-
* @description fetch all trades made by the user
|
|
1207
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-account-trade-list
|
|
1208
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/query-futures-trades
|
|
1209
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-sub-account-user
|
|
1210
|
-
* @param {string} symbol *is mandatory for swap markets* unified market symbol
|
|
1211
|
-
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
1212
|
-
* @param {int} [limit] the maximum amount of trades to fetch (default 200, max 500)
|
|
1213
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1214
|
-
* @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch trades for (default 'spot')
|
|
1215
|
-
* @param {int} [params.until] the latest time in ms to fetch trades for, only supports the last 30 days timeframe
|
|
1216
|
-
* @param {string} [params.fromId] srarting trade id
|
|
1217
|
-
* @param {string} [params.toId] ending trade id
|
|
1218
|
-
* @param {string} [params.clientOrderId] *spot markets only* filter trades by orderId
|
|
1219
|
-
* @param {string} [params.accountId] account id to fetch the orders from
|
|
1220
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
1221
|
-
*/
|
|
1222
1223
|
const methodName = 'fetchMyTrades';
|
|
1223
1224
|
await this.loadMarkets();
|
|
1224
1225
|
const request = {};
|
|
@@ -1422,21 +1423,21 @@ class hashkey extends hashkey$1 {
|
|
|
1422
1423
|
'info': trade,
|
|
1423
1424
|
}, market);
|
|
1424
1425
|
}
|
|
1426
|
+
/**
|
|
1427
|
+
* @method
|
|
1428
|
+
* @name hashkey#fetchOHLCV
|
|
1429
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-kline
|
|
1430
|
+
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1431
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1432
|
+
* @param {string} timeframe the length of time each candle represents
|
|
1433
|
+
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
1434
|
+
* @param {int} [limit] the maximum amount of candles to fetch
|
|
1435
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1436
|
+
* @param {int} [params.until] timestamp in ms of the latest candle to fetch
|
|
1437
|
+
* @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)
|
|
1438
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
1439
|
+
*/
|
|
1425
1440
|
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
1426
|
-
/**
|
|
1427
|
-
* @method
|
|
1428
|
-
* @name hashkey#fetchOHLCV
|
|
1429
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-kline
|
|
1430
|
-
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
1431
|
-
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
1432
|
-
* @param {string} timeframe the length of time each candle represents
|
|
1433
|
-
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
1434
|
-
* @param {int} [limit] the maximum amount of candles to fetch
|
|
1435
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1436
|
-
* @param {int} [params.until] timestamp in ms of the latest candle to fetch
|
|
1437
|
-
* @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)
|
|
1438
|
-
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
1439
|
-
*/
|
|
1440
1441
|
const methodName = 'fetchOHLCV';
|
|
1441
1442
|
await this.loadMarkets();
|
|
1442
1443
|
let paginate = false;
|
|
@@ -1503,16 +1504,16 @@ class hashkey extends hashkey$1 {
|
|
|
1503
1504
|
this.safeNumber(ohlcv, 5),
|
|
1504
1505
|
];
|
|
1505
1506
|
}
|
|
1507
|
+
/**
|
|
1508
|
+
* @method
|
|
1509
|
+
* @name hashkey#fetchTicker
|
|
1510
|
+
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1511
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-24hr-ticker-price-change
|
|
1512
|
+
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1513
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1514
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1515
|
+
*/
|
|
1506
1516
|
async fetchTicker(symbol, params = {}) {
|
|
1507
|
-
/**
|
|
1508
|
-
* @method
|
|
1509
|
-
* @name hashkey#fetchTicker
|
|
1510
|
-
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1511
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-24hr-ticker-price-change
|
|
1512
|
-
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1513
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1514
|
-
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1515
|
-
*/
|
|
1516
1517
|
await this.loadMarkets();
|
|
1517
1518
|
const market = this.market(symbol);
|
|
1518
1519
|
const request = {
|
|
@@ -1538,16 +1539,16 @@ class hashkey extends hashkey$1 {
|
|
|
1538
1539
|
const ticker = this.safeDict(response, 0, {});
|
|
1539
1540
|
return this.parseTicker(ticker, market);
|
|
1540
1541
|
}
|
|
1542
|
+
/**
|
|
1543
|
+
* @method
|
|
1544
|
+
* @name hashkey#fetchTickers
|
|
1545
|
+
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
1546
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-24hr-ticker-price-change
|
|
1547
|
+
* @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1548
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1549
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1550
|
+
*/
|
|
1541
1551
|
async fetchTickers(symbols = undefined, params = {}) {
|
|
1542
|
-
/**
|
|
1543
|
-
* @method
|
|
1544
|
-
* @name hashkey#fetchTickers
|
|
1545
|
-
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
1546
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-24hr-ticker-price-change
|
|
1547
|
-
* @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1548
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1549
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
1550
|
-
*/
|
|
1551
1552
|
await this.loadMarkets();
|
|
1552
1553
|
symbols = this.marketSymbols(symbols);
|
|
1553
1554
|
const response = await this.publicGetQuoteV1Ticker24hr(params);
|
|
@@ -1596,17 +1597,17 @@ class hashkey extends hashkey$1 {
|
|
|
1596
1597
|
'info': ticker,
|
|
1597
1598
|
}, market);
|
|
1598
1599
|
}
|
|
1600
|
+
/**
|
|
1601
|
+
* @method
|
|
1602
|
+
* @name hashkey#fetchLastPrices
|
|
1603
|
+
* @description fetches the last price for multiple markets
|
|
1604
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-symbol-price-ticker
|
|
1605
|
+
* @param {string[]} [symbols] unified symbols of the markets to fetch the last prices
|
|
1606
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1607
|
+
* @param {string} [params.symbol] the id of the market to fetch last price for
|
|
1608
|
+
* @returns {object} a dictionary of lastprices structures
|
|
1609
|
+
*/
|
|
1599
1610
|
async fetchLastPrices(symbols = undefined, params = {}) {
|
|
1600
|
-
/**
|
|
1601
|
-
* @method
|
|
1602
|
-
* @name hashkey#fetchLastPrices
|
|
1603
|
-
* @description fetches the last price for multiple markets
|
|
1604
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-symbol-price-ticker
|
|
1605
|
-
* @param {string[]} [symbols] unified symbols of the markets to fetch the last prices
|
|
1606
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1607
|
-
* @param {string} [params.symbol] the id of the market to fetch last price for
|
|
1608
|
-
* @returns {object} a dictionary of lastprices structures
|
|
1609
|
-
*/
|
|
1610
1611
|
await this.loadMarkets();
|
|
1611
1612
|
symbols = this.marketSymbols(symbols);
|
|
1612
1613
|
const request = {};
|
|
@@ -1639,17 +1640,17 @@ class hashkey extends hashkey$1 {
|
|
|
1639
1640
|
'info': entry,
|
|
1640
1641
|
};
|
|
1641
1642
|
}
|
|
1643
|
+
/**
|
|
1644
|
+
* @method
|
|
1645
|
+
* @name hashkey#fetchBalance
|
|
1646
|
+
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
1647
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-account-information
|
|
1648
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1649
|
+
* @param {string} [params.accountId] account ID, for Master Key only
|
|
1650
|
+
* @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch balance for (default 'spot')
|
|
1651
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
1652
|
+
*/
|
|
1642
1653
|
async fetchBalance(params = {}) {
|
|
1643
|
-
/**
|
|
1644
|
-
* @method
|
|
1645
|
-
* @name hashkey#fetchBalance
|
|
1646
|
-
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
1647
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-account-information
|
|
1648
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1649
|
-
* @param {string} [params.accountId] account ID, for Master Key only
|
|
1650
|
-
* @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch balance for (default 'spot')
|
|
1651
|
-
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
1652
|
-
*/
|
|
1653
1654
|
await this.loadMarkets();
|
|
1654
1655
|
const request = {};
|
|
1655
1656
|
const methodName = 'fetchBalance';
|
|
@@ -1758,17 +1759,17 @@ class hashkey extends hashkey$1 {
|
|
|
1758
1759
|
result[code] = account;
|
|
1759
1760
|
return this.safeBalance(result);
|
|
1760
1761
|
}
|
|
1762
|
+
/**
|
|
1763
|
+
* @method
|
|
1764
|
+
* @name hashkey#fetchDepositAddress
|
|
1765
|
+
* @description fetch the deposit address for a currency associated with this account
|
|
1766
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-deposit-address
|
|
1767
|
+
* @param {string} code unified currency code (default is 'USDT')
|
|
1768
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1769
|
+
* @param {string} [params.network] network for fetch deposit address (default is 'ETH')
|
|
1770
|
+
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
1771
|
+
*/
|
|
1761
1772
|
async fetchDepositAddress(code, params = {}) {
|
|
1762
|
-
/**
|
|
1763
|
-
* @method
|
|
1764
|
-
* @name hashkey#fetchDepositAddress
|
|
1765
|
-
* @description fetch the deposit address for a currency associated with this account
|
|
1766
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-deposit-address
|
|
1767
|
-
* @param {string} code unified currency code (default is 'USDT')
|
|
1768
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1769
|
-
* @param {string} [params.network] network for fetch deposit address (default is 'ETH')
|
|
1770
|
-
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
1771
|
-
*/
|
|
1772
1773
|
await this.loadMarkets();
|
|
1773
1774
|
const currency = this.currency(code);
|
|
1774
1775
|
const request = {
|
|
@@ -1824,20 +1825,20 @@ class hashkey extends hashkey$1 {
|
|
|
1824
1825
|
'tag': tag,
|
|
1825
1826
|
};
|
|
1826
1827
|
}
|
|
1828
|
+
/**
|
|
1829
|
+
* @method
|
|
1830
|
+
* @name hashkey#fetchDeposits
|
|
1831
|
+
* @description fetch all deposits made to an account
|
|
1832
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-deposit-history
|
|
1833
|
+
* @param {string} code unified currency code of the currency transferred
|
|
1834
|
+
* @param {int} [since] the earliest time in ms to fetch transfers for (default 24 hours ago)
|
|
1835
|
+
* @param {int} [limit] the maximum number of transfer structures to retrieve (default 50, max 200)
|
|
1836
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1837
|
+
* @param {int} [params.until] the latest time in ms to fetch transfers for (default time now)
|
|
1838
|
+
* @param {int} [params.fromId] starting ID (To be released)
|
|
1839
|
+
* @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
1840
|
+
*/
|
|
1827
1841
|
async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1828
|
-
/**
|
|
1829
|
-
* @method
|
|
1830
|
-
* @name hashkey#fetchDeposits
|
|
1831
|
-
* @description fetch all deposits made to an account
|
|
1832
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-deposit-history
|
|
1833
|
-
* @param {string} code unified currency code of the currency transferred
|
|
1834
|
-
* @param {int} [since] the earliest time in ms to fetch transfers for (default 24 hours ago)
|
|
1835
|
-
* @param {int} [limit] the maximum number of transfer structures to retrieve (default 50, max 200)
|
|
1836
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1837
|
-
* @param {int} [params.until] the latest time in ms to fetch transfers for (default time now)
|
|
1838
|
-
* @param {int} [params.fromId] starting ID (To be released)
|
|
1839
|
-
* @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
1840
|
-
*/
|
|
1841
1842
|
const methodName = 'fetchDeposits';
|
|
1842
1843
|
await this.loadMarkets();
|
|
1843
1844
|
const request = {};
|
|
@@ -1874,19 +1875,19 @@ class hashkey extends hashkey$1 {
|
|
|
1874
1875
|
//
|
|
1875
1876
|
return this.parseTransactions(response, currency, since, limit, { 'type': 'deposit' });
|
|
1876
1877
|
}
|
|
1878
|
+
/**
|
|
1879
|
+
* @method
|
|
1880
|
+
* @name hashkey#fetchWithdrawals
|
|
1881
|
+
* @description fetch all withdrawals made from an account
|
|
1882
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/withdrawal-records
|
|
1883
|
+
* @param {string} code unified currency code of the currency transferred
|
|
1884
|
+
* @param {int} [since] the earliest time in ms to fetch transfers for (default 24 hours ago)
|
|
1885
|
+
* @param {int} [limit] the maximum number of transfer structures to retrieve (default 50, max 200)
|
|
1886
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1887
|
+
* @param {int} [params.until] the latest time in ms to fetch transfers for (default time now)
|
|
1888
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1889
|
+
*/
|
|
1877
1890
|
async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1878
|
-
/**
|
|
1879
|
-
* @method
|
|
1880
|
-
* @name hashkey#fetchWithdrawals
|
|
1881
|
-
* @description fetch all withdrawals made from an account
|
|
1882
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/withdrawal-records
|
|
1883
|
-
* @param {string} code unified currency code of the currency transferred
|
|
1884
|
-
* @param {int} [since] the earliest time in ms to fetch transfers for (default 24 hours ago)
|
|
1885
|
-
* @param {int} [limit] the maximum number of transfer structures to retrieve (default 50, max 200)
|
|
1886
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1887
|
-
* @param {int} [params.until] the latest time in ms to fetch transfers for (default time now)
|
|
1888
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1889
|
-
*/
|
|
1890
1891
|
const methodName = 'fetchWithdrawals';
|
|
1891
1892
|
await this.loadMarkets();
|
|
1892
1893
|
const request = {};
|
|
@@ -1930,22 +1931,22 @@ class hashkey extends hashkey$1 {
|
|
|
1930
1931
|
//
|
|
1931
1932
|
return this.parseTransactions(response, currency, since, limit, { 'type': 'withdrawal' });
|
|
1932
1933
|
}
|
|
1934
|
+
/**
|
|
1935
|
+
* @method
|
|
1936
|
+
* @name hashkey#withdraw
|
|
1937
|
+
* @description make a withdrawal
|
|
1938
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/withdraw
|
|
1939
|
+
* @param {string} code unified currency code
|
|
1940
|
+
* @param {float} amount the amount to withdraw
|
|
1941
|
+
* @param {string} address the address to withdraw to
|
|
1942
|
+
* @param {string} tag
|
|
1943
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1944
|
+
* @param {string} [params.network] network for withdraw
|
|
1945
|
+
* @param {string} [params.clientOrderId] client order id
|
|
1946
|
+
* @param {string} [params.platform] the platform to withdraw to (hashkey, HashKey HK)
|
|
1947
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1948
|
+
*/
|
|
1933
1949
|
async withdraw(code, amount, address, tag = undefined, params = {}) {
|
|
1934
|
-
/**
|
|
1935
|
-
* @method
|
|
1936
|
-
* @name hashkey#withdraw
|
|
1937
|
-
* @description make a withdrawal
|
|
1938
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/withdraw
|
|
1939
|
-
* @param {string} code unified currency code
|
|
1940
|
-
* @param {float} amount the amount to withdraw
|
|
1941
|
-
* @param {string} address the address to withdraw to
|
|
1942
|
-
* @param {string} tag
|
|
1943
|
-
* @param {string} [params.network] network for withdraw
|
|
1944
|
-
* @param {string} [params.clientOrderId] client order id
|
|
1945
|
-
* @param {string} [params.platform] the platform to withdraw to (hashkey, HashKey HK)
|
|
1946
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1947
|
-
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1948
|
-
*/
|
|
1949
1950
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
1950
1951
|
await this.loadMarkets();
|
|
1951
1952
|
const currency = this.currency(code);
|
|
@@ -2092,21 +2093,21 @@ class hashkey extends hashkey$1 {
|
|
|
2092
2093
|
};
|
|
2093
2094
|
return this.safeString(statuses, status, status);
|
|
2094
2095
|
}
|
|
2096
|
+
/**
|
|
2097
|
+
* @method
|
|
2098
|
+
* @name hashkey#transfer
|
|
2099
|
+
* @description transfer currency internally between wallets on the same account
|
|
2100
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/new-account-transfer
|
|
2101
|
+
* @param {string} code unified currency code
|
|
2102
|
+
* @param {float} amount amount to transfer
|
|
2103
|
+
* @param {string} fromAccount account id to transfer from
|
|
2104
|
+
* @param {string} toAccount account id to transfer to
|
|
2105
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2106
|
+
* @param {string} [params.clientOrderId] a unique id for the transfer
|
|
2107
|
+
* @param {string} [params.remark] a note for the transfer
|
|
2108
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
2109
|
+
*/
|
|
2095
2110
|
async transfer(code, amount, fromAccount, toAccount, params = {}) {
|
|
2096
|
-
/**
|
|
2097
|
-
* @method
|
|
2098
|
-
* @name hashkey#transfer
|
|
2099
|
-
* @description transfer currency internally between wallets on the same account
|
|
2100
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/new-account-transfer
|
|
2101
|
-
* @param {string} code unified currency code
|
|
2102
|
-
* @param {float} amount amount to transfer
|
|
2103
|
-
* @param {string} fromAccount account id to transfer from
|
|
2104
|
-
* @param {string} toAccount account id to transfer to
|
|
2105
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2106
|
-
* @param {string} [params.clientOrderId] a unique id for the transfer
|
|
2107
|
-
* @param {string} [params.remark] a note for the transfer
|
|
2108
|
-
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
2109
|
-
*/
|
|
2110
2111
|
await this.loadMarkets();
|
|
2111
2112
|
const currency = this.currency(code);
|
|
2112
2113
|
const request = {
|
|
@@ -2156,15 +2157,15 @@ class hashkey extends hashkey$1 {
|
|
|
2156
2157
|
'info': transfer,
|
|
2157
2158
|
};
|
|
2158
2159
|
}
|
|
2160
|
+
/**
|
|
2161
|
+
* @method
|
|
2162
|
+
* @name hashkey#fetchAccounts
|
|
2163
|
+
* @description fetch all the accounts associated with a profile
|
|
2164
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/query-sub-account
|
|
2165
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2166
|
+
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
|
|
2167
|
+
*/
|
|
2159
2168
|
async fetchAccounts(params = {}) {
|
|
2160
|
-
/**
|
|
2161
|
-
* @method
|
|
2162
|
-
* @name hashkey#fetchAccounts
|
|
2163
|
-
* @description fetch all the accounts associated with a profile
|
|
2164
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/query-sub-account
|
|
2165
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2166
|
-
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
|
|
2167
|
-
*/
|
|
2168
2169
|
await this.loadMarkets();
|
|
2169
2170
|
const response = await this.privateGetApiV1AccountType(params);
|
|
2170
2171
|
//
|
|
@@ -2225,21 +2226,21 @@ class hashkey extends hashkey$1 {
|
|
|
2225
2226
|
};
|
|
2226
2227
|
return this.safeInteger(types, type, type);
|
|
2227
2228
|
}
|
|
2229
|
+
/**
|
|
2230
|
+
* @method
|
|
2231
|
+
* @name hashkey#fetchLedger
|
|
2232
|
+
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
2233
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-account-transaction-list
|
|
2234
|
+
* @param {string} [code] unified currency code, default is undefined (not used)
|
|
2235
|
+
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
2236
|
+
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
2237
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2238
|
+
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
2239
|
+
* @param {int} [params.flowType] trade, fee, transfer, deposit, withdrawal
|
|
2240
|
+
* @param {int} [params.accountType] spot, swap, custody
|
|
2241
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
2242
|
+
*/
|
|
2228
2243
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2229
|
-
/**
|
|
2230
|
-
* @method
|
|
2231
|
-
* @name hashkey#fetchLedger
|
|
2232
|
-
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
2233
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-account-transaction-list
|
|
2234
|
-
* @param {string} [code] unified currency code, default is undefined (not used)
|
|
2235
|
-
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
2236
|
-
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
2237
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2238
|
-
* @param {int} [params.until] the latest time in ms to fetch entries for
|
|
2239
|
-
* @param {int} [params.flowType] trade, fee, transfer, deposit, withdrawal
|
|
2240
|
-
* @param {int} [params.accountType] spot, swap, custody
|
|
2241
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
2242
|
-
*/
|
|
2243
2244
|
const methodName = 'fetchLedger';
|
|
2244
2245
|
if (since === undefined) {
|
|
2245
2246
|
throw new errors.ArgumentsRequired(this.id + ' ' + methodName + '() requires a since argument');
|
|
@@ -2349,28 +2350,28 @@ class hashkey extends hashkey$1 {
|
|
|
2349
2350
|
'fee': undefined,
|
|
2350
2351
|
}, currency);
|
|
2351
2352
|
}
|
|
2353
|
+
/**
|
|
2354
|
+
* @method
|
|
2355
|
+
* @name hashkey#createOrder
|
|
2356
|
+
* @description create a trade order
|
|
2357
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/test-new-order
|
|
2358
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/create-order
|
|
2359
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/create-new-futures-order
|
|
2360
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
2361
|
+
* @param {string} type 'market' or 'limit' or 'LIMIT_MAKER' for spot, 'market' or 'limit' or 'STOP' for swap
|
|
2362
|
+
* @param {string} side 'buy' or 'sell'
|
|
2363
|
+
* @param {float} amount how much of you want to trade in units of the base currency
|
|
2364
|
+
* @param {float} [price] the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
2365
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2366
|
+
* @param {float} [params.cost] *spot market buy only* the quote quantity that can be used as an alternative for the amount
|
|
2367
|
+
* @param {boolean} [params.test] *spot markets only* whether to use the test endpoint or not, default is false
|
|
2368
|
+
* @param {bool} [params.postOnly] if true, the order will only be posted to the order book and not executed immediately
|
|
2369
|
+
* @param {string} [params.timeInForce] "GTC" or "IOC" or "PO" for spot, 'GTC' or 'FOK' or 'IOC' or 'LIMIT_MAKER' or 'PO' for swap
|
|
2370
|
+
* @param {string} [params.clientOrderId] a unique id for the order - is mandatory for swap
|
|
2371
|
+
* @param {float} [params.triggerPrice] *swap markets only* The price at which a trigger order is triggered at
|
|
2372
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2373
|
+
*/
|
|
2352
2374
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
2353
|
-
/**
|
|
2354
|
-
* @method
|
|
2355
|
-
* @name hashkey#createOrder
|
|
2356
|
-
* @description create a trade order
|
|
2357
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/test-new-order
|
|
2358
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/create-order
|
|
2359
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/create-new-futures-order
|
|
2360
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
2361
|
-
* @param {string} type 'market' or 'limit' or 'LIMIT_MAKER' for spot, 'market' or 'limit' or 'STOP' for swap
|
|
2362
|
-
* @param {string} side 'buy' or 'sell'
|
|
2363
|
-
* @param {float} amount how much of you want to trade in units of the base currency
|
|
2364
|
-
* @param {float} [price] the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
2365
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2366
|
-
* @param {float} [params.cost] *spot market buy only* the quote quantity that can be used as an alternative for the amount
|
|
2367
|
-
* @param {boolean} [params.test] *spot markets only* whether to use the test endpoint or not, default is false
|
|
2368
|
-
* @param {bool} [params.postOnly] if true, the order will only be posted to the order book and not executed immediately
|
|
2369
|
-
* @param {string} [params.timeInForce] "GTC" or "IOC" or "PO" for spot, 'GTC' or 'FOK' or 'IOC' or 'LIMIT_MAKER' or 'PO' for swap
|
|
2370
|
-
* @param {string} [params.clientOrderId] a unique id for the order - is mandatory for swap
|
|
2371
|
-
* @param {float} [params.triggerPrice] *swap markets only* The price at which a trigger order is triggered at
|
|
2372
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2373
|
-
*/
|
|
2374
2375
|
await this.loadMarkets();
|
|
2375
2376
|
const market = this.market(symbol);
|
|
2376
2377
|
if (market['spot']) {
|
|
@@ -2383,16 +2384,16 @@ class hashkey extends hashkey$1 {
|
|
|
2383
2384
|
throw new errors.NotSupported(this.id + ' createOrder() is not supported for ' + market['type'] + ' type of markets');
|
|
2384
2385
|
}
|
|
2385
2386
|
}
|
|
2387
|
+
/**
|
|
2388
|
+
* @method
|
|
2389
|
+
* @name hashkey#createMarketBuyOrderWithCost
|
|
2390
|
+
* @description create a market buy order by providing the symbol and cost
|
|
2391
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
2392
|
+
* @param {float} cost how much you want to trade in units of the quote currency
|
|
2393
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2394
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2395
|
+
*/
|
|
2386
2396
|
async createMarketBuyOrderWithCost(symbol, cost, params = {}) {
|
|
2387
|
-
/**
|
|
2388
|
-
* @method
|
|
2389
|
-
* @name hashkey#createMarketBuyOrderWithCost
|
|
2390
|
-
* @description create a market buy order by providing the symbol and cost
|
|
2391
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
2392
|
-
* @param {float} cost how much you want to trade in units of the quote currency
|
|
2393
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2394
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2395
|
-
*/
|
|
2396
2397
|
await this.loadMarkets();
|
|
2397
2398
|
const market = this.market(symbol);
|
|
2398
2399
|
if (!market['spot']) {
|
|
@@ -2401,26 +2402,26 @@ class hashkey extends hashkey$1 {
|
|
|
2401
2402
|
params['cost'] = cost;
|
|
2402
2403
|
return await this.createOrder(symbol, 'market', 'buy', cost, undefined, params);
|
|
2403
2404
|
}
|
|
2405
|
+
/**
|
|
2406
|
+
* @method
|
|
2407
|
+
* @name hashkey#createSpotOrder
|
|
2408
|
+
* @description create a trade order on spot market
|
|
2409
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/test-new-order
|
|
2410
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/create-order
|
|
2411
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
2412
|
+
* @param {string} type 'market' or 'limit' or 'LIMIT_MAKER'
|
|
2413
|
+
* @param {string} side 'buy' or 'sell'
|
|
2414
|
+
* @param {float} amount how much of you want to trade in units of the base currency
|
|
2415
|
+
* @param {float} [price] the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
2416
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2417
|
+
* @param {float} [params.cost] *market buy only* the quote quantity that can be used as an alternative for the amount
|
|
2418
|
+
* @param {bool} [params.test] whether to use the test endpoint or not, default is false
|
|
2419
|
+
* @param {bool} [params.postOnly] if true, the order will only be posted to the order book and not executed immediately
|
|
2420
|
+
* @param {string} [params.timeInForce] 'GTC', 'IOC', or 'PO'
|
|
2421
|
+
* @param {string} [params.clientOrderId] a unique id for the order
|
|
2422
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2423
|
+
*/
|
|
2404
2424
|
async createSpotOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
2405
|
-
/**
|
|
2406
|
-
* @method
|
|
2407
|
-
* @name hashkey#createSpotOrder
|
|
2408
|
-
* @description create a trade order on spot market
|
|
2409
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/test-new-order
|
|
2410
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/create-order
|
|
2411
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
2412
|
-
* @param {string} type 'market' or 'limit' or 'LIMIT_MAKER'
|
|
2413
|
-
* @param {string} side 'buy' or 'sell'
|
|
2414
|
-
* @param {float} amount how much of you want to trade in units of the base currency
|
|
2415
|
-
* @param {float} [price] the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
2416
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2417
|
-
* @param {float} [params.cost] *market buy only* the quote quantity that can be used as an alternative for the amount
|
|
2418
|
-
* @param {bool} [params.test] whether to use the test endpoint or not, default is false
|
|
2419
|
-
* @param {bool} [params.postOnly] if true, the order will only be posted to the order book and not executed immediately
|
|
2420
|
-
* @param {string} [params.timeInForce] 'GTC', 'IOC', or 'PO'
|
|
2421
|
-
* @param {string} [params.clientOrderId] a unique id for the order
|
|
2422
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2423
|
-
*/
|
|
2424
2425
|
const triggerPrice = this.safeString2(params, 'stopPrice', 'triggerPrice');
|
|
2425
2426
|
if (triggerPrice !== undefined) {
|
|
2426
2427
|
throw new errors.NotSupported(this.id + ' trigger orders are not supported for spot markets');
|
|
@@ -2647,25 +2648,25 @@ class hashkey extends hashkey$1 {
|
|
|
2647
2648
|
}
|
|
2648
2649
|
return this.extend(request, params);
|
|
2649
2650
|
}
|
|
2651
|
+
/**
|
|
2652
|
+
* @method
|
|
2653
|
+
* @name hashkey#createSwapOrder
|
|
2654
|
+
* @description create a trade order on swap market
|
|
2655
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/create-new-futures-order
|
|
2656
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
2657
|
+
* @param {string} type 'market' or 'limit' or 'STOP'
|
|
2658
|
+
* @param {string} side 'buy' or 'sell'
|
|
2659
|
+
* @param {float} amount how much of you want to trade in units of the base currency
|
|
2660
|
+
* @param {float} [price] the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
2661
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2662
|
+
* @param {bool} [params.postOnly] if true, the order will only be posted to the order book and not executed immediately
|
|
2663
|
+
* @param {bool} [params.reduceOnly] true or false whether the order is reduce only
|
|
2664
|
+
* @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
|
|
2665
|
+
* @param {string} [params.timeInForce] 'GTC', 'FOK', 'IOC', 'LIMIT_MAKER' or 'PO'
|
|
2666
|
+
* @param {string} [params.clientOrderId] a unique id for the order
|
|
2667
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2668
|
+
*/
|
|
2650
2669
|
async createSwapOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
2651
|
-
/**
|
|
2652
|
-
* @method
|
|
2653
|
-
* @name hashkey#createSwapOrder
|
|
2654
|
-
* @description create a trade order on swap market
|
|
2655
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/create-new-futures-order
|
|
2656
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
2657
|
-
* @param {string} type 'market' or 'limit' or 'STOP'
|
|
2658
|
-
* @param {string} side 'buy' or 'sell'
|
|
2659
|
-
* @param {float} amount how much of you want to trade in units of the base currency
|
|
2660
|
-
* @param {float} [price] the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
2661
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2662
|
-
* @param {bool} [params.postOnly] if true, the order will only be posted to the order book and not executed immediately
|
|
2663
|
-
* @param {bool} [params.reduceOnly] true or false whether the order is reduce only
|
|
2664
|
-
* @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
|
|
2665
|
-
* @param {string} [params.timeInForce] 'GTC', 'FOK', 'IOC', 'LIMIT_MAKER' or 'PO'
|
|
2666
|
-
* @param {string} [params.clientOrderId] a unique id for the order
|
|
2667
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2668
|
-
*/
|
|
2669
2670
|
await this.loadMarkets();
|
|
2670
2671
|
const market = this.market(symbol);
|
|
2671
2672
|
const request = this.createSwapOrderRequest(symbol, type, side, amount, price, params);
|
|
@@ -2693,17 +2694,17 @@ class hashkey extends hashkey$1 {
|
|
|
2693
2694
|
//
|
|
2694
2695
|
return this.parseOrder(response, market);
|
|
2695
2696
|
}
|
|
2697
|
+
/**
|
|
2698
|
+
* @method
|
|
2699
|
+
* @name hashkey#createOrders
|
|
2700
|
+
* @description create a list of trade orders (all orders should be of the same symbol)
|
|
2701
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/create-multiple-orders
|
|
2702
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/batch-create-new-futures-order
|
|
2703
|
+
* @param {Array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
|
|
2704
|
+
* @param {object} [params] extra parameters specific to the api endpoint
|
|
2705
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2706
|
+
*/
|
|
2696
2707
|
async createOrders(orders, params = {}) {
|
|
2697
|
-
/**
|
|
2698
|
-
* @method
|
|
2699
|
-
* @name hashkey#createOrders
|
|
2700
|
-
* @description create a list of trade orders (all orders should be of the same symbol)
|
|
2701
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/create-multiple-orders
|
|
2702
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/batch-create-new-futures-order
|
|
2703
|
-
* @param {Array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
|
|
2704
|
-
* @param {object} [params] extra parameters specific to the api endpoint
|
|
2705
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2706
|
-
*/
|
|
2707
2708
|
await this.loadMarkets();
|
|
2708
2709
|
const ordersRequests = [];
|
|
2709
2710
|
for (let i = 0; i < orders.length; i++) {
|
|
@@ -2808,22 +2809,22 @@ class hashkey extends hashkey$1 {
|
|
|
2808
2809
|
}
|
|
2809
2810
|
return this.parseOrders(responseOrders);
|
|
2810
2811
|
}
|
|
2812
|
+
/**
|
|
2813
|
+
* @method
|
|
2814
|
+
* @name hashkey#cancelOrder
|
|
2815
|
+
* @description cancels an open order
|
|
2816
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/cancel-order
|
|
2817
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/cancel-futures-order
|
|
2818
|
+
* @param {string} id order id
|
|
2819
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
2820
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2821
|
+
* @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch entry for (default 'spot')
|
|
2822
|
+
* @param {string} [params.clientOrderId] a unique id for the order that can be used as an alternative for the id
|
|
2823
|
+
* @param {bool} [params.trigger] *swap markets only* true for canceling a trigger order (default false)
|
|
2824
|
+
* @param {bool} [params.stop] *swap markets only* an alternative for trigger param
|
|
2825
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2826
|
+
*/
|
|
2811
2827
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
2812
|
-
/**
|
|
2813
|
-
* @method
|
|
2814
|
-
* @name hashkey#cancelOrder
|
|
2815
|
-
* @description cancels an open order
|
|
2816
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/cancel-order
|
|
2817
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/cancel-futures-order
|
|
2818
|
-
* @param {string} id order id
|
|
2819
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
2820
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2821
|
-
* @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch entry for (default 'spot')
|
|
2822
|
-
* @param {string} [params.clientOrderId] a unique id for the order that can be used as an alternative for the id
|
|
2823
|
-
* @param {bool} [params.trigger] *swap markets only* true for canceling a trigger order (default false)
|
|
2824
|
-
* @param {bool} [params.stop] *swap markets only* an alternative for trigger param
|
|
2825
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2826
|
-
*/
|
|
2827
2828
|
const methodName = 'cancelOrder';
|
|
2828
2829
|
this.checkTypeParam(methodName, params);
|
|
2829
2830
|
await this.loadMarkets();
|
|
@@ -2900,18 +2901,18 @@ class hashkey extends hashkey$1 {
|
|
|
2900
2901
|
}
|
|
2901
2902
|
return this.parseOrder(response);
|
|
2902
2903
|
}
|
|
2904
|
+
/**
|
|
2905
|
+
* @method
|
|
2906
|
+
* @name hashkey#cancelAllOrders
|
|
2907
|
+
* @description cancel all open orders
|
|
2908
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/cancel-all-open-orders
|
|
2909
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/batch-cancel-futures-order
|
|
2910
|
+
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
2911
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2912
|
+
* @param {string} [params.side] 'buy' or 'sell'
|
|
2913
|
+
* @returns {object} response from exchange
|
|
2914
|
+
*/
|
|
2903
2915
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
2904
|
-
/**
|
|
2905
|
-
* @method
|
|
2906
|
-
* @name hashkey#cancelAllOrders
|
|
2907
|
-
* @description cancel all open orders
|
|
2908
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/cancel-all-open-orders
|
|
2909
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/batch-cancel-futures-order
|
|
2910
|
-
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
2911
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2912
|
-
* @param {string} [params.side] 'buy' or 'sell'
|
|
2913
|
-
* @returns {object} response from exchange
|
|
2914
|
-
*/
|
|
2915
2916
|
// Does not cancel trigger orders. For canceling trigger order use cancelOrder() or cancelOrders()
|
|
2916
2917
|
const methodName = 'cancelAllOrders';
|
|
2917
2918
|
if (symbol === undefined) {
|
|
@@ -2946,18 +2947,19 @@ class hashkey extends hashkey$1 {
|
|
|
2946
2947
|
order['info'] = response;
|
|
2947
2948
|
return [order];
|
|
2948
2949
|
}
|
|
2950
|
+
/**
|
|
2951
|
+
* @method
|
|
2952
|
+
* @name hashkey#cancelOrders
|
|
2953
|
+
* @description cancel multiple orders
|
|
2954
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/cancel-multiple-orders
|
|
2955
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/batch-cancel-futures-order-by-order-id
|
|
2956
|
+
* @param {string[]} ids order ids
|
|
2957
|
+
* @param {string} [symbol] unified market symbol (not used by hashkey)
|
|
2958
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2959
|
+
* @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch entry for (default 'spot')
|
|
2960
|
+
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2961
|
+
*/
|
|
2949
2962
|
async cancelOrders(ids, symbol = undefined, params = {}) {
|
|
2950
|
-
/**
|
|
2951
|
-
* @method
|
|
2952
|
-
* @name hashkey#cancelOrders
|
|
2953
|
-
* @description cancel multiple orders
|
|
2954
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/cancel-multiple-orders
|
|
2955
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/batch-cancel-futures-order-by-order-id
|
|
2956
|
-
* @param {string[]} ids order ids
|
|
2957
|
-
* @param {string} [symbol] unified market symbol (not used by hashkey)
|
|
2958
|
-
* @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch entry for (default 'spot')
|
|
2959
|
-
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
2960
|
-
*/
|
|
2961
2963
|
const methodName = 'cancelOrders';
|
|
2962
2964
|
await this.loadMarkets();
|
|
2963
2965
|
const request = {};
|
|
@@ -2989,23 +2991,23 @@ class hashkey extends hashkey$1 {
|
|
|
2989
2991
|
order['info'] = response;
|
|
2990
2992
|
return [order];
|
|
2991
2993
|
}
|
|
2994
|
+
/**
|
|
2995
|
+
* @method
|
|
2996
|
+
* @name hashkey#fetchOrder
|
|
2997
|
+
* @description fetches information on an order made by the user
|
|
2998
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/query-order
|
|
2999
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-futures-order
|
|
3000
|
+
* @param {string} id the order id
|
|
3001
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
3002
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3003
|
+
* @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch entry for (default 'spot')
|
|
3004
|
+
* @param {string} [params.clientOrderId] a unique id for the order that can be used as an alternative for the id
|
|
3005
|
+
* @param {string} [params.accountId] *spot markets only* account id to fetch the order from
|
|
3006
|
+
* @param {bool} [params.trigger] *swap markets only* true for fetching a trigger order (default false)
|
|
3007
|
+
* @param {bool} [params.stop] *swap markets only* an alternative for trigger param
|
|
3008
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3009
|
+
*/
|
|
2992
3010
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
2993
|
-
/**
|
|
2994
|
-
* @method
|
|
2995
|
-
* @name hashkey#fetchOrder
|
|
2996
|
-
* @description fetches information on an order made by the user
|
|
2997
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/query-order
|
|
2998
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-futures-order
|
|
2999
|
-
* @param {string} id the order id
|
|
3000
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
3001
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3002
|
-
* @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch entry for (default 'spot')
|
|
3003
|
-
* @param {string} [params.clientOrderId] a unique id for the order that can be used as an alternative for the id
|
|
3004
|
-
* @param {string} [params.accountId] *spot markets only* account id to fetch the order from
|
|
3005
|
-
* @param {bool} [params.trigger] *swap markets only* true for fetching a trigger order (default false)
|
|
3006
|
-
* @param {bool} [params.stop] *swap markets only* an alternative for trigger param
|
|
3007
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3008
|
-
*/
|
|
3009
3011
|
const methodName = 'fetchOrder';
|
|
3010
3012
|
this.checkTypeParam(methodName, params);
|
|
3011
3013
|
await this.loadMarkets();
|
|
@@ -3098,28 +3100,28 @@ class hashkey extends hashkey$1 {
|
|
|
3098
3100
|
}
|
|
3099
3101
|
return this.parseOrder(response);
|
|
3100
3102
|
}
|
|
3103
|
+
/**
|
|
3104
|
+
* @method
|
|
3105
|
+
* @name hashkey#fetchOpenOrders
|
|
3106
|
+
* @description fetch all unfilled currently open orders
|
|
3107
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-current-open-orders
|
|
3108
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-sub-account-open-orders
|
|
3109
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/sub
|
|
3110
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/query-open-futures-orders
|
|
3111
|
+
* @param {string} [symbol] unified market symbol of the market orders were made in - is mandatory for swap markets
|
|
3112
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
3113
|
+
* @param {int} [limit] the maximum number of order structures to retrieve - default 500, maximum 1000
|
|
3114
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3115
|
+
* @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch entries for (default 'spot')
|
|
3116
|
+
* @param {string} [params.orderId] *spot markets only* the id of the order to fetch
|
|
3117
|
+
* @param {string} [params.side] *spot markets only* 'buy' or 'sell' - the side of the orders to fetch
|
|
3118
|
+
* @param {string} [params.fromOrderId] *swap markets only* the id of the order to start from
|
|
3119
|
+
* @param {bool} [params.trigger] *swap markets only* true for fetching trigger orders (default false)
|
|
3120
|
+
* @param {bool} [params.stop] *swap markets only* an alternative for trigger param
|
|
3121
|
+
* @param {string} [params.accountId] account id to fetch the orders from
|
|
3122
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3123
|
+
*/
|
|
3101
3124
|
async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3102
|
-
/**
|
|
3103
|
-
* @method
|
|
3104
|
-
* @name hashkey#fetchOpenOrders
|
|
3105
|
-
* @description fetch all unfilled currently open orders
|
|
3106
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-current-open-orders
|
|
3107
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-sub-account-open-orders
|
|
3108
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/sub
|
|
3109
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/query-open-futures-orders
|
|
3110
|
-
* @param {string} [symbol] unified market symbol of the market orders were made in - is mandatory for swap markets
|
|
3111
|
-
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
3112
|
-
* @param {int} [limit] the maximum number of order structures to retrieve - default 500, maximum 1000
|
|
3113
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3114
|
-
* @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch entries for (default 'spot')
|
|
3115
|
-
* @param {string} [params.orderId] *spot markets only* the id of the order to fetch
|
|
3116
|
-
* @param {string} [params.side] *spot markets only* 'buy' or 'sell' - the side of the orders to fetch
|
|
3117
|
-
* @param {string} [params.fromOrderId] *swap markets only* the id of the order to start from
|
|
3118
|
-
* @param {bool} [params.trigger] *swap markets only* true for fetching trigger orders (default false)
|
|
3119
|
-
* @param {bool} [params.stop] *swap markets only* an alternative for trigger param
|
|
3120
|
-
* @param {string} [params.accountId] account id to fetch the orders from
|
|
3121
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3122
|
-
*/
|
|
3123
3125
|
const methodName = 'fetchOpenOrders';
|
|
3124
3126
|
this.checkTypeParam(methodName, params);
|
|
3125
3127
|
await this.loadMarkets();
|
|
@@ -3140,23 +3142,23 @@ class hashkey extends hashkey$1 {
|
|
|
3140
3142
|
throw new errors.NotSupported(this.id + ' ' + methodName + '() is not supported for ' + marketType + ' type of markets');
|
|
3141
3143
|
}
|
|
3142
3144
|
}
|
|
3145
|
+
/**
|
|
3146
|
+
* @method
|
|
3147
|
+
* @ignore
|
|
3148
|
+
* @name hashkey#fetchOpenSpotOrders
|
|
3149
|
+
* @description fetch all unfilled currently open orders for spot markets
|
|
3150
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-current-open-orders
|
|
3151
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/sub
|
|
3152
|
+
* @param {string} [symbol] unified market symbol of the market orders were made in
|
|
3153
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
3154
|
+
* @param {int} [limit] the maximum number of order structures to retrieve - default 500, maximum 1000
|
|
3155
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3156
|
+
* @param {string} [params.orderId] the id of the order to fetch
|
|
3157
|
+
* @param {string} [params.side] 'buy' or 'sell' - the side of the orders to fetch
|
|
3158
|
+
* @param {string} [params.accountId] account id to fetch the orders from
|
|
3159
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3160
|
+
*/
|
|
3143
3161
|
async fetchOpenSpotOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3144
|
-
/**
|
|
3145
|
-
* @method
|
|
3146
|
-
* @ignore
|
|
3147
|
-
* @name hashkey#fetchOpenSpotOrders
|
|
3148
|
-
* @description fetch all unfilled currently open orders for spot markets
|
|
3149
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-current-open-orders
|
|
3150
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/sub
|
|
3151
|
-
* @param {string} [symbol] unified market symbol of the market orders were made in
|
|
3152
|
-
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
3153
|
-
* @param {int} [limit] the maximum number of order structures to retrieve - default 500, maximum 1000
|
|
3154
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3155
|
-
* @param {string} [params.orderId] the id of the order to fetch
|
|
3156
|
-
* @param {string} [params.side] 'buy' or 'sell' - the side of the orders to fetch
|
|
3157
|
-
* @param {string} [params.accountId] account id to fetch the orders from
|
|
3158
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3159
|
-
*/
|
|
3160
3162
|
await this.loadMarkets();
|
|
3161
3163
|
let methodName = 'fetchOpenSpotOrders';
|
|
3162
3164
|
[methodName, params] = this.handleParamString(params, 'methodName', methodName);
|
|
@@ -3219,24 +3221,24 @@ class hashkey extends hashkey$1 {
|
|
|
3219
3221
|
}
|
|
3220
3222
|
return this.parseOrders(response, market, since, limit);
|
|
3221
3223
|
}
|
|
3224
|
+
/**
|
|
3225
|
+
* @method
|
|
3226
|
+
* @ignore
|
|
3227
|
+
* @name hashkey#fetchOpenSwapOrders
|
|
3228
|
+
* @description fetch all unfilled currently open orders for swap markets
|
|
3229
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/query-open-futures-orders
|
|
3230
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-sub-account-open-orders
|
|
3231
|
+
* @param {string} symbol *is mandatory* unified market symbol of the market orders were made in
|
|
3232
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
3233
|
+
* @param {int} [limit] the maximum number of order structures to retrieve - maximum 500
|
|
3234
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3235
|
+
* @param {string} [params.fromOrderId] the id of the order to start from
|
|
3236
|
+
* @param {bool} [params.trigger] true for fetching trigger orders (default false)
|
|
3237
|
+
* @param {bool} [params.stop] an alternative for trigger param
|
|
3238
|
+
* @param {string} [params.accountId] account id to fetch the orders from
|
|
3239
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3240
|
+
*/
|
|
3222
3241
|
async fetchOpenSwapOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3223
|
-
/**
|
|
3224
|
-
* @method
|
|
3225
|
-
* @ignore
|
|
3226
|
-
* @name hashkey#fetchOpenSwapOrders
|
|
3227
|
-
* @description fetch all unfilled currently open orders for swap markets
|
|
3228
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/query-open-futures-orders
|
|
3229
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-sub-account-open-orders
|
|
3230
|
-
* @param {string} symbol *is mandatory* unified market symbol of the market orders were made in
|
|
3231
|
-
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
3232
|
-
* @param {int} [limit] the maximum number of order structures to retrieve - maximum 500
|
|
3233
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3234
|
-
* @param {string} [params.fromOrderId] the id of the order to start from
|
|
3235
|
-
* @param {bool} [params.trigger] true for fetching trigger orders (default false)
|
|
3236
|
-
* @param {bool} [params.stop] an alternative for trigger param
|
|
3237
|
-
* @param {string} [params.accountId] account id to fetch the orders from
|
|
3238
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3239
|
-
*/
|
|
3240
3242
|
let methodName = 'fetchOpenSwapOrders';
|
|
3241
3243
|
[methodName, params] = this.handleParamString(params, 'methodName', methodName);
|
|
3242
3244
|
if (symbol === undefined) {
|
|
@@ -3317,28 +3319,28 @@ class hashkey extends hashkey$1 {
|
|
|
3317
3319
|
}
|
|
3318
3320
|
return this.parseOrders(response, market, since, limit);
|
|
3319
3321
|
}
|
|
3322
|
+
/**
|
|
3323
|
+
* @method
|
|
3324
|
+
* @name hashkey#fetchCanceledAndClosedOrders
|
|
3325
|
+
* @description fetches information on multiple canceled and closed orders made by the user
|
|
3326
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-all-orders
|
|
3327
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/query-futures-history-orders
|
|
3328
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-sub-account-history-orders
|
|
3329
|
+
* @param {string} symbol *is mandatory for swap markets* unified market symbol of the market orders were made in
|
|
3330
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
3331
|
+
* @param {int} [limit] the maximum number of order structures to retrieve - default 500, maximum 1000
|
|
3332
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3333
|
+
* @param {int} [params.until] the latest time in ms to fetch entries for - only supports the last 90 days timeframe
|
|
3334
|
+
* @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch entries for (default 'spot')
|
|
3335
|
+
* @param {string} [params.orderId] *spot markets only* the id of the order to fetch
|
|
3336
|
+
* @param {string} [params.side] *spot markets only* 'buy' or 'sell' - the side of the orders to fetch
|
|
3337
|
+
* @param {string} [params.fromOrderId] *swap markets only* the id of the order to start from
|
|
3338
|
+
* @param {bool} [params.trigger] *swap markets only* the id of the order to start from true for fetching trigger orders (default false)
|
|
3339
|
+
* @param {bool} [params.stop] *swap markets only* the id of the order to start from an alternative for trigger param
|
|
3340
|
+
* @param {string} [params.accountId] account id to fetch the orders from
|
|
3341
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3342
|
+
*/
|
|
3320
3343
|
async fetchCanceledAndClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3321
|
-
/**
|
|
3322
|
-
* @method
|
|
3323
|
-
* @name hashkey#fetchCanceledAndClosedOrders
|
|
3324
|
-
* @description fetches information on multiple canceled and closed orders made by the user
|
|
3325
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-all-orders
|
|
3326
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/query-futures-history-orders
|
|
3327
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-sub-account-history-orders
|
|
3328
|
-
* @param {string} symbol *is mandatory for swap markets* unified market symbol of the market orders were made in
|
|
3329
|
-
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
3330
|
-
* @param {int} [limit] the maximum number of order structures to retrieve - default 500, maximum 1000
|
|
3331
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3332
|
-
* @param {int} [params.until] the latest time in ms to fetch entries for - only supports the last 90 days timeframe
|
|
3333
|
-
* @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch entries for (default 'spot')
|
|
3334
|
-
* @param {string} [params.orderId] *spot markets only* the id of the order to fetch
|
|
3335
|
-
* @param {string} [params.side] *spot markets only* 'buy' or 'sell' - the side of the orders to fetch
|
|
3336
|
-
* @param {string} [params.fromOrderId] *swap markets only* the id of the order to start from
|
|
3337
|
-
* @param {bool} [params.trigger] *swap markets only* the id of the order to start from true for fetching trigger orders (default false)
|
|
3338
|
-
* @param {bool} [params.stop] *swap markets only* the id of the order to start from an alternative for trigger param
|
|
3339
|
-
* @param {string} [params.accountId] account id to fetch the orders from
|
|
3340
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
3341
|
-
*/
|
|
3342
3344
|
const methodName = 'fetchCanceledAndClosedOrders';
|
|
3343
3345
|
this.checkTypeParam(methodName, params);
|
|
3344
3346
|
await this.loadMarkets();
|
|
@@ -3708,16 +3710,16 @@ class hashkey extends hashkey$1 {
|
|
|
3708
3710
|
};
|
|
3709
3711
|
return this.safeString(types, type, type);
|
|
3710
3712
|
}
|
|
3713
|
+
/**
|
|
3714
|
+
* @method
|
|
3715
|
+
* @name hashkey#fetchFundingRate
|
|
3716
|
+
* @description fetch the current funding rate
|
|
3717
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-futures-funding-rate
|
|
3718
|
+
* @param {string} symbol unified market symbol
|
|
3719
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3720
|
+
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
3721
|
+
*/
|
|
3711
3722
|
async fetchFundingRate(symbol, params = {}) {
|
|
3712
|
-
/**
|
|
3713
|
-
* @method
|
|
3714
|
-
* @name hashkey#fetchFundingRate
|
|
3715
|
-
* @description fetch the current funding rate
|
|
3716
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-futures-funding-rate
|
|
3717
|
-
* @param {string} symbol unified market symbol
|
|
3718
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3719
|
-
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
3720
|
-
*/
|
|
3721
3723
|
await this.loadMarkets();
|
|
3722
3724
|
const market = this.market(symbol);
|
|
3723
3725
|
const request = {
|
|
@@ -3733,16 +3735,16 @@ class hashkey extends hashkey$1 {
|
|
|
3733
3735
|
const rate = this.safeDict(response, 0, {});
|
|
3734
3736
|
return this.parseFundingRate(rate, market);
|
|
3735
3737
|
}
|
|
3738
|
+
/**
|
|
3739
|
+
* @method
|
|
3740
|
+
* @name hashkey#fetchFundingRates
|
|
3741
|
+
* @description fetch the funding rate for multiple markets
|
|
3742
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-futures-funding-rate
|
|
3743
|
+
* @param {string[]|undefined} symbols list of unified market symbols
|
|
3744
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3745
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rates-structure}, indexed by market symbols
|
|
3746
|
+
*/
|
|
3736
3747
|
async fetchFundingRates(symbols = undefined, params = {}) {
|
|
3737
|
-
/**
|
|
3738
|
-
* @method
|
|
3739
|
-
* @name hashkey#fetchFundingRates
|
|
3740
|
-
* @description fetch the funding rate for multiple markets
|
|
3741
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-futures-funding-rate
|
|
3742
|
-
* @param {string[]|undefined} symbols list of unified market symbols
|
|
3743
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3744
|
-
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rates-structure}, indexed by market symbols
|
|
3745
|
-
*/
|
|
3746
3748
|
await this.loadMarkets();
|
|
3747
3749
|
symbols = this.marketSymbols(symbols);
|
|
3748
3750
|
const request = {
|
|
@@ -3791,20 +3793,20 @@ class hashkey extends hashkey$1 {
|
|
|
3791
3793
|
'interval': undefined,
|
|
3792
3794
|
};
|
|
3793
3795
|
}
|
|
3796
|
+
/**
|
|
3797
|
+
* @method
|
|
3798
|
+
* @name hashkey#fetchFundingRateHistory
|
|
3799
|
+
* @description fetches historical funding rate prices
|
|
3800
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-futures-history-funding-rate
|
|
3801
|
+
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
3802
|
+
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
3803
|
+
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
3804
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3805
|
+
* @param {int} [params.fromId] the id of the entry to start from
|
|
3806
|
+
* @param {int} [params.endId] the id of the entry to end with
|
|
3807
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
3808
|
+
*/
|
|
3794
3809
|
async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3795
|
-
/**
|
|
3796
|
-
* @method
|
|
3797
|
-
* @name hashkey#fetchFundingRateHistory
|
|
3798
|
-
* @description fetches historical funding rate prices
|
|
3799
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-futures-history-funding-rate
|
|
3800
|
-
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
3801
|
-
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
3802
|
-
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
3803
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3804
|
-
* @param {int} [params.fromId] the id of the entry to start from
|
|
3805
|
-
* @param {int} [params.endId] the id of the entry to end with
|
|
3806
|
-
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
3807
|
-
*/
|
|
3808
3810
|
await this.loadMarkets();
|
|
3809
3811
|
if (symbol === undefined) {
|
|
3810
3812
|
throw new errors.ArgumentsRequired(this.id + ' fetchFundingRateHistory() requires a symbol argument');
|
|
@@ -3843,18 +3845,18 @@ class hashkey extends hashkey$1 {
|
|
|
3843
3845
|
const sorted = this.sortBy(rates, 'timestamp');
|
|
3844
3846
|
return this.filterBySinceLimit(sorted, since, limit);
|
|
3845
3847
|
}
|
|
3848
|
+
/**
|
|
3849
|
+
* @method
|
|
3850
|
+
* @description fetch open positions for a market
|
|
3851
|
+
* @name hashkey#fetchPositions
|
|
3852
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-futures-positions
|
|
3853
|
+
* @description fetch all open positions
|
|
3854
|
+
* @param {string[]|undefined} symbols list of unified market symbols
|
|
3855
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3856
|
+
* @param {string} [params.side] 'LONG' or 'SHORT' - the direction of the position (if not provided, positions for both sides will be returned)
|
|
3857
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
3858
|
+
*/
|
|
3846
3859
|
async fetchPositions(symbols = undefined, params = {}) {
|
|
3847
|
-
/**
|
|
3848
|
-
* @method
|
|
3849
|
-
* @description fetch open positions for a market
|
|
3850
|
-
* @name hashkey#fetchPositions
|
|
3851
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-futures-positions
|
|
3852
|
-
* @description fetch all open positions
|
|
3853
|
-
* @param {string[]|undefined} symbols list of unified market symbols
|
|
3854
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3855
|
-
* @param {string} [params.side] 'LONG' or 'SHORT' - the direction of the position (if not provided, positions for both sides will be returned)
|
|
3856
|
-
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
3857
|
-
*/
|
|
3858
3860
|
const methodName = 'fetchPositions';
|
|
3859
3861
|
if ((symbols === undefined)) {
|
|
3860
3862
|
throw new errors.ArgumentsRequired(this.id + ' ' + methodName + '() requires a symbol argument with one single market symbol');
|
|
@@ -3868,18 +3870,18 @@ class hashkey extends hashkey$1 {
|
|
|
3868
3870
|
await this.loadMarkets();
|
|
3869
3871
|
return await this.fetchPositionsForSymbol(symbols[0], this.extend({ 'methodName': 'fetchPositions' }, params));
|
|
3870
3872
|
}
|
|
3873
|
+
/**
|
|
3874
|
+
* @method
|
|
3875
|
+
* @description fetch open positions for a single market
|
|
3876
|
+
* @name hashkey#fetchPositionsForSymbol
|
|
3877
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-futures-positions
|
|
3878
|
+
* @description fetch all open positions for specific symbol
|
|
3879
|
+
* @param {string} symbol unified market symbol
|
|
3880
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3881
|
+
* @param {string} [params.side] 'LONG' or 'SHORT' - the direction of the position (if not provided, positions for both sides will be returned)
|
|
3882
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
3883
|
+
*/
|
|
3871
3884
|
async fetchPositionsForSymbol(symbol, params = {}) {
|
|
3872
|
-
/**
|
|
3873
|
-
* @method
|
|
3874
|
-
* @description fetch open positions for a single market
|
|
3875
|
-
* @name hashkey#fetchPositionsForSymbol
|
|
3876
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-futures-positions
|
|
3877
|
-
* @description fetch all open positions for specific symbol
|
|
3878
|
-
* @param {string} symbol unified market symbol
|
|
3879
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3880
|
-
* @param {string} [params.side] 'LONG' or 'SHORT' - the direction of the position (if not provided, positions for both sides will be returned)
|
|
3881
|
-
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
3882
|
-
*/
|
|
3883
3885
|
await this.loadMarkets();
|
|
3884
3886
|
const market = this.market(symbol);
|
|
3885
3887
|
let methodName = 'fetchPosition';
|
|
@@ -3954,16 +3956,16 @@ class hashkey extends hashkey$1 {
|
|
|
3954
3956
|
'info': position,
|
|
3955
3957
|
});
|
|
3956
3958
|
}
|
|
3959
|
+
/**
|
|
3960
|
+
* @method
|
|
3961
|
+
* @name hashkey#fetchLeverage
|
|
3962
|
+
* @description fetch the set leverage for a market
|
|
3963
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/query-futures-leverage-trade
|
|
3964
|
+
* @param {string} symbol unified market symbol
|
|
3965
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3966
|
+
* @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
3967
|
+
*/
|
|
3957
3968
|
async fetchLeverage(symbol, params = {}) {
|
|
3958
|
-
/**
|
|
3959
|
-
* @method
|
|
3960
|
-
* @name hashkey#fetchLeverage
|
|
3961
|
-
* @description fetch the set leverage for a market
|
|
3962
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/query-futures-leverage-trade
|
|
3963
|
-
* @param {string} symbol unified market symbol
|
|
3964
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3965
|
-
* @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
|
|
3966
|
-
*/
|
|
3967
3969
|
await this.loadMarkets();
|
|
3968
3970
|
const market = this.market(symbol);
|
|
3969
3971
|
const request = {
|
|
@@ -3993,17 +3995,17 @@ class hashkey extends hashkey$1 {
|
|
|
3993
3995
|
'shortLeverage': leverageValue,
|
|
3994
3996
|
};
|
|
3995
3997
|
}
|
|
3998
|
+
/**
|
|
3999
|
+
* @method
|
|
4000
|
+
* @name hashkey#setLeverage
|
|
4001
|
+
* @description set the level of leverage for a market
|
|
4002
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/change-futures-leverage-trade
|
|
4003
|
+
* @param {float} leverage the rate of leverage
|
|
4004
|
+
* @param {string} symbol unified market symbol
|
|
4005
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4006
|
+
* @returns {object} response from the exchange
|
|
4007
|
+
*/
|
|
3996
4008
|
async setLeverage(leverage, symbol = undefined, params = {}) {
|
|
3997
|
-
/**
|
|
3998
|
-
* @method
|
|
3999
|
-
* @name hashkey#setLeverage
|
|
4000
|
-
* @description set the level of leverage for a market
|
|
4001
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/change-futures-leverage-trade
|
|
4002
|
-
* @param {float} leverage the rate of leverage
|
|
4003
|
-
* @param {string} symbol unified market symbol
|
|
4004
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4005
|
-
* @returns {object} response from the exchange
|
|
4006
|
-
*/
|
|
4007
4009
|
if (symbol === undefined) {
|
|
4008
4010
|
throw new errors.ArgumentsRequired(this.id + ' setLeverage() requires a symbol argument');
|
|
4009
4011
|
}
|
|
@@ -4023,16 +4025,16 @@ class hashkey extends hashkey$1 {
|
|
|
4023
4025
|
//
|
|
4024
4026
|
return this.parseLeverage(response, market);
|
|
4025
4027
|
}
|
|
4028
|
+
/**
|
|
4029
|
+
* @method
|
|
4030
|
+
* @name hashkey#fetchLeverageTiers
|
|
4031
|
+
* @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
|
|
4032
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/exchangeinfo
|
|
4033
|
+
* @param {string[]|undefined} symbols list of unified market symbols
|
|
4034
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4035
|
+
* @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}, indexed by market symbols
|
|
4036
|
+
*/
|
|
4026
4037
|
async fetchLeverageTiers(symbols = undefined, params = {}) {
|
|
4027
|
-
/**
|
|
4028
|
-
* @method
|
|
4029
|
-
* @name hashkey#fetchLeverageTiers
|
|
4030
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/exchangeinfo
|
|
4031
|
-
* @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
|
|
4032
|
-
* @param {string[]|undefined} symbols list of unified market symbols
|
|
4033
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4034
|
-
* @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}, indexed by market symbols
|
|
4035
|
-
*/
|
|
4036
4038
|
await this.loadMarkets();
|
|
4037
4039
|
const response = await this.publicGetApiV1ExchangeInfo(params);
|
|
4038
4040
|
// response is the same as in fetchMarkets()
|
|
@@ -4119,14 +4121,15 @@ class hashkey extends hashkey$1 {
|
|
|
4119
4121
|
// }
|
|
4120
4122
|
//
|
|
4121
4123
|
const riskLimits = this.safeList(info, 'riskLimits', []);
|
|
4122
|
-
const
|
|
4123
|
-
market = this.safeMarket(
|
|
4124
|
+
const marketId = this.safeString(info, 'symbol');
|
|
4125
|
+
market = this.safeMarket(marketId, market);
|
|
4124
4126
|
const tiers = [];
|
|
4125
4127
|
for (let i = 0; i < riskLimits.length; i++) {
|
|
4126
4128
|
const tier = riskLimits[i];
|
|
4127
4129
|
const initialMarginRate = this.safeString(tier, 'initialMargin');
|
|
4128
4130
|
tiers.push({
|
|
4129
4131
|
'tier': this.sum(i, 1),
|
|
4132
|
+
'symbol': this.safeSymbol(marketId, market),
|
|
4130
4133
|
'currency': market['settle'],
|
|
4131
4134
|
'minNotional': undefined,
|
|
4132
4135
|
'maxNotional': this.safeNumber(tier, 'quantity'),
|
|
@@ -4137,17 +4140,17 @@ class hashkey extends hashkey$1 {
|
|
|
4137
4140
|
}
|
|
4138
4141
|
return tiers;
|
|
4139
4142
|
}
|
|
4143
|
+
/**
|
|
4144
|
+
* @method
|
|
4145
|
+
* @name hashkey#fetchTradingFee
|
|
4146
|
+
* @description fetch the trading fees for a market
|
|
4147
|
+
* @see https://developers.binance.com/docs/wallet/asset/trade-fee // spot
|
|
4148
|
+
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-futures-commission-rate-request-weight // swap
|
|
4149
|
+
* @param {string} symbol unified market symbol
|
|
4150
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4151
|
+
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
4152
|
+
*/
|
|
4140
4153
|
async fetchTradingFee(symbol, params = {}) {
|
|
4141
|
-
/**
|
|
4142
|
-
* @method
|
|
4143
|
-
* @name hashkey#fetchTradingFee
|
|
4144
|
-
* @description fetch the trading fees for a market
|
|
4145
|
-
* @see https://developers.binance.com/docs/wallet/asset/trade-fee // spot
|
|
4146
|
-
* @see https://hashkeyglobal-apidoc.readme.io/reference/get-futures-commission-rate-request-weight // swap
|
|
4147
|
-
* @param {string} symbol unified market symbol
|
|
4148
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4149
|
-
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
4150
|
-
*/
|
|
4151
4154
|
await this.loadMarkets();
|
|
4152
4155
|
const market = this.market(symbol);
|
|
4153
4156
|
const methodName = 'fetchTradingFee';
|
|
@@ -4172,15 +4175,15 @@ class hashkey extends hashkey$1 {
|
|
|
4172
4175
|
throw new errors.NotSupported(this.id + ' ' + methodName + '() is not supported for ' + market['type'] + ' type of markets');
|
|
4173
4176
|
}
|
|
4174
4177
|
}
|
|
4178
|
+
/**
|
|
4179
|
+
* @method
|
|
4180
|
+
* @name hashkey#fetchTradingFees
|
|
4181
|
+
* @description *for spot markets only* fetch the trading fees for multiple markets
|
|
4182
|
+
* @see https://developers.binance.com/docs/wallet/asset/trade-fee
|
|
4183
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4184
|
+
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
4185
|
+
*/
|
|
4175
4186
|
async fetchTradingFees(params = {}) {
|
|
4176
|
-
/**
|
|
4177
|
-
* @method
|
|
4178
|
-
* @name hashkey#fetchTradingFees
|
|
4179
|
-
* @description *for spot markets only* fetch the trading fees for multiple markets
|
|
4180
|
-
* @see https://developers.binance.com/docs/wallet/asset/trade-fee
|
|
4181
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4182
|
-
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
4183
|
-
*/
|
|
4184
4187
|
await this.loadMarkets();
|
|
4185
4188
|
const response = await this.privateGetApiV1AccountVipInfo(params);
|
|
4186
4189
|
//
|