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
|
@@ -216,15 +216,15 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
216
216
|
super.setSandboxMode(enabled);
|
|
217
217
|
this.options['sandboxMode'] = enabled;
|
|
218
218
|
}
|
|
219
|
+
/**
|
|
220
|
+
* @method
|
|
221
|
+
* @name hyperliquid#fetchCurrencies
|
|
222
|
+
* @description fetches all available currencies on an exchange
|
|
223
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-perpetuals-metadata
|
|
224
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
225
|
+
* @returns {object} an associative dictionary of currencies
|
|
226
|
+
*/
|
|
219
227
|
async fetchCurrencies(params = {}) {
|
|
220
|
-
/**
|
|
221
|
-
* @method
|
|
222
|
-
* @name hyperliquid#fetchCurrencies
|
|
223
|
-
* @description fetches all available currencies on an exchange
|
|
224
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-perpetuals-metadata
|
|
225
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
226
|
-
* @returns {object} an associative dictionary of currencies
|
|
227
|
-
*/
|
|
228
228
|
const request = {
|
|
229
229
|
'type': 'meta',
|
|
230
230
|
};
|
|
@@ -275,16 +275,16 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
275
275
|
}
|
|
276
276
|
return result;
|
|
277
277
|
}
|
|
278
|
+
/**
|
|
279
|
+
* @method
|
|
280
|
+
* @name hyperliquid#fetchMarkets
|
|
281
|
+
* @description retrieves data on all markets for hyperliquid
|
|
282
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-perpetuals-asset-contexts-includes-mark-price-current-funding-open-interest-etc
|
|
283
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-spot-asset-contexts
|
|
284
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
285
|
+
* @returns {object[]} an array of objects representing market data
|
|
286
|
+
*/
|
|
278
287
|
async fetchMarkets(params = {}) {
|
|
279
|
-
/**
|
|
280
|
-
* @method
|
|
281
|
-
* @name hyperliquid#fetchMarkets
|
|
282
|
-
* @description retrieves data on all markets for hyperliquid
|
|
283
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-perpetuals-asset-contexts-includes-mark-price-current-funding-open-interest-etc
|
|
284
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-spot-asset-contexts
|
|
285
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
286
|
-
* @returns {object[]} an array of objects representing market data
|
|
287
|
-
*/
|
|
288
288
|
const rawPromises = [
|
|
289
289
|
this.fetchSwapMarkets(params),
|
|
290
290
|
this.fetchSpotMarkets(params),
|
|
@@ -294,15 +294,15 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
294
294
|
const spotMarkets = promises[1];
|
|
295
295
|
return this.arrayConcat(swapMarkets, spotMarkets);
|
|
296
296
|
}
|
|
297
|
+
/**
|
|
298
|
+
* @method
|
|
299
|
+
* @name hyperliquid#fetchMarkets
|
|
300
|
+
* @description retrieves data on all swap markets for hyperliquid
|
|
301
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-perpetuals-asset-contexts-includes-mark-price-current-funding-open-interest-etc
|
|
302
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
303
|
+
* @returns {object[]} an array of objects representing market data
|
|
304
|
+
*/
|
|
297
305
|
async fetchSwapMarkets(params = {}) {
|
|
298
|
-
/**
|
|
299
|
-
* @method
|
|
300
|
-
* @name hyperliquid#fetchMarkets
|
|
301
|
-
* @description retrieves data on all swap markets for hyperliquid
|
|
302
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-perpetuals-asset-contexts-includes-mark-price-current-funding-open-interest-etc
|
|
303
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
304
|
-
* @returns {object[]} an array of objects representing market data
|
|
305
|
-
*/
|
|
306
306
|
const request = {
|
|
307
307
|
'type': 'metaAndAssetCtxs',
|
|
308
308
|
};
|
|
@@ -349,15 +349,15 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
349
349
|
}
|
|
350
350
|
return this.parseMarkets(result);
|
|
351
351
|
}
|
|
352
|
+
/**
|
|
353
|
+
* @method
|
|
354
|
+
* @name hyperliquid#fetchMarkets
|
|
355
|
+
* @description retrieves data on all spot markets for hyperliquid
|
|
356
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-spot-asset-contexts
|
|
357
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
358
|
+
* @returns {object[]} an array of objects representing market data
|
|
359
|
+
*/
|
|
352
360
|
async fetchSpotMarkets(params = {}) {
|
|
353
|
-
/**
|
|
354
|
-
* @method
|
|
355
|
-
* @name hyperliquid#fetchMarkets
|
|
356
|
-
* @description retrieves data on all spot markets for hyperliquid
|
|
357
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-spot-asset-contexts
|
|
358
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
359
|
-
* @returns {object[]} an array of objects representing market data
|
|
360
|
-
*/
|
|
361
361
|
const request = {
|
|
362
362
|
'type': 'spotMetaAndAssetCtxs',
|
|
363
363
|
};
|
|
@@ -413,7 +413,8 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
413
413
|
const markets = [];
|
|
414
414
|
for (let i = 0; i < meta.length; i++) {
|
|
415
415
|
const market = this.safeDict(meta, i, {});
|
|
416
|
-
const
|
|
416
|
+
const index = this.safeInteger(market, 'index');
|
|
417
|
+
const extraData = this.safeDict(second, index, {});
|
|
417
418
|
const marketName = this.safeString(market, 'name');
|
|
418
419
|
// if (marketName.indexOf ('/') < 0) {
|
|
419
420
|
// // there are some weird spot markets in testnet, eg @2
|
|
@@ -586,18 +587,18 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
586
587
|
'info': market,
|
|
587
588
|
});
|
|
588
589
|
}
|
|
590
|
+
/**
|
|
591
|
+
* @method
|
|
592
|
+
* @name hyperliquid#fetchBalance
|
|
593
|
+
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
594
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-a-users-token-balances
|
|
595
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-users-perpetuals-account-summary
|
|
596
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
597
|
+
* @param {string} [params.user] user address, will default to this.walletAddress if not provided
|
|
598
|
+
* @param {string} [params.type] wallet type, ['spot', 'swap'], defaults to swap
|
|
599
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
600
|
+
*/
|
|
589
601
|
async fetchBalance(params = {}) {
|
|
590
|
-
/**
|
|
591
|
-
* @method
|
|
592
|
-
* @name hyperliquid#fetchBalance
|
|
593
|
-
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
594
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-a-users-token-balances
|
|
595
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-users-perpetuals-account-summary
|
|
596
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
597
|
-
* @param {string} [params.user] user address, will default to this.walletAddress if not provided
|
|
598
|
-
* @param {string} [params.type] wallet type, ['spot', 'swap'], defaults to swap
|
|
599
|
-
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
600
|
-
*/
|
|
601
602
|
let userAddress = undefined;
|
|
602
603
|
[userAddress, params] = this.handlePublicAddress('fetchBalance', params);
|
|
603
604
|
let type = undefined;
|
|
@@ -672,17 +673,17 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
672
673
|
result['datetime'] = this.iso8601(timestamp);
|
|
673
674
|
return this.safeBalance(result);
|
|
674
675
|
}
|
|
676
|
+
/**
|
|
677
|
+
* @method
|
|
678
|
+
* @name hyperliquid#fetchOrderBook
|
|
679
|
+
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
680
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#l2-book-snapshot
|
|
681
|
+
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
682
|
+
* @param {int} [limit] the maximum amount of order book entries to return
|
|
683
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
684
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
685
|
+
*/
|
|
675
686
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
676
|
-
/**
|
|
677
|
-
* @method
|
|
678
|
-
* @name hyperliquid#fetchOrderBook
|
|
679
|
-
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
680
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#l2-book-snapshot
|
|
681
|
-
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
682
|
-
* @param {int} [limit] the maximum amount of order book entries to return
|
|
683
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
684
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
685
|
-
*/
|
|
686
687
|
await this.loadMarkets();
|
|
687
688
|
const market = this.market(symbol);
|
|
688
689
|
const request = {
|
|
@@ -720,17 +721,17 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
720
721
|
const timestamp = this.safeInteger(response, 'time');
|
|
721
722
|
return this.parseOrderBook(result, market['symbol'], timestamp, 'bids', 'asks', 'px', 'sz');
|
|
722
723
|
}
|
|
724
|
+
/**
|
|
725
|
+
* @method
|
|
726
|
+
* @name hyperliquid#fetchTickers
|
|
727
|
+
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
728
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-perpetuals-asset-contexts-includes-mark-price-current-funding-open-interest-etc
|
|
729
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-spot-asset-contexts
|
|
730
|
+
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
731
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
732
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
733
|
+
*/
|
|
723
734
|
async fetchTickers(symbols = undefined, params = {}) {
|
|
724
|
-
/**
|
|
725
|
-
* @method
|
|
726
|
-
* @name hyperliquid#fetchTickers
|
|
727
|
-
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
728
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-perpetuals-asset-contexts-includes-mark-price-current-funding-open-interest-etc
|
|
729
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-spot-asset-contexts
|
|
730
|
-
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
731
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
732
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
733
|
-
*/
|
|
734
735
|
await this.loadMarkets();
|
|
735
736
|
symbols = this.marketSymbols(symbols);
|
|
736
737
|
// at this stage, to get tickers data, we use fetchMarkets endpoints
|
|
@@ -746,15 +747,16 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
746
747
|
}
|
|
747
748
|
return this.filterByArrayTickers(result, 'symbol', symbols);
|
|
748
749
|
}
|
|
750
|
+
/**
|
|
751
|
+
* @method
|
|
752
|
+
* @name hyperliquid#fetchFundingRates
|
|
753
|
+
* @description retrieves data on all swap markets for hyperliquid
|
|
754
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-perpetuals-asset-contexts-includes-mark-price-current-funding-open-interest-etc
|
|
755
|
+
* @param {string[]} [symbols] list of unified market symbols
|
|
756
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
757
|
+
* @returns {object[]} an array of objects representing market data
|
|
758
|
+
*/
|
|
749
759
|
async fetchFundingRates(symbols = undefined, params = {}) {
|
|
750
|
-
/**
|
|
751
|
-
* @method
|
|
752
|
-
* @name hyperliquid#fetchFundingRates
|
|
753
|
-
* @description retrieves data on all swap markets for hyperliquid
|
|
754
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-perpetuals-asset-contexts-includes-mark-price-current-funding-open-interest-etc
|
|
755
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
756
|
-
* @returns {object[]} an array of objects representing market data
|
|
757
|
-
*/
|
|
758
760
|
const request = {
|
|
759
761
|
'type': 'metaAndAssetCtxs',
|
|
760
762
|
};
|
|
@@ -879,20 +881,20 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
879
881
|
'info': ticker,
|
|
880
882
|
}, market);
|
|
881
883
|
}
|
|
884
|
+
/**
|
|
885
|
+
* @method
|
|
886
|
+
* @name hyperliquid#fetchOHLCV
|
|
887
|
+
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
888
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#candle-snapshot
|
|
889
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
890
|
+
* @param {string} timeframe the length of time each candle represents, support '1m', '15m', '1h', '1d'
|
|
891
|
+
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
892
|
+
* @param {int} [limit] the maximum amount of candles to fetch
|
|
893
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
894
|
+
* @param {int} [params.until] timestamp in ms of the latest candle to fetch
|
|
895
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
896
|
+
*/
|
|
882
897
|
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
883
|
-
/**
|
|
884
|
-
* @method
|
|
885
|
-
* @name hyperliquid#fetchOHLCV
|
|
886
|
-
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
887
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#candle-snapshot
|
|
888
|
-
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
889
|
-
* @param {string} timeframe the length of time each candle represents, support '1m', '15m', '1h', '1d'
|
|
890
|
-
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
891
|
-
* @param {int} [limit] the maximum amount of candles to fetch
|
|
892
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
893
|
-
* @param {int} [params.until] timestamp in ms of the latest candle to fetch
|
|
894
|
-
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
895
|
-
*/
|
|
896
898
|
await this.loadMarkets();
|
|
897
899
|
const market = this.market(symbol);
|
|
898
900
|
const until = this.safeInteger(params, 'until', this.milliseconds());
|
|
@@ -962,22 +964,22 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
962
964
|
this.safeNumber(ohlcv, 'v'),
|
|
963
965
|
];
|
|
964
966
|
}
|
|
967
|
+
/**
|
|
968
|
+
* @method
|
|
969
|
+
* @name hyperliquid#fetchTrades
|
|
970
|
+
* @description get the list of most recent trades for a particular symbol
|
|
971
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-fills
|
|
972
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-fills-by-time
|
|
973
|
+
* @param {string} symbol unified market symbol
|
|
974
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
975
|
+
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
976
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
977
|
+
* @param {int} [params.until] timestamp in ms of the latest trade
|
|
978
|
+
* @param {string} [params.address] wallet address that made trades
|
|
979
|
+
* @param {string} [params.user] wallet address that made trades
|
|
980
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
981
|
+
*/
|
|
965
982
|
async fetchTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
966
|
-
/**
|
|
967
|
-
* @method
|
|
968
|
-
* @name hyperliquid#fetchTrades
|
|
969
|
-
* @description get the list of most recent trades for a particular symbol
|
|
970
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-fills
|
|
971
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-fills-by-time
|
|
972
|
-
* @param {string} symbol unified market symbol
|
|
973
|
-
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
974
|
-
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
975
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
976
|
-
* @param {int} [params.until] timestamp in ms of the latest trade
|
|
977
|
-
* @param {string} [params.address] wallet address that made trades
|
|
978
|
-
* @param {string} [params.user] wallet address that made trades
|
|
979
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
980
|
-
*/
|
|
981
983
|
let userAddress = undefined;
|
|
982
984
|
[userAddress, params] = this.handlePublicAddress('fetchTrades', params);
|
|
983
985
|
await this.loadMarkets();
|
|
@@ -1145,41 +1147,42 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
1145
1147
|
};
|
|
1146
1148
|
return this.signUserSignedAction(messageTypes, message);
|
|
1147
1149
|
}
|
|
1150
|
+
/**
|
|
1151
|
+
* @method
|
|
1152
|
+
* @name hyperliquid#createOrder
|
|
1153
|
+
* @description create a trade order
|
|
1154
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#place-an-order
|
|
1155
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
1156
|
+
* @param {string} type 'market' or 'limit'
|
|
1157
|
+
* @param {string} side 'buy' or 'sell'
|
|
1158
|
+
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1159
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1160
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1161
|
+
* @param {string} [params.timeInForce] 'Gtc', 'Ioc', 'Alo'
|
|
1162
|
+
* @param {bool} [params.postOnly] true or false whether the order is post-only
|
|
1163
|
+
* @param {bool} [params.reduceOnly] true or false whether the order is reduce-only
|
|
1164
|
+
* @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
|
|
1165
|
+
* @param {string} [params.clientOrderId] client order id, (optional 128 bit hex string e.g. 0x1234567890abcdef1234567890abcdef)
|
|
1166
|
+
* @param {string} [params.slippage] the slippage for market order
|
|
1167
|
+
* @param {string} [params.vaultAddress] the vault address for order
|
|
1168
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1169
|
+
*/
|
|
1148
1170
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
1149
|
-
/**
|
|
1150
|
-
* @method
|
|
1151
|
-
* @name hyperliquid#createOrder
|
|
1152
|
-
* @description create a trade order
|
|
1153
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#place-an-order
|
|
1154
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
1155
|
-
* @param {string} type 'market' or 'limit'
|
|
1156
|
-
* @param {string} side 'buy' or 'sell'
|
|
1157
|
-
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1158
|
-
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1159
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1160
|
-
* @param {string} [params.timeInForce] 'Gtc', 'Ioc', 'Alo'
|
|
1161
|
-
* @param {bool} [params.postOnly] true or false whether the order is post-only
|
|
1162
|
-
* @param {bool} [params.reduceOnly] true or false whether the order is reduce-only
|
|
1163
|
-
* @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
|
|
1164
|
-
* @param {string} [params.clientOrderId] client order id, (optional 128 bit hex string e.g. 0x1234567890abcdef1234567890abcdef)
|
|
1165
|
-
* @param {string} [params.slippage] the slippage for market order
|
|
1166
|
-
* @param {string} [params.vaultAddress] the vault address for order
|
|
1167
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1168
|
-
*/
|
|
1169
1171
|
await this.loadMarkets();
|
|
1170
1172
|
const [order, globalParams] = this.parseCreateOrderArgs(symbol, type, side, amount, price, params);
|
|
1171
1173
|
const orders = await this.createOrders([order], globalParams);
|
|
1172
1174
|
return orders[0];
|
|
1173
1175
|
}
|
|
1176
|
+
/**
|
|
1177
|
+
* @method
|
|
1178
|
+
* @name hyperliquid#createOrders
|
|
1179
|
+
* @description create a list of trade orders
|
|
1180
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#place-an-order
|
|
1181
|
+
* @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
|
|
1182
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1183
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1184
|
+
*/
|
|
1174
1185
|
async createOrders(orders, params = {}) {
|
|
1175
|
-
/**
|
|
1176
|
-
* @method
|
|
1177
|
-
* @name hyperliquid#createOrders
|
|
1178
|
-
* @description create a list of trade orders
|
|
1179
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#place-an-order
|
|
1180
|
-
* @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
|
|
1181
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1182
|
-
*/
|
|
1183
1186
|
await this.loadMarkets();
|
|
1184
1187
|
const request = this.createOrdersRequest(orders, params);
|
|
1185
1188
|
const response = await this.privatePostExchange(request);
|
|
@@ -1336,37 +1339,37 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
1336
1339
|
}
|
|
1337
1340
|
return request;
|
|
1338
1341
|
}
|
|
1342
|
+
/**
|
|
1343
|
+
* @method
|
|
1344
|
+
* @name hyperliquid#cancelOrder
|
|
1345
|
+
* @description cancels an open order
|
|
1346
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#cancel-order-s
|
|
1347
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#cancel-order-s-by-cloid
|
|
1348
|
+
* @param {string} id order id
|
|
1349
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
1350
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1351
|
+
* @param {string} [params.clientOrderId] client order id, (optional 128 bit hex string e.g. 0x1234567890abcdef1234567890abcdef)
|
|
1352
|
+
* @param {string} [params.vaultAddress] the vault address for order
|
|
1353
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1354
|
+
*/
|
|
1339
1355
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
1340
|
-
/**
|
|
1341
|
-
* @method
|
|
1342
|
-
* @name hyperliquid#cancelOrder
|
|
1343
|
-
* @description cancels an open order
|
|
1344
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#cancel-order-s
|
|
1345
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#cancel-order-s-by-cloid
|
|
1346
|
-
* @param {string} id order id
|
|
1347
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
1348
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1349
|
-
* @param {string} [params.clientOrderId] client order id, (optional 128 bit hex string e.g. 0x1234567890abcdef1234567890abcdef)
|
|
1350
|
-
* @param {string} [params.vaultAddress] the vault address for order
|
|
1351
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1352
|
-
*/
|
|
1353
1356
|
const orders = await this.cancelOrders([id], symbol, params);
|
|
1354
1357
|
return this.safeDict(orders, 0);
|
|
1355
1358
|
}
|
|
1359
|
+
/**
|
|
1360
|
+
* @method
|
|
1361
|
+
* @name hyperliquid#cancelOrders
|
|
1362
|
+
* @description cancel multiple orders
|
|
1363
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#cancel-order-s
|
|
1364
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#cancel-order-s-by-cloid
|
|
1365
|
+
* @param {string[]} ids order ids
|
|
1366
|
+
* @param {string} [symbol] unified market symbol
|
|
1367
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1368
|
+
* @param {string|string[]} [params.clientOrderId] client order ids, (optional 128 bit hex string e.g. 0x1234567890abcdef1234567890abcdef)
|
|
1369
|
+
* @param {string} [params.vaultAddress] the vault address
|
|
1370
|
+
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1371
|
+
*/
|
|
1356
1372
|
async cancelOrders(ids, symbol = undefined, params = {}) {
|
|
1357
|
-
/**
|
|
1358
|
-
* @method
|
|
1359
|
-
* @name hyperliquid#cancelOrders
|
|
1360
|
-
* @description cancel multiple orders
|
|
1361
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#cancel-order-s
|
|
1362
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#cancel-order-s-by-cloid
|
|
1363
|
-
* @param {string[]} ids order ids
|
|
1364
|
-
* @param {string} [symbol] unified market symbol
|
|
1365
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1366
|
-
* @param {string|string[]} [params.clientOrderId] client order ids, (optional 128 bit hex string e.g. 0x1234567890abcdef1234567890abcdef)
|
|
1367
|
-
* @param {string} [params.vaultAddress] the vault address
|
|
1368
|
-
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1369
|
-
*/
|
|
1370
1373
|
this.checkRequiredCredentials();
|
|
1371
1374
|
if (symbol === undefined) {
|
|
1372
1375
|
throw new errors.ArgumentsRequired(this.id + ' cancelOrders() requires a symbol argument');
|
|
@@ -1443,18 +1446,18 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
1443
1446
|
}
|
|
1444
1447
|
return orders;
|
|
1445
1448
|
}
|
|
1449
|
+
/**
|
|
1450
|
+
* @method
|
|
1451
|
+
* @name hyperliquid#cancelOrdersForSymbols
|
|
1452
|
+
* @description cancel multiple orders for multiple symbols
|
|
1453
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#cancel-order-s
|
|
1454
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#cancel-order-s-by-cloid
|
|
1455
|
+
* @param {CancellationRequest[]} orders each order should contain the parameters required by cancelOrder namely id and symbol, example [{"id": "a", "symbol": "BTC/USDT"}, {"id": "b", "symbol": "ETH/USDT"}]
|
|
1456
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1457
|
+
* @param {string} [params.vaultAddress] the vault address
|
|
1458
|
+
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1459
|
+
*/
|
|
1446
1460
|
async cancelOrdersForSymbols(orders, params = {}) {
|
|
1447
|
-
/**
|
|
1448
|
-
* @method
|
|
1449
|
-
* @name hyperliquid#cancelOrdersForSymbols
|
|
1450
|
-
* @description cancel multiple orders for multiple symbols
|
|
1451
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#cancel-order-s
|
|
1452
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#cancel-order-s-by-cloid
|
|
1453
|
-
* @param {CancellationRequest[]} orders each order should contain the parameters required by cancelOrder namely id and symbol, example [{"id": "a", "symbol": "BTC/USDT"}, {"id": "b", "symbol": "ETH/USDT"}]
|
|
1454
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1455
|
-
* @param {string} [params.vaultAddress] the vault address
|
|
1456
|
-
* @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1457
|
-
*/
|
|
1458
1461
|
this.checkRequiredCredentials();
|
|
1459
1462
|
await this.loadMarkets();
|
|
1460
1463
|
const nonce = this.milliseconds();
|
|
@@ -1516,16 +1519,16 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
1516
1519
|
//
|
|
1517
1520
|
return response;
|
|
1518
1521
|
}
|
|
1522
|
+
/**
|
|
1523
|
+
* @method
|
|
1524
|
+
* @name hyperliquid#cancelAllOrdersAfter
|
|
1525
|
+
* @description dead man's switch, cancel all orders after the given timeout
|
|
1526
|
+
* @param {number} timeout time in milliseconds, 0 represents cancel the timer
|
|
1527
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1528
|
+
* @param {string} [params.vaultAddress] the vault address
|
|
1529
|
+
* @returns {object} the api result
|
|
1530
|
+
*/
|
|
1519
1531
|
async cancelAllOrdersAfter(timeout, params = {}) {
|
|
1520
|
-
/**
|
|
1521
|
-
* @method
|
|
1522
|
-
* @name hyperliquid#cancelAllOrdersAfter
|
|
1523
|
-
* @description dead man's switch, cancel all orders after the given timeout
|
|
1524
|
-
* @param {number} timeout time in milliseconds, 0 represents cancel the timer
|
|
1525
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1526
|
-
* @param {string} [params.vaultAddress] the vault address
|
|
1527
|
-
* @returns {object} the api result
|
|
1528
|
-
*/
|
|
1529
1532
|
this.checkRequiredCredentials();
|
|
1530
1533
|
await this.loadMarkets();
|
|
1531
1534
|
params = this.omit(params, ['clientOrderId', 'client_id']);
|
|
@@ -1648,28 +1651,28 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
1648
1651
|
}
|
|
1649
1652
|
return request;
|
|
1650
1653
|
}
|
|
1654
|
+
/**
|
|
1655
|
+
* @method
|
|
1656
|
+
* @name hyperliquid#editOrder
|
|
1657
|
+
* @description edit a trade order
|
|
1658
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#modify-an-order
|
|
1659
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#modify-multiple-orders
|
|
1660
|
+
* @param {string} id cancel order id
|
|
1661
|
+
* @param {string} symbol unified symbol of the market to create an order in
|
|
1662
|
+
* @param {string} type 'market' or 'limit'
|
|
1663
|
+
* @param {string} side 'buy' or 'sell'
|
|
1664
|
+
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1665
|
+
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1666
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1667
|
+
* @param {string} [params.timeInForce] 'Gtc', 'Ioc', 'Alo'
|
|
1668
|
+
* @param {bool} [params.postOnly] true or false whether the order is post-only
|
|
1669
|
+
* @param {bool} [params.reduceOnly] true or false whether the order is reduce-only
|
|
1670
|
+
* @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
|
|
1671
|
+
* @param {string} [params.clientOrderId] client order id, (optional 128 bit hex string e.g. 0x1234567890abcdef1234567890abcdef)
|
|
1672
|
+
* @param {string} [params.vaultAddress] the vault address for order
|
|
1673
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1674
|
+
*/
|
|
1651
1675
|
async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
|
|
1652
|
-
/**
|
|
1653
|
-
* @method
|
|
1654
|
-
* @name hyperliquid#editOrder
|
|
1655
|
-
* @description edit a trade order
|
|
1656
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#modify-an-order
|
|
1657
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#modify-multiple-orders
|
|
1658
|
-
* @param {string} id cancel order id
|
|
1659
|
-
* @param {string} symbol unified symbol of the market to create an order in
|
|
1660
|
-
* @param {string} type 'market' or 'limit'
|
|
1661
|
-
* @param {string} side 'buy' or 'sell'
|
|
1662
|
-
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1663
|
-
* @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
|
1664
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1665
|
-
* @param {string} [params.timeInForce] 'Gtc', 'Ioc', 'Alo'
|
|
1666
|
-
* @param {bool} [params.postOnly] true or false whether the order is post-only
|
|
1667
|
-
* @param {bool} [params.reduceOnly] true or false whether the order is reduce-only
|
|
1668
|
-
* @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
|
|
1669
|
-
* @param {string} [params.clientOrderId] client order id, (optional 128 bit hex string e.g. 0x1234567890abcdef1234567890abcdef)
|
|
1670
|
-
* @param {string} [params.vaultAddress] the vault address for order
|
|
1671
|
-
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1672
|
-
*/
|
|
1673
1676
|
await this.loadMarkets();
|
|
1674
1677
|
const market = this.market(symbol);
|
|
1675
1678
|
const request = this.editOrderRequest(id, symbol, type, side, amount, price, params);
|
|
@@ -1715,19 +1718,19 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
1715
1718
|
const first = this.safeDict(statuses, 0, {});
|
|
1716
1719
|
return this.parseOrder(first, market);
|
|
1717
1720
|
}
|
|
1721
|
+
/**
|
|
1722
|
+
* @method
|
|
1723
|
+
* @name hyperliquid#fetchFundingRateHistory
|
|
1724
|
+
* @description fetches historical funding rate prices
|
|
1725
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-historical-funding-rates
|
|
1726
|
+
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
1727
|
+
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
1728
|
+
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
1729
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1730
|
+
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
1731
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
1732
|
+
*/
|
|
1718
1733
|
async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1719
|
-
/**
|
|
1720
|
-
* @method
|
|
1721
|
-
* @name hyperliquid#fetchFundingRateHistory
|
|
1722
|
-
* @description fetches historical funding rate prices
|
|
1723
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-historical-funding-rates
|
|
1724
|
-
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
1725
|
-
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
1726
|
-
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
1727
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1728
|
-
* @param {int} [params.until] timestamp in ms of the latest funding rate
|
|
1729
|
-
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
1730
|
-
*/
|
|
1731
1734
|
await this.loadMarkets();
|
|
1732
1735
|
const market = this.market(symbol);
|
|
1733
1736
|
const request = {
|
|
@@ -1772,20 +1775,20 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
1772
1775
|
const sorted = this.sortBy(result, 'timestamp');
|
|
1773
1776
|
return this.filterBySymbolSinceLimit(sorted, symbol, since, limit);
|
|
1774
1777
|
}
|
|
1778
|
+
/**
|
|
1779
|
+
* @method
|
|
1780
|
+
* @name hyperliquid#fetchOpenOrders
|
|
1781
|
+
* @description fetch all unfilled currently open orders
|
|
1782
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-open-orders
|
|
1783
|
+
* @param {string} symbol unified market symbol
|
|
1784
|
+
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1785
|
+
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1786
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1787
|
+
* @param {string} [params.user] user address, will default to this.walletAddress if not provided
|
|
1788
|
+
* @param {string} [params.method] 'openOrders' or 'frontendOpenOrders' default is 'frontendOpenOrders'
|
|
1789
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1790
|
+
*/
|
|
1775
1791
|
async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1776
|
-
/**
|
|
1777
|
-
* @method
|
|
1778
|
-
* @name hyperliquid#fetchOpenOrders
|
|
1779
|
-
* @description fetch all unfilled currently open orders
|
|
1780
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-open-orders
|
|
1781
|
-
* @param {string} symbol unified market symbol
|
|
1782
|
-
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1783
|
-
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1784
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1785
|
-
* @param {string} [params.user] user address, will default to this.walletAddress if not provided
|
|
1786
|
-
* @param {string} [params.method] 'openOrders' or 'frontendOpenOrders' default is 'frontendOpenOrders'
|
|
1787
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1788
|
-
*/
|
|
1789
1792
|
let userAddress = undefined;
|
|
1790
1793
|
[userAddress, params] = this.handlePublicAddress('fetchOpenOrders', params);
|
|
1791
1794
|
let method = undefined;
|
|
@@ -1821,69 +1824,69 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
1821
1824
|
}
|
|
1822
1825
|
return this.parseOrders(orderWithStatus, market, since, limit);
|
|
1823
1826
|
}
|
|
1827
|
+
/**
|
|
1828
|
+
* @method
|
|
1829
|
+
* @name hyperliquid#fetchClosedOrders
|
|
1830
|
+
* @description fetch all unfilled currently closed orders
|
|
1831
|
+
* @param {string} symbol unified market symbol
|
|
1832
|
+
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1833
|
+
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1834
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1835
|
+
* @param {string} [params.user] user address, will default to this.walletAddress if not provided
|
|
1836
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1837
|
+
*/
|
|
1824
1838
|
async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1825
|
-
/**
|
|
1826
|
-
* @method
|
|
1827
|
-
* @name hyperliquid#fetchClosedOrders
|
|
1828
|
-
* @description fetch all unfilled currently closed orders
|
|
1829
|
-
* @param {string} symbol unified market symbol
|
|
1830
|
-
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1831
|
-
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1832
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1833
|
-
* @param {string} [params.user] user address, will default to this.walletAddress if not provided
|
|
1834
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1835
|
-
*/
|
|
1836
1839
|
await this.loadMarkets();
|
|
1837
1840
|
const orders = await this.fetchOrders(symbol, undefined, undefined, params); // don't filter here because we don't want to catch open orders
|
|
1838
1841
|
const closedOrders = this.filterByArray(orders, 'status', ['closed'], false);
|
|
1839
1842
|
return this.filterBySymbolSinceLimit(closedOrders, symbol, since, limit);
|
|
1840
1843
|
}
|
|
1844
|
+
/**
|
|
1845
|
+
* @method
|
|
1846
|
+
* @name hyperliquid#fetchCanceledOrders
|
|
1847
|
+
* @description fetch all canceled orders
|
|
1848
|
+
* @param {string} symbol unified market symbol
|
|
1849
|
+
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1850
|
+
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1851
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1852
|
+
* @param {string} [params.user] user address, will default to this.walletAddress if not provided
|
|
1853
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1854
|
+
*/
|
|
1841
1855
|
async fetchCanceledOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1842
|
-
/**
|
|
1843
|
-
* @method
|
|
1844
|
-
* @name hyperliquid#fetchCanceledOrders
|
|
1845
|
-
* @description fetch all canceled orders
|
|
1846
|
-
* @param {string} symbol unified market symbol
|
|
1847
|
-
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1848
|
-
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1849
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1850
|
-
* @param {string} [params.user] user address, will default to this.walletAddress if not provided
|
|
1851
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1852
|
-
*/
|
|
1853
1856
|
await this.loadMarkets();
|
|
1854
1857
|
const orders = await this.fetchOrders(symbol, undefined, undefined, params); // don't filter here because we don't want to catch open orders
|
|
1855
1858
|
const closedOrders = this.filterByArray(orders, 'status', ['canceled'], false);
|
|
1856
1859
|
return this.filterBySymbolSinceLimit(closedOrders, symbol, since, limit);
|
|
1857
1860
|
}
|
|
1861
|
+
/**
|
|
1862
|
+
* @method
|
|
1863
|
+
* @name hyperliquid#fetchCanceledAndClosedOrders
|
|
1864
|
+
* @description fetch all closed and canceled orders
|
|
1865
|
+
* @param {string} symbol unified market symbol
|
|
1866
|
+
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1867
|
+
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1868
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1869
|
+
* @param {string} [params.user] user address, will default to this.walletAddress if not provided
|
|
1870
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1871
|
+
*/
|
|
1858
1872
|
async fetchCanceledAndClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1859
|
-
/**
|
|
1860
|
-
* @method
|
|
1861
|
-
* @name hyperliquid#fetchCanceledAndClosedOrders
|
|
1862
|
-
* @description fetch all closed and canceled orders
|
|
1863
|
-
* @param {string} symbol unified market symbol
|
|
1864
|
-
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1865
|
-
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1866
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1867
|
-
* @param {string} [params.user] user address, will default to this.walletAddress if not provided
|
|
1868
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1869
|
-
*/
|
|
1870
1873
|
await this.loadMarkets();
|
|
1871
1874
|
const orders = await this.fetchOrders(symbol, undefined, undefined, params); // don't filter here because we don't want to catch open orders
|
|
1872
1875
|
const closedOrders = this.filterByArray(orders, 'status', ['canceled', 'closed', 'rejected'], false);
|
|
1873
1876
|
return this.filterBySymbolSinceLimit(closedOrders, symbol, since, limit);
|
|
1874
1877
|
}
|
|
1878
|
+
/**
|
|
1879
|
+
* @method
|
|
1880
|
+
* @name hyperliquid#fetchOrders
|
|
1881
|
+
* @description fetch all orders
|
|
1882
|
+
* @param {string} symbol unified market symbol
|
|
1883
|
+
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1884
|
+
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1885
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1886
|
+
* @param {string} [params.user] user address, will default to this.walletAddress if not provided
|
|
1887
|
+
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1888
|
+
*/
|
|
1875
1889
|
async fetchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1876
|
-
/**
|
|
1877
|
-
* @method
|
|
1878
|
-
* @name hyperliquid#fetchOrders
|
|
1879
|
-
* @description fetch all orders
|
|
1880
|
-
* @param {string} symbol unified market symbol
|
|
1881
|
-
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1882
|
-
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1883
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1884
|
-
* @param {string} [params.user] user address, will default to this.walletAddress if not provided
|
|
1885
|
-
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1886
|
-
*/
|
|
1887
1890
|
let userAddress = undefined;
|
|
1888
1891
|
[userAddress, params] = this.handlePublicAddress('fetchOrders', params);
|
|
1889
1892
|
await this.loadMarkets();
|
|
@@ -1908,17 +1911,18 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
1908
1911
|
//
|
|
1909
1912
|
return this.parseOrders(response, market, since, limit);
|
|
1910
1913
|
}
|
|
1914
|
+
/**
|
|
1915
|
+
* @method
|
|
1916
|
+
* @name hyperliquid#fetchOrder
|
|
1917
|
+
* @description fetches information on an order made by the user
|
|
1918
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-order-status-by-oid-or-cloid
|
|
1919
|
+
* @param {string} id order id
|
|
1920
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
1921
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1922
|
+
* @param {string} [params.user] user address, will default to this.walletAddress if not provided
|
|
1923
|
+
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1924
|
+
*/
|
|
1911
1925
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
1912
|
-
/**
|
|
1913
|
-
* @method
|
|
1914
|
-
* @name hyperliquid#fetchOrder
|
|
1915
|
-
* @description fetches information on an order made by the user
|
|
1916
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-order-status-by-oid-or-cloid
|
|
1917
|
-
* @param {string} symbol unified symbol of the market the order was made in
|
|
1918
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1919
|
-
* @param {string} [params.user] user address, will default to this.walletAddress if not provided
|
|
1920
|
-
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1921
|
-
*/
|
|
1922
1926
|
let userAddress = undefined;
|
|
1923
1927
|
[userAddress, params] = this.handlePublicAddress('fetchOrder', params);
|
|
1924
1928
|
await this.loadMarkets();
|
|
@@ -2121,20 +2125,20 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
2121
2125
|
};
|
|
2122
2126
|
return this.safeString(statuses, status, status);
|
|
2123
2127
|
}
|
|
2128
|
+
/**
|
|
2129
|
+
* @method
|
|
2130
|
+
* @name hyperliquid#fetchMyTrades
|
|
2131
|
+
* @description fetch all trades made by the user
|
|
2132
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-fills
|
|
2133
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-fills-by-time
|
|
2134
|
+
* @param {string} symbol unified market symbol
|
|
2135
|
+
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
2136
|
+
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
2137
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2138
|
+
* @param {int} [params.until] timestamp in ms of the latest trade
|
|
2139
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
2140
|
+
*/
|
|
2124
2141
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2125
|
-
/**
|
|
2126
|
-
* @method
|
|
2127
|
-
* @name hyperliquid#fetchMyTrades
|
|
2128
|
-
* @description fetch all trades made by the user
|
|
2129
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-fills
|
|
2130
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-fills-by-time
|
|
2131
|
-
* @param {string} symbol unified market symbol
|
|
2132
|
-
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
2133
|
-
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
2134
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2135
|
-
* @param {int} [params.until] timestamp in ms of the latest trade
|
|
2136
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
|
|
2137
|
-
*/
|
|
2138
2142
|
let userAddress = undefined;
|
|
2139
2143
|
[userAddress, params] = this.handlePublicAddress('fetchMyTrades', params);
|
|
2140
2144
|
await this.loadMarkets();
|
|
@@ -2230,31 +2234,31 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
2230
2234
|
},
|
|
2231
2235
|
}, market);
|
|
2232
2236
|
}
|
|
2237
|
+
/**
|
|
2238
|
+
* @method
|
|
2239
|
+
* @name hyperliquid#fetchPosition
|
|
2240
|
+
* @description fetch data on an open position
|
|
2241
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-users-perpetuals-account-summary
|
|
2242
|
+
* @param {string} symbol unified market symbol of the market the position is held in
|
|
2243
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2244
|
+
* @param {string} [params.user] user address, will default to this.walletAddress if not provided
|
|
2245
|
+
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
2246
|
+
*/
|
|
2233
2247
|
async fetchPosition(symbol, params = {}) {
|
|
2234
|
-
/**
|
|
2235
|
-
* @method
|
|
2236
|
-
* @name hyperliquid#fetchPosition
|
|
2237
|
-
* @description fetch data on an open position
|
|
2238
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-users-perpetuals-account-summary
|
|
2239
|
-
* @param {string} symbol unified market symbol of the market the position is held in
|
|
2240
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2241
|
-
* @param {string} [params.user] user address, will default to this.walletAddress if not provided
|
|
2242
|
-
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
2243
|
-
*/
|
|
2244
2248
|
const positions = await this.fetchPositions([symbol], params);
|
|
2245
2249
|
return this.safeDict(positions, 0, {});
|
|
2246
2250
|
}
|
|
2251
|
+
/**
|
|
2252
|
+
* @method
|
|
2253
|
+
* @name hyperliquid#fetchPositions
|
|
2254
|
+
* @description fetch all open positions
|
|
2255
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-users-perpetuals-account-summary
|
|
2256
|
+
* @param {string[]} [symbols] list of unified market symbols
|
|
2257
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2258
|
+
* @param {string} [params.user] user address, will default to this.walletAddress if not provided
|
|
2259
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
2260
|
+
*/
|
|
2247
2261
|
async fetchPositions(symbols = undefined, params = {}) {
|
|
2248
|
-
/**
|
|
2249
|
-
* @method
|
|
2250
|
-
* @name hyperliquid#fetchPositions
|
|
2251
|
-
* @description fetch all open positions
|
|
2252
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-users-perpetuals-account-summary
|
|
2253
|
-
* @param {string[]} [symbols] list of unified market symbols
|
|
2254
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2255
|
-
* @param {string} [params.user] user address, will default to this.walletAddress if not provided
|
|
2256
|
-
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
2257
|
-
*/
|
|
2258
2262
|
await this.loadMarkets();
|
|
2259
2263
|
let userAddress = undefined;
|
|
2260
2264
|
[userAddress, params] = this.handlePublicAddress('fetchPositions', params);
|
|
@@ -2388,17 +2392,17 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
2388
2392
|
'percentage': this.parseNumber(percentage),
|
|
2389
2393
|
});
|
|
2390
2394
|
}
|
|
2395
|
+
/**
|
|
2396
|
+
* @method
|
|
2397
|
+
* @name hyperliquid#setMarginMode
|
|
2398
|
+
* @description set margin mode (symbol)
|
|
2399
|
+
* @param {string} marginMode margin mode must be either [isolated, cross]
|
|
2400
|
+
* @param {string} symbol unified market symbol of the market the position is held in, default is undefined
|
|
2401
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2402
|
+
* @param {string} [params.leverage] the rate of leverage, is required if setting trade mode (symbol)
|
|
2403
|
+
* @returns {object} response from the exchange
|
|
2404
|
+
*/
|
|
2391
2405
|
async setMarginMode(marginMode, symbol = undefined, params = {}) {
|
|
2392
|
-
/**
|
|
2393
|
-
* @method
|
|
2394
|
-
* @name hyperliquid#setMarginMode
|
|
2395
|
-
* @description set margin mode (symbol)
|
|
2396
|
-
* @param {string} marginMode margin mode must be either [isolated, cross]
|
|
2397
|
-
* @param {string} symbol unified market symbol of the market the position is held in, default is undefined
|
|
2398
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2399
|
-
* @param {string} [params.leverage] the rate of leverage, is required if setting trade mode (symbol)
|
|
2400
|
-
* @returns {object} response from the exchange
|
|
2401
|
-
*/
|
|
2402
2406
|
if (symbol === undefined) {
|
|
2403
2407
|
throw new errors.ArgumentsRequired(this.id + ' setMarginMode() requires a symbol argument');
|
|
2404
2408
|
}
|
|
@@ -2446,17 +2450,17 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
2446
2450
|
//
|
|
2447
2451
|
return response;
|
|
2448
2452
|
}
|
|
2453
|
+
/**
|
|
2454
|
+
* @method
|
|
2455
|
+
* @name hyperliquid#setLeverage
|
|
2456
|
+
* @description set the level of leverage for a market
|
|
2457
|
+
* @param {float} leverage the rate of leverage
|
|
2458
|
+
* @param {string} symbol unified market symbol
|
|
2459
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2460
|
+
* @param {string} [params.marginMode] margin mode must be either [isolated, cross], default is cross
|
|
2461
|
+
* @returns {object} response from the exchange
|
|
2462
|
+
*/
|
|
2449
2463
|
async setLeverage(leverage, symbol = undefined, params = {}) {
|
|
2450
|
-
/**
|
|
2451
|
-
* @method
|
|
2452
|
-
* @name hyperliquid#setLeverage
|
|
2453
|
-
* @description set the level of leverage for a market
|
|
2454
|
-
* @param {float} leverage the rate of leverage
|
|
2455
|
-
* @param {string} symbol unified market symbol
|
|
2456
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2457
|
-
* @param {string} [params.marginMode] margin mode must be either [isolated, cross], default is cross
|
|
2458
|
-
* @returns {object} response from the exchange
|
|
2459
|
-
*/
|
|
2460
2464
|
if (symbol === undefined) {
|
|
2461
2465
|
throw new errors.ArgumentsRequired(this.id + ' setLeverage() requires a symbol argument');
|
|
2462
2466
|
}
|
|
@@ -2496,30 +2500,30 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
2496
2500
|
//
|
|
2497
2501
|
return response;
|
|
2498
2502
|
}
|
|
2503
|
+
/**
|
|
2504
|
+
* @method
|
|
2505
|
+
* @name hyperliquid#addMargin
|
|
2506
|
+
* @description add margin
|
|
2507
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#update-isolated-margin
|
|
2508
|
+
* @param {string} symbol unified market symbol
|
|
2509
|
+
* @param {float} amount amount of margin to add
|
|
2510
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2511
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
|
|
2512
|
+
*/
|
|
2499
2513
|
async addMargin(symbol, amount, params = {}) {
|
|
2500
|
-
/**
|
|
2501
|
-
* @method
|
|
2502
|
-
* @name hyperliquid#addMargin
|
|
2503
|
-
* @description add margin
|
|
2504
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#update-isolated-margin
|
|
2505
|
-
* @param {string} symbol unified market symbol
|
|
2506
|
-
* @param {float} amount amount of margin to add
|
|
2507
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2508
|
-
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
|
|
2509
|
-
*/
|
|
2510
2514
|
return await this.modifyMarginHelper(symbol, amount, 'add', params);
|
|
2511
2515
|
}
|
|
2516
|
+
/**
|
|
2517
|
+
* @method
|
|
2518
|
+
* @name hyperliquid#reduceMargin
|
|
2519
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#update-isolated-margin
|
|
2520
|
+
* @description remove margin from a position
|
|
2521
|
+
* @param {string} symbol unified market symbol
|
|
2522
|
+
* @param {float} amount the amount of margin to remove
|
|
2523
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2524
|
+
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
|
|
2525
|
+
*/
|
|
2512
2526
|
async reduceMargin(symbol, amount, params = {}) {
|
|
2513
|
-
/**
|
|
2514
|
-
* @method
|
|
2515
|
-
* @name hyperliquid#reduceMargin
|
|
2516
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#update-isolated-margin
|
|
2517
|
-
* @description remove margin from a position
|
|
2518
|
-
* @param {string} symbol unified market symbol
|
|
2519
|
-
* @param {float} amount the amount of margin to remove
|
|
2520
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2521
|
-
* @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
|
|
2522
|
-
*/
|
|
2523
2527
|
return await this.modifyMarginHelper(symbol, amount, 'reduce', params);
|
|
2524
2528
|
}
|
|
2525
2529
|
async modifyMarginHelper(symbol, amount, type, params = {}) {
|
|
@@ -2581,20 +2585,20 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
2581
2585
|
'datetime': undefined,
|
|
2582
2586
|
};
|
|
2583
2587
|
}
|
|
2588
|
+
/**
|
|
2589
|
+
* @method
|
|
2590
|
+
* @name hyperliquid#transfer
|
|
2591
|
+
* @description transfer currency internally between wallets on the same account
|
|
2592
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#l1-usdc-transfer
|
|
2593
|
+
* @param {string} code unified currency code
|
|
2594
|
+
* @param {float} amount amount to transfer
|
|
2595
|
+
* @param {string} fromAccount account to transfer from *spot, swap*
|
|
2596
|
+
* @param {string} toAccount account to transfer to *swap, spot or address*
|
|
2597
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2598
|
+
* @param {string} [params.vaultAddress] the vault address for order
|
|
2599
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
2600
|
+
*/
|
|
2584
2601
|
async transfer(code, amount, fromAccount, toAccount, params = {}) {
|
|
2585
|
-
/**
|
|
2586
|
-
* @method
|
|
2587
|
-
* @name hyperliquid#transfer
|
|
2588
|
-
* @description transfer currency internally between wallets on the same account
|
|
2589
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#l1-usdc-transfer
|
|
2590
|
-
* @param {string} code unified currency code
|
|
2591
|
-
* @param {float} amount amount to transfer
|
|
2592
|
-
* @param {string} fromAccount account to transfer from *spot, swap*
|
|
2593
|
-
* @param {string} toAccount account to transfer to *swap, spot or address*
|
|
2594
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2595
|
-
* @param {string} [params.vaultAddress] the vault address for order
|
|
2596
|
-
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
|
|
2597
|
-
*/
|
|
2598
2602
|
this.checkRequiredCredentials();
|
|
2599
2603
|
await this.loadMarkets();
|
|
2600
2604
|
const isSandboxMode = this.safeBool(this.options, 'sandboxMode');
|
|
@@ -2656,21 +2660,21 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
2656
2660
|
const response = await this.privatePostExchange(request);
|
|
2657
2661
|
return response;
|
|
2658
2662
|
}
|
|
2663
|
+
/**
|
|
2664
|
+
* @method
|
|
2665
|
+
* @name hyperliquid#withdraw
|
|
2666
|
+
* @description make a withdrawal (only support USDC)
|
|
2667
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#initiate-a-withdrawal-request
|
|
2668
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#deposit-or-withdraw-from-a-vault
|
|
2669
|
+
* @param {string} code unified currency code
|
|
2670
|
+
* @param {float} amount the amount to withdraw
|
|
2671
|
+
* @param {string} address the address to withdraw to
|
|
2672
|
+
* @param {string} tag
|
|
2673
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2674
|
+
* @param {string} [params.vaultAddress] vault address withdraw from
|
|
2675
|
+
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2676
|
+
*/
|
|
2659
2677
|
async withdraw(code, amount, address, tag = undefined, params = {}) {
|
|
2660
|
-
/**
|
|
2661
|
-
* @method
|
|
2662
|
-
* @name hyperliquid#withdraw
|
|
2663
|
-
* @description make a withdrawal (only support USDC)
|
|
2664
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#initiate-a-withdrawal-request
|
|
2665
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#deposit-or-withdraw-from-a-vault
|
|
2666
|
-
* @param {string} code unified currency code
|
|
2667
|
-
* @param {float} amount the amount to withdraw
|
|
2668
|
-
* @param {string} address the address to withdraw to
|
|
2669
|
-
* @param {string} tag
|
|
2670
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2671
|
-
* @param {string} [params.vaultAddress] vault address withdraw from
|
|
2672
|
-
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2673
|
-
*/
|
|
2674
2678
|
this.checkRequiredCredentials();
|
|
2675
2679
|
await this.loadMarkets();
|
|
2676
2680
|
this.checkAddress(address);
|
|
@@ -2773,16 +2777,16 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
2773
2777
|
'fee': fee,
|
|
2774
2778
|
};
|
|
2775
2779
|
}
|
|
2780
|
+
/**
|
|
2781
|
+
* @method
|
|
2782
|
+
* @name hyperliquid#fetchTradingFee
|
|
2783
|
+
* @description fetch the trading fees for a market
|
|
2784
|
+
* @param {string} symbol unified market symbol
|
|
2785
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2786
|
+
* @param {string} [params.user] user address, will default to this.walletAddress if not provided
|
|
2787
|
+
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
2788
|
+
*/
|
|
2776
2789
|
async fetchTradingFee(symbol, params = {}) {
|
|
2777
|
-
/**
|
|
2778
|
-
* @method
|
|
2779
|
-
* @name hyperliquid#fetchTradingFee
|
|
2780
|
-
* @description fetch the trading fees for a market
|
|
2781
|
-
* @param {string} symbol unified market symbol
|
|
2782
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2783
|
-
* @param {string} [params.user] user address, will default to this.walletAddress if not provided
|
|
2784
|
-
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
2785
|
-
*/
|
|
2786
2790
|
await this.loadMarkets();
|
|
2787
2791
|
let userAddress = undefined;
|
|
2788
2792
|
[userAddress, params] = this.handlePublicAddress('fetchTradingFee', params);
|
|
@@ -2879,18 +2883,18 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
2879
2883
|
'tierBased': undefined,
|
|
2880
2884
|
};
|
|
2881
2885
|
}
|
|
2886
|
+
/**
|
|
2887
|
+
* @method
|
|
2888
|
+
* @name hyperliquid#fetchLedger
|
|
2889
|
+
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
2890
|
+
* @param {string} [code] unified currency code
|
|
2891
|
+
* @param {int} [since] timestamp in ms of the earliest ledger entry
|
|
2892
|
+
* @param {int} [limit] max number of ledger entries to return
|
|
2893
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2894
|
+
* @param {int} [params.until] timestamp in ms of the latest ledger entry
|
|
2895
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
2896
|
+
*/
|
|
2882
2897
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2883
|
-
/**
|
|
2884
|
-
* @method
|
|
2885
|
-
* @name hyperliquid#fetchLedger
|
|
2886
|
-
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
2887
|
-
* @param {string} [code] unified currency code
|
|
2888
|
-
* @param {int} [since] timestamp in ms of the earliest ledger entry
|
|
2889
|
-
* @param {int} [limit] max number of ledger entries to return
|
|
2890
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2891
|
-
* @param {int} [params.until] timestamp in ms of the latest ledger entry
|
|
2892
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
|
|
2893
|
-
*/
|
|
2894
2898
|
await this.loadMarkets();
|
|
2895
2899
|
let userAddress = undefined;
|
|
2896
2900
|
[userAddress, params] = this.handlePublicAddress('fetchLedger', params);
|
|
@@ -2971,18 +2975,18 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
2971
2975
|
};
|
|
2972
2976
|
return this.safeString(ledgerType, type, type);
|
|
2973
2977
|
}
|
|
2978
|
+
/**
|
|
2979
|
+
* @method
|
|
2980
|
+
* @name hyperliquid#fetchDeposits
|
|
2981
|
+
* @description fetch all deposits made to an account
|
|
2982
|
+
* @param {string} code unified currency code
|
|
2983
|
+
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
2984
|
+
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
2985
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2986
|
+
* @param {int} [params.until] the latest time in ms to fetch withdrawals for
|
|
2987
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2988
|
+
*/
|
|
2974
2989
|
async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2975
|
-
/**
|
|
2976
|
-
* @method
|
|
2977
|
-
* @name hyperliquid#fetchDeposits
|
|
2978
|
-
* @description fetch all deposits made to an account
|
|
2979
|
-
* @param {string} code unified currency code
|
|
2980
|
-
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
2981
|
-
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
2982
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2983
|
-
* @param {int} [params.until] the latest time in ms to fetch withdrawals for
|
|
2984
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
2985
|
-
*/
|
|
2986
2990
|
await this.loadMarkets();
|
|
2987
2991
|
let userAddress = undefined;
|
|
2988
2992
|
[userAddress, params] = this.handlePublicAddress('fetchDepositsWithdrawals', params);
|
|
@@ -3016,18 +3020,18 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
3016
3020
|
const deposits = this.filterByArray(records, 'type', ['deposit'], false);
|
|
3017
3021
|
return this.parseTransactions(deposits, undefined, since, limit);
|
|
3018
3022
|
}
|
|
3023
|
+
/**
|
|
3024
|
+
* @method
|
|
3025
|
+
* @name hyperliquid#fetchWithdrawals
|
|
3026
|
+
* @description fetch all withdrawals made from an account
|
|
3027
|
+
* @param {string} code unified currency code
|
|
3028
|
+
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
3029
|
+
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
3030
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3031
|
+
* @param {int} [params.until] the latest time in ms to fetch withdrawals for
|
|
3032
|
+
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
3033
|
+
*/
|
|
3019
3034
|
async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
3020
|
-
/**
|
|
3021
|
-
* @method
|
|
3022
|
-
* @name hyperliquid#fetchWithdrawals
|
|
3023
|
-
* @description fetch all withdrawals made from an account
|
|
3024
|
-
* @param {string} code unified currency code
|
|
3025
|
-
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
3026
|
-
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
3027
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3028
|
-
* @param {int} [params.until] the latest time in ms to fetch withdrawals for
|
|
3029
|
-
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
3030
|
-
*/
|
|
3031
3035
|
await this.loadMarkets();
|
|
3032
3036
|
let userAddress = undefined;
|
|
3033
3037
|
[userAddress, params] = this.handlePublicAddress('fetchDepositsWithdrawals', params);
|