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/js/src/huobi.js
CHANGED
|
@@ -1326,7 +1326,7 @@ export default class huobi extends Exchange {
|
|
|
1326
1326
|
* @description fetch the trading fees for a market
|
|
1327
1327
|
* @param {string} symbol unified market symbol
|
|
1328
1328
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
1329
|
-
* @returns {object} a [fee structure]{@link https://
|
|
1329
|
+
* @returns {object} a [fee structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
1330
1330
|
*/
|
|
1331
1331
|
await this.loadMarkets();
|
|
1332
1332
|
const market = this.market(symbol);
|
|
@@ -1867,7 +1867,7 @@ export default class huobi extends Exchange {
|
|
|
1867
1867
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
1868
1868
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
1869
1869
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
1870
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
1870
|
+
* @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
1871
1871
|
*/
|
|
1872
1872
|
await this.loadMarkets();
|
|
1873
1873
|
const market = this.market(symbol);
|
|
@@ -1950,7 +1950,7 @@ export default class huobi extends Exchange {
|
|
|
1950
1950
|
* @see https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-a-batch-of-market-data-overview-v2
|
|
1951
1951
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
1952
1952
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
1953
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
1953
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
1954
1954
|
*/
|
|
1955
1955
|
await this.loadMarkets();
|
|
1956
1956
|
symbols = this.marketSymbols(symbols);
|
|
@@ -2104,7 +2104,7 @@ export default class huobi extends Exchange {
|
|
|
2104
2104
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
2105
2105
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
2106
2106
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
2107
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
2107
|
+
* @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
|
|
2108
2108
|
*/
|
|
2109
2109
|
await this.loadMarkets();
|
|
2110
2110
|
const market = this.market(symbol);
|
|
@@ -2332,7 +2332,7 @@ export default class huobi extends Exchange {
|
|
|
2332
2332
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
2333
2333
|
* @param {int} [limit] the maximum number of trades to retrieve
|
|
2334
2334
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
2335
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
2335
|
+
* @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
2336
2336
|
*/
|
|
2337
2337
|
let market = undefined;
|
|
2338
2338
|
if (symbol !== undefined) {
|
|
@@ -2362,7 +2362,7 @@ export default class huobi extends Exchange {
|
|
|
2362
2362
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
2363
2363
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
2364
2364
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
2365
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
2365
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
2366
2366
|
*/
|
|
2367
2367
|
await this.loadMarkets();
|
|
2368
2368
|
let market = undefined;
|
|
@@ -2763,7 +2763,7 @@ export default class huobi extends Exchange {
|
|
|
2763
2763
|
* @name huobi#fetchAccounts
|
|
2764
2764
|
* @description fetch all the accounts associated with a profile
|
|
2765
2765
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
2766
|
-
* @returns {object} a dictionary of [account structures]{@link https://
|
|
2766
|
+
* @returns {object} a dictionary of [account structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#account-structure} indexed by the account type
|
|
2767
2767
|
*/
|
|
2768
2768
|
await this.loadMarkets();
|
|
2769
2769
|
const response = await this.spotPrivateGetV1AccountAccounts(params);
|
|
@@ -3316,7 +3316,7 @@ export default class huobi extends Exchange {
|
|
|
3316
3316
|
* @description fetches information on an order made by the user
|
|
3317
3317
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
3318
3318
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
3319
|
-
* @returns {object} An [order structure]{@link https://
|
|
3319
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
3320
3320
|
*/
|
|
3321
3321
|
await this.loadMarkets();
|
|
3322
3322
|
let market = undefined;
|
|
@@ -3856,7 +3856,7 @@ export default class huobi extends Exchange {
|
|
|
3856
3856
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
3857
3857
|
* @param {bool} [params.stop] *contract only* if the orders are stop trigger orders or not
|
|
3858
3858
|
* @param {bool} [params.stopLossTakeProfit] *contract only* if the orders are stop-loss or take-profit orders
|
|
3859
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
3859
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
3860
3860
|
*/
|
|
3861
3861
|
await this.loadMarkets();
|
|
3862
3862
|
let market = undefined;
|
|
@@ -3887,7 +3887,7 @@ export default class huobi extends Exchange {
|
|
|
3887
3887
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
3888
3888
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
3889
3889
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
3890
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
3890
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
3891
3891
|
*/
|
|
3892
3892
|
await this.loadMarkets();
|
|
3893
3893
|
let market = undefined;
|
|
@@ -3916,7 +3916,7 @@ export default class huobi extends Exchange {
|
|
|
3916
3916
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
3917
3917
|
* @param {bool} [params.stop] *contract only* if the orders are stop trigger orders or not
|
|
3918
3918
|
* @param {bool} [params.stopLossTakeProfit] *contract only* if the orders are stop-loss or take-profit orders
|
|
3919
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
3919
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
3920
3920
|
*/
|
|
3921
3921
|
await this.loadMarkets();
|
|
3922
3922
|
let market = undefined;
|
|
@@ -4586,7 +4586,7 @@ export default class huobi extends Exchange {
|
|
|
4586
4586
|
* @param {string} type 'market' or 'limit'
|
|
4587
4587
|
* @param {string} side 'buy' or 'sell'
|
|
4588
4588
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
4589
|
-
* @param {float} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
4589
|
+
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
4590
4590
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
4591
4591
|
* @param {float} [params.stopPrice] the price a trigger order is triggered at
|
|
4592
4592
|
* @param {string} [params.triggerType] *contract trigger orders only* ge: greater than or equal to, le: less than or equal to
|
|
@@ -4596,7 +4596,7 @@ export default class huobi extends Exchange {
|
|
|
4596
4596
|
* @param {string} [params.offset] *contract only* 'open', 'close', or 'both', required in hedge mode
|
|
4597
4597
|
* @param {bool} [params.postOnly] *contract only* true or false
|
|
4598
4598
|
* @param {int} [params.leverRate] *contract only* required for all contract orders except tpsl, leverage greater than 20x requires prior approval of high-leverage agreement
|
|
4599
|
-
* @returns {object} an [order structure]{@link https://
|
|
4599
|
+
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
4600
4600
|
*/
|
|
4601
4601
|
await this.loadMarkets();
|
|
4602
4602
|
const market = this.market(symbol);
|
|
@@ -4621,7 +4621,7 @@ export default class huobi extends Exchange {
|
|
|
4621
4621
|
* @param {string} type 'market' or 'limit'
|
|
4622
4622
|
* @param {string} side 'buy' or 'sell'
|
|
4623
4623
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
4624
|
-
* @param {float
|
|
4624
|
+
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
4625
4625
|
* @param {object} params extra parameters specific to the huobi api endpoint
|
|
4626
4626
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
4627
4627
|
*/
|
|
@@ -4760,7 +4760,7 @@ export default class huobi extends Exchange {
|
|
|
4760
4760
|
* @param {string} type 'market' or 'limit'
|
|
4761
4761
|
* @param {string} side 'buy' or 'sell'
|
|
4762
4762
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
4763
|
-
* @param {float
|
|
4763
|
+
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
4764
4764
|
* @param {object} params extra parameters specific to the huobi api endpoint
|
|
4765
4765
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
|
|
4766
4766
|
*/
|
|
@@ -4932,7 +4932,7 @@ export default class huobi extends Exchange {
|
|
|
4932
4932
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
4933
4933
|
* @param {bool} [params.stop] *contract only* if the order is a stop trigger order or not
|
|
4934
4934
|
* @param {bool} [params.stopLossTakeProfit] *contract only* if the order is a stop-loss or take-profit order
|
|
4935
|
-
* @returns {object} An [order structure]{@link https://
|
|
4935
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
4936
4936
|
*/
|
|
4937
4937
|
await this.loadMarkets();
|
|
4938
4938
|
let market = undefined;
|
|
@@ -5074,7 +5074,7 @@ export default class huobi extends Exchange {
|
|
|
5074
5074
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
5075
5075
|
* @param {bool} [params.stop] *contract only* if the orders are stop trigger orders or not
|
|
5076
5076
|
* @param {bool} [params.stopLossTakeProfit] *contract only* if the orders are stop-loss or take-profit orders
|
|
5077
|
-
* @returns {object} an list of [order structures]{@link https://
|
|
5077
|
+
* @returns {object} an list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
5078
5078
|
*/
|
|
5079
5079
|
await this.loadMarkets();
|
|
5080
5080
|
let market = undefined;
|
|
@@ -5253,7 +5253,7 @@ export default class huobi extends Exchange {
|
|
|
5253
5253
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
5254
5254
|
* @param {bool} [params.stop] *contract only* if the orders are stop trigger orders or not
|
|
5255
5255
|
* @param {bool} [params.stopLossTakeProfit] *contract only* if the orders are stop-loss or take-profit orders
|
|
5256
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
5256
|
+
* @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
5257
5257
|
*/
|
|
5258
5258
|
await this.loadMarkets();
|
|
5259
5259
|
let market = undefined;
|
|
@@ -5405,7 +5405,7 @@ export default class huobi extends Exchange {
|
|
|
5405
5405
|
* @description fetch a dictionary of addresses for a currency, indexed by network
|
|
5406
5406
|
* @param {string} code unified currency code of the currency for the deposit address
|
|
5407
5407
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
5408
|
-
* @returns {object} a dictionary of [address structures]{@link https://
|
|
5408
|
+
* @returns {object} a dictionary of [address structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure} indexed by the network
|
|
5409
5409
|
*/
|
|
5410
5410
|
await this.loadMarkets();
|
|
5411
5411
|
const currency = this.currency(code);
|
|
@@ -5437,7 +5437,7 @@ export default class huobi extends Exchange {
|
|
|
5437
5437
|
* @description fetch the deposit address for a currency associated with this account
|
|
5438
5438
|
* @param {string} code unified currency code
|
|
5439
5439
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
5440
|
-
* @returns {object} an [address structure]{@link https://
|
|
5440
|
+
* @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
|
|
5441
5441
|
*/
|
|
5442
5442
|
await this.loadMarkets();
|
|
5443
5443
|
const currency = this.currency(code);
|
|
@@ -5489,7 +5489,7 @@ export default class huobi extends Exchange {
|
|
|
5489
5489
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
5490
5490
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
5491
5491
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
5492
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
5492
|
+
* @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
5493
5493
|
*/
|
|
5494
5494
|
if (limit === undefined || limit > 100) {
|
|
5495
5495
|
limit = 100;
|
|
@@ -5548,7 +5548,7 @@ export default class huobi extends Exchange {
|
|
|
5548
5548
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
5549
5549
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
5550
5550
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
5551
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
5551
|
+
* @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
5552
5552
|
*/
|
|
5553
5553
|
if (limit === undefined || limit > 100) {
|
|
5554
5554
|
limit = 100;
|
|
@@ -5720,7 +5720,7 @@ export default class huobi extends Exchange {
|
|
|
5720
5720
|
* @param {string} address the address to withdraw to
|
|
5721
5721
|
* @param {string} tag
|
|
5722
5722
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
5723
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
5723
|
+
* @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
5724
5724
|
*/
|
|
5725
5725
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
5726
5726
|
await this.loadMarkets();
|
|
@@ -5812,7 +5812,7 @@ export default class huobi extends Exchange {
|
|
|
5812
5812
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
5813
5813
|
* @param {string} [params.symbol] used for isolated margin transfer
|
|
5814
5814
|
* @param {string} [params.subType] 'linear' or 'inverse', only used when transfering to/from swap accounts
|
|
5815
|
-
* @returns {object} a [transfer structure]{@link https://
|
|
5815
|
+
* @returns {object} a [transfer structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transfer-structure}
|
|
5816
5816
|
*/
|
|
5817
5817
|
await this.loadMarkets();
|
|
5818
5818
|
const currency = this.currency(code);
|
|
@@ -5896,7 +5896,7 @@ export default class huobi extends Exchange {
|
|
|
5896
5896
|
* @name huobi#fetchBorrowRatesPerSymbol
|
|
5897
5897
|
* @description fetch borrow rates for currencies within individual markets
|
|
5898
5898
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
5899
|
-
* @returns {object} a dictionary of [borrow rate structures]{@link https://
|
|
5899
|
+
* @returns {object} a dictionary of [borrow rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure} indexed by market symbol
|
|
5900
5900
|
*/
|
|
5901
5901
|
await this.loadMarkets();
|
|
5902
5902
|
const response = await this.spotPrivateGetV1MarginLoanInfo(params);
|
|
@@ -5962,7 +5962,7 @@ export default class huobi extends Exchange {
|
|
|
5962
5962
|
* @name huobi#fetchBorrowRates
|
|
5963
5963
|
* @description fetch the borrow interest rates of all currencies
|
|
5964
5964
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
5965
|
-
* @returns {object} a list of [borrow rate structures]{@link https://
|
|
5965
|
+
* @returns {object} a list of [borrow rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure}
|
|
5966
5966
|
*/
|
|
5967
5967
|
await this.loadMarkets();
|
|
5968
5968
|
const response = await this.spotPrivateGetV1MarginLoanInfo(params);
|
|
@@ -6132,7 +6132,7 @@ export default class huobi extends Exchange {
|
|
|
6132
6132
|
* @description fetch the current funding rate
|
|
6133
6133
|
* @param {string} symbol unified market symbol
|
|
6134
6134
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
6135
|
-
* @returns {object} a [funding rate structure]{@link https://
|
|
6135
|
+
* @returns {object} a [funding rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-structure}
|
|
6136
6136
|
*/
|
|
6137
6137
|
await this.loadMarkets();
|
|
6138
6138
|
const market = this.market(symbol);
|
|
@@ -6175,7 +6175,7 @@ export default class huobi extends Exchange {
|
|
|
6175
6175
|
* @description fetch the funding rate for multiple markets
|
|
6176
6176
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
6177
6177
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
6178
|
-
* @returns {object} a dictionary of [funding rates structures]{@link https://
|
|
6178
|
+
* @returns {object} a dictionary of [funding rates structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rates-structure}, indexe by market symbols
|
|
6179
6179
|
*/
|
|
6180
6180
|
await this.loadMarkets();
|
|
6181
6181
|
symbols = this.marketSymbols(symbols);
|
|
@@ -6224,7 +6224,7 @@ export default class huobi extends Exchange {
|
|
|
6224
6224
|
* @param {int} [since] the earliest time in ms to fetch borrrow interest for
|
|
6225
6225
|
* @param {int} [limit] the maximum number of structures to retrieve
|
|
6226
6226
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
6227
|
-
* @returns {object[]} a list of [borrow interest structures]{@link https://
|
|
6227
|
+
* @returns {object[]} a list of [borrow interest structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-interest-structure}
|
|
6228
6228
|
*/
|
|
6229
6229
|
await this.loadMarkets();
|
|
6230
6230
|
let marginMode = undefined;
|
|
@@ -6511,7 +6511,7 @@ export default class huobi extends Exchange {
|
|
|
6511
6511
|
* @param {int} [since] the earliest time in ms to fetch funding history for
|
|
6512
6512
|
* @param {int} [limit] the maximum number of funding history structures to retrieve
|
|
6513
6513
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
6514
|
-
* @returns {object} a [funding history structure]{@link https://
|
|
6514
|
+
* @returns {object} a [funding history structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-history-structure}
|
|
6515
6515
|
*/
|
|
6516
6516
|
await this.loadMarkets();
|
|
6517
6517
|
const market = this.market(symbol);
|
|
@@ -6787,7 +6787,7 @@ export default class huobi extends Exchange {
|
|
|
6787
6787
|
* @description fetch all open positions
|
|
6788
6788
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
6789
6789
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
6790
|
-
* @returns {object[]} a list of [position structure]{@link https://
|
|
6790
|
+
* @returns {object[]} a list of [position structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure}
|
|
6791
6791
|
*/
|
|
6792
6792
|
await this.loadMarkets();
|
|
6793
6793
|
symbols = this.marketSymbols(symbols);
|
|
@@ -6917,7 +6917,7 @@ export default class huobi extends Exchange {
|
|
|
6917
6917
|
* @description fetch data on a single open contract trade position
|
|
6918
6918
|
* @param {string} symbol unified market symbol of the market the position is held in, default is undefined
|
|
6919
6919
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
6920
|
-
* @returns {object} a [position structure]{@link https://
|
|
6920
|
+
* @returns {object} a [position structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure}
|
|
6921
6921
|
*/
|
|
6922
6922
|
await this.loadMarkets();
|
|
6923
6923
|
const market = this.market(symbol);
|
|
@@ -7235,7 +7235,7 @@ export default class huobi extends Exchange {
|
|
|
7235
7235
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
7236
7236
|
* @param {int} [limit] max number of ledger entrys to return, default is undefined
|
|
7237
7237
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
7238
|
-
* @returns {object} a [ledger structure]{@link https://
|
|
7238
|
+
* @returns {object} a [ledger structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ledger-structure}
|
|
7239
7239
|
*/
|
|
7240
7240
|
await this.loadMarkets();
|
|
7241
7241
|
const accountId = await this.fetchAccountIdByType('spot', undefined, undefined, params);
|
|
@@ -7303,7 +7303,7 @@ export default class huobi extends Exchange {
|
|
|
7303
7303
|
* @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
|
|
7304
7304
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
7305
7305
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
7306
|
-
* @returns {object} a dictionary of [leverage tiers structures]{@link https://
|
|
7306
|
+
* @returns {object} a dictionary of [leverage tiers structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#leverage-tiers-structure}, indexed by market symbols
|
|
7307
7307
|
*/
|
|
7308
7308
|
await this.loadMarkets();
|
|
7309
7309
|
const response = await this.contractPublicGetLinearSwapApiV1SwapAdjustfactor(params);
|
|
@@ -7346,7 +7346,7 @@ export default class huobi extends Exchange {
|
|
|
7346
7346
|
* @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
|
|
7347
7347
|
* @param {string} symbol unified market symbol
|
|
7348
7348
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
7349
|
-
* @returns {object} a [leverage tiers structure]{@link https://
|
|
7349
|
+
* @returns {object} a [leverage tiers structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#leverage-tiers-structure}
|
|
7350
7350
|
*/
|
|
7351
7351
|
await this.loadMarkets();
|
|
7352
7352
|
const request = {};
|
|
@@ -7439,7 +7439,7 @@ export default class huobi extends Exchange {
|
|
|
7439
7439
|
* @param {object} [params] Exchange specific parameters
|
|
7440
7440
|
* @param {int} [params.amount_type] *required* Open interest unit. 1-cont,2-cryptocurrency
|
|
7441
7441
|
* @param {int} [params.pair] eg BTC-USDT *Only for USDT-M*
|
|
7442
|
-
* @returns {object} an array of [open interest structures]{@link https://
|
|
7442
|
+
* @returns {object} an array of [open interest structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#open-interest-structure}
|
|
7443
7443
|
*/
|
|
7444
7444
|
if (timeframe !== '1h' && timeframe !== '4h' && timeframe !== '12h' && timeframe !== '1d') {
|
|
7445
7445
|
throw new BadRequest(this.id + ' fetchOpenInterestHistory cannot only use the 1h, 4h, 12h and 1d timeframe');
|
|
@@ -7551,7 +7551,7 @@ export default class huobi extends Exchange {
|
|
|
7551
7551
|
* @see https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-get-swap-open-interest-information
|
|
7552
7552
|
* @param {string} symbol Unified CCXT market symbol
|
|
7553
7553
|
* @param {object} [params] exchange specific parameters
|
|
7554
|
-
* @returns {object} an open interest structure{@link https://
|
|
7554
|
+
* @returns {object} an open interest structure{@link https://github.com/ccxt/ccxt/wiki/Manual#interest-history-structure}
|
|
7555
7555
|
*/
|
|
7556
7556
|
await this.loadMarkets();
|
|
7557
7557
|
const market = this.market(symbol);
|
|
@@ -7725,7 +7725,7 @@ export default class huobi extends Exchange {
|
|
|
7725
7725
|
* @param {float} amount the amount to borrow
|
|
7726
7726
|
* @param {string} symbol unified market symbol, required for isolated margin
|
|
7727
7727
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
7728
|
-
* @returns {object} a [margin loan structure]{@link https://
|
|
7728
|
+
* @returns {object} a [margin loan structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#margin-loan-structure}
|
|
7729
7729
|
*/
|
|
7730
7730
|
await this.loadMarkets();
|
|
7731
7731
|
const currency = this.currency(code);
|
|
@@ -7777,7 +7777,7 @@ export default class huobi extends Exchange {
|
|
|
7777
7777
|
* @param {float} amount the amount to repay
|
|
7778
7778
|
* @param {string} symbol unified market symbol
|
|
7779
7779
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
7780
|
-
* @returns {object} a [margin loan structure]{@link https://
|
|
7780
|
+
* @returns {object} a [margin loan structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#margin-loan-structure}
|
|
7781
7781
|
*/
|
|
7782
7782
|
await this.loadMarkets();
|
|
7783
7783
|
const currency = this.currency(code);
|
|
@@ -7963,7 +7963,7 @@ export default class huobi extends Exchange {
|
|
|
7963
7963
|
* @see https://huobiapi.github.io/docs/spot/v1/en/#get-all-supported-currencies-v2
|
|
7964
7964
|
* @param {string[]|undefined} codes list of unified currency codes
|
|
7965
7965
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
7966
|
-
* @returns {object[]} a list of [fees structures]{@link https://
|
|
7966
|
+
* @returns {object[]} a list of [fees structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
|
|
7967
7967
|
*/
|
|
7968
7968
|
await this.loadMarkets();
|
|
7969
7969
|
const response = await this.spotPublicGetV2ReferenceCurrencies(params);
|
package/js/src/huobijp.js
CHANGED
|
@@ -617,7 +617,7 @@ export default class huobijp extends Exchange {
|
|
|
617
617
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
618
618
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
619
619
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
620
|
-
* @returns {object} A dictionary of [order book structures]{@link https://
|
|
620
|
+
* @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
|
|
621
621
|
*/
|
|
622
622
|
await this.loadMarkets();
|
|
623
623
|
const market = this.market(symbol);
|
|
@@ -666,7 +666,7 @@ export default class huobijp extends Exchange {
|
|
|
666
666
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
667
667
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
668
668
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
669
|
-
* @returns {object} a [ticker structure]{@link https://
|
|
669
|
+
* @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
670
670
|
*/
|
|
671
671
|
await this.loadMarkets();
|
|
672
672
|
const market = this.market(symbol);
|
|
@@ -707,7 +707,7 @@ export default class huobijp extends Exchange {
|
|
|
707
707
|
* @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
|
|
708
708
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
709
709
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
710
|
-
* @returns {object} a dictionary of [ticker structures]{@link https://
|
|
710
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
|
|
711
711
|
*/
|
|
712
712
|
await this.loadMarkets();
|
|
713
713
|
symbols = this.marketSymbols(symbols);
|
|
@@ -818,7 +818,7 @@ export default class huobijp extends Exchange {
|
|
|
818
818
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
819
819
|
* @param {int} [limit] the maximum number of trades to retrieve
|
|
820
820
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
821
|
-
* @returns {object[]} a list of [trade structures]{@link https://
|
|
821
|
+
* @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
822
822
|
*/
|
|
823
823
|
await this.loadMarkets();
|
|
824
824
|
const request = {
|
|
@@ -836,7 +836,7 @@ export default class huobijp extends Exchange {
|
|
|
836
836
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
837
837
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
838
838
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
839
|
-
* @returns {Trade[]} a list of [trade structures]{@link https://
|
|
839
|
+
* @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
|
|
840
840
|
*/
|
|
841
841
|
await this.loadMarkets();
|
|
842
842
|
let market = undefined;
|
|
@@ -976,7 +976,7 @@ export default class huobijp extends Exchange {
|
|
|
976
976
|
* @name huobijp#fetchAccounts
|
|
977
977
|
* @description fetch all the accounts associated with a profile
|
|
978
978
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
979
|
-
* @returns {object} a dictionary of [account structures]{@link https://
|
|
979
|
+
* @returns {object} a dictionary of [account structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#account-structure} indexed by the account type
|
|
980
980
|
*/
|
|
981
981
|
await this.loadMarkets();
|
|
982
982
|
const response = await this.privateGetAccountAccounts(params);
|
|
@@ -1159,7 +1159,7 @@ export default class huobijp extends Exchange {
|
|
|
1159
1159
|
* @description fetches information on an order made by the user
|
|
1160
1160
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
1161
1161
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
1162
|
-
* @returns {object} An [order structure]{@link https://
|
|
1162
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1163
1163
|
*/
|
|
1164
1164
|
await this.loadMarkets();
|
|
1165
1165
|
const request = {
|
|
@@ -1178,7 +1178,7 @@ export default class huobijp extends Exchange {
|
|
|
1178
1178
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1179
1179
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
1180
1180
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
1181
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1181
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1182
1182
|
*/
|
|
1183
1183
|
return await this.fetchOrdersByStates('pre-submitted,submitted,partial-filled,filled,partial-canceled,canceled', symbol, since, limit, params);
|
|
1184
1184
|
}
|
|
@@ -1191,7 +1191,7 @@ export default class huobijp extends Exchange {
|
|
|
1191
1191
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
1192
1192
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
1193
1193
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
1194
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1194
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1195
1195
|
*/
|
|
1196
1196
|
const method = this.safeString(this.options, 'fetchOpenOrdersMethod', 'fetch_open_orders_v1');
|
|
1197
1197
|
return await this[method](symbol, since, limit, params);
|
|
@@ -1211,7 +1211,7 @@ export default class huobijp extends Exchange {
|
|
|
1211
1211
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
1212
1212
|
* @param {int} [limit] the maximum number of orde structures to retrieve
|
|
1213
1213
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
1214
|
-
* @returns {Order[]} a list of [order structures]{@link https://
|
|
1214
|
+
* @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1215
1215
|
*/
|
|
1216
1216
|
return await this.fetchOrdersByStates('filled,partial-canceled,canceled', symbol, since, limit, params);
|
|
1217
1217
|
}
|
|
@@ -1370,9 +1370,9 @@ export default class huobijp extends Exchange {
|
|
|
1370
1370
|
* @param {string} type 'market' or 'limit'
|
|
1371
1371
|
* @param {string} side 'buy' or 'sell'
|
|
1372
1372
|
* @param {float} amount how much of currency you want to trade in units of base currency
|
|
1373
|
-
* @param {float} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1373
|
+
* @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
|
1374
1374
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
1375
|
-
* @returns {object} an [order structure]{@link https://
|
|
1375
|
+
* @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1376
1376
|
*/
|
|
1377
1377
|
await this.loadMarkets();
|
|
1378
1378
|
await this.loadAccounts();
|
|
@@ -1453,7 +1453,7 @@ export default class huobijp extends Exchange {
|
|
|
1453
1453
|
* @param {string} id order id
|
|
1454
1454
|
* @param {string} symbol not used by huobijp cancelOrder ()
|
|
1455
1455
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
1456
|
-
* @returns {object} An [order structure]{@link https://
|
|
1456
|
+
* @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1457
1457
|
*/
|
|
1458
1458
|
const response = await this.privatePostOrderOrdersIdSubmitcancel({ 'id': id });
|
|
1459
1459
|
//
|
|
@@ -1475,7 +1475,7 @@ export default class huobijp extends Exchange {
|
|
|
1475
1475
|
* @param {string[]} ids order ids
|
|
1476
1476
|
* @param {string} symbol not used by huobijp cancelOrders ()
|
|
1477
1477
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
1478
|
-
* @returns {object} an list of [order structures]{@link https://
|
|
1478
|
+
* @returns {object} an list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1479
1479
|
*/
|
|
1480
1480
|
await this.loadMarkets();
|
|
1481
1481
|
const clientOrderIds = this.safeValue2(params, 'clientOrderIds', 'client-order-ids');
|
|
@@ -1529,7 +1529,7 @@ export default class huobijp extends Exchange {
|
|
|
1529
1529
|
* @description cancel all open orders
|
|
1530
1530
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
1531
1531
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
1532
|
-
* @returns {object[]} a list of [order structures]{@link https://
|
|
1532
|
+
* @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
|
|
1533
1533
|
*/
|
|
1534
1534
|
await this.loadMarkets();
|
|
1535
1535
|
const request = {
|
|
@@ -1606,7 +1606,7 @@ export default class huobijp extends Exchange {
|
|
|
1606
1606
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
1607
1607
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
1608
1608
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
1609
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
1609
|
+
* @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
1610
1610
|
*/
|
|
1611
1611
|
if (limit === undefined || limit > 100) {
|
|
1612
1612
|
limit = 100;
|
|
@@ -1639,7 +1639,7 @@ export default class huobijp extends Exchange {
|
|
|
1639
1639
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
1640
1640
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
1641
1641
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
1642
|
-
* @returns {object[]} a list of [transaction structures]{@link https://
|
|
1642
|
+
* @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
1643
1643
|
*/
|
|
1644
1644
|
if (limit === undefined || limit > 100) {
|
|
1645
1645
|
limit = 100;
|
|
@@ -1774,7 +1774,7 @@ export default class huobijp extends Exchange {
|
|
|
1774
1774
|
* @param {string} address the address to withdraw to
|
|
1775
1775
|
* @param {string} tag
|
|
1776
1776
|
* @param {object} [params] extra parameters specific to the huobijp api endpoint
|
|
1777
|
-
* @returns {object} a [transaction structure]{@link https://
|
|
1777
|
+
* @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
|
|
1778
1778
|
*/
|
|
1779
1779
|
[tag, params] = this.handleWithdrawTagAndParams(tag, params);
|
|
1780
1780
|
await this.loadMarkets();
|