ccxt 4.4.99 → 4.4.100
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 +4 -4
- package/dist/373.ccxt.browser.js +7630 -0
- package/dist/373.ccxt.browser.min.js +1 -0
- package/dist/ccxt.browser.min.js +8 -8
- package/dist/cjs/ccxt.js +288 -288
- package/dist/cjs/src/abstract/alpaca.js +3 -1
- package/dist/cjs/src/abstract/apex.js +3 -1
- package/dist/cjs/src/abstract/ascendex.js +3 -1
- package/dist/cjs/src/abstract/bigone.js +3 -1
- package/dist/cjs/src/abstract/binance.js +3 -1
- package/dist/cjs/src/abstract/bingx.js +3 -1
- package/dist/cjs/src/abstract/bit2c.js +3 -1
- package/dist/cjs/src/abstract/bitbank.js +3 -1
- package/dist/cjs/src/abstract/bitbns.js +3 -1
- package/dist/cjs/src/abstract/bitfinex.js +3 -1
- package/dist/cjs/src/abstract/bitflyer.js +3 -1
- package/dist/cjs/src/abstract/bitget.js +3 -1
- package/dist/cjs/src/abstract/bithumb.js +3 -1
- package/dist/cjs/src/abstract/bitmart.js +3 -1
- package/dist/cjs/src/abstract/bitmex.js +3 -1
- package/dist/cjs/src/abstract/bitopro.js +3 -1
- package/dist/cjs/src/abstract/bitrue.js +3 -1
- package/dist/cjs/src/abstract/bitso.js +3 -1
- package/dist/cjs/src/abstract/bitstamp.js +3 -1
- package/dist/cjs/src/abstract/bitteam.js +3 -1
- package/dist/cjs/src/abstract/bittrade.js +3 -1
- package/dist/cjs/src/abstract/bitvavo.js +3 -1
- package/dist/cjs/src/abstract/blockchaincom.js +3 -1
- package/dist/cjs/src/abstract/blofin.js +3 -1
- package/dist/cjs/src/abstract/btcalpha.js +3 -1
- package/dist/cjs/src/abstract/btcbox.js +3 -1
- package/dist/cjs/src/abstract/btcmarkets.js +3 -1
- package/dist/cjs/src/abstract/btcturk.js +3 -1
- package/dist/cjs/src/abstract/bybit.js +3 -1
- package/dist/cjs/src/abstract/cex.js +3 -1
- package/dist/cjs/src/abstract/coinbase.js +3 -1
- package/dist/cjs/src/abstract/coinbaseexchange.js +3 -1
- package/dist/cjs/src/abstract/coinbaseinternational.js +3 -1
- package/dist/cjs/src/abstract/coincatch.js +3 -1
- package/dist/cjs/src/abstract/coincheck.js +3 -1
- package/dist/cjs/src/abstract/coinex.js +3 -1
- package/dist/cjs/src/abstract/coinmate.js +3 -1
- package/dist/cjs/src/abstract/coinmetro.js +3 -1
- package/dist/cjs/src/abstract/coinone.js +3 -1
- package/dist/cjs/src/abstract/coinsph.js +3 -1
- package/dist/cjs/src/abstract/coinspot.js +3 -1
- package/dist/cjs/src/abstract/cryptocom.js +3 -1
- package/dist/cjs/src/abstract/cryptomus.js +3 -1
- package/dist/cjs/src/abstract/defx.js +3 -1
- package/dist/cjs/src/abstract/delta.js +3 -1
- package/dist/cjs/src/abstract/deribit.js +3 -1
- package/dist/cjs/src/abstract/derive.js +3 -1
- package/dist/cjs/src/abstract/digifinex.js +3 -1
- package/dist/cjs/src/abstract/ellipx.js +3 -1
- package/dist/cjs/src/abstract/exmo.js +3 -1
- package/dist/cjs/src/abstract/foxbit.js +3 -1
- package/dist/cjs/src/abstract/gate.js +3 -1
- package/dist/cjs/src/abstract/gemini.js +3 -1
- package/dist/cjs/src/abstract/hashkey.js +3 -1
- package/dist/cjs/src/abstract/hibachi.js +3 -1
- package/dist/cjs/src/abstract/hitbtc.js +3 -1
- package/dist/cjs/src/abstract/hollaex.js +3 -1
- package/dist/cjs/src/abstract/htx.js +3 -1
- package/dist/cjs/src/abstract/hyperliquid.js +3 -1
- package/dist/cjs/src/abstract/independentreserve.js +3 -1
- package/dist/cjs/src/abstract/indodax.js +3 -1
- package/dist/cjs/src/abstract/kraken.js +3 -1
- package/dist/cjs/src/abstract/krakenfutures.js +3 -1
- package/dist/cjs/src/abstract/kucoin.js +3 -1
- package/dist/cjs/src/abstract/kucoinfutures.js +4 -2
- package/dist/cjs/src/abstract/latoken.js +3 -1
- package/dist/cjs/src/abstract/lbank.js +3 -1
- package/dist/cjs/src/abstract/luno.js +3 -1
- package/dist/cjs/src/abstract/mercado.js +3 -1
- package/dist/cjs/src/abstract/mexc.js +3 -1
- package/dist/cjs/src/abstract/modetrade.js +3 -1
- package/dist/cjs/src/abstract/ndax.js +3 -1
- package/dist/cjs/src/abstract/novadax.js +3 -1
- package/dist/cjs/src/abstract/oceanex.js +3 -1
- package/dist/cjs/src/abstract/okcoin.js +3 -1
- package/dist/cjs/src/abstract/okx.js +3 -1
- package/dist/cjs/src/abstract/onetrading.js +3 -1
- package/dist/cjs/src/abstract/oxfun.js +3 -1
- package/dist/cjs/src/abstract/p2b.js +3 -1
- package/dist/cjs/src/abstract/paradex.js +3 -1
- package/dist/cjs/src/abstract/paymium.js +3 -1
- package/dist/cjs/src/abstract/phemex.js +3 -1
- package/dist/cjs/src/abstract/poloniex.js +3 -1
- package/dist/cjs/src/abstract/probit.js +3 -1
- package/dist/cjs/src/abstract/timex.js +3 -1
- package/dist/cjs/src/abstract/tokocrypto.js +3 -1
- package/dist/cjs/src/abstract/tradeogre.js +3 -1
- package/dist/cjs/src/abstract/upbit.js +3 -1
- package/dist/cjs/src/abstract/vertex.js +3 -1
- package/dist/cjs/src/abstract/wavesexchange.js +3 -1
- package/dist/cjs/src/abstract/whitebit.js +3 -1
- package/dist/cjs/src/abstract/woo.js +3 -1
- package/dist/cjs/src/abstract/woofipro.js +3 -1
- package/dist/cjs/src/abstract/xt.js +3 -1
- package/dist/cjs/src/abstract/yobit.js +3 -1
- package/dist/cjs/src/abstract/zaif.js +3 -1
- package/dist/cjs/src/abstract/zonda.js +3 -1
- package/dist/cjs/src/alpaca.js +4 -2
- package/dist/cjs/src/apex.js +4 -2
- package/dist/cjs/src/ascendex.js +4 -2
- package/dist/cjs/src/base/Exchange.js +51 -11
- package/dist/cjs/src/base/functions/encode.js +2 -2
- package/dist/cjs/src/base/ws/Client.js +8 -2
- package/dist/cjs/src/base/ws/WsClient.js +4 -2
- package/dist/cjs/src/bequant.js +4 -2
- package/dist/cjs/src/bigone.js +4 -2
- package/dist/cjs/src/binance.js +5 -2
- package/dist/cjs/src/binancecoinm.js +4 -2
- package/dist/cjs/src/binanceus.js +4 -2
- package/dist/cjs/src/binanceusdm.js +4 -2
- package/dist/cjs/src/bingx.js +36 -4
- package/dist/cjs/src/bit2c.js +4 -2
- package/dist/cjs/src/bitbank.js +4 -2
- package/dist/cjs/src/bitbns.js +4 -2
- package/dist/cjs/src/bitfinex.js +7 -2
- package/dist/cjs/src/bitflyer.js +4 -2
- package/dist/cjs/src/bitget.js +42 -16
- package/dist/cjs/src/bithumb.js +4 -2
- package/dist/cjs/src/bitmart.js +4 -2
- package/dist/cjs/src/bitmex.js +5 -2
- package/dist/cjs/src/bitopro.js +4 -2
- package/dist/cjs/src/bitrue.js +4 -2
- package/dist/cjs/src/bitso.js +4 -2
- package/dist/cjs/src/bitstamp.js +4 -2
- package/dist/cjs/src/bitteam.js +4 -2
- package/dist/cjs/src/bittrade.js +4 -2
- package/dist/cjs/src/bitvavo.js +4 -2
- package/dist/cjs/src/blockchaincom.js +4 -2
- package/dist/cjs/src/blofin.js +4 -2
- package/dist/cjs/src/btcalpha.js +4 -2
- package/dist/cjs/src/btcbox.js +4 -2
- package/dist/cjs/src/btcmarkets.js +4 -2
- package/dist/cjs/src/btcturk.js +4 -2
- package/dist/cjs/src/bybit.js +4 -2
- package/dist/cjs/src/cex.js +4 -2
- package/dist/cjs/src/coinbase.js +4 -2
- package/dist/cjs/src/coinbaseadvanced.js +4 -2
- package/dist/cjs/src/coinbaseexchange.js +4 -2
- package/dist/cjs/src/coinbaseinternational.js +4 -2
- package/dist/cjs/src/coincatch.js +4 -2
- package/dist/cjs/src/coincheck.js +4 -2
- package/dist/cjs/src/coinex.js +5 -3
- package/dist/cjs/src/coinmate.js +4 -2
- package/dist/cjs/src/coinmetro.js +4 -2
- package/dist/cjs/src/coinone.js +4 -2
- package/dist/cjs/src/coinsph.js +4 -2
- package/dist/cjs/src/coinspot.js +4 -2
- package/dist/cjs/src/cryptocom.js +4 -2
- package/dist/cjs/src/cryptomus.js +4 -2
- package/dist/cjs/src/defx.js +4 -2
- package/dist/cjs/src/delta.js +4 -2
- package/dist/cjs/src/deribit.js +4 -2
- package/dist/cjs/src/derive.js +4 -2
- package/dist/cjs/src/digifinex.js +4 -2
- package/dist/cjs/src/ellipx.js +4 -2
- package/dist/cjs/src/exmo.js +4 -2
- package/dist/cjs/src/fmfwio.js +4 -2
- package/dist/cjs/src/foxbit.js +7 -6
- package/dist/cjs/src/gate.js +25 -2
- package/dist/cjs/src/gateio.js +4 -2
- package/dist/cjs/src/gemini.js +4 -2
- package/dist/cjs/src/hashkey.js +4 -2
- package/dist/cjs/src/hibachi.js +4 -2
- package/dist/cjs/src/hitbtc.js +4 -2
- package/dist/cjs/src/hollaex.js +4 -2
- package/dist/cjs/src/htx.js +5 -2
- package/dist/cjs/src/huobi.js +4 -2
- package/dist/cjs/src/hyperliquid.js +83 -30
- package/dist/cjs/src/independentreserve.js +4 -2
- package/dist/cjs/src/indodax.js +4 -2
- package/dist/cjs/src/kraken.js +4 -2
- package/dist/cjs/src/krakenfutures.js +5 -2
- package/dist/cjs/src/kucoin.js +4 -2
- package/dist/cjs/src/kucoinfutures.js +5 -2
- package/dist/cjs/src/latoken.js +4 -2
- package/dist/cjs/src/lbank.js +5 -3
- package/dist/cjs/src/luno.js +4 -2
- package/dist/cjs/src/mercado.js +4 -2
- package/dist/cjs/src/mexc.js +11 -2
- package/dist/cjs/src/modetrade.js +100 -2
- package/dist/cjs/src/myokx.js +4 -2
- package/dist/cjs/src/ndax.js +4 -2
- package/dist/cjs/src/novadax.js +4 -2
- package/dist/cjs/src/oceanex.js +4 -2
- package/dist/cjs/src/okcoin.js +4 -2
- package/dist/cjs/src/okx.js +4 -2
- package/dist/cjs/src/okxus.js +4 -2
- package/dist/cjs/src/onetrading.js +37 -2
- package/dist/cjs/src/oxfun.js +4 -2
- package/dist/cjs/src/p2b.js +36 -2
- package/dist/cjs/src/paradex.js +5 -2
- package/dist/cjs/src/paymium.js +4 -2
- package/dist/cjs/src/phemex.js +4 -2
- package/dist/cjs/src/poloniex.js +4 -2
- package/dist/cjs/src/pro/alpaca.js +4 -2
- package/dist/cjs/src/pro/apex.js +4 -2
- package/dist/cjs/src/pro/ascendex.js +4 -2
- package/dist/cjs/src/pro/bequant.js +5 -3
- package/dist/cjs/src/pro/binance.js +6 -3
- package/dist/cjs/src/pro/binancecoinm.js +5 -3
- package/dist/cjs/src/pro/binanceus.js +5 -3
- package/dist/cjs/src/pro/binanceusdm.js +4 -2
- package/dist/cjs/src/pro/bingx.js +4 -2
- package/dist/cjs/src/pro/bitfinex.js +4 -2
- package/dist/cjs/src/pro/bitget.js +4 -2
- package/dist/cjs/src/pro/bithumb.js +4 -2
- package/dist/cjs/src/pro/bitmart.js +4 -2
- package/dist/cjs/src/pro/bitmex.js +4 -2
- package/dist/cjs/src/pro/bitopro.js +4 -2
- package/dist/cjs/src/pro/bitrue.js +4 -2
- package/dist/cjs/src/pro/bitstamp.js +4 -2
- package/dist/cjs/src/pro/bittrade.js +4 -2
- package/dist/cjs/src/pro/bitvavo.js +5 -3
- package/dist/cjs/src/pro/blockchaincom.js +4 -2
- package/dist/cjs/src/pro/blofin.js +4 -2
- package/dist/cjs/src/pro/bybit.js +5 -2
- package/dist/cjs/src/pro/cex.js +4 -2
- package/dist/cjs/src/pro/coinbase.js +4 -2
- package/dist/cjs/src/pro/coinbaseadvanced.js +4 -2
- package/dist/cjs/src/pro/coinbaseexchange.js +4 -2
- package/dist/cjs/src/pro/coinbaseinternational.js +4 -2
- package/dist/cjs/src/pro/coincatch.js +4 -2
- package/dist/cjs/src/pro/coincheck.js +4 -2
- package/dist/cjs/src/pro/coinex.js +5 -3
- package/dist/cjs/src/pro/coinone.js +4 -2
- package/dist/cjs/src/pro/cryptocom.js +4 -2
- package/dist/cjs/src/pro/defx.js +4 -2
- package/dist/cjs/src/pro/deribit.js +4 -2
- package/dist/cjs/src/pro/derive.js +4 -2
- package/dist/cjs/src/pro/exmo.js +4 -2
- package/dist/cjs/src/pro/gate.js +4 -2
- package/dist/cjs/src/pro/gateio.js +4 -2
- package/dist/cjs/src/pro/gemini.js +4 -2
- package/dist/cjs/src/pro/hashkey.js +4 -2
- package/dist/cjs/src/pro/hitbtc.js +4 -2
- package/dist/cjs/src/pro/hollaex.js +4 -2
- package/dist/cjs/src/pro/htx.js +4 -2
- package/dist/cjs/src/pro/huobi.js +4 -2
- package/dist/cjs/src/pro/hyperliquid.js +107 -14
- package/dist/cjs/src/pro/independentreserve.js +4 -2
- package/dist/cjs/src/pro/kraken.js +4 -2
- package/dist/cjs/src/pro/krakenfutures.js +4 -2
- package/dist/cjs/src/pro/kucoin.js +5 -3
- package/dist/cjs/src/pro/kucoinfutures.js +5 -3
- package/dist/cjs/src/pro/lbank.js +4 -2
- package/dist/cjs/src/pro/luno.js +4 -2
- package/dist/cjs/src/pro/mexc.js +342 -159
- package/dist/cjs/src/pro/modetrade.js +4 -2
- package/dist/cjs/src/pro/myokx.js +4 -2
- package/dist/cjs/src/pro/ndax.js +4 -2
- package/dist/cjs/src/pro/okcoin.js +4 -2
- package/dist/cjs/src/pro/okx.js +6 -3
- package/dist/cjs/src/pro/okxus.js +4 -2
- package/dist/cjs/src/pro/onetrading.js +4 -2
- package/dist/cjs/src/pro/oxfun.js +5 -3
- package/dist/cjs/src/pro/p2b.js +4 -2
- package/dist/cjs/src/pro/paradex.js +4 -2
- package/dist/cjs/src/pro/phemex.js +4 -2
- package/dist/cjs/src/pro/poloniex.js +4 -2
- package/dist/cjs/src/pro/probit.js +4 -2
- package/dist/cjs/src/pro/tradeogre.js +4 -2
- package/dist/cjs/src/pro/upbit.js +4 -2
- package/dist/cjs/src/pro/vertex.js +4 -2
- package/dist/cjs/src/pro/whitebit.js +4 -2
- package/dist/cjs/src/pro/woo.js +4 -2
- package/dist/cjs/src/pro/woofipro.js +4 -2
- package/dist/cjs/src/pro/xt.js +4 -2
- package/dist/cjs/src/probit.js +39 -2
- package/dist/cjs/src/protobuf/mexc/compiled.cjs.js +7180 -0
- package/dist/cjs/src/static_dependencies/ethers/abi-coder.js +1 -1
- package/dist/cjs/src/static_dependencies/ethers/coders/abstract-coder.js +2 -2
- package/dist/cjs/src/static_dependencies/ethers/fragments.js +2 -2
- package/dist/cjs/src/static_dependencies/ethers/hash/typed-data.js +2 -2
- package/dist/cjs/src/static_dependencies/ethers/interface.js +2 -2
- package/dist/cjs/src/static_dependencies/ethers/typed.js +2 -2
- package/dist/cjs/src/static_dependencies/ethers/utils/events.js +2 -2
- package/dist/cjs/src/static_dependencies/ethers/utils/fixednumber.js +2 -2
- package/dist/cjs/src/static_dependencies/node-fetch/index.js +7 -7
- package/dist/cjs/src/static_dependencies/node-fetch/response.js +3 -1
- package/dist/cjs/src/static_dependencies/qs/index.cjs.js +3 -1
- package/dist/cjs/src/static_dependencies/starknet/utils/assert.js +3 -1
- package/dist/cjs/src/static_dependencies/starknet/utils/calldata/formatter.js +3 -1
- package/dist/cjs/src/static_dependencies/starknet/utils/calldata/index.js +7 -7
- package/dist/cjs/src/static_dependencies/starknet/utils/calldata/propertyOrder.js +4 -2
- package/dist/cjs/src/static_dependencies/starknet/utils/calldata/requestParser.js +1 -1
- package/dist/cjs/src/static_dependencies/starknet/utils/calldata/responseParser.js +4 -2
- package/dist/cjs/src/static_dependencies/starknet/utils/calldata/tuple.js +3 -1
- package/dist/cjs/src/static_dependencies/starknet/utils/calldata/validate.js +28 -26
- package/dist/cjs/src/static_dependencies/starknet/utils/typedData.js +2 -2
- package/dist/cjs/src/timex.js +4 -2
- package/dist/cjs/src/tokocrypto.js +4 -2
- package/dist/cjs/src/tradeogre.js +4 -2
- package/dist/cjs/src/upbit.js +4 -2
- package/dist/cjs/src/vertex.js +4 -2
- package/dist/cjs/src/wavesexchange.js +4 -2
- package/dist/cjs/src/whitebit.js +4 -2
- package/dist/cjs/src/woo.js +4 -2
- package/dist/cjs/src/woofipro.js +100 -2
- package/dist/cjs/src/xt.js +4 -2
- package/dist/cjs/src/yobit.js +4 -2
- package/dist/cjs/src/zaif.js +4 -2
- package/dist/cjs/src/zonda.js +4 -2
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bingx.d.ts +1 -0
- package/js/src/alpaca.d.ts +1 -1
- package/js/src/apex.d.ts +1 -1
- package/js/src/ascendex.d.ts +1 -1
- package/js/src/base/Exchange.d.ts +9 -7
- package/js/src/base/Exchange.js +50 -10
- package/js/src/base/types.d.ts +2 -1
- package/js/src/base/ws/Client.d.ts +1 -0
- package/js/src/base/ws/Client.js +5 -1
- package/js/src/bigone.d.ts +1 -1
- package/js/src/binance.d.ts +2 -2
- package/js/src/binance.js +1 -0
- package/js/src/bingx.d.ts +3 -2
- package/js/src/bingx.js +32 -2
- package/js/src/bitbank.d.ts +1 -1
- package/js/src/bitfinex.d.ts +1 -1
- package/js/src/bitfinex.js +3 -0
- package/js/src/bitflyer.d.ts +1 -1
- package/js/src/bitget.d.ts +4 -2
- package/js/src/bitget.js +38 -14
- package/js/src/bithumb.d.ts +1 -1
- package/js/src/bitmart.d.ts +2 -2
- package/js/src/bitmex.d.ts +2 -2
- package/js/src/bitmex.js +1 -0
- package/js/src/bitopro.d.ts +1 -1
- package/js/src/bitrue.d.ts +2 -2
- package/js/src/bitso.d.ts +1 -1
- package/js/src/bitstamp.d.ts +1 -1
- package/js/src/bittrade.d.ts +1 -1
- package/js/src/bitvavo.d.ts +1 -1
- package/js/src/blockchaincom.d.ts +1 -1
- package/js/src/blofin.d.ts +1 -1
- package/js/src/btcmarkets.d.ts +1 -1
- package/js/src/bybit.d.ts +2 -2
- package/js/src/coinbase.d.ts +1 -1
- package/js/src/coinbaseexchange.d.ts +1 -1
- package/js/src/coinbaseinternational.d.ts +1 -1
- package/js/src/coincatch.d.ts +2 -2
- package/js/src/coinex.d.ts +3 -3
- package/js/src/coinex.js +1 -1
- package/js/src/coinmate.d.ts +1 -1
- package/js/src/coinsph.d.ts +1 -1
- package/js/src/cryptocom.d.ts +1 -1
- package/js/src/defx.d.ts +2 -2
- package/js/src/delta.d.ts +1 -1
- package/js/src/deribit.d.ts +1 -1
- package/js/src/digifinex.d.ts +2 -2
- package/js/src/ellipx.d.ts +1 -1
- package/js/src/exmo.d.ts +1 -1
- package/js/src/foxbit.d.ts +1 -1
- package/js/src/foxbit.js +3 -3
- package/js/src/gate.d.ts +2 -2
- package/js/src/gate.js +21 -0
- package/js/src/gemini.d.ts +1 -1
- package/js/src/hashkey.d.ts +3 -3
- package/js/src/hibachi.d.ts +1 -1
- package/js/src/hitbtc.d.ts +2 -2
- package/js/src/hollaex.d.ts +1 -1
- package/js/src/htx.d.ts +3 -3
- package/js/src/htx.js +1 -0
- package/js/src/hyperliquid.d.ts +12 -2
- package/js/src/hyperliquid.js +79 -28
- package/js/src/independentreserve.d.ts +1 -1
- package/js/src/indodax.d.ts +1 -1
- package/js/src/kraken.d.ts +1 -1
- package/js/src/krakenfutures.d.ts +1 -1
- package/js/src/krakenfutures.js +1 -0
- package/js/src/kucoin.d.ts +2 -2
- package/js/src/kucoinfutures.d.ts +3 -2
- package/js/src/kucoinfutures.js +1 -0
- package/js/src/lbank.d.ts +1 -1
- package/js/src/lbank.js +1 -1
- package/js/src/mercado.d.ts +1 -1
- package/js/src/mexc.d.ts +2 -2
- package/js/src/mexc.js +7 -0
- package/js/src/modetrade.d.ts +26 -3
- package/js/src/modetrade.js +96 -0
- package/js/src/ndax.d.ts +1 -1
- package/js/src/novadax.d.ts +1 -1
- package/js/src/okcoin.d.ts +1 -1
- package/js/src/okx.d.ts +2 -2
- package/js/src/onetrading.js +33 -0
- package/js/src/oxfun.d.ts +1 -1
- package/js/src/p2b.js +32 -0
- package/js/src/paradex.d.ts +1 -1
- package/js/src/paradex.js +1 -0
- package/js/src/phemex.d.ts +2 -2
- package/js/src/poloniex.d.ts +2 -2
- package/js/src/pro/binance.js +2 -1
- package/js/src/pro/bitvavo.js +1 -1
- package/js/src/pro/bybit.js +1 -0
- package/js/src/pro/coinex.js +1 -1
- package/js/src/pro/hyperliquid.d.ts +26 -0
- package/js/src/pro/hyperliquid.js +103 -12
- package/js/src/pro/kucoin.js +1 -1
- package/js/src/pro/kucoinfutures.js +1 -1
- package/js/src/pro/mexc.d.ts +9 -6
- package/js/src/pro/mexc.js +338 -157
- package/js/src/pro/okx.js +2 -1
- package/js/src/pro/oxfun.js +1 -1
- package/js/src/probit.d.ts +1 -1
- package/js/src/probit.js +35 -0
- package/js/src/protobuf/mexc/compiled.cjs +7180 -0
- package/js/src/protobuf/mexc/compiled.d.cts +2 -0
- package/js/src/tokocrypto.d.ts +1 -1
- package/js/src/upbit.d.ts +1 -1
- package/js/src/vertex.d.ts +1 -1
- package/js/src/wavesexchange.d.ts +1 -1
- package/js/src/whitebit.d.ts +2 -2
- package/js/src/woo.d.ts +4 -4
- package/js/src/woofipro.d.ts +26 -3
- package/js/src/woofipro.js +96 -0
- package/js/src/xt.d.ts +3 -3
- package/js/src/yobit.d.ts +1 -1
- package/js/src/zaif.d.ts +1 -1
- package/js/src/zonda.d.ts +1 -1
- package/package.json +4 -3
package/js/src/modetrade.js
CHANGED
|
@@ -1029,6 +1029,102 @@ export default class modetrade extends Exchange {
|
|
|
1029
1029
|
const sorted = this.sortBy(rates, 'timestamp');
|
|
1030
1030
|
return this.filterBySymbolSinceLimit(sorted, symbol, since, limit);
|
|
1031
1031
|
}
|
|
1032
|
+
parseIncome(income, market = undefined) {
|
|
1033
|
+
//
|
|
1034
|
+
// {
|
|
1035
|
+
// "symbol": "PERP_ETH_USDC",
|
|
1036
|
+
// "funding_rate": 0.00046875,
|
|
1037
|
+
// "mark_price": 2100,
|
|
1038
|
+
// "funding_fee": 0.000016,
|
|
1039
|
+
// "payment_type": "Pay",
|
|
1040
|
+
// "status": "Accrued",
|
|
1041
|
+
// "created_time": 1682235722003,
|
|
1042
|
+
// "updated_time": 1682235722003
|
|
1043
|
+
// }
|
|
1044
|
+
//
|
|
1045
|
+
const marketId = this.safeString(income, 'symbol');
|
|
1046
|
+
const symbol = this.safeSymbol(marketId, market);
|
|
1047
|
+
let amount = this.safeString(income, 'funding_fee');
|
|
1048
|
+
const code = this.safeCurrencyCode('USDC');
|
|
1049
|
+
const timestamp = this.safeInteger(income, 'updated_time');
|
|
1050
|
+
const rate = this.safeNumber(income, 'funding_rate');
|
|
1051
|
+
const paymentType = this.safeString(income, 'payment_type');
|
|
1052
|
+
amount = (paymentType === 'Pay') ? Precise.stringNeg(amount) : amount;
|
|
1053
|
+
return {
|
|
1054
|
+
'info': income,
|
|
1055
|
+
'symbol': symbol,
|
|
1056
|
+
'code': code,
|
|
1057
|
+
'timestamp': timestamp,
|
|
1058
|
+
'datetime': this.iso8601(timestamp),
|
|
1059
|
+
'id': undefined,
|
|
1060
|
+
'amount': this.parseNumber(amount),
|
|
1061
|
+
'rate': rate,
|
|
1062
|
+
};
|
|
1063
|
+
}
|
|
1064
|
+
/**
|
|
1065
|
+
* @method
|
|
1066
|
+
* @name modetrade#fetchFundingHistory
|
|
1067
|
+
* @description fetch the history of funding payments paid and received on this account
|
|
1068
|
+
* @see https://orderly.network/docs/build-on-omnichain/evm-api/restful-api/private/get-funding-fee-history
|
|
1069
|
+
* @param {string} [symbol] unified market symbol
|
|
1070
|
+
* @param {int} [since] the earliest time in ms to fetch funding history for
|
|
1071
|
+
* @param {int} [limit] the maximum number of funding history structures to retrieve
|
|
1072
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1073
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
1074
|
+
* @returns {object} a [funding history structure]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
|
|
1075
|
+
*/
|
|
1076
|
+
async fetchFundingHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
1077
|
+
await this.loadMarkets();
|
|
1078
|
+
let paginate = false;
|
|
1079
|
+
[paginate, params] = this.handleOptionAndParams(params, 'fetchFundingHistory', 'paginate');
|
|
1080
|
+
if (paginate) {
|
|
1081
|
+
return await this.fetchPaginatedCallIncremental('fetchFundingHistory', symbol, since, limit, params, 'page', 500);
|
|
1082
|
+
}
|
|
1083
|
+
const request = {};
|
|
1084
|
+
let market = undefined;
|
|
1085
|
+
if (symbol !== undefined) {
|
|
1086
|
+
market = this.market(symbol);
|
|
1087
|
+
request['symbol'] = market['id'];
|
|
1088
|
+
}
|
|
1089
|
+
if (since !== undefined) {
|
|
1090
|
+
request['start_t'] = since;
|
|
1091
|
+
}
|
|
1092
|
+
const until = this.safeInteger(params, 'until'); // unified in milliseconds
|
|
1093
|
+
params = this.omit(params, ['until']);
|
|
1094
|
+
if (until !== undefined) {
|
|
1095
|
+
request['end_t'] = until;
|
|
1096
|
+
}
|
|
1097
|
+
if (limit !== undefined) {
|
|
1098
|
+
request['size'] = Math.min(limit, 500);
|
|
1099
|
+
}
|
|
1100
|
+
const response = await this.v1PrivateGetFundingFeeHistory(this.extend(request, params));
|
|
1101
|
+
//
|
|
1102
|
+
// {
|
|
1103
|
+
// "success": true,
|
|
1104
|
+
// "timestamp": 1702989203989,
|
|
1105
|
+
// "data": {
|
|
1106
|
+
// "meta": {
|
|
1107
|
+
// "total": 9,
|
|
1108
|
+
// "records_per_page": 25,
|
|
1109
|
+
// "current_page": 1
|
|
1110
|
+
// },
|
|
1111
|
+
// "rows": [{
|
|
1112
|
+
// "symbol": "PERP_ETH_USDC",
|
|
1113
|
+
// "funding_rate": 0.00046875,
|
|
1114
|
+
// "mark_price": 2100,
|
|
1115
|
+
// "funding_fee": 0.000016,
|
|
1116
|
+
// "payment_type": "Pay",
|
|
1117
|
+
// "status": "Accrued",
|
|
1118
|
+
// "created_time": 1682235722003,
|
|
1119
|
+
// "updated_time": 1682235722003
|
|
1120
|
+
// }]
|
|
1121
|
+
// }
|
|
1122
|
+
// }
|
|
1123
|
+
//
|
|
1124
|
+
const data = this.safeDict(response, 'data', {});
|
|
1125
|
+
const rows = this.safeList(data, 'rows', []);
|
|
1126
|
+
return this.parseIncomes(rows, market, since, limit);
|
|
1127
|
+
}
|
|
1032
1128
|
/**
|
|
1033
1129
|
* @method
|
|
1034
1130
|
* @name modetrade#fetchTradingFees
|
package/js/src/ndax.d.ts
CHANGED
|
@@ -273,7 +273,7 @@ export default class ndax extends Exchange {
|
|
|
273
273
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
274
274
|
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
275
275
|
*/
|
|
276
|
-
withdraw(code: string, amount: number, address: string, tag?:
|
|
276
|
+
withdraw(code: string, amount: number, address: string, tag?: Str, params?: {}): Promise<Transaction>;
|
|
277
277
|
nonce(): number;
|
|
278
278
|
sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
|
|
279
279
|
url: string;
|
package/js/src/novadax.d.ts
CHANGED
|
@@ -209,7 +209,7 @@ export default class novadax extends Exchange {
|
|
|
209
209
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
210
210
|
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
211
211
|
*/
|
|
212
|
-
withdraw(code: string, amount: number, address: string, tag?:
|
|
212
|
+
withdraw(code: string, amount: number, address: string, tag?: Str, params?: {}): Promise<Transaction>;
|
|
213
213
|
/**
|
|
214
214
|
* @method
|
|
215
215
|
* @name novadax#fetchAccounts
|
package/js/src/okcoin.d.ts
CHANGED
|
@@ -267,7 +267,7 @@ export default class okcoin extends Exchange {
|
|
|
267
267
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
268
268
|
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
269
269
|
*/
|
|
270
|
-
withdraw(code: string, amount: number, address: string, tag?:
|
|
270
|
+
withdraw(code: string, amount: number, address: string, tag?: Str, params?: {}): Promise<Transaction>;
|
|
271
271
|
/**
|
|
272
272
|
* @method
|
|
273
273
|
* @name okcoin#fetchDeposits
|
package/js/src/okx.d.ts
CHANGED
|
@@ -488,7 +488,7 @@ export default class okx extends Exchange {
|
|
|
488
488
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
489
489
|
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
490
490
|
*/
|
|
491
|
-
withdraw(code: string, amount: number, address: string, tag?:
|
|
491
|
+
withdraw(code: string, amount: number, address: string, tag?: Str, params?: {}): Promise<Transaction>;
|
|
492
492
|
/**
|
|
493
493
|
* @method
|
|
494
494
|
* @name okx#fetchDeposits
|
|
@@ -678,7 +678,7 @@ export default class okx extends Exchange {
|
|
|
678
678
|
* @param {string} [params.posSide] 'long' or 'short' or 'net' for isolated margin long/short mode on futures and swap markets, default is 'net'
|
|
679
679
|
* @returns {object} response from the exchange
|
|
680
680
|
*/
|
|
681
|
-
setLeverage(leverage:
|
|
681
|
+
setLeverage(leverage: int, symbol?: Str, params?: {}): Promise<any>;
|
|
682
682
|
/**
|
|
683
683
|
* @method
|
|
684
684
|
* @name okx#fetchPositionMode
|
package/js/src/onetrading.js
CHANGED
|
@@ -26,6 +26,9 @@ export default class onetrading extends Exchange {
|
|
|
26
26
|
'future': false,
|
|
27
27
|
'option': false,
|
|
28
28
|
'addMargin': false,
|
|
29
|
+
'borrowCrossMargin': false,
|
|
30
|
+
'borrowIsolatedMargin': false,
|
|
31
|
+
'borrowMargin': false,
|
|
29
32
|
'cancelAllOrders': true,
|
|
30
33
|
'cancelOrder': true,
|
|
31
34
|
'cancelOrders': true,
|
|
@@ -38,9 +41,14 @@ export default class onetrading extends Exchange {
|
|
|
38
41
|
'createStopMarketOrder': false,
|
|
39
42
|
'createStopOrder': true,
|
|
40
43
|
'fetchAccounts': false,
|
|
44
|
+
'fetchAllGreeks': false,
|
|
41
45
|
'fetchBalance': true,
|
|
46
|
+
'fetchBorrowInterest': false,
|
|
47
|
+
'fetchBorrowRate': false,
|
|
42
48
|
'fetchBorrowRateHistories': false,
|
|
43
49
|
'fetchBorrowRateHistory': false,
|
|
50
|
+
'fetchBorrowRates': false,
|
|
51
|
+
'fetchBorrowRatesPerSymbol': false,
|
|
44
52
|
'fetchClosedOrders': true,
|
|
45
53
|
'fetchCrossBorrowRate': false,
|
|
46
54
|
'fetchCrossBorrowRates': false,
|
|
@@ -52,21 +60,41 @@ export default class onetrading extends Exchange {
|
|
|
52
60
|
'fetchDeposits': false,
|
|
53
61
|
'fetchDepositsWithdrawals': false,
|
|
54
62
|
'fetchFundingHistory': false,
|
|
63
|
+
'fetchFundingInterval': false,
|
|
64
|
+
'fetchFundingIntervals': false,
|
|
55
65
|
'fetchFundingRate': false,
|
|
56
66
|
'fetchFundingRateHistory': false,
|
|
57
67
|
'fetchFundingRates': false,
|
|
68
|
+
'fetchGreeks': false,
|
|
58
69
|
'fetchIndexOHLCV': false,
|
|
59
70
|
'fetchIsolatedBorrowRate': false,
|
|
60
71
|
'fetchIsolatedBorrowRates': false,
|
|
72
|
+
'fetchIsolatedPositions': false,
|
|
61
73
|
'fetchLedger': false,
|
|
62
74
|
'fetchLeverage': false,
|
|
75
|
+
'fetchLeverages': false,
|
|
76
|
+
'fetchLeverageTiers': false,
|
|
77
|
+
'fetchLiquidations': false,
|
|
78
|
+
'fetchLongShortRatio': false,
|
|
79
|
+
'fetchLongShortRatioHistory': false,
|
|
80
|
+
'fetchMarginAdjustmentHistory': false,
|
|
63
81
|
'fetchMarginMode': false,
|
|
82
|
+
'fetchMarginModes': false,
|
|
83
|
+
'fetchMarketLeverageTiers': false,
|
|
64
84
|
'fetchMarkets': true,
|
|
65
85
|
'fetchMarkOHLCV': false,
|
|
86
|
+
'fetchMarkPrice': false,
|
|
87
|
+
'fetchMarkPrices': false,
|
|
88
|
+
'fetchMyLiquidations': false,
|
|
89
|
+
'fetchMySettlementHistory': false,
|
|
66
90
|
'fetchMyTrades': true,
|
|
67
91
|
'fetchOHLCV': true,
|
|
92
|
+
'fetchOpenInterest': false,
|
|
68
93
|
'fetchOpenInterestHistory': false,
|
|
94
|
+
'fetchOpenInterests': false,
|
|
69
95
|
'fetchOpenOrders': true,
|
|
96
|
+
'fetchOption': false,
|
|
97
|
+
'fetchOptionChain': false,
|
|
70
98
|
'fetchOrder': true,
|
|
71
99
|
'fetchOrderBook': true,
|
|
72
100
|
'fetchOrders': false,
|
|
@@ -79,6 +107,7 @@ export default class onetrading extends Exchange {
|
|
|
79
107
|
'fetchPositionsHistory': false,
|
|
80
108
|
'fetchPositionsRisk': false,
|
|
81
109
|
'fetchPremiumIndexOHLCV': false,
|
|
110
|
+
'fetchSettlementHistory': false,
|
|
82
111
|
'fetchTicker': true,
|
|
83
112
|
'fetchTickers': true,
|
|
84
113
|
'fetchTime': true,
|
|
@@ -90,9 +119,13 @@ export default class onetrading extends Exchange {
|
|
|
90
119
|
'fetchTransactions': false,
|
|
91
120
|
'fetchTransfer': false,
|
|
92
121
|
'fetchTransfers': false,
|
|
122
|
+
'fetchUnderlyingAssets': false,
|
|
123
|
+
'fetchVolatilityHistory': false,
|
|
93
124
|
'fetchWithdrawal': false,
|
|
94
125
|
'fetchWithdrawals': false,
|
|
95
126
|
'reduceMargin': false,
|
|
127
|
+
'repayCrossMargin': false,
|
|
128
|
+
'repayIsolatedMargin': false,
|
|
96
129
|
'setLeverage': false,
|
|
97
130
|
'setMargin': false,
|
|
98
131
|
'setMarginMode': false,
|
package/js/src/oxfun.d.ts
CHANGED
|
@@ -300,7 +300,7 @@ export default class oxfun extends Exchange {
|
|
|
300
300
|
* @param {string} [params.code] 2FA code
|
|
301
301
|
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
302
302
|
*/
|
|
303
|
-
withdraw(code: string, amount: number, address: string, tag?:
|
|
303
|
+
withdraw(code: string, amount: number, address: string, tag?: Str, params?: {}): Promise<Transaction>;
|
|
304
304
|
/**
|
|
305
305
|
* @method
|
|
306
306
|
* @name oxfun#fetchPositions
|
package/js/src/p2b.js
CHANGED
|
@@ -25,6 +25,9 @@ export default class p2b extends Exchange {
|
|
|
25
25
|
'future': false,
|
|
26
26
|
'option': false,
|
|
27
27
|
'addMargin': false,
|
|
28
|
+
'borrowCrossMargin': false,
|
|
29
|
+
'borrowIsolatedMargin': false,
|
|
30
|
+
'borrowMargin': false,
|
|
28
31
|
'cancelAllOrders': false,
|
|
29
32
|
'cancelOrder': true,
|
|
30
33
|
'cancelOrders': false,
|
|
@@ -40,9 +43,14 @@ export default class p2b extends Exchange {
|
|
|
40
43
|
'createStopMarketOrder': false,
|
|
41
44
|
'createStopOrder': false,
|
|
42
45
|
'fetchAccounts': false,
|
|
46
|
+
'fetchAllGreeks': false,
|
|
43
47
|
'fetchBalance': true,
|
|
44
48
|
'fetchBorrowInterest': false,
|
|
49
|
+
'fetchBorrowRate': false,
|
|
50
|
+
'fetchBorrowRateHistories': false,
|
|
45
51
|
'fetchBorrowRateHistory': false,
|
|
52
|
+
'fetchBorrowRates': false,
|
|
53
|
+
'fetchBorrowRatesPerSymbol': false,
|
|
46
54
|
'fetchClosedOrders': true,
|
|
47
55
|
'fetchCrossBorrowRate': false,
|
|
48
56
|
'fetchCrossBorrowRates': false,
|
|
@@ -53,23 +61,42 @@ export default class p2b extends Exchange {
|
|
|
53
61
|
'fetchDeposits': false,
|
|
54
62
|
'fetchDepositsWithdrawals': false,
|
|
55
63
|
'fetchFundingHistory': false,
|
|
64
|
+
'fetchFundingInterval': false,
|
|
65
|
+
'fetchFundingIntervals': false,
|
|
56
66
|
'fetchFundingRate': false,
|
|
57
67
|
'fetchFundingRateHistory': false,
|
|
58
68
|
'fetchFundingRates': false,
|
|
69
|
+
'fetchGreeks': false,
|
|
59
70
|
'fetchIndexOHLCV': false,
|
|
60
71
|
'fetchIsolatedBorrowRate': false,
|
|
61
72
|
'fetchIsolatedBorrowRates': false,
|
|
73
|
+
'fetchIsolatedPositions': false,
|
|
62
74
|
'fetchLedger': false,
|
|
63
75
|
'fetchLedgerEntry': false,
|
|
76
|
+
'fetchLeverage': false,
|
|
77
|
+
'fetchLeverages': false,
|
|
64
78
|
'fetchLeverageTiers': false,
|
|
79
|
+
'fetchLiquidations': false,
|
|
80
|
+
'fetchLongShortRatio': false,
|
|
81
|
+
'fetchLongShortRatioHistory': false,
|
|
82
|
+
'fetchMarginAdjustmentHistory': false,
|
|
83
|
+
'fetchMarginMode': false,
|
|
84
|
+
'fetchMarginModes': false,
|
|
65
85
|
'fetchMarketLeverageTiers': false,
|
|
66
86
|
'fetchMarkets': true,
|
|
67
87
|
'fetchMarkOHLCV': false,
|
|
88
|
+
'fetchMarkPrice': false,
|
|
89
|
+
'fetchMarkPrices': false,
|
|
90
|
+
'fetchMyLiquidations': false,
|
|
91
|
+
'fetchMySettlementHistory': false,
|
|
68
92
|
'fetchMyTrades': true,
|
|
69
93
|
'fetchOHLCV': true,
|
|
70
94
|
'fetchOpenInterest': false,
|
|
71
95
|
'fetchOpenInterestHistory': false,
|
|
96
|
+
'fetchOpenInterests': false,
|
|
72
97
|
'fetchOpenOrders': true,
|
|
98
|
+
'fetchOption': false,
|
|
99
|
+
'fetchOptionChain': false,
|
|
73
100
|
'fetchOrderBook': true,
|
|
74
101
|
'fetchOrderBooks': false,
|
|
75
102
|
'fetchOrders': false,
|
|
@@ -82,6 +109,7 @@ export default class p2b extends Exchange {
|
|
|
82
109
|
'fetchPositionsHistory': false,
|
|
83
110
|
'fetchPositionsRisk': false,
|
|
84
111
|
'fetchPremiumIndexOHLCV': false,
|
|
112
|
+
'fetchSettlementHistory': false,
|
|
85
113
|
'fetchTicker': true,
|
|
86
114
|
'fetchTickers': true,
|
|
87
115
|
'fetchTrades': true,
|
|
@@ -90,10 +118,14 @@ export default class p2b extends Exchange {
|
|
|
90
118
|
'fetchTransactionFees': false,
|
|
91
119
|
'fetchTransactions': false,
|
|
92
120
|
'fetchTransfers': false,
|
|
121
|
+
'fetchUnderlyingAssets': false,
|
|
122
|
+
'fetchVolatilityHistory': false,
|
|
93
123
|
'fetchWithdrawAddresses': false,
|
|
94
124
|
'fetchWithdrawal': false,
|
|
95
125
|
'fetchWithdrawals': false,
|
|
96
126
|
'reduceMargin': false,
|
|
127
|
+
'repayCrossMargin': false,
|
|
128
|
+
'repayIsolatedMargin': false,
|
|
97
129
|
'setLeverage': false,
|
|
98
130
|
'setMargin': false,
|
|
99
131
|
'setMarginMode': false,
|
package/js/src/paradex.d.ts
CHANGED
|
@@ -357,7 +357,7 @@ export default class paradex extends Exchange {
|
|
|
357
357
|
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
358
358
|
* @returns {object} response from the exchange
|
|
359
359
|
*/
|
|
360
|
-
setLeverage(leverage:
|
|
360
|
+
setLeverage(leverage: int, symbol?: Str, params?: {}): Promise<any>;
|
|
361
361
|
/**
|
|
362
362
|
* @method
|
|
363
363
|
* @name paradex#fetchGreeks
|
package/js/src/paradex.js
CHANGED
package/js/src/phemex.d.ts
CHANGED
|
@@ -383,7 +383,7 @@ export default class phemex extends Exchange {
|
|
|
383
383
|
* @param {float} [params.shortLeverageRr] *hedged mode only* set the leverage for short positions
|
|
384
384
|
* @returns {object} response from the exchange
|
|
385
385
|
*/
|
|
386
|
-
setLeverage(leverage:
|
|
386
|
+
setLeverage(leverage: int, symbol?: Str, params?: {}): Promise<any>;
|
|
387
387
|
/**
|
|
388
388
|
* @method
|
|
389
389
|
* @name phemex#transfer
|
|
@@ -440,7 +440,7 @@ export default class phemex extends Exchange {
|
|
|
440
440
|
* @param {string} [params.network] unified network code
|
|
441
441
|
* @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
442
442
|
*/
|
|
443
|
-
withdraw(code: string, amount: number, address: string, tag?:
|
|
443
|
+
withdraw(code: string, amount: number, address: string, tag?: Str, params?: {}): Promise<Transaction>;
|
|
444
444
|
/**
|
|
445
445
|
* @method
|
|
446
446
|
* @name phemex#fetchOpenInterest
|
package/js/src/poloniex.d.ts
CHANGED
|
@@ -297,7 +297,7 @@ export default class poloniex extends Exchange {
|
|
|
297
297
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
298
298
|
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
299
299
|
*/
|
|
300
|
-
withdraw(code: string, amount: number, address: string, tag?:
|
|
300
|
+
withdraw(code: string, amount: number, address: string, tag?: Str, params?: {}): Promise<Transaction>;
|
|
301
301
|
fetchTransactionsHelper(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
302
302
|
/**
|
|
303
303
|
* @method
|
|
@@ -360,7 +360,7 @@ export default class poloniex extends Exchange {
|
|
|
360
360
|
* @param {string} [params.marginMode] 'cross' or 'isolated'
|
|
361
361
|
* @returns {object} response from the exchange
|
|
362
362
|
*/
|
|
363
|
-
setLeverage(leverage:
|
|
363
|
+
setLeverage(leverage: int, symbol?: Str, params?: {}): Promise<any>;
|
|
364
364
|
/**
|
|
365
365
|
* @method
|
|
366
366
|
* @name poloniex#fetchLeverage
|
package/js/src/pro/binance.js
CHANGED
|
@@ -411,6 +411,7 @@ export default class binance extends binanceRest {
|
|
|
411
411
|
'contracts': this.safeNumber(liquidation, 'l'),
|
|
412
412
|
'contractSize': this.safeNumber(market, 'contractSize'),
|
|
413
413
|
'price': this.safeNumber(liquidation, 'ap'),
|
|
414
|
+
'side': this.safeStringLower(liquidation, 'S'),
|
|
414
415
|
'baseValue': undefined,
|
|
415
416
|
'quoteValue': undefined,
|
|
416
417
|
'timestamp': timestamp,
|
|
@@ -4264,7 +4265,7 @@ export default class binance extends binanceRest {
|
|
|
4264
4265
|
const code = this.safeInteger(error, 'code');
|
|
4265
4266
|
const msg = this.safeString(error, 'msg');
|
|
4266
4267
|
try {
|
|
4267
|
-
this.handleErrors(code, msg, client.url,
|
|
4268
|
+
this.handleErrors(code, msg, client.url, '', {}, this.json(error), error, {}, {});
|
|
4268
4269
|
}
|
|
4269
4270
|
catch (e) {
|
|
4270
4271
|
rejected = true;
|
package/js/src/pro/bitvavo.js
CHANGED
|
@@ -1342,7 +1342,7 @@ export default class bitvavo extends bitvavoRest {
|
|
|
1342
1342
|
const messageHash = this.safeString(message, 'requestId', buildMessage);
|
|
1343
1343
|
let rejected = false;
|
|
1344
1344
|
try {
|
|
1345
|
-
this.handleErrors(code, error, client.url,
|
|
1345
|
+
this.handleErrors(code, error, client.url, '', {}, error, message, {}, {});
|
|
1346
1346
|
}
|
|
1347
1347
|
catch (e) {
|
|
1348
1348
|
rejected = true;
|
package/js/src/pro/bybit.js
CHANGED
|
@@ -1704,6 +1704,7 @@ export default class bybit extends bybitRest {
|
|
|
1704
1704
|
'contracts': this.safeNumber2(liquidation, 'size', 'v'),
|
|
1705
1705
|
'contractSize': this.safeNumber(market, 'contractSize'),
|
|
1706
1706
|
'price': this.safeNumber2(liquidation, 'price', 'p'),
|
|
1707
|
+
'side': this.safeStringLower(liquidation, 'side', 'S'),
|
|
1707
1708
|
'baseValue': undefined,
|
|
1708
1709
|
'quoteValue': undefined,
|
|
1709
1710
|
'timestamp': timestamp,
|
package/js/src/pro/coinex.js
CHANGED
|
@@ -1302,7 +1302,7 @@ export default class coinex extends coinexRest {
|
|
|
1302
1302
|
const method = this.safeString(message, 'method');
|
|
1303
1303
|
const error = this.safeString(message, 'message');
|
|
1304
1304
|
if (error !== undefined) {
|
|
1305
|
-
this.handleErrors(
|
|
1305
|
+
this.handleErrors(1, '', client.url, method, {}, this.json(error), message, {}, {});
|
|
1306
1306
|
}
|
|
1307
1307
|
const handlers = {
|
|
1308
1308
|
'state.update': this.handleTicker,
|
|
@@ -55,6 +55,32 @@ export default class hyperliquid extends hyperliquidRest {
|
|
|
55
55
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
56
56
|
*/
|
|
57
57
|
editOrderWs(id: string, symbol: string, type: string, side: string, amount?: Num, price?: Num, params?: {}): Promise<Order>;
|
|
58
|
+
/**
|
|
59
|
+
* @method
|
|
60
|
+
* @name hyperliquid#cancelOrdersWs
|
|
61
|
+
* @description cancel multiple orders using WebSocket post request
|
|
62
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/post-requests
|
|
63
|
+
* @param {string[]} ids list of order ids to cancel
|
|
64
|
+
* @param {string} symbol unified symbol of the market the orders were made in
|
|
65
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
66
|
+
* @param {string[]} [params.clientOrderId] list of client order ids to cancel instead of order ids
|
|
67
|
+
* @param {string} [params.vaultAddress] the vault address for order cancellation
|
|
68
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
69
|
+
*/
|
|
70
|
+
cancelOrdersWs(ids: string[], symbol?: Str, params?: {}): Promise<any[]>;
|
|
71
|
+
/**
|
|
72
|
+
* @method
|
|
73
|
+
* @name hyperliquid#cancelOrderWs
|
|
74
|
+
* @description cancel a single order using WebSocket post request
|
|
75
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/post-requests
|
|
76
|
+
* @param {string} id order id to cancel
|
|
77
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
78
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
79
|
+
* @param {string} [params.clientOrderId] client order id to cancel instead of order id
|
|
80
|
+
* @param {string} [params.vaultAddress] the vault address for order cancellation
|
|
81
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
82
|
+
*/
|
|
83
|
+
cancelOrderWs(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
58
84
|
/**
|
|
59
85
|
* @method
|
|
60
86
|
* @name hyperliquid#watchOrderBook
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// ---------------------------------------------------------------------------
|
|
2
2
|
import hyperliquidRest from '../hyperliquid.js';
|
|
3
|
-
import { ExchangeError } from '../base/errors.js';
|
|
4
3
|
import { ArrayCache, ArrayCacheByTimestamp, ArrayCacheBySymbolById } from '../base/ws/Cache.js';
|
|
5
4
|
// ---------------------------------------------------------------------------
|
|
6
5
|
export default class hyperliquid extends hyperliquidRest {
|
|
@@ -8,6 +7,8 @@ export default class hyperliquid extends hyperliquidRest {
|
|
|
8
7
|
return this.deepExtend(super.describe(), {
|
|
9
8
|
'has': {
|
|
10
9
|
'ws': true,
|
|
10
|
+
'cancelOrderWs': true,
|
|
11
|
+
'cancelOrdersWs': true,
|
|
11
12
|
'createOrderWs': true,
|
|
12
13
|
'createOrdersWs': true,
|
|
13
14
|
'editOrderWs': true,
|
|
@@ -93,9 +94,6 @@ export default class hyperliquid extends hyperliquidRest {
|
|
|
93
94
|
const [order, globalParams] = this.parseCreateEditOrderArgs(undefined, symbol, type, side, amount, price, params);
|
|
94
95
|
const orders = await this.createOrdersWs([order], globalParams);
|
|
95
96
|
const parsedOrder = orders[0];
|
|
96
|
-
const orderInfo = this.safeDict(parsedOrder, 'info');
|
|
97
|
-
// handle potential error here
|
|
98
|
-
this.handleErrors(undefined, undefined, undefined, undefined, undefined, this.json(orderInfo), orderInfo, undefined, undefined);
|
|
99
97
|
return parsedOrder;
|
|
100
98
|
}
|
|
101
99
|
/**
|
|
@@ -134,11 +132,58 @@ export default class hyperliquid extends hyperliquidRest {
|
|
|
134
132
|
const statuses = this.safeList(dataObject, 'statuses', []);
|
|
135
133
|
const first = this.safeDict(statuses, 0, {});
|
|
136
134
|
const parsedOrder = this.parseOrder(first, market);
|
|
137
|
-
const orderInfo = this.safeDict(parsedOrder, 'info');
|
|
138
|
-
// handle potential error here
|
|
139
|
-
this.handleErrors(undefined, undefined, undefined, undefined, undefined, this.json(orderInfo), orderInfo, undefined, undefined);
|
|
140
135
|
return parsedOrder;
|
|
141
136
|
}
|
|
137
|
+
/**
|
|
138
|
+
* @method
|
|
139
|
+
* @name hyperliquid#cancelOrdersWs
|
|
140
|
+
* @description cancel multiple orders using WebSocket post request
|
|
141
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/post-requests
|
|
142
|
+
* @param {string[]} ids list of order ids to cancel
|
|
143
|
+
* @param {string} symbol unified symbol of the market the orders were made in
|
|
144
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
145
|
+
* @param {string[]} [params.clientOrderId] list of client order ids to cancel instead of order ids
|
|
146
|
+
* @param {string} [params.vaultAddress] the vault address for order cancellation
|
|
147
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
148
|
+
*/
|
|
149
|
+
async cancelOrdersWs(ids, symbol = undefined, params = {}) {
|
|
150
|
+
this.checkRequiredCredentials();
|
|
151
|
+
await this.loadMarkets();
|
|
152
|
+
const request = this.cancelOrdersRequest(ids, symbol, params);
|
|
153
|
+
const url = this.urls['api']['ws']['public'];
|
|
154
|
+
const wrapped = this.wrapAsPostAction(request);
|
|
155
|
+
const wsRequest = this.safeDict(wrapped, 'request', {});
|
|
156
|
+
const requestId = this.safeString(wrapped, 'requestId');
|
|
157
|
+
const response = await this.watch(url, requestId, wsRequest, requestId);
|
|
158
|
+
const responseObj = this.safeDict(response, 'response', {});
|
|
159
|
+
const data = this.safeDict(responseObj, 'data', {});
|
|
160
|
+
const statuses = this.safeList(data, 'statuses', []);
|
|
161
|
+
const orders = [];
|
|
162
|
+
for (let i = 0; i < statuses.length; i++) {
|
|
163
|
+
const status = statuses[i];
|
|
164
|
+
orders.push(this.safeOrder({
|
|
165
|
+
'info': status,
|
|
166
|
+
'status': status,
|
|
167
|
+
}));
|
|
168
|
+
}
|
|
169
|
+
return orders;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* @method
|
|
173
|
+
* @name hyperliquid#cancelOrderWs
|
|
174
|
+
* @description cancel a single order using WebSocket post request
|
|
175
|
+
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/post-requests
|
|
176
|
+
* @param {string} id order id to cancel
|
|
177
|
+
* @param {string} symbol unified symbol of the market the order was made in
|
|
178
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
179
|
+
* @param {string} [params.clientOrderId] client order id to cancel instead of order id
|
|
180
|
+
* @param {string} [params.vaultAddress] the vault address for order cancellation
|
|
181
|
+
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
182
|
+
*/
|
|
183
|
+
async cancelOrderWs(id, symbol = undefined, params = {}) {
|
|
184
|
+
const orders = await this.cancelOrdersWs([id], symbol, params);
|
|
185
|
+
return this.safeDict(orders, 0);
|
|
186
|
+
}
|
|
142
187
|
/**
|
|
143
188
|
* @method
|
|
144
189
|
* @name hyperliquid#watchOrderBook
|
|
@@ -834,19 +879,65 @@ export default class hyperliquid extends hyperliquidRest {
|
|
|
834
879
|
}
|
|
835
880
|
handleErrorMessage(client, message) {
|
|
836
881
|
//
|
|
837
|
-
//
|
|
882
|
+
// {
|
|
883
|
+
// "channel": "post",
|
|
884
|
+
// "data": {
|
|
885
|
+
// "id": 1,
|
|
886
|
+
// "response": {
|
|
887
|
+
// "type": "action",
|
|
888
|
+
// "payload": {
|
|
889
|
+
// "status": "ok",
|
|
890
|
+
// "response": {
|
|
891
|
+
// "type": "order",
|
|
892
|
+
// "data": {
|
|
893
|
+
// "statuses": [
|
|
894
|
+
// {
|
|
895
|
+
// "error": "Order price cannot be more than 80% away from the reference price"
|
|
896
|
+
// }
|
|
897
|
+
// ]
|
|
898
|
+
// }
|
|
899
|
+
// }
|
|
900
|
+
// }
|
|
901
|
+
// }
|
|
902
|
+
// }
|
|
903
|
+
// }
|
|
904
|
+
//
|
|
905
|
+
// {
|
|
838
906
|
// "channel": "error",
|
|
839
907
|
// "data": "Error parsing JSON into valid websocket request: { \"type\": \"allMids\" }"
|
|
840
908
|
// }
|
|
841
909
|
//
|
|
842
910
|
const channel = this.safeString(message, 'channel', '');
|
|
843
|
-
const ret_msg = this.safeString(message, 'data', '');
|
|
844
911
|
if (channel === 'error') {
|
|
845
|
-
|
|
912
|
+
const ret_msg = this.safeString(message, 'data', '');
|
|
913
|
+
const errorMsg = this.id + ' ' + ret_msg;
|
|
914
|
+
client.reject(errorMsg);
|
|
915
|
+
return true;
|
|
916
|
+
}
|
|
917
|
+
const data = this.safeDict(message, 'data', {});
|
|
918
|
+
const id = this.safeString(message, 'id');
|
|
919
|
+
const response = this.safeDict(data, 'response', {});
|
|
920
|
+
const payload = this.safeDict(response, 'payload', {});
|
|
921
|
+
const status = this.safeString(payload, 'status');
|
|
922
|
+
if (status !== undefined && status !== 'ok') {
|
|
923
|
+
const errorMsg = this.id + ' ' + this.json(payload);
|
|
924
|
+
client.reject(errorMsg, id);
|
|
925
|
+
return true;
|
|
926
|
+
}
|
|
927
|
+
const type = this.safeString(payload, 'type');
|
|
928
|
+
if (type === 'error') {
|
|
929
|
+
const error = this.id + ' ' + this.json(payload);
|
|
930
|
+
client.reject(error, id);
|
|
931
|
+
return true;
|
|
932
|
+
}
|
|
933
|
+
try {
|
|
934
|
+
this.handleErrors(0, '', '', '', {}, this.json(payload), payload, {}, {});
|
|
846
935
|
}
|
|
847
|
-
|
|
848
|
-
|
|
936
|
+
catch (e) {
|
|
937
|
+
client.reject(e, id);
|
|
938
|
+
return true;
|
|
849
939
|
}
|
|
940
|
+
return false;
|
|
850
941
|
}
|
|
851
942
|
handleOrderBookUnsubscription(client, subscription) {
|
|
852
943
|
//
|
package/js/src/pro/kucoin.js
CHANGED
|
@@ -1403,7 +1403,7 @@ export default class kucoin extends kucoinRest {
|
|
|
1403
1403
|
}
|
|
1404
1404
|
this.options['urls'][type] = undefined;
|
|
1405
1405
|
}
|
|
1406
|
-
this.handleErrors(
|
|
1406
|
+
this.handleErrors(1, '', client.url, '', {}, data, message, {}, {});
|
|
1407
1407
|
return false;
|
|
1408
1408
|
}
|
|
1409
1409
|
handleMessage(client, message) {
|