ccxt 4.3.89 → 4.3.91
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 +3 -3
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/alpaca.js +2 -2
- package/dist/cjs/src/ascendex.js +95 -97
- package/dist/cjs/src/binance.js +1 -1
- package/dist/cjs/src/bingx.js +31 -17
- package/dist/cjs/src/bitfinex2.js +21 -22
- package/dist/cjs/src/bitget.js +2 -2
- package/dist/cjs/src/bitmart.js +6 -9
- package/dist/cjs/src/coinbaseinternational.js +2 -1
- package/dist/cjs/src/coinex.js +1 -17
- package/dist/cjs/src/hitbtc.js +2 -0
- package/dist/cjs/src/htx.js +49 -49
- package/dist/cjs/src/huobijp.js +0 -9
- package/dist/cjs/src/kucoin.js +59 -21
- package/dist/cjs/src/kucoinfutures.js +26 -2
- package/dist/cjs/src/latoken.js +1 -0
- package/dist/cjs/src/okx.js +1 -8
- package/dist/cjs/src/pro/binance.js +323 -0
- package/dist/cjs/src/pro/bingx.js +263 -91
- package/dist/cjs/src/pro/bithumb.js +5 -1
- package/dist/cjs/src/pro/bybit.js +1 -1
- package/dist/cjs/src/pro/coinex.js +994 -679
- package/dist/cjs/src/pro/lbank.js +2 -3
- package/dist/cjs/src/pro/okx.js +159 -3
- package/dist/cjs/src/whitebit.js +5 -3
- package/dist/cjs/src/woo.js +1 -1
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/kucoin.d.ts +1 -0
- package/js/src/abstract/kucoinfutures.d.ts +1 -0
- package/js/src/alpaca.js +2 -2
- package/js/src/ascendex.js +95 -97
- package/js/src/binance.js +1 -1
- package/js/src/bingx.js +31 -17
- package/js/src/bitfinex2.d.ts +0 -1
- package/js/src/bitfinex2.js +21 -22
- package/js/src/bitget.js +2 -2
- package/js/src/bitmart.d.ts +0 -1
- package/js/src/bitmart.js +6 -9
- package/js/src/coinbaseinternational.js +2 -1
- package/js/src/coinex.d.ts +0 -2
- package/js/src/coinex.js +1 -17
- package/js/src/hitbtc.js +2 -0
- package/js/src/htx.js +49 -49
- package/js/src/huobijp.d.ts +0 -1
- package/js/src/huobijp.js +0 -9
- package/js/src/kucoin.d.ts +3 -1
- package/js/src/kucoin.js +59 -21
- package/js/src/kucoinfutures.d.ts +1 -0
- package/js/src/kucoinfutures.js +26 -2
- package/js/src/latoken.js +1 -0
- package/js/src/okx.d.ts +0 -1
- package/js/src/okx.js +1 -8
- package/js/src/pro/binance.d.ts +9 -1
- package/js/src/pro/binance.js +327 -1
- package/js/src/pro/bingx.d.ts +2 -2
- package/js/src/pro/bingx.js +263 -91
- package/js/src/pro/bithumb.js +5 -1
- package/js/src/pro/bybit.js +1 -1
- package/js/src/pro/coinex.d.ts +12 -6
- package/js/src/pro/coinex.js +996 -681
- package/js/src/pro/lbank.js +2 -3
- package/js/src/pro/okx.d.ts +7 -0
- package/js/src/pro/okx.js +162 -4
- package/js/src/whitebit.js +5 -3
- package/js/src/woo.js +1 -1
- package/package.json +1 -1
package/dist/cjs/src/htx.js
CHANGED
|
@@ -1457,7 +1457,7 @@ class htx extends htx$1 {
|
|
|
1457
1457
|
async fetchTime(params = {}) {
|
|
1458
1458
|
/**
|
|
1459
1459
|
* @method
|
|
1460
|
-
* @name
|
|
1460
|
+
* @name htx#fetchTime
|
|
1461
1461
|
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
1462
1462
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1463
1463
|
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
@@ -1507,7 +1507,7 @@ class htx extends htx$1 {
|
|
|
1507
1507
|
async fetchTradingFee(symbol, params = {}) {
|
|
1508
1508
|
/**
|
|
1509
1509
|
* @method
|
|
1510
|
-
* @name
|
|
1510
|
+
* @name htx#fetchTradingFee
|
|
1511
1511
|
* @description fetch the trading fees for a market
|
|
1512
1512
|
* @param {string} symbol unified market symbol
|
|
1513
1513
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -1608,7 +1608,7 @@ class htx extends htx$1 {
|
|
|
1608
1608
|
async fetchMarkets(params = {}) {
|
|
1609
1609
|
/**
|
|
1610
1610
|
* @method
|
|
1611
|
-
* @name
|
|
1611
|
+
* @name htx#fetchMarkets
|
|
1612
1612
|
* @description retrieves data on all markets for huobi
|
|
1613
1613
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1614
1614
|
* @returns {object[]} an array of objects representing market data
|
|
@@ -2076,7 +2076,7 @@ class htx extends htx$1 {
|
|
|
2076
2076
|
async fetchTicker(symbol, params = {}) {
|
|
2077
2077
|
/**
|
|
2078
2078
|
* @method
|
|
2079
|
-
* @name
|
|
2079
|
+
* @name htx#fetchTicker
|
|
2080
2080
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
2081
2081
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
2082
2082
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -2157,7 +2157,7 @@ class htx extends htx$1 {
|
|
|
2157
2157
|
async fetchTickers(symbols = undefined, params = {}) {
|
|
2158
2158
|
/**
|
|
2159
2159
|
* @method
|
|
2160
|
-
* @name
|
|
2160
|
+
* @name htx#fetchTickers
|
|
2161
2161
|
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
2162
2162
|
* @see https://huobiapi.github.io/docs/spot/v1/en/#get-latest-tickers-for-all-pairs
|
|
2163
2163
|
* @see https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-get-a-batch-of-market-data-overview
|
|
@@ -2275,7 +2275,7 @@ class htx extends htx$1 {
|
|
|
2275
2275
|
async fetchLastPrices(symbols = undefined, params = {}) {
|
|
2276
2276
|
/**
|
|
2277
2277
|
* @method
|
|
2278
|
-
* @name
|
|
2278
|
+
* @name htx#fetchLastPrices
|
|
2279
2279
|
* @description fetches the last price for multiple markets
|
|
2280
2280
|
* @see https://www.htx.com/en-us/opend/newApiPages/?id=8cb81024-77b5-11ed-9966-0242ac110003 linear swap & linear future
|
|
2281
2281
|
* @see https://www.htx.com/en-us/opend/newApiPages/?id=28c2e8fc-77ae-11ed-9966-0242ac110003 inverse future
|
|
@@ -2396,7 +2396,7 @@ class htx extends htx$1 {
|
|
|
2396
2396
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
2397
2397
|
/**
|
|
2398
2398
|
* @method
|
|
2399
|
-
* @name
|
|
2399
|
+
* @name htx#fetchOrderBook
|
|
2400
2400
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
2401
2401
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
2402
2402
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
@@ -2625,7 +2625,7 @@ class htx extends htx$1 {
|
|
|
2625
2625
|
async fetchOrderTrades(id, symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2626
2626
|
/**
|
|
2627
2627
|
* @method
|
|
2628
|
-
* @name
|
|
2628
|
+
* @name htx#fetchOrderTrades
|
|
2629
2629
|
* @description fetch all the trades made from a single order
|
|
2630
2630
|
* @param {string} id order id
|
|
2631
2631
|
* @param {string} symbol unified market symbol
|
|
@@ -2656,7 +2656,7 @@ class htx extends htx$1 {
|
|
|
2656
2656
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2657
2657
|
/**
|
|
2658
2658
|
* @method
|
|
2659
|
-
* @name
|
|
2659
|
+
* @name htx#fetchMyTrades
|
|
2660
2660
|
* @see https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-get-history-match-results-via-multiple-fields-new
|
|
2661
2661
|
* @see https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-get-history-match-results-via-multiple-fields-new
|
|
2662
2662
|
* @see https://huobiapi.github.io/docs/spot/v1/en/#search-match-results
|
|
@@ -2829,7 +2829,7 @@ class htx extends htx$1 {
|
|
|
2829
2829
|
async fetchTrades(symbol, since = undefined, limit = 1000, params = {}) {
|
|
2830
2830
|
/**
|
|
2831
2831
|
* @method
|
|
2832
|
-
* @name
|
|
2832
|
+
* @name htx#fetchTrades
|
|
2833
2833
|
* @see https://huobiapi.github.io/docs/spot/v1/en/#get-the-most-recent-trades
|
|
2834
2834
|
* @see https://huobiapi.github.io/docs/dm/v1/en/#query-a-batch-of-trade-records-of-a-contract
|
|
2835
2835
|
* @see https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-a-batch-of-trade-records-of-a-contract
|
|
@@ -2935,7 +2935,7 @@ class htx extends htx$1 {
|
|
|
2935
2935
|
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
2936
2936
|
/**
|
|
2937
2937
|
* @method
|
|
2938
|
-
* @name
|
|
2938
|
+
* @name htx#fetchOHLCV
|
|
2939
2939
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
2940
2940
|
* @see https://huobiapi.github.io/docs/spot/v1/en/#get-klines-candles
|
|
2941
2941
|
* @see https://huobiapi.github.io/docs/dm/v1/en/#get-kline-data
|
|
@@ -3100,7 +3100,7 @@ class htx extends htx$1 {
|
|
|
3100
3100
|
async fetchAccounts(params = {}) {
|
|
3101
3101
|
/**
|
|
3102
3102
|
* @method
|
|
3103
|
-
* @name
|
|
3103
|
+
* @name htx#fetchAccounts
|
|
3104
3104
|
* @description fetch all the accounts associated with a profile
|
|
3105
3105
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3106
3106
|
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
|
|
@@ -3173,7 +3173,7 @@ class htx extends htx$1 {
|
|
|
3173
3173
|
async fetchCurrencies(params = {}) {
|
|
3174
3174
|
/**
|
|
3175
3175
|
* @method
|
|
3176
|
-
* @name
|
|
3176
|
+
* @name htx#fetchCurrencies
|
|
3177
3177
|
* @description fetches all available currencies on an exchange
|
|
3178
3178
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
3179
3179
|
* @returns {object} an associative dictionary of currencies
|
|
@@ -3338,7 +3338,7 @@ class htx extends htx$1 {
|
|
|
3338
3338
|
async fetchBalance(params = {}) {
|
|
3339
3339
|
/**
|
|
3340
3340
|
* @method
|
|
3341
|
-
* @name
|
|
3341
|
+
* @name htx#fetchBalance
|
|
3342
3342
|
* @see https://huobiapi.github.io/docs/spot/v1/en/#get-account-balance-of-a-specific-account
|
|
3343
3343
|
* @see https://www.htx.com/en-us/opend/newApiPages/?id=7ec4b429-7773-11ed-9966-0242ac110003
|
|
3344
3344
|
* @see https://www.htx.com/en-us/opend/newApiPages/?id=10000074-77b7-11ed-9966-0242ac110003
|
|
@@ -3674,7 +3674,7 @@ class htx extends htx$1 {
|
|
|
3674
3674
|
async fetchOrder(id, symbol = undefined, params = {}) {
|
|
3675
3675
|
/**
|
|
3676
3676
|
* @method
|
|
3677
|
-
* @name
|
|
3677
|
+
* @name htx#fetchOrder
|
|
3678
3678
|
* @description fetches information on an order made by the user
|
|
3679
3679
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
3680
3680
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -4236,7 +4236,7 @@ class htx extends htx$1 {
|
|
|
4236
4236
|
async fetchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
4237
4237
|
/**
|
|
4238
4238
|
* @method
|
|
4239
|
-
* @name
|
|
4239
|
+
* @name htx#fetchOrders
|
|
4240
4240
|
* @see https://huobiapi.github.io/docs/spot/v1/en/#search-past-orders
|
|
4241
4241
|
* @see https://huobiapi.github.io/docs/spot/v1/en/#search-historical-orders-within-48-hours
|
|
4242
4242
|
* @see https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-get-history-orders-new
|
|
@@ -4275,7 +4275,7 @@ class htx extends htx$1 {
|
|
|
4275
4275
|
async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
4276
4276
|
/**
|
|
4277
4277
|
* @method
|
|
4278
|
-
* @name
|
|
4278
|
+
* @name htx#fetchClosedOrders
|
|
4279
4279
|
* @see https://huobiapi.github.io/docs/spot/v1/en/#search-past-orders
|
|
4280
4280
|
* @see https://huobiapi.github.io/docs/spot/v1/en/#search-historical-orders-within-48-hours
|
|
4281
4281
|
* @see https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-get-history-orders-new
|
|
@@ -4313,7 +4313,7 @@ class htx extends htx$1 {
|
|
|
4313
4313
|
async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
4314
4314
|
/**
|
|
4315
4315
|
* @method
|
|
4316
|
-
* @name
|
|
4316
|
+
* @name htx#fetchOpenOrders
|
|
4317
4317
|
* @see https://huobiapi.github.io/docs/spot/v1/en/#get-all-open-orders
|
|
4318
4318
|
* @see https://huobiapi.github.io/docs/usdt_swap/v1/en/#isolated-current-unfilled-order-acquisition
|
|
4319
4319
|
* @see https://huobiapi.github.io/docs/usdt_swap/v1/en/#cross-current-unfilled-order-acquisition
|
|
@@ -5368,7 +5368,7 @@ class htx extends htx$1 {
|
|
|
5368
5368
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
5369
5369
|
/**
|
|
5370
5370
|
* @method
|
|
5371
|
-
* @name
|
|
5371
|
+
* @name htx#createOrder
|
|
5372
5372
|
* @description create a trade order
|
|
5373
5373
|
* @see https://huobiapi.github.io/docs/spot/v1/en/#place-a-new-order // spot, margin
|
|
5374
5374
|
* @see https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#place-an-order // coin-m swap
|
|
@@ -5693,7 +5693,7 @@ class htx extends htx$1 {
|
|
|
5693
5693
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
5694
5694
|
/**
|
|
5695
5695
|
* @method
|
|
5696
|
-
* @name
|
|
5696
|
+
* @name htx#cancelOrder
|
|
5697
5697
|
* @description cancels an open order
|
|
5698
5698
|
* @param {string} id order id
|
|
5699
5699
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
@@ -5851,7 +5851,7 @@ class htx extends htx$1 {
|
|
|
5851
5851
|
async cancelOrders(ids, symbol = undefined, params = {}) {
|
|
5852
5852
|
/**
|
|
5853
5853
|
* @method
|
|
5854
|
-
* @name
|
|
5854
|
+
* @name htx#cancelOrders
|
|
5855
5855
|
* @description cancel multiple orders
|
|
5856
5856
|
* @param {string[]} ids order ids
|
|
5857
5857
|
* @param {string} symbol unified market symbol, default is undefined
|
|
@@ -6092,7 +6092,7 @@ class htx extends htx$1 {
|
|
|
6092
6092
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
6093
6093
|
/**
|
|
6094
6094
|
* @method
|
|
6095
|
-
* @name
|
|
6095
|
+
* @name htx#cancelAllOrders
|
|
6096
6096
|
* @description cancel all open orders
|
|
6097
6097
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
6098
6098
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -6240,7 +6240,7 @@ class htx extends htx$1 {
|
|
|
6240
6240
|
async cancelAllOrdersAfter(timeout, params = {}) {
|
|
6241
6241
|
/**
|
|
6242
6242
|
* @method
|
|
6243
|
-
* @name
|
|
6243
|
+
* @name htx#cancelAllOrdersAfter
|
|
6244
6244
|
* @description dead man's switch, cancel all orders after the given timeout
|
|
6245
6245
|
* @see https://huobiapi.github.io/docs/spot/v1/en/#dead-man-s-switch
|
|
6246
6246
|
* @param {number} timeout time in milliseconds, 0 represents cancel the timer
|
|
@@ -6294,7 +6294,7 @@ class htx extends htx$1 {
|
|
|
6294
6294
|
/**
|
|
6295
6295
|
* @method
|
|
6296
6296
|
* @see https://www.htx.com/en-us/opend/newApiPages/?id=7ec50029-7773-11ed-9966-0242ac110003
|
|
6297
|
-
* @name
|
|
6297
|
+
* @name htx#fetchDepositAddressesByNetwork
|
|
6298
6298
|
* @description fetch a dictionary of addresses for a currency, indexed by network
|
|
6299
6299
|
* @param {string} code unified currency code of the currency for the deposit address
|
|
6300
6300
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -6326,7 +6326,7 @@ class htx extends htx$1 {
|
|
|
6326
6326
|
async fetchDepositAddress(code, params = {}) {
|
|
6327
6327
|
/**
|
|
6328
6328
|
* @method
|
|
6329
|
-
* @name
|
|
6329
|
+
* @name htx#fetchDepositAddress
|
|
6330
6330
|
* @see https://www.htx.com/en-us/opend/newApiPages/?id=7ec50029-7773-11ed-9966-0242ac110003
|
|
6331
6331
|
* @description fetch the deposit address for a currency associated with this account
|
|
6332
6332
|
* @param {string} code unified currency code
|
|
@@ -6377,7 +6377,7 @@ class htx extends htx$1 {
|
|
|
6377
6377
|
async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
6378
6378
|
/**
|
|
6379
6379
|
* @method
|
|
6380
|
-
* @name
|
|
6380
|
+
* @name htx#fetchDeposits
|
|
6381
6381
|
* @see https://www.htx.com/en-us/opend/newApiPages/?id=7ec4f050-7773-11ed-9966-0242ac110003
|
|
6382
6382
|
* @description fetch all deposits made to an account
|
|
6383
6383
|
* @param {string} code unified currency code
|
|
@@ -6437,7 +6437,7 @@ class htx extends htx$1 {
|
|
|
6437
6437
|
async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
6438
6438
|
/**
|
|
6439
6439
|
* @method
|
|
6440
|
-
* @name
|
|
6440
|
+
* @name htx#fetchWithdrawals
|
|
6441
6441
|
* @description fetch all withdrawals made from an account
|
|
6442
6442
|
* @param {string} code unified currency code
|
|
6443
6443
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
@@ -6612,7 +6612,7 @@ class htx extends htx$1 {
|
|
|
6612
6612
|
async withdraw(code, amount, address, tag = undefined, params = {}) {
|
|
6613
6613
|
/**
|
|
6614
6614
|
* @method
|
|
6615
|
-
* @name
|
|
6615
|
+
* @name htx#withdraw
|
|
6616
6616
|
* @see https://www.htx.com/en-us/opend/newApiPages/?id=7ec4cc41-7773-11ed-9966-0242ac110003
|
|
6617
6617
|
* @description make a withdrawal
|
|
6618
6618
|
* @param {string} code unified currency code
|
|
@@ -6696,7 +6696,7 @@ class htx extends htx$1 {
|
|
|
6696
6696
|
async transfer(code, amount, fromAccount, toAccount, params = {}) {
|
|
6697
6697
|
/**
|
|
6698
6698
|
* @method
|
|
6699
|
-
* @name
|
|
6699
|
+
* @name htx#transfer
|
|
6700
6700
|
* @description transfer currency internally between wallets on the same account
|
|
6701
6701
|
* @see https://huobiapi.github.io/docs/dm/v1/en/#transfer-margin-between-spot-account-and-future-account
|
|
6702
6702
|
* @see https://huobiapi.github.io/docs/spot/v1/en/#transfer-fund-between-spot-account-and-future-contract-account
|
|
@@ -6877,7 +6877,7 @@ class htx extends htx$1 {
|
|
|
6877
6877
|
async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
6878
6878
|
/**
|
|
6879
6879
|
* @method
|
|
6880
|
-
* @name
|
|
6880
|
+
* @name htx#fetchFundingRateHistory
|
|
6881
6881
|
* @see https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-historical-funding-rate
|
|
6882
6882
|
* @see https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-historical-funding-rate
|
|
6883
6883
|
* @description fetches historical funding rate prices
|
|
@@ -6998,7 +6998,7 @@ class htx extends htx$1 {
|
|
|
6998
6998
|
async fetchFundingRate(symbol, params = {}) {
|
|
6999
6999
|
/**
|
|
7000
7000
|
* @method
|
|
7001
|
-
* @name
|
|
7001
|
+
* @name htx#fetchFundingRate
|
|
7002
7002
|
* @description fetch the current funding rate
|
|
7003
7003
|
* @param {string} symbol unified market symbol
|
|
7004
7004
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -7040,7 +7040,7 @@ class htx extends htx$1 {
|
|
|
7040
7040
|
async fetchFundingRates(symbols = undefined, params = {}) {
|
|
7041
7041
|
/**
|
|
7042
7042
|
* @method
|
|
7043
|
-
* @name
|
|
7043
|
+
* @name htx#fetchFundingRates
|
|
7044
7044
|
* @description fetch the funding rate for multiple markets
|
|
7045
7045
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
7046
7046
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -7091,7 +7091,7 @@ class htx extends htx$1 {
|
|
|
7091
7091
|
async fetchBorrowInterest(code = undefined, symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
7092
7092
|
/**
|
|
7093
7093
|
* @method
|
|
7094
|
-
* @name
|
|
7094
|
+
* @name htx#fetchBorrowInterest
|
|
7095
7095
|
* @description fetch the interest owed by the user for borrowing currency for margin trading
|
|
7096
7096
|
* @param {string} code unified currency code
|
|
7097
7097
|
* @param {string} symbol unified market symbol when fetch interest in isolated markets
|
|
@@ -7375,7 +7375,7 @@ class htx extends htx$1 {
|
|
|
7375
7375
|
async fetchFundingHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
7376
7376
|
/**
|
|
7377
7377
|
* @method
|
|
7378
|
-
* @name
|
|
7378
|
+
* @name htx#fetchFundingHistory
|
|
7379
7379
|
* @description fetch the history of funding payments paid and received on this account
|
|
7380
7380
|
* @see https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-account-financial-records-via-multiple-fields-new // linear swaps
|
|
7381
7381
|
* @see https://huobiapi.github.io/docs/dm/v1/en/#query-financial-records-via-multiple-fields-new // coin-m futures
|
|
@@ -7466,7 +7466,7 @@ class htx extends htx$1 {
|
|
|
7466
7466
|
async setLeverage(leverage, symbol = undefined, params = {}) {
|
|
7467
7467
|
/**
|
|
7468
7468
|
* @method
|
|
7469
|
-
* @name
|
|
7469
|
+
* @name htx#setLeverage
|
|
7470
7470
|
* @description set the level of leverage for a market
|
|
7471
7471
|
* @param {float} leverage the rate of leverage
|
|
7472
7472
|
* @param {string} symbol unified market symbol
|
|
@@ -7666,7 +7666,7 @@ class htx extends htx$1 {
|
|
|
7666
7666
|
async fetchPositions(symbols = undefined, params = {}) {
|
|
7667
7667
|
/**
|
|
7668
7668
|
* @method
|
|
7669
|
-
* @name
|
|
7669
|
+
* @name htx#fetchPositions
|
|
7670
7670
|
* @description fetch all open positions
|
|
7671
7671
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
7672
7672
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -7810,7 +7810,7 @@ class htx extends htx$1 {
|
|
|
7810
7810
|
async fetchPosition(symbol, params = {}) {
|
|
7811
7811
|
/**
|
|
7812
7812
|
* @method
|
|
7813
|
-
* @name
|
|
7813
|
+
* @name htx#fetchPosition
|
|
7814
7814
|
* @description fetch data on a single open contract trade position
|
|
7815
7815
|
* @param {string} symbol unified market symbol of the market the position is held in, default is undefined
|
|
7816
7816
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -8134,7 +8134,7 @@ class htx extends htx$1 {
|
|
|
8134
8134
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
8135
8135
|
/**
|
|
8136
8136
|
* @method
|
|
8137
|
-
* @name
|
|
8137
|
+
* @name htx#fetchLedger
|
|
8138
8138
|
* @see https://huobiapi.github.io/docs/spot/v1/en/#get-account-history
|
|
8139
8139
|
* @description fetch the history of changes, actions done by the user or operations that altered balance of the user
|
|
8140
8140
|
* @param {string} code unified currency code, default is undefined
|
|
@@ -8213,7 +8213,7 @@ class htx extends htx$1 {
|
|
|
8213
8213
|
async fetchLeverageTiers(symbols = undefined, params = {}) {
|
|
8214
8214
|
/**
|
|
8215
8215
|
* @method
|
|
8216
|
-
* @name
|
|
8216
|
+
* @name htx#fetchLeverageTiers
|
|
8217
8217
|
* @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
|
|
8218
8218
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
8219
8219
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -8256,7 +8256,7 @@ class htx extends htx$1 {
|
|
|
8256
8256
|
async fetchMarketLeverageTiers(symbol, params = {}) {
|
|
8257
8257
|
/**
|
|
8258
8258
|
* @method
|
|
8259
|
-
* @name
|
|
8259
|
+
* @name htx#fetchMarketLeverageTiers
|
|
8260
8260
|
* @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
|
|
8261
8261
|
* @param {string} symbol unified market symbol
|
|
8262
8262
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -8341,7 +8341,7 @@ class htx extends htx$1 {
|
|
|
8341
8341
|
async fetchOpenInterestHistory(symbol, timeframe = '1h', since = undefined, limit = undefined, params = {}) {
|
|
8342
8342
|
/**
|
|
8343
8343
|
* @method
|
|
8344
|
-
* @name
|
|
8344
|
+
* @name htx#fetchOpenInterestHistory
|
|
8345
8345
|
* @description Retrieves the open interest history of a currency
|
|
8346
8346
|
* @see https://huobiapi.github.io/docs/dm/v1/en/#query-information-on-open-interest
|
|
8347
8347
|
* @see https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-information-on-open-interest
|
|
@@ -8460,7 +8460,7 @@ class htx extends htx$1 {
|
|
|
8460
8460
|
async fetchOpenInterest(symbol, params = {}) {
|
|
8461
8461
|
/**
|
|
8462
8462
|
* @method
|
|
8463
|
-
* @name
|
|
8463
|
+
* @name htx#fetchOpenInterest
|
|
8464
8464
|
* @description Retrieves the open interest of a currency
|
|
8465
8465
|
* @see https://huobiapi.github.io/docs/dm/v1/en/#get-contract-open-interest-information
|
|
8466
8466
|
* @see https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#get-swap-open-interest-information
|
|
@@ -8634,7 +8634,7 @@ class htx extends htx$1 {
|
|
|
8634
8634
|
async borrowIsolatedMargin(symbol, code, amount, params = {}) {
|
|
8635
8635
|
/**
|
|
8636
8636
|
* @method
|
|
8637
|
-
* @name
|
|
8637
|
+
* @name htx#borrowIsolatedMargin
|
|
8638
8638
|
* @description create a loan to borrow margin
|
|
8639
8639
|
* @see https://huobiapi.github.io/docs/spot/v1/en/#request-a-margin-loan-isolated
|
|
8640
8640
|
* @see https://huobiapi.github.io/docs/spot/v1/en/#request-a-margin-loan-cross
|
|
@@ -8669,7 +8669,7 @@ class htx extends htx$1 {
|
|
|
8669
8669
|
async borrowCrossMargin(code, amount, params = {}) {
|
|
8670
8670
|
/**
|
|
8671
8671
|
* @method
|
|
8672
|
-
* @name
|
|
8672
|
+
* @name htx#borrowCrossMargin
|
|
8673
8673
|
* @description create a loan to borrow margin
|
|
8674
8674
|
* @see https://huobiapi.github.io/docs/spot/v1/en/#request-a-margin-loan-isolated
|
|
8675
8675
|
* @see https://huobiapi.github.io/docs/spot/v1/en/#request-a-margin-loan-cross
|
|
@@ -8701,7 +8701,7 @@ class htx extends htx$1 {
|
|
|
8701
8701
|
async repayIsolatedMargin(symbol, code, amount, params = {}) {
|
|
8702
8702
|
/**
|
|
8703
8703
|
* @method
|
|
8704
|
-
* @name
|
|
8704
|
+
* @name htx#repayIsolatedMargin
|
|
8705
8705
|
* @description repay borrowed margin and interest
|
|
8706
8706
|
* @see https://huobiapi.github.io/docs/spot/v1/en/#repay-margin-loan-cross-isolated
|
|
8707
8707
|
* @param {string} code unified currency code of the currency to repay
|
|
@@ -8741,7 +8741,7 @@ class htx extends htx$1 {
|
|
|
8741
8741
|
async repayCrossMargin(code, amount, params = {}) {
|
|
8742
8742
|
/**
|
|
8743
8743
|
* @method
|
|
8744
|
-
* @name
|
|
8744
|
+
* @name htx#repayCrossMargin
|
|
8745
8745
|
* @description repay borrowed margin and interest
|
|
8746
8746
|
* @see https://huobiapi.github.io/docs/spot/v1/en/#repay-margin-loan-cross-isolated
|
|
8747
8747
|
* @param {string} code unified currency code of the currency to repay
|
|
@@ -8812,7 +8812,7 @@ class htx extends htx$1 {
|
|
|
8812
8812
|
async fetchSettlementHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
8813
8813
|
/**
|
|
8814
8814
|
* @method
|
|
8815
|
-
* @name
|
|
8815
|
+
* @name htx#fetchSettlementHistory
|
|
8816
8816
|
* @description Fetches historical settlement records
|
|
8817
8817
|
* @param {string} symbol unified symbol of the market to fetch the settlement history for
|
|
8818
8818
|
* @param {int} [since] timestamp in ms, value range = current time - 90 days,default = current time - 90 days
|
|
@@ -8917,7 +8917,7 @@ class htx extends htx$1 {
|
|
|
8917
8917
|
async fetchDepositWithdrawFees(codes = undefined, params = {}) {
|
|
8918
8918
|
/**
|
|
8919
8919
|
* @method
|
|
8920
|
-
* @name
|
|
8920
|
+
* @name htx#fetchDepositWithdrawFees
|
|
8921
8921
|
* @description fetch deposit and withdraw fees
|
|
8922
8922
|
* @see https://huobiapi.github.io/docs/spot/v1/en/#get-all-supported-currencies-v2
|
|
8923
8923
|
* @param {string[]|undefined} codes list of unified currency codes
|
|
@@ -9127,7 +9127,7 @@ class htx extends htx$1 {
|
|
|
9127
9127
|
async fetchLiquidations(symbol, since = undefined, limit = undefined, params = {}) {
|
|
9128
9128
|
/**
|
|
9129
9129
|
* @method
|
|
9130
|
-
* @name
|
|
9130
|
+
* @name htx#fetchLiquidations
|
|
9131
9131
|
* @description retrieves the public liquidations of a trading pair
|
|
9132
9132
|
* @see https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-query-liquidation-orders-new
|
|
9133
9133
|
* @see https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#query-liquidation-orders-new
|
package/dist/cjs/src/huobijp.js
CHANGED
|
@@ -1648,15 +1648,6 @@ class huobijp extends huobijp$1 {
|
|
|
1648
1648
|
currencyToPrecision(code, fee, networkCode = undefined) {
|
|
1649
1649
|
return this.decimalToPrecision(fee, 0, this.currencies[code]['precision'], this.precisionMode);
|
|
1650
1650
|
}
|
|
1651
|
-
safeNetwork(networkId) {
|
|
1652
|
-
const lastCharacterIndex = networkId.length - 1;
|
|
1653
|
-
const lastCharacter = networkId[lastCharacterIndex];
|
|
1654
|
-
if (lastCharacter === '1') {
|
|
1655
|
-
networkId = networkId.slice(0, lastCharacterIndex);
|
|
1656
|
-
}
|
|
1657
|
-
const networksById = {};
|
|
1658
|
-
return this.safeString(networksById, networkId, networkId);
|
|
1659
|
-
}
|
|
1660
1651
|
parseDepositAddress(depositAddress, currency = undefined) {
|
|
1661
1652
|
//
|
|
1662
1653
|
// {
|
package/dist/cjs/src/kucoin.js
CHANGED
|
@@ -241,6 +241,7 @@ class kucoin extends kucoin$1 {
|
|
|
241
241
|
'purchase/orders': 10,
|
|
242
242
|
// broker
|
|
243
243
|
'broker/api/rebase/download': 3,
|
|
244
|
+
'migrate/user/account/status': 3,
|
|
244
245
|
// affiliate
|
|
245
246
|
'affiliate/inviter/statistics': 30,
|
|
246
247
|
},
|
|
@@ -685,6 +686,7 @@ class kucoin extends kucoin$1 {
|
|
|
685
686
|
'project/marketInterestRate': 'v3',
|
|
686
687
|
'redeem/orders': 'v3',
|
|
687
688
|
'purchase/orders': 'v3',
|
|
689
|
+
'migrate/user/account/status': 'v3',
|
|
688
690
|
'margin/symbols': 'v3',
|
|
689
691
|
'affiliate/inviter/statistics': 'v2',
|
|
690
692
|
'asset/ndbroker/deposit/list': 'v1',
|
|
@@ -1208,6 +1210,30 @@ class kucoin extends kucoin$1 {
|
|
|
1208
1210
|
}
|
|
1209
1211
|
return result;
|
|
1210
1212
|
}
|
|
1213
|
+
async loadMigrationStatus(force = false) {
|
|
1214
|
+
if (!('hfMigrated' in this.options) || force) {
|
|
1215
|
+
const result = await this.privateGetMigrateUserAccountStatus();
|
|
1216
|
+
const data = this.safeDict(result, 'data', {});
|
|
1217
|
+
const status = this.safeInteger(data, 'status');
|
|
1218
|
+
this.options['hfMigrated'] = (status === 2);
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
async handleHfAndParams(params = {}) {
|
|
1222
|
+
await this.loadMigrationStatus();
|
|
1223
|
+
const migrated = this.safeBool(this.options, 'hfMigrated');
|
|
1224
|
+
let loadedHf = undefined;
|
|
1225
|
+
if (migrated !== undefined) {
|
|
1226
|
+
if (migrated) {
|
|
1227
|
+
loadedHf = true;
|
|
1228
|
+
}
|
|
1229
|
+
else {
|
|
1230
|
+
loadedHf = false;
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
const hf = this.safeBool(params, 'hf', loadedHf);
|
|
1234
|
+
params = this.omit(params, 'hf');
|
|
1235
|
+
return [hf, params];
|
|
1236
|
+
}
|
|
1211
1237
|
async fetchCurrencies(params = {}) {
|
|
1212
1238
|
/**
|
|
1213
1239
|
* @method
|
|
@@ -2089,7 +2115,8 @@ class kucoin extends kucoin$1 {
|
|
|
2089
2115
|
const market = this.market(symbol);
|
|
2090
2116
|
const testOrder = this.safeBool(params, 'test', false);
|
|
2091
2117
|
params = this.omit(params, 'test');
|
|
2092
|
-
|
|
2118
|
+
let hf = undefined;
|
|
2119
|
+
[hf, params] = await this.handleHfAndParams(params);
|
|
2093
2120
|
const [triggerPrice, stopLossPrice, takeProfitPrice] = this.handleTriggerPrices(params);
|
|
2094
2121
|
const tradeType = this.safeString(params, 'tradeType'); // keep it for backward compatibility
|
|
2095
2122
|
const isTriggerOrder = (triggerPrice || stopLossPrice || takeProfitPrice);
|
|
@@ -2103,19 +2130,22 @@ class kucoin extends kucoin$1 {
|
|
|
2103
2130
|
if (isMarginOrder) {
|
|
2104
2131
|
response = await this.privatePostMarginOrderTest(orderRequest);
|
|
2105
2132
|
}
|
|
2133
|
+
else if (hf) {
|
|
2134
|
+
response = await this.privatePostHfOrdersTest(orderRequest);
|
|
2135
|
+
}
|
|
2106
2136
|
else {
|
|
2107
2137
|
response = await this.privatePostOrdersTest(orderRequest);
|
|
2108
2138
|
}
|
|
2109
2139
|
}
|
|
2110
|
-
else if (isHf) {
|
|
2111
|
-
response = await this.privatePostHfOrders(orderRequest);
|
|
2112
|
-
}
|
|
2113
2140
|
else if (isTriggerOrder) {
|
|
2114
2141
|
response = await this.privatePostStopOrder(orderRequest);
|
|
2115
2142
|
}
|
|
2116
2143
|
else if (isMarginOrder) {
|
|
2117
2144
|
response = await this.privatePostMarginOrder(orderRequest);
|
|
2118
2145
|
}
|
|
2146
|
+
else if (hf) {
|
|
2147
|
+
response = await this.privatePostHfOrders(orderRequest);
|
|
2148
|
+
}
|
|
2119
2149
|
else {
|
|
2120
2150
|
response = await this.privatePostOrders(orderRequest);
|
|
2121
2151
|
}
|
|
@@ -2216,8 +2246,8 @@ class kucoin extends kucoin$1 {
|
|
|
2216
2246
|
'symbol': market['id'],
|
|
2217
2247
|
'orderList': ordersRequests,
|
|
2218
2248
|
};
|
|
2219
|
-
|
|
2220
|
-
params = this.
|
|
2249
|
+
let hf = undefined;
|
|
2250
|
+
[hf, params] = await this.handleHfAndParams(params);
|
|
2221
2251
|
let response = undefined;
|
|
2222
2252
|
if (hf) {
|
|
2223
2253
|
response = await this.privatePostHfOrdersMulti(this.extend(request, params));
|
|
@@ -2406,7 +2436,8 @@ class kucoin extends kucoin$1 {
|
|
|
2406
2436
|
const request = {};
|
|
2407
2437
|
const clientOrderId = this.safeString2(params, 'clientOid', 'clientOrderId');
|
|
2408
2438
|
const stop = this.safeBool2(params, 'stop', 'trigger', false);
|
|
2409
|
-
|
|
2439
|
+
let hf = undefined;
|
|
2440
|
+
[hf, params] = await this.handleHfAndParams(params);
|
|
2410
2441
|
if (hf) {
|
|
2411
2442
|
if (symbol === undefined) {
|
|
2412
2443
|
throw new errors.ArgumentsRequired(this.id + ' cancelOrder() requires a symbol parameter for hf orders');
|
|
@@ -2415,7 +2446,7 @@ class kucoin extends kucoin$1 {
|
|
|
2415
2446
|
request['symbol'] = market['id'];
|
|
2416
2447
|
}
|
|
2417
2448
|
let response = undefined;
|
|
2418
|
-
params = this.omit(params, ['clientOid', 'clientOrderId', 'stop', '
|
|
2449
|
+
params = this.omit(params, ['clientOid', 'clientOrderId', 'stop', 'trigger']);
|
|
2419
2450
|
if (clientOrderId !== undefined) {
|
|
2420
2451
|
request['clientOid'] = clientOrderId;
|
|
2421
2452
|
if (stop) {
|
|
@@ -2519,8 +2550,9 @@ class kucoin extends kucoin$1 {
|
|
|
2519
2550
|
await this.loadMarkets();
|
|
2520
2551
|
const request = {};
|
|
2521
2552
|
const stop = this.safeBool(params, 'stop', false);
|
|
2522
|
-
|
|
2523
|
-
params = this.
|
|
2553
|
+
let hf = undefined;
|
|
2554
|
+
[hf, params] = await this.handleHfAndParams(params);
|
|
2555
|
+
params = this.omit(params, 'stop');
|
|
2524
2556
|
const [marginMode, query] = this.handleMarginModeAndParams('cancelAllOrders', params);
|
|
2525
2557
|
if (symbol !== undefined) {
|
|
2526
2558
|
request['symbol'] = this.marketId(symbol);
|
|
@@ -2577,8 +2609,12 @@ class kucoin extends kucoin$1 {
|
|
|
2577
2609
|
let lowercaseStatus = status.toLowerCase();
|
|
2578
2610
|
const until = this.safeInteger(params, 'until');
|
|
2579
2611
|
const stop = this.safeBool2(params, 'stop', 'trigger', false);
|
|
2580
|
-
|
|
2581
|
-
params = this.
|
|
2612
|
+
let hf = undefined;
|
|
2613
|
+
[hf, params] = await this.handleHfAndParams(params);
|
|
2614
|
+
if (hf && (symbol === undefined)) {
|
|
2615
|
+
throw new errors.ArgumentsRequired(this.id + ' fetchOrdersByStatus() requires a symbol parameter for hf orders');
|
|
2616
|
+
}
|
|
2617
|
+
params = this.omit(params, ['stop', 'trigger', 'till', 'until']);
|
|
2582
2618
|
const [marginMode, query] = this.handleMarginModeAndParams('fetchOrdersByStatus', params);
|
|
2583
2619
|
if (lowercaseStatus === 'open') {
|
|
2584
2620
|
lowercaseStatus = 'active';
|
|
@@ -2756,7 +2792,8 @@ class kucoin extends kucoin$1 {
|
|
|
2756
2792
|
const request = {};
|
|
2757
2793
|
const clientOrderId = this.safeString2(params, 'clientOid', 'clientOrderId');
|
|
2758
2794
|
const stop = this.safeBool2(params, 'stop', 'trigger', false);
|
|
2759
|
-
|
|
2795
|
+
let hf = undefined;
|
|
2796
|
+
[hf, params] = await this.handleHfAndParams(params);
|
|
2760
2797
|
let market = undefined;
|
|
2761
2798
|
if (symbol !== undefined) {
|
|
2762
2799
|
market = this.market(symbol);
|
|
@@ -2767,7 +2804,7 @@ class kucoin extends kucoin$1 {
|
|
|
2767
2804
|
}
|
|
2768
2805
|
request['symbol'] = market['id'];
|
|
2769
2806
|
}
|
|
2770
|
-
params = this.omit(params, ['stop', '
|
|
2807
|
+
params = this.omit(params, ['stop', 'clientOid', 'clientOrderId', 'trigger']);
|
|
2771
2808
|
let response = undefined;
|
|
2772
2809
|
if (clientOrderId !== undefined) {
|
|
2773
2810
|
request['clientOid'] = clientOrderId;
|
|
@@ -3033,7 +3070,8 @@ class kucoin extends kucoin$1 {
|
|
|
3033
3070
|
return await this.fetchPaginatedCallDynamic('fetchMyTrades', symbol, since, limit, params);
|
|
3034
3071
|
}
|
|
3035
3072
|
let request = {};
|
|
3036
|
-
|
|
3073
|
+
let hf = undefined;
|
|
3074
|
+
[hf, params] = await this.handleHfAndParams(params);
|
|
3037
3075
|
if (hf && symbol === undefined) {
|
|
3038
3076
|
throw new errors.ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol parameter for hf orders');
|
|
3039
3077
|
}
|
|
@@ -3760,11 +3798,11 @@ class kucoin extends kucoin$1 {
|
|
|
3760
3798
|
const accountsByType = this.safeDict(this.options, 'accountsByType');
|
|
3761
3799
|
let type = this.safeString(accountsByType, requestedType, requestedType);
|
|
3762
3800
|
params = this.omit(params, 'type');
|
|
3763
|
-
|
|
3764
|
-
|
|
3801
|
+
let hf = undefined;
|
|
3802
|
+
[hf, params] = await this.handleHfAndParams(params);
|
|
3803
|
+
if (hf) {
|
|
3765
3804
|
type = 'trade_hf';
|
|
3766
3805
|
}
|
|
3767
|
-
params = this.omit(params, 'hf');
|
|
3768
3806
|
const [marginMode, query] = this.handleMarginModeAndParams('fetchBalance', params);
|
|
3769
3807
|
let response = undefined;
|
|
3770
3808
|
const request = {};
|
|
@@ -4220,8 +4258,8 @@ class kucoin extends kucoin$1 {
|
|
|
4220
4258
|
await this.loadAccounts();
|
|
4221
4259
|
let paginate = false;
|
|
4222
4260
|
[paginate, params] = this.handleOptionAndParams(params, 'fetchLedger', 'paginate');
|
|
4223
|
-
|
|
4224
|
-
params = this.
|
|
4261
|
+
let hf = undefined;
|
|
4262
|
+
[hf, params] = await this.handleHfAndParams(params);
|
|
4225
4263
|
if (paginate) {
|
|
4226
4264
|
return await this.fetchPaginatedCallDynamic('fetchLedger', code, since, limit, params);
|
|
4227
4265
|
}
|
|
@@ -4245,7 +4283,7 @@ class kucoin extends kucoin$1 {
|
|
|
4245
4283
|
let marginMode = undefined;
|
|
4246
4284
|
[marginMode, params] = this.handleMarginModeAndParams('fetchLedger', params);
|
|
4247
4285
|
let response = undefined;
|
|
4248
|
-
if (
|
|
4286
|
+
if (hf) {
|
|
4249
4287
|
if (marginMode !== undefined) {
|
|
4250
4288
|
response = await this.privateGetHfMarginAccountLedgers(this.extend(request, params));
|
|
4251
4289
|
}
|