ccxt 4.0.74 → 4.0.75
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/ccxt.browser.js +2047 -1932
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ace.js +9 -9
- package/dist/cjs/src/alpaca.js +6 -6
- package/dist/cjs/src/ascendex.js +22 -22
- package/dist/cjs/src/base/Exchange.js +2 -2
- package/dist/cjs/src/bigone.js +17 -17
- package/dist/cjs/src/binance.js +51 -51
- package/dist/cjs/src/bingx.js +21 -21
- package/dist/cjs/src/bit2c.js +10 -10
- package/dist/cjs/src/bitbank.js +11 -11
- package/dist/cjs/src/bitbns.js +12 -12
- package/dist/cjs/src/bitfinex.js +19 -19
- package/dist/cjs/src/bitfinex2.js +25 -25
- package/dist/cjs/src/bitflyer.js +15 -15
- package/dist/cjs/src/bitforex.js +9 -9
- package/dist/cjs/src/bitget.js +34 -34
- package/dist/cjs/src/bithumb.js +9 -9
- package/dist/cjs/src/bitmart.js +42 -29
- package/dist/cjs/src/bitmex.js +19 -19
- package/dist/cjs/src/bitopro.js +18 -18
- package/dist/cjs/src/bitpanda.js +19 -19
- package/dist/cjs/src/bitrue.js +15 -15
- package/dist/cjs/src/bitso.js +19 -19
- package/dist/cjs/src/bitstamp.js +19 -19
- package/dist/cjs/src/bitstamp1.js +6 -6
- package/dist/cjs/src/bittrex.js +24 -24
- package/dist/cjs/src/bitvavo.js +16 -16
- package/dist/cjs/src/bkex.js +17 -17
- package/dist/cjs/src/bl3p.js +6 -6
- package/dist/cjs/src/blockchaincom.js +20 -20
- package/dist/cjs/src/btcalpha.js +13 -13
- package/dist/cjs/src/btcbox.js +8 -8
- package/dist/cjs/src/btcmarkets.js +15 -15
- package/dist/cjs/src/btctradeua.js +6 -6
- package/dist/cjs/src/btcturk.js +9 -9
- package/dist/cjs/src/bybit.js +148 -116
- package/dist/cjs/src/cex.js +12 -12
- package/dist/cjs/src/coinbase.js +20 -20
- package/dist/cjs/src/coinbasepro.js +22 -22
- package/dist/cjs/src/coincheck.js +10 -10
- package/dist/cjs/src/coinex.js +81 -35
- package/dist/cjs/src/coinfalcon.js +14 -14
- package/dist/cjs/src/coinmate.js +12 -12
- package/dist/cjs/src/coinone.js +10 -10
- package/dist/cjs/src/coinsph.js +20 -20
- package/dist/cjs/src/coinspot.js +6 -6
- package/dist/cjs/src/cryptocom.js +24 -24
- package/dist/cjs/src/currencycom.js +18 -18
- package/dist/cjs/src/delta.js +23 -23
- package/dist/cjs/src/deribit.js +27 -27
- package/dist/cjs/src/digifinex.js +27 -27
- package/dist/cjs/src/exmo.js +24 -24
- package/dist/cjs/src/gate.js +34 -34
- package/dist/cjs/src/gemini.js +14 -14
- package/dist/cjs/src/hitbtc.js +30 -30
- package/dist/cjs/src/hollaex.js +20 -20
- package/dist/cjs/src/huobi.js +40 -40
- package/dist/cjs/src/huobijp.js +18 -18
- package/dist/cjs/src/idex.js +17 -17
- package/dist/cjs/src/independentreserve.js +10 -10
- package/dist/cjs/src/indodax.js +12 -12
- package/dist/cjs/src/kraken.js +25 -25
- package/dist/cjs/src/krakenfutures.js +12 -12
- package/dist/cjs/src/kucoin.js +29 -29
- package/dist/cjs/src/kucoinfutures.js +19 -19
- package/dist/cjs/src/kuna.js +10 -10
- package/dist/cjs/src/latoken.js +15 -15
- package/dist/cjs/src/lbank.js +10 -10
- package/dist/cjs/src/lbank2.js +21 -21
- package/dist/cjs/src/luno.js +14 -14
- package/dist/cjs/src/lykke.js +14 -14
- package/dist/cjs/src/mercado.js +10 -10
- package/dist/cjs/src/mexc.js +38 -38
- package/dist/cjs/src/ndax.js +18 -18
- package/dist/cjs/src/novadax.js +18 -18
- package/dist/cjs/src/oceanex.js +14 -14
- package/dist/cjs/src/okcoin.js +19 -19
- package/dist/cjs/src/okx.js +48 -48
- package/dist/cjs/src/paymium.js +9 -9
- package/dist/cjs/src/phemex.js +24 -24
- package/dist/cjs/src/poloniex.js +77 -60
- package/dist/cjs/src/poloniexfutures.js +16 -16
- package/dist/cjs/src/pro/alpaca.js +5 -5
- package/dist/cjs/src/pro/ascendex.js +2 -2
- package/dist/cjs/src/pro/binance.js +10 -10
- package/dist/cjs/src/pro/bitfinex.js +3 -3
- package/dist/cjs/src/pro/bitfinex2.js +4 -4
- package/dist/cjs/src/pro/bitget.js +4 -4
- package/dist/cjs/src/pro/bitmart.js +3 -3
- package/dist/cjs/src/pro/bitmex.js +4 -4
- package/dist/cjs/src/pro/bitopro.js +2 -2
- package/dist/cjs/src/pro/bitrue.js +1 -1
- package/dist/cjs/src/pro/bitstamp.js +2 -2
- package/dist/cjs/src/pro/bittrex.js +4 -4
- package/dist/cjs/src/pro/bitvavo.js +4 -4
- package/dist/cjs/src/pro/bybit.js +5 -5
- package/dist/cjs/src/pro/cex.js +3 -3
- package/dist/cjs/src/pro/coinbasepro.js +5 -5
- package/dist/cjs/src/pro/coinex.js +3 -3
- package/dist/cjs/src/pro/cryptocom.js +7 -7
- package/dist/cjs/src/pro/currencycom.js +2 -2
- package/dist/cjs/src/pro/deribit.js +3 -3
- package/dist/cjs/src/pro/exmo.js +2 -2
- package/dist/cjs/src/pro/gate.js +5 -5
- package/dist/cjs/src/pro/gemini.js +2 -2
- package/dist/cjs/src/pro/hitbtc.js +2 -2
- package/dist/cjs/src/pro/hollaex.js +3 -3
- package/dist/cjs/src/pro/huobi.js +4 -4
- package/dist/cjs/src/pro/huobijp.js +2 -2
- package/dist/cjs/src/pro/idex.js +3 -3
- package/dist/cjs/src/pro/independentreserve.js +1 -1
- package/dist/cjs/src/pro/kraken.js +6 -6
- package/dist/cjs/src/pro/krakenfutures.js +2 -2
- package/dist/cjs/src/pro/kucoin.js +4 -4
- package/dist/cjs/src/pro/kucoinfutures.js +3 -3
- package/dist/cjs/src/pro/luno.js +1 -1
- package/dist/cjs/src/pro/ndax.js +2 -2
- package/dist/cjs/src/pro/okcoin.js +3 -3
- package/dist/cjs/src/pro/okx.js +12 -11
- package/dist/cjs/src/pro/phemex.js +4 -4
- package/dist/cjs/src/pro/poloniex.js +1 -1
- package/dist/cjs/src/pro/upbit.js +2 -2
- package/dist/cjs/src/pro/wazirx.js +3 -3
- package/dist/cjs/src/pro/whitebit.js +4 -4
- package/dist/cjs/src/probit.js +17 -17
- package/dist/cjs/src/tidex.js +11 -11
- package/dist/cjs/src/timex.js +14 -14
- package/dist/cjs/src/tokocrypto.js +16 -16
- package/dist/cjs/src/upbit.js +18 -18
- package/dist/cjs/src/wavesexchange.js +13 -13
- package/dist/cjs/src/wazirx.js +10 -10
- package/dist/cjs/src/whitebit.js +21 -21
- package/dist/cjs/src/woo.js +28 -22
- package/dist/cjs/src/yobit.js +14 -14
- package/dist/cjs/src/zaif.js +8 -8
- package/dist/cjs/src/zonda.js +13 -13
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bitmart.d.ts +13 -0
- package/js/src/abstract/bybit.d.ts +33 -21
- package/js/src/abstract/woo.d.ts +6 -0
- package/js/src/ace.js +9 -9
- package/js/src/alpaca.js +6 -6
- package/js/src/ascendex.js +22 -22
- package/js/src/base/Exchange.js +2 -2
- package/js/src/bigone.js +17 -17
- package/js/src/binance.js +51 -51
- package/js/src/bingx.js +21 -21
- package/js/src/bit2c.js +10 -10
- package/js/src/bitbank.js +11 -11
- package/js/src/bitbns.js +12 -12
- package/js/src/bitfinex.js +19 -19
- package/js/src/bitfinex2.js +25 -25
- package/js/src/bitflyer.js +15 -15
- package/js/src/bitforex.js +9 -9
- package/js/src/bitget.js +34 -34
- package/js/src/bithumb.js +9 -9
- package/js/src/bitmart.js +42 -29
- package/js/src/bitmex.js +19 -19
- package/js/src/bitopro.js +18 -18
- package/js/src/bitpanda.js +19 -19
- package/js/src/bitrue.js +15 -15
- package/js/src/bitso.js +19 -19
- package/js/src/bitstamp.js +19 -19
- package/js/src/bitstamp1.js +6 -6
- package/js/src/bittrex.js +24 -24
- package/js/src/bitvavo.js +16 -16
- package/js/src/bkex.js +17 -17
- package/js/src/bl3p.js +6 -6
- package/js/src/blockchaincom.js +20 -20
- package/js/src/btcalpha.js +13 -13
- package/js/src/btcbox.js +8 -8
- package/js/src/btcmarkets.js +15 -15
- package/js/src/btctradeua.js +6 -6
- package/js/src/btcturk.js +9 -9
- package/js/src/bybit.js +148 -116
- package/js/src/cex.js +12 -12
- package/js/src/coinbase.js +20 -20
- package/js/src/coinbasepro.js +22 -22
- package/js/src/coincheck.js +10 -10
- package/js/src/coinex.d.ts +1 -0
- package/js/src/coinex.js +81 -35
- package/js/src/coinfalcon.js +14 -14
- package/js/src/coinmate.js +12 -12
- package/js/src/coinone.js +10 -10
- package/js/src/coinsph.js +20 -20
- package/js/src/coinspot.js +6 -6
- package/js/src/cryptocom.js +24 -24
- package/js/src/currencycom.js +18 -18
- package/js/src/delta.js +23 -23
- package/js/src/deribit.js +27 -27
- package/js/src/digifinex.js +27 -27
- package/js/src/exmo.js +24 -24
- package/js/src/gate.js +34 -34
- package/js/src/gemini.js +14 -14
- package/js/src/hitbtc.js +30 -30
- package/js/src/hollaex.js +20 -20
- package/js/src/huobi.js +40 -40
- package/js/src/huobijp.js +18 -18
- package/js/src/idex.js +17 -17
- package/js/src/independentreserve.js +10 -10
- package/js/src/indodax.js +12 -12
- package/js/src/kraken.js +25 -25
- package/js/src/krakenfutures.js +12 -12
- package/js/src/kucoin.js +29 -29
- package/js/src/kucoinfutures.js +19 -19
- package/js/src/kuna.js +10 -10
- package/js/src/latoken.js +15 -15
- package/js/src/lbank.js +10 -10
- package/js/src/lbank2.js +21 -21
- package/js/src/luno.js +14 -14
- package/js/src/lykke.js +14 -14
- package/js/src/mercado.js +10 -10
- package/js/src/mexc.js +38 -38
- package/js/src/ndax.js +18 -18
- package/js/src/novadax.js +18 -18
- package/js/src/oceanex.js +14 -14
- package/js/src/okcoin.js +19 -19
- package/js/src/okx.js +48 -48
- package/js/src/paymium.js +9 -9
- package/js/src/phemex.js +24 -24
- package/js/src/poloniex.js +77 -60
- package/js/src/poloniexfutures.js +16 -16
- package/js/src/pro/alpaca.js +5 -5
- package/js/src/pro/ascendex.js +2 -2
- package/js/src/pro/binance.js +10 -10
- package/js/src/pro/bitfinex.js +3 -3
- package/js/src/pro/bitfinex2.js +4 -4
- package/js/src/pro/bitget.js +4 -4
- package/js/src/pro/bitmart.js +3 -3
- package/js/src/pro/bitmex.js +4 -4
- package/js/src/pro/bitopro.js +2 -2
- package/js/src/pro/bitrue.js +1 -1
- package/js/src/pro/bitstamp.js +2 -2
- package/js/src/pro/bittrex.js +4 -4
- package/js/src/pro/bitvavo.js +4 -4
- package/js/src/pro/bybit.js +5 -5
- package/js/src/pro/cex.js +3 -3
- package/js/src/pro/coinbasepro.js +5 -5
- package/js/src/pro/coinex.js +3 -3
- package/js/src/pro/cryptocom.js +7 -7
- package/js/src/pro/currencycom.js +2 -2
- package/js/src/pro/deribit.js +3 -3
- package/js/src/pro/exmo.js +2 -2
- package/js/src/pro/gate.js +5 -5
- package/js/src/pro/gemini.js +2 -2
- package/js/src/pro/hitbtc.js +2 -2
- package/js/src/pro/hollaex.js +3 -3
- package/js/src/pro/huobi.js +4 -4
- package/js/src/pro/huobijp.js +2 -2
- package/js/src/pro/idex.js +3 -3
- package/js/src/pro/independentreserve.js +1 -1
- package/js/src/pro/kraken.js +6 -6
- package/js/src/pro/krakenfutures.js +2 -2
- package/js/src/pro/kucoin.js +4 -4
- package/js/src/pro/kucoinfutures.js +3 -3
- package/js/src/pro/luno.js +1 -1
- package/js/src/pro/ndax.js +2 -2
- package/js/src/pro/okcoin.js +3 -3
- package/js/src/pro/okx.d.ts +1 -1
- package/js/src/pro/okx.js +12 -11
- package/js/src/pro/phemex.js +4 -4
- package/js/src/pro/poloniex.js +1 -1
- package/js/src/pro/upbit.js +2 -2
- package/js/src/pro/wazirx.js +3 -3
- package/js/src/pro/whitebit.js +4 -4
- package/js/src/probit.js +17 -17
- package/js/src/tidex.js +11 -11
- package/js/src/timex.js +14 -14
- package/js/src/tokocrypto.js +16 -16
- package/js/src/upbit.js +18 -18
- package/js/src/wavesexchange.js +13 -13
- package/js/src/wazirx.js +10 -10
- package/js/src/whitebit.js +21 -21
- package/js/src/woo.js +28 -22
- package/js/src/yobit.js +14 -14
- package/js/src/zaif.js +8 -8
- package/js/src/zonda.js +13 -13
- package/package.json +1 -1
package/dist/cjs/src/huobi.js
CHANGED
|
@@ -1323,7 +1323,7 @@ class huobi extends huobi$1 {
|
|
|
1323
1323
|
* @description fetch the trading fees for a market
|
|
1324
1324
|
* @param {string} symbol unified market symbol
|
|
1325
1325
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
1326
|
-
* @returns {object} a [fee structure]{@link https://
|
|
1326
|
+
* @returns {object} a [fee structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
1327
1327
|
*/
|
|
1328
1328
|
await this.loadMarkets();
|
|
1329
1329
|
const market = this.market(symbol);
|
|
@@ -1864,7 +1864,7 @@ class huobi extends huobi$1 {
|
|
|
1864
1864
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1865
1865
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1866
1866
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
1867
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
1867
|
+
* @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
1868
1868
|
*/
|
|
1869
1869
|
await this.loadMarkets();
|
|
1870
1870
|
const market = this.market(symbol);
|
|
@@ -1947,7 +1947,7 @@ class huobi extends huobi$1 {
|
|
|
1947
1947
|
* @see https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-a-batch-of-market-data-overview-v2
|
|
1948
1948
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1949
1949
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
1950
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
1950
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
1951
1951
|
*/
|
|
1952
1952
|
await this.loadMarkets();
|
|
1953
1953
|
symbols = this.marketSymbols(symbols);
|
|
@@ -2101,7 +2101,7 @@ class huobi extends huobi$1 {
|
|
|
2101
2101
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
2102
2102
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
2103
2103
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
2104
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
2104
|
+
* @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
|
|
2105
2105
|
*/
|
|
2106
2106
|
await this.loadMarkets();
|
|
2107
2107
|
const market = this.market(symbol);
|
|
@@ -2329,7 +2329,7 @@ class huobi extends huobi$1 {
|
|
|
2329
2329
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
2330
2330
|
* @param {int} [limit] the maximum number of trades to retrieve
|
|
2331
2331
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
2332
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
2332
|
+
* @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
2333
2333
|
*/
|
|
2334
2334
|
let market = undefined;
|
|
2335
2335
|
if (symbol !== undefined) {
|
|
@@ -2359,7 +2359,7 @@ class huobi extends huobi$1 {
|
|
|
2359
2359
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
2360
2360
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
2361
2361
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
2362
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
2362
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
2363
2363
|
*/
|
|
2364
2364
|
await this.loadMarkets();
|
|
2365
2365
|
let market = undefined;
|
|
@@ -2760,7 +2760,7 @@ class huobi extends huobi$1 {
|
|
|
2760
2760
|
* @name huobi#fetchAccounts
|
|
2761
2761
|
* @description fetch all the accounts associated with a profile
|
|
2762
2762
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
2763
|
-
* @returns {object} a dictionary of [account structures]{@link https://
|
|
2763
|
+
* @returns {object} a dictionary of [account structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#account-structure} indexed by the account type
|
|
2764
2764
|
*/
|
|
2765
2765
|
await this.loadMarkets();
|
|
2766
2766
|
const response = await this.spotPrivateGetV1AccountAccounts(params);
|
|
@@ -3313,7 +3313,7 @@ class huobi extends huobi$1 {
|
|
|
3313
3313
|
* @description fetches information on an order made by the user
|
|
3314
3314
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
3315
3315
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
3316
|
-
* @returns {object} An [order structure]{@link https://
|
|
3316
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
3317
3317
|
*/
|
|
3318
3318
|
await this.loadMarkets();
|
|
3319
3319
|
let market = undefined;
|
|
@@ -3853,7 +3853,7 @@ class huobi extends huobi$1 {
|
|
|
3853
3853
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
3854
3854
|
* @param {bool} [params.stop] *contract only* if the orders are stop trigger orders or not
|
|
3855
3855
|
* @param {bool} [params.stopLossTakeProfit] *contract only* if the orders are stop-loss or take-profit orders
|
|
3856
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
3856
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
3857
3857
|
*/
|
|
3858
3858
|
await this.loadMarkets();
|
|
3859
3859
|
let market = undefined;
|
|
@@ -3884,7 +3884,7 @@ class huobi extends huobi$1 {
|
|
|
3884
3884
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
3885
3885
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
3886
3886
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
3887
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
3887
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
3888
3888
|
*/
|
|
3889
3889
|
await this.loadMarkets();
|
|
3890
3890
|
let market = undefined;
|
|
@@ -3913,7 +3913,7 @@ class huobi extends huobi$1 {
|
|
|
3913
3913
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
3914
3914
|
* @param {bool} [params.stop] *contract only* if the orders are stop trigger orders or not
|
|
3915
3915
|
* @param {bool} [params.stopLossTakeProfit] *contract only* if the orders are stop-loss or take-profit orders
|
|
3916
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
3916
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
3917
3917
|
*/
|
|
3918
3918
|
await this.loadMarkets();
|
|
3919
3919
|
let market = undefined;
|
|
@@ -4583,7 +4583,7 @@ class huobi extends huobi$1 {
|
|
|
4583
4583
|
* @param {string} type 'market' or 'limit'
|
|
4584
4584
|
* @param {string} side 'buy' or 'sell'
|
|
4585
4585
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
4586
|
-
* @param {float} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
4586
|
+
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
4587
4587
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
4588
4588
|
* @param {float} [params.stopPrice] the price a trigger order is triggered at
|
|
4589
4589
|
* @param {string} [params.triggerType] *contract trigger orders only* ge: greater than or equal to, le: less than or equal to
|
|
@@ -4593,7 +4593,7 @@ class huobi extends huobi$1 {
|
|
|
4593
4593
|
* @param {string} [params.offset] *contract only* 'open', 'close', or 'both', required in hedge mode
|
|
4594
4594
|
* @param {bool} [params.postOnly] *contract only* true or false
|
|
4595
4595
|
* @param {int} [params.leverRate] *contract only* required for all contract orders except tpsl, leverage greater than 20x requires prior approval of high-leverage agreement
|
|
4596
|
-
* @returns {object} an [order structure]{@link https://
|
|
4596
|
+
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
4597
4597
|
*/
|
|
4598
4598
|
await this.loadMarkets();
|
|
4599
4599
|
const market = this.market(symbol);
|
|
@@ -4618,7 +4618,7 @@ class huobi extends huobi$1 {
|
|
|
4618
4618
|
* @param {string} type 'market' or 'limit'
|
|
4619
4619
|
* @param {string} side 'buy' or 'sell'
|
|
4620
4620
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
4621
|
-
* @param {float
|
|
4621
|
+
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
4622
4622
|
* @param {object} params extra parameters specific to the huobi api endpoint
|
|
4623
4623
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
4624
4624
|
*/
|
|
@@ -4757,7 +4757,7 @@ class huobi extends huobi$1 {
|
|
|
4757
4757
|
* @param {string} type 'market' or 'limit'
|
|
4758
4758
|
* @param {string} side 'buy' or 'sell'
|
|
4759
4759
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
4760
|
-
* @param {float
|
|
4760
|
+
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
4761
4761
|
* @param {object} params extra parameters specific to the huobi api endpoint
|
|
4762
4762
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
4763
4763
|
*/
|
|
@@ -4929,7 +4929,7 @@ class huobi extends huobi$1 {
|
|
|
4929
4929
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
4930
4930
|
* @param {bool} [params.stop] *contract only* if the order is a stop trigger order or not
|
|
4931
4931
|
* @param {bool} [params.stopLossTakeProfit] *contract only* if the order is a stop-loss or take-profit order
|
|
4932
|
-
* @returns {object} An [order structure]{@link https://
|
|
4932
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
4933
4933
|
*/
|
|
4934
4934
|
await this.loadMarkets();
|
|
4935
4935
|
let market = undefined;
|
|
@@ -5071,7 +5071,7 @@ class huobi extends huobi$1 {
|
|
|
5071
5071
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
5072
5072
|
* @param {bool} [params.stop] *contract only* if the orders are stop trigger orders or not
|
|
5073
5073
|
* @param {bool} [params.stopLossTakeProfit] *contract only* if the orders are stop-loss or take-profit orders
|
|
5074
|
-
* @returns {object} an list of [order structures]{@link https://
|
|
5074
|
+
* @returns {object} an list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
5075
5075
|
*/
|
|
5076
5076
|
await this.loadMarkets();
|
|
5077
5077
|
let market = undefined;
|
|
@@ -5250,7 +5250,7 @@ class huobi extends huobi$1 {
|
|
|
5250
5250
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
5251
5251
|
* @param {bool} [params.stop] *contract only* if the orders are stop trigger orders or not
|
|
5252
5252
|
* @param {bool} [params.stopLossTakeProfit] *contract only* if the orders are stop-loss or take-profit orders
|
|
5253
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
5253
|
+
* @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
5254
5254
|
*/
|
|
5255
5255
|
await this.loadMarkets();
|
|
5256
5256
|
let market = undefined;
|
|
@@ -5402,7 +5402,7 @@ class huobi extends huobi$1 {
|
|
|
5402
5402
|
* @description fetch a dictionary of addresses for a currency, indexed by network
|
|
5403
5403
|
* @param {string} code unified currency code of the currency for the deposit address
|
|
5404
5404
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
5405
|
-
* @returns {object} a dictionary of [address structures]{@link https://
|
|
5405
|
+
* @returns {object} a dictionary of [address structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure} indexed by the network
|
|
5406
5406
|
*/
|
|
5407
5407
|
await this.loadMarkets();
|
|
5408
5408
|
const currency = this.currency(code);
|
|
@@ -5434,7 +5434,7 @@ class huobi extends huobi$1 {
|
|
|
5434
5434
|
* @description fetch the deposit address for a currency associated with this account
|
|
5435
5435
|
* @param {string} code unified currency code
|
|
5436
5436
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
5437
|
-
* @returns {object} an [address structure]{@link https://
|
|
5437
|
+
* @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
|
|
5438
5438
|
*/
|
|
5439
5439
|
await this.loadMarkets();
|
|
5440
5440
|
const currency = this.currency(code);
|
|
@@ -5486,7 +5486,7 @@ class huobi extends huobi$1 {
|
|
|
5486
5486
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
5487
5487
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
5488
5488
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
5489
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
5489
|
+
* @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
5490
5490
|
*/
|
|
5491
5491
|
if (limit === undefined || limit > 100) {
|
|
5492
5492
|
limit = 100;
|
|
@@ -5545,7 +5545,7 @@ class huobi extends huobi$1 {
|
|
|
5545
5545
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
5546
5546
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
5547
5547
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
5548
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
5548
|
+
* @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
5549
5549
|
*/
|
|
5550
5550
|
if (limit === undefined || limit > 100) {
|
|
5551
5551
|
limit = 100;
|
|
@@ -5717,7 +5717,7 @@ class huobi extends huobi$1 {
|
|
|
5717
5717
|
* @param {string} address the address to withdraw to
|
|
5718
5718
|
* @param {string} tag
|
|
5719
5719
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
5720
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
5720
|
+
* @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
5721
5721
|
*/
|
|
5722
5722
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
5723
5723
|
await this.loadMarkets();
|
|
@@ -5809,7 +5809,7 @@ class huobi extends huobi$1 {
|
|
|
5809
5809
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
5810
5810
|
* @param {string} [params.symbol] used for isolated margin transfer
|
|
5811
5811
|
* @param {string} [params.subType] 'linear' or 'inverse', only used when transfering to/from swap accounts
|
|
5812
|
-
* @returns {object} a [transfer structure]{@link https://
|
|
5812
|
+
* @returns {object} a [transfer structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transfer-structure}
|
|
5813
5813
|
*/
|
|
5814
5814
|
await this.loadMarkets();
|
|
5815
5815
|
const currency = this.currency(code);
|
|
@@ -5893,7 +5893,7 @@ class huobi extends huobi$1 {
|
|
|
5893
5893
|
* @name huobi#fetchBorrowRatesPerSymbol
|
|
5894
5894
|
* @description fetch borrow rates for currencies within individual markets
|
|
5895
5895
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
5896
|
-
* @returns {object} a dictionary of [borrow rate structures]{@link https://
|
|
5896
|
+
* @returns {object} a dictionary of [borrow rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure} indexed by market symbol
|
|
5897
5897
|
*/
|
|
5898
5898
|
await this.loadMarkets();
|
|
5899
5899
|
const response = await this.spotPrivateGetV1MarginLoanInfo(params);
|
|
@@ -5959,7 +5959,7 @@ class huobi extends huobi$1 {
|
|
|
5959
5959
|
* @name huobi#fetchBorrowRates
|
|
5960
5960
|
* @description fetch the borrow interest rates of all currencies
|
|
5961
5961
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
5962
|
-
* @returns {object} a list of [borrow rate structures]{@link https://
|
|
5962
|
+
* @returns {object} a list of [borrow rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure}
|
|
5963
5963
|
*/
|
|
5964
5964
|
await this.loadMarkets();
|
|
5965
5965
|
const response = await this.spotPrivateGetV1MarginLoanInfo(params);
|
|
@@ -6129,7 +6129,7 @@ class huobi extends huobi$1 {
|
|
|
6129
6129
|
* @description fetch the current funding rate
|
|
6130
6130
|
* @param {string} symbol unified market symbol
|
|
6131
6131
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
6132
|
-
* @returns {object} a [funding rate structure]{@link https://
|
|
6132
|
+
* @returns {object} a [funding rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-structure}
|
|
6133
6133
|
*/
|
|
6134
6134
|
await this.loadMarkets();
|
|
6135
6135
|
const market = this.market(symbol);
|
|
@@ -6172,7 +6172,7 @@ class huobi extends huobi$1 {
|
|
|
6172
6172
|
* @description fetch the funding rate for multiple markets
|
|
6173
6173
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
6174
6174
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
6175
|
-
* @returns {object} a dictionary of [funding rates structures]{@link https://
|
|
6175
|
+
* @returns {object} a dictionary of [funding rates structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rates-structure}, indexe by market symbols
|
|
6176
6176
|
*/
|
|
6177
6177
|
await this.loadMarkets();
|
|
6178
6178
|
symbols = this.marketSymbols(symbols);
|
|
@@ -6221,7 +6221,7 @@ class huobi extends huobi$1 {
|
|
|
6221
6221
|
* @param {int} [since] the earliest time in ms to fetch borrrow interest for
|
|
6222
6222
|
* @param {int} [limit] the maximum number of structures to retrieve
|
|
6223
6223
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
6224
|
-
* @returns {object[]} a list of [borrow interest structures]{@link https://
|
|
6224
|
+
* @returns {object[]} a list of [borrow interest structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-interest-structure}
|
|
6225
6225
|
*/
|
|
6226
6226
|
await this.loadMarkets();
|
|
6227
6227
|
let marginMode = undefined;
|
|
@@ -6508,7 +6508,7 @@ class huobi extends huobi$1 {
|
|
|
6508
6508
|
* @param {int} [since] the earliest time in ms to fetch funding history for
|
|
6509
6509
|
* @param {int} [limit] the maximum number of funding history structures to retrieve
|
|
6510
6510
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
6511
|
-
* @returns {object} a [funding history structure]{@link https://
|
|
6511
|
+
* @returns {object} a [funding history structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-history-structure}
|
|
6512
6512
|
*/
|
|
6513
6513
|
await this.loadMarkets();
|
|
6514
6514
|
const market = this.market(symbol);
|
|
@@ -6784,7 +6784,7 @@ class huobi extends huobi$1 {
|
|
|
6784
6784
|
* @description fetch all open positions
|
|
6785
6785
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
6786
6786
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
6787
|
-
* @returns {object[]} a list of [position structure]{@link https://
|
|
6787
|
+
* @returns {object[]} a list of [position structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure}
|
|
6788
6788
|
*/
|
|
6789
6789
|
await this.loadMarkets();
|
|
6790
6790
|
symbols = this.marketSymbols(symbols);
|
|
@@ -6914,7 +6914,7 @@ class huobi extends huobi$1 {
|
|
|
6914
6914
|
* @description fetch data on a single open contract trade position
|
|
6915
6915
|
* @param {string} symbol unified market symbol of the market the position is held in, default is undefined
|
|
6916
6916
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
6917
|
-
* @returns {object} a [position structure]{@link https://
|
|
6917
|
+
* @returns {object} a [position structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure}
|
|
6918
6918
|
*/
|
|
6919
6919
|
await this.loadMarkets();
|
|
6920
6920
|
const market = this.market(symbol);
|
|
@@ -7232,7 +7232,7 @@ class huobi extends huobi$1 {
|
|
|
7232
7232
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
7233
7233
|
* @param {int} [limit] max number of ledger entrys to return, default is undefined
|
|
7234
7234
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
7235
|
-
* @returns {object} a [ledger structure]{@link https://
|
|
7235
|
+
* @returns {object} a [ledger structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ledger-structure}
|
|
7236
7236
|
*/
|
|
7237
7237
|
await this.loadMarkets();
|
|
7238
7238
|
const accountId = await this.fetchAccountIdByType('spot', undefined, undefined, params);
|
|
@@ -7300,7 +7300,7 @@ class huobi extends huobi$1 {
|
|
|
7300
7300
|
* @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
|
|
7301
7301
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
7302
7302
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
7303
|
-
* @returns {object} a dictionary of [leverage tiers structures]{@link https://
|
|
7303
|
+
* @returns {object} a dictionary of [leverage tiers structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#leverage-tiers-structure}, indexed by market symbols
|
|
7304
7304
|
*/
|
|
7305
7305
|
await this.loadMarkets();
|
|
7306
7306
|
const response = await this.contractPublicGetLinearSwapApiV1SwapAdjustfactor(params);
|
|
@@ -7343,7 +7343,7 @@ class huobi extends huobi$1 {
|
|
|
7343
7343
|
* @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
|
|
7344
7344
|
* @param {string} symbol unified market symbol
|
|
7345
7345
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
7346
|
-
* @returns {object} a [leverage tiers structure]{@link https://
|
|
7346
|
+
* @returns {object} a [leverage tiers structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#leverage-tiers-structure}
|
|
7347
7347
|
*/
|
|
7348
7348
|
await this.loadMarkets();
|
|
7349
7349
|
const request = {};
|
|
@@ -7436,7 +7436,7 @@ class huobi extends huobi$1 {
|
|
|
7436
7436
|
* @param {object} [params] Exchange specific parameters
|
|
7437
7437
|
* @param {int} [params.amount_type] *required* Open interest unit. 1-cont,2-cryptocurrency
|
|
7438
7438
|
* @param {int} [params.pair] eg BTC-USDT *Only for USDT-M*
|
|
7439
|
-
* @returns {object} an array of [open interest structures]{@link https://
|
|
7439
|
+
* @returns {object} an array of [open interest structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#open-interest-structure}
|
|
7440
7440
|
*/
|
|
7441
7441
|
if (timeframe !== '1h' && timeframe !== '4h' && timeframe !== '12h' && timeframe !== '1d') {
|
|
7442
7442
|
throw new errors.BadRequest(this.id + ' fetchOpenInterestHistory cannot only use the 1h, 4h, 12h and 1d timeframe');
|
|
@@ -7548,7 +7548,7 @@ class huobi extends huobi$1 {
|
|
|
7548
7548
|
* @see https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-get-swap-open-interest-information
|
|
7549
7549
|
* @param {string} symbol Unified CCXT market symbol
|
|
7550
7550
|
* @param {object} [params] exchange specific parameters
|
|
7551
|
-
* @returns {object} an open interest structure{@link https://
|
|
7551
|
+
* @returns {object} an open interest structure{@link https://github.com/ccxt/ccxt/wiki/Manual#interest-history-structure}
|
|
7552
7552
|
*/
|
|
7553
7553
|
await this.loadMarkets();
|
|
7554
7554
|
const market = this.market(symbol);
|
|
@@ -7722,7 +7722,7 @@ class huobi extends huobi$1 {
|
|
|
7722
7722
|
* @param {float} amount the amount to borrow
|
|
7723
7723
|
* @param {string} symbol unified market symbol, required for isolated margin
|
|
7724
7724
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
7725
|
-
* @returns {object} a [margin loan structure]{@link https://
|
|
7725
|
+
* @returns {object} a [margin loan structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#margin-loan-structure}
|
|
7726
7726
|
*/
|
|
7727
7727
|
await this.loadMarkets();
|
|
7728
7728
|
const currency = this.currency(code);
|
|
@@ -7774,7 +7774,7 @@ class huobi extends huobi$1 {
|
|
|
7774
7774
|
* @param {float} amount the amount to repay
|
|
7775
7775
|
* @param {string} symbol unified market symbol
|
|
7776
7776
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
7777
|
-
* @returns {object} a [margin loan structure]{@link https://
|
|
7777
|
+
* @returns {object} a [margin loan structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#margin-loan-structure}
|
|
7778
7778
|
*/
|
|
7779
7779
|
await this.loadMarkets();
|
|
7780
7780
|
const currency = this.currency(code);
|
|
@@ -7960,7 +7960,7 @@ class huobi extends huobi$1 {
|
|
|
7960
7960
|
* @see https://huobiapi.github.io/docs/spot/v1/en/#get-all-supported-currencies-v2
|
|
7961
7961
|
* @param {string[]|undefined} codes list of unified currency codes
|
|
7962
7962
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
7963
|
-
* @returns {object[]} a list of [fees structures]{@link https://
|
|
7963
|
+
* @returns {object[]} a list of [fees structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
7964
7964
|
*/
|
|
7965
7965
|
await this.loadMarkets();
|
|
7966
7966
|
const response = await this.spotPublicGetV2ReferenceCurrencies(params);
|
package/dist/cjs/src/huobijp.js
CHANGED
|
@@ -614,7 +614,7 @@ class huobijp extends huobijp$1 {
|
|
|
614
614
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
615
615
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
616
616
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
617
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
617
|
+
* @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
|
|
618
618
|
*/
|
|
619
619
|
await this.loadMarkets();
|
|
620
620
|
const market = this.market(symbol);
|
|
@@ -663,7 +663,7 @@ class huobijp extends huobijp$1 {
|
|
|
663
663
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
664
664
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
665
665
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
666
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
666
|
+
* @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
667
667
|
*/
|
|
668
668
|
await this.loadMarkets();
|
|
669
669
|
const market = this.market(symbol);
|
|
@@ -704,7 +704,7 @@ class huobijp extends huobijp$1 {
|
|
|
704
704
|
* @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
|
|
705
705
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
706
706
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
707
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
707
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
708
708
|
*/
|
|
709
709
|
await this.loadMarkets();
|
|
710
710
|
symbols = this.marketSymbols(symbols);
|
|
@@ -815,7 +815,7 @@ class huobijp extends huobijp$1 {
|
|
|
815
815
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
816
816
|
* @param {int} [limit] the maximum number of trades to retrieve
|
|
817
817
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
818
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
818
|
+
* @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
819
819
|
*/
|
|
820
820
|
await this.loadMarkets();
|
|
821
821
|
const request = {
|
|
@@ -833,7 +833,7 @@ class huobijp extends huobijp$1 {
|
|
|
833
833
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
834
834
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
835
835
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
836
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
836
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
837
837
|
*/
|
|
838
838
|
await this.loadMarkets();
|
|
839
839
|
let market = undefined;
|
|
@@ -973,7 +973,7 @@ class huobijp extends huobijp$1 {
|
|
|
973
973
|
* @name huobijp#fetchAccounts
|
|
974
974
|
* @description fetch all the accounts associated with a profile
|
|
975
975
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
976
|
-
* @returns {object} a dictionary of [account structures]{@link https://
|
|
976
|
+
* @returns {object} a dictionary of [account structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#account-structure} indexed by the account type
|
|
977
977
|
*/
|
|
978
978
|
await this.loadMarkets();
|
|
979
979
|
const response = await this.privateGetAccountAccounts(params);
|
|
@@ -1156,7 +1156,7 @@ class huobijp extends huobijp$1 {
|
|
|
1156
1156
|
* @description fetches information on an order made by the user
|
|
1157
1157
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1158
1158
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
1159
|
-
* @returns {object} An [order structure]{@link https://
|
|
1159
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1160
1160
|
*/
|
|
1161
1161
|
await this.loadMarkets();
|
|
1162
1162
|
const request = {
|
|
@@ -1175,7 +1175,7 @@ class huobijp extends huobijp$1 {
|
|
|
1175
1175
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1176
1176
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
1177
1177
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
1178
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1178
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1179
1179
|
*/
|
|
1180
1180
|
return await this.fetchOrdersByStates('pre-submitted,submitted,partial-filled,filled,partial-canceled,canceled', symbol, since, limit, params);
|
|
1181
1181
|
}
|
|
@@ -1188,7 +1188,7 @@ class huobijp extends huobijp$1 {
|
|
|
1188
1188
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1189
1189
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1190
1190
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
1191
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1191
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1192
1192
|
*/
|
|
1193
1193
|
const method = this.safeString(this.options, 'fetchOpenOrdersMethod', 'fetch_open_orders_v1');
|
|
1194
1194
|
return await this[method](symbol, since, limit, params);
|
|
@@ -1208,7 +1208,7 @@ class huobijp extends huobijp$1 {
|
|
|
1208
1208
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1209
1209
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
1210
1210
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
1211
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1211
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1212
1212
|
*/
|
|
1213
1213
|
return await this.fetchOrdersByStates('filled,partial-canceled,canceled', symbol, since, limit, params);
|
|
1214
1214
|
}
|
|
@@ -1367,9 +1367,9 @@ class huobijp extends huobijp$1 {
|
|
|
1367
1367
|
* @param {string} type 'market' or 'limit'
|
|
1368
1368
|
* @param {string} side 'buy' or 'sell'
|
|
1369
1369
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1370
|
-
* @param {float} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1370
|
+
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1371
1371
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
1372
|
-
* @returns {object} an [order structure]{@link https://
|
|
1372
|
+
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1373
1373
|
*/
|
|
1374
1374
|
await this.loadMarkets();
|
|
1375
1375
|
await this.loadAccounts();
|
|
@@ -1450,7 +1450,7 @@ class huobijp extends huobijp$1 {
|
|
|
1450
1450
|
* @param {string} id order id
|
|
1451
1451
|
* @param {string} symbol not used by huobijp cancelOrder ()
|
|
1452
1452
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
1453
|
-
* @returns {object} An [order structure]{@link https://
|
|
1453
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1454
1454
|
*/
|
|
1455
1455
|
const response = await this.privatePostOrderOrdersIdSubmitcancel({ 'id': id });
|
|
1456
1456
|
//
|
|
@@ -1472,7 +1472,7 @@ class huobijp extends huobijp$1 {
|
|
|
1472
1472
|
* @param {string[]} ids order ids
|
|
1473
1473
|
* @param {string} symbol not used by huobijp cancelOrders ()
|
|
1474
1474
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
1475
|
-
* @returns {object} an list of [order structures]{@link https://
|
|
1475
|
+
* @returns {object} an list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1476
1476
|
*/
|
|
1477
1477
|
await this.loadMarkets();
|
|
1478
1478
|
const clientOrderIds = this.safeValue2(params, 'clientOrderIds', 'client-order-ids');
|
|
@@ -1526,7 +1526,7 @@ class huobijp extends huobijp$1 {
|
|
|
1526
1526
|
* @description cancel all open orders
|
|
1527
1527
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
1528
1528
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
1529
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
1529
|
+
* @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1530
1530
|
*/
|
|
1531
1531
|
await this.loadMarkets();
|
|
1532
1532
|
const request = {
|
|
@@ -1603,7 +1603,7 @@ class huobijp extends huobijp$1 {
|
|
|
1603
1603
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
1604
1604
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
1605
1605
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
1606
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
1606
|
+
* @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
1607
1607
|
*/
|
|
1608
1608
|
if (limit === undefined || limit > 100) {
|
|
1609
1609
|
limit = 100;
|
|
@@ -1636,7 +1636,7 @@ class huobijp extends huobijp$1 {
|
|
|
1636
1636
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
1637
1637
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
1638
1638
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
1639
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
1639
|
+
* @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
1640
1640
|
*/
|
|
1641
1641
|
if (limit === undefined || limit > 100) {
|
|
1642
1642
|
limit = 100;
|
|
@@ -1771,7 +1771,7 @@ class huobijp extends huobijp$1 {
|
|
|
1771
1771
|
* @param {string} address the address to withdraw to
|
|
1772
1772
|
* @param {string} tag
|
|
1773
1773
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
1774
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
1774
|
+
* @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
1775
1775
|
*/
|
|
1776
1776
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
1777
1777
|
await this.loadMarkets();
|