ccxt 4.5.14 → 4.5.16
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 +20 -5
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ascendex.js +1 -0
- package/dist/cjs/src/backpack.js +7 -2
- package/dist/cjs/src/base/Exchange.js +46 -0
- package/dist/cjs/src/binance.js +3 -0
- package/dist/cjs/src/bingx.js +73 -46
- package/dist/cjs/src/bitget.js +19 -6
- package/dist/cjs/src/blofin.js +7 -6
- package/dist/cjs/src/bybit.js +16 -6
- package/dist/cjs/src/delta.js +98 -3
- package/dist/cjs/src/gate.js +152 -151
- package/dist/cjs/src/htx.js +1 -0
- package/dist/cjs/src/kraken.js +99 -4
- package/dist/cjs/src/kucoin.js +1 -0
- package/dist/cjs/src/mexc.js +1 -0
- package/dist/cjs/src/okx.js +10 -0
- package/dist/cjs/src/phemex.js +6 -3
- package/dist/cjs/src/poloniex.js +3 -0
- package/dist/cjs/src/pro/binance.js +1 -1
- package/dist/cjs/src/pro/kraken.js +1 -1
- package/dist/cjs/src/pro/upbit.js +25 -1
- package/dist/cjs/src/woo.js +41 -20
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bingx.d.ts +17 -0
- package/js/src/abstract/bybit.d.ts +1 -0
- package/js/src/abstract/delta.d.ts +5 -1
- package/js/src/abstract/woo.d.ts +0 -3
- package/js/src/ascendex.js +1 -0
- package/js/src/backpack.d.ts +1 -1
- package/js/src/backpack.js +7 -2
- package/js/src/base/Exchange.d.ts +31 -0
- package/js/src/base/Exchange.js +47 -1
- package/js/src/base/types.d.ts +2 -0
- package/js/src/binance.js +3 -0
- package/js/src/bingx.d.ts +2 -2
- package/js/src/bingx.js +73 -46
- package/js/src/bitget.js +19 -6
- package/js/src/blofin.js +7 -6
- package/js/src/bybit.d.ts +1 -1
- package/js/src/bybit.js +16 -6
- package/js/src/delta.d.ts +13 -0
- package/js/src/delta.js +98 -3
- package/js/src/derive.js +1 -1
- package/js/src/gate.d.ts +140 -140
- package/js/src/gate.js +152 -151
- package/js/src/htx.js +1 -0
- package/js/src/kraken.d.ts +11 -1
- package/js/src/kraken.js +99 -4
- package/js/src/kucoin.js +1 -0
- package/js/src/mexc.js +1 -0
- package/js/src/okx.js +10 -0
- package/js/src/phemex.js +6 -3
- package/js/src/poloniex.js +3 -0
- package/js/src/pro/binance.js +1 -1
- package/js/src/pro/gate.js +1 -1
- package/js/src/pro/gemini.js +1 -1
- package/js/src/pro/kraken.d.ts +1 -1
- package/js/src/pro/kraken.js +1 -1
- package/js/src/pro/onetrading.js +1 -1
- package/js/src/pro/upbit.js +25 -1
- package/js/src/woo.d.ts +1 -1
- package/js/src/woo.js +41 -20
- package/package.json +1 -1
package/dist/cjs/src/gate.js
CHANGED
|
@@ -17,7 +17,7 @@ class gate extends gate$1["default"] {
|
|
|
17
17
|
describe() {
|
|
18
18
|
return this.deepExtend(super.describe(), {
|
|
19
19
|
'id': 'gate',
|
|
20
|
-
'name': 'Gate
|
|
20
|
+
'name': 'Gate',
|
|
21
21
|
'countries': ['KR'],
|
|
22
22
|
'rateLimit': 50,
|
|
23
23
|
'version': 'v4',
|
|
@@ -25,8 +25,8 @@ class gate extends gate$1["default"] {
|
|
|
25
25
|
'pro': true,
|
|
26
26
|
'urls': {
|
|
27
27
|
'logo': 'https://github.com/user-attachments/assets/64f988c5-07b6-4652-b5c1-679a6bf67c85',
|
|
28
|
-
'doc': 'https://www.gate.
|
|
29
|
-
'www': 'https://gate.
|
|
28
|
+
'doc': 'https://www.gate.com/docs/developers/apiv4/en/',
|
|
29
|
+
'www': 'https://gate.com',
|
|
30
30
|
'api': {
|
|
31
31
|
'public': {
|
|
32
32
|
'wallet': 'https://api.gateio.ws/api/v4',
|
|
@@ -77,7 +77,7 @@ class gate extends gate$1["default"] {
|
|
|
77
77
|
},
|
|
78
78
|
},
|
|
79
79
|
'referral': {
|
|
80
|
-
'url': 'https://www.gate.
|
|
80
|
+
'url': 'https://www.gate.com/share/CCXTGATE',
|
|
81
81
|
'discount': 0.2,
|
|
82
82
|
},
|
|
83
83
|
},
|
|
@@ -1035,7 +1035,7 @@ class gate extends gate$1["default"] {
|
|
|
1035
1035
|
},
|
|
1036
1036
|
},
|
|
1037
1037
|
},
|
|
1038
|
-
// https://www.gate.
|
|
1038
|
+
// https://www.gate.com/docs/developers/apiv4/en/#label-list
|
|
1039
1039
|
'exceptions': {
|
|
1040
1040
|
'exact': {
|
|
1041
1041
|
'INVALID_PARAM_VALUE': errors.BadRequest,
|
|
@@ -1148,7 +1148,7 @@ class gate extends gate$1["default"] {
|
|
|
1148
1148
|
* @name gate#loadUnifiedStatus
|
|
1149
1149
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1150
1150
|
* @description returns unifiedAccount so the user can check if the unified account is enabled
|
|
1151
|
-
* @see https://www.gate.
|
|
1151
|
+
* @see https://www.gate.com/docs/developers/apiv4/#get-account-detail
|
|
1152
1152
|
* @returns {boolean} true or false if the enabled unified account is enabled or not and sets the unifiedAccount option if it is undefined
|
|
1153
1153
|
*/
|
|
1154
1154
|
async loadUnifiedStatus(params = {}) {
|
|
@@ -1186,7 +1186,7 @@ class gate extends gate$1["default"] {
|
|
|
1186
1186
|
* @method
|
|
1187
1187
|
* @name gate#fetchTime
|
|
1188
1188
|
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
1189
|
-
* @see https://www.gate.
|
|
1189
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-server-current-time
|
|
1190
1190
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1191
1191
|
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
1192
1192
|
*/
|
|
@@ -1276,11 +1276,11 @@ class gate extends gate$1["default"] {
|
|
|
1276
1276
|
* @method
|
|
1277
1277
|
* @name gate#fetchMarkets
|
|
1278
1278
|
* @description retrieves data on all markets for gate
|
|
1279
|
-
* @see https://www.gate.
|
|
1280
|
-
* @see https://www.gate.
|
|
1281
|
-
* @see https://www.gate.
|
|
1282
|
-
* @see https://www.gate.
|
|
1283
|
-
* @see https://www.gate.
|
|
1279
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-currency-pairs-supported // spot
|
|
1280
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-supported-currency-pairs-supported-in-margin-trading // margin
|
|
1281
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-futures-contracts // swap
|
|
1282
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-futures-contracts-2 // future
|
|
1283
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-the-contracts-with-specified-underlying-and-expiration-time // option
|
|
1284
1284
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1285
1285
|
* @returns {object[]} an array of objects representing market data
|
|
1286
1286
|
*/
|
|
@@ -1340,7 +1340,7 @@ class gate extends gate$1["default"] {
|
|
|
1340
1340
|
// "sell_start": 1607313600,
|
|
1341
1341
|
// "buy_start": 1700492400,
|
|
1342
1342
|
// "type": "normal",
|
|
1343
|
-
// "trade_url": "https://www.gate.
|
|
1343
|
+
// "trade_url": "https://www.gate.com/trade/QTUM_ETH",
|
|
1344
1344
|
// }
|
|
1345
1345
|
//
|
|
1346
1346
|
// Margin
|
|
@@ -1914,7 +1914,7 @@ class gate extends gate$1["default"] {
|
|
|
1914
1914
|
* @method
|
|
1915
1915
|
* @name gate#fetchCurrencies
|
|
1916
1916
|
* @description fetches all available currencies on an exchange
|
|
1917
|
-
* @see https://www.gate.
|
|
1917
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-currencies-details
|
|
1918
1918
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1919
1919
|
* @returns {object} an associative dictionary of currencies
|
|
1920
1920
|
*/
|
|
@@ -2018,7 +2018,7 @@ class gate extends gate$1["default"] {
|
|
|
2018
2018
|
* @method
|
|
2019
2019
|
* @name gate#fetchFundingRate
|
|
2020
2020
|
* @description fetch the current funding rate
|
|
2021
|
-
* @see https://www.gate.
|
|
2021
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-a-single-contract
|
|
2022
2022
|
* @param {string} symbol unified market symbol
|
|
2023
2023
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2024
2024
|
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
@@ -2081,7 +2081,7 @@ class gate extends gate$1["default"] {
|
|
|
2081
2081
|
* @method
|
|
2082
2082
|
* @name gate#fetchFundingRates
|
|
2083
2083
|
* @description fetch the funding rate for multiple markets
|
|
2084
|
-
* @see https://www.gate.
|
|
2084
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-futures-contracts
|
|
2085
2085
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
2086
2086
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2087
2087
|
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rates-structure}, indexed by market symbols
|
|
@@ -2289,10 +2289,10 @@ class gate extends gate$1["default"] {
|
|
|
2289
2289
|
* @method
|
|
2290
2290
|
* @name gate#fetchDepositAddress
|
|
2291
2291
|
* @description fetch the deposit address for a currency associated with this account
|
|
2292
|
-
* @see https://www.gate.
|
|
2292
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#generate-currency-deposit-address
|
|
2293
2293
|
* @param {string} code unified currency code
|
|
2294
2294
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2295
|
-
* @param {string} [params.network] unified network code (not used directly by gate.
|
|
2295
|
+
* @param {string} [params.network] unified network code (not used directly by gate.com but used by ccxt to filter the response)
|
|
2296
2296
|
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
2297
2297
|
*/
|
|
2298
2298
|
async fetchDepositAddress(code, params = {}) {
|
|
@@ -2327,7 +2327,7 @@ class gate extends gate$1["default"] {
|
|
|
2327
2327
|
* @method
|
|
2328
2328
|
* @name gate#fetchTradingFee
|
|
2329
2329
|
* @description fetch the trading fees for a market
|
|
2330
|
-
* @see https://www.gate.
|
|
2330
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#retrieve-personal-trading-fee
|
|
2331
2331
|
* @param {string} symbol unified market symbol
|
|
2332
2332
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2333
2333
|
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
@@ -2359,7 +2359,7 @@ class gate extends gate$1["default"] {
|
|
|
2359
2359
|
* @method
|
|
2360
2360
|
* @name gate#fetchTradingFees
|
|
2361
2361
|
* @description fetch the trading fees for multiple markets
|
|
2362
|
-
* @see https://www.gate.
|
|
2362
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#retrieve-personal-trading-fee
|
|
2363
2363
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2364
2364
|
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
2365
2365
|
*/
|
|
@@ -2426,7 +2426,7 @@ class gate extends gate$1["default"] {
|
|
|
2426
2426
|
* @name gate#fetchTransactionFees
|
|
2427
2427
|
* @deprecated
|
|
2428
2428
|
* @description please use fetchDepositWithdrawFees instead
|
|
2429
|
-
* @see https://www.gate.
|
|
2429
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#retrieve-withdrawal-status
|
|
2430
2430
|
* @param {string[]|undefined} codes list of unified currency codes
|
|
2431
2431
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2432
2432
|
* @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
@@ -2466,10 +2466,11 @@ class gate extends gate$1["default"] {
|
|
|
2466
2466
|
withdrawFees = this.safeNumber(entry, 'withdraw_fix');
|
|
2467
2467
|
}
|
|
2468
2468
|
else {
|
|
2469
|
-
const
|
|
2470
|
-
for (let j = 0; j <
|
|
2471
|
-
const
|
|
2472
|
-
|
|
2469
|
+
const networkIds = Object.keys(withdrawFixOnChains);
|
|
2470
|
+
for (let j = 0; j < networkIds.length; j++) {
|
|
2471
|
+
const networkId = networkIds[j];
|
|
2472
|
+
const networkCode = this.networkIdToCode(networkId);
|
|
2473
|
+
withdrawFees[networkCode] = this.parseNumber(withdrawFixOnChains[networkId]);
|
|
2473
2474
|
}
|
|
2474
2475
|
}
|
|
2475
2476
|
result[code] = {
|
|
@@ -2484,7 +2485,7 @@ class gate extends gate$1["default"] {
|
|
|
2484
2485
|
* @method
|
|
2485
2486
|
* @name gate#fetchDepositWithdrawFees
|
|
2486
2487
|
* @description fetch deposit and withdraw fees
|
|
2487
|
-
* @see https://www.gate.
|
|
2488
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#retrieve-withdrawal-status
|
|
2488
2489
|
* @param {string[]|undefined} codes list of unified currency codes
|
|
2489
2490
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2490
2491
|
* @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
@@ -2567,8 +2568,8 @@ class gate extends gate$1["default"] {
|
|
|
2567
2568
|
* @method
|
|
2568
2569
|
* @name gate#fetchFundingHistory
|
|
2569
2570
|
* @description fetch the history of funding payments paid and received on this account
|
|
2570
|
-
* @see https://www.gate.
|
|
2571
|
-
* @see https://www.gate.
|
|
2571
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#query-account-book-2
|
|
2572
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#query-account-book-3
|
|
2572
2573
|
* @param {string} symbol unified market symbol
|
|
2573
2574
|
* @param {int} [since] the earliest time in ms to fetch funding history for
|
|
2574
2575
|
* @param {int} [limit] the maximum number of funding history structures to retrieve
|
|
@@ -2654,10 +2655,10 @@ class gate extends gate$1["default"] {
|
|
|
2654
2655
|
* @method
|
|
2655
2656
|
* @name gate#fetchOrderBook
|
|
2656
2657
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
2657
|
-
* @see https://www.gate.
|
|
2658
|
-
* @see https://www.gate.
|
|
2659
|
-
* @see https://www.gate.
|
|
2660
|
-
* @see https://www.gate.
|
|
2658
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#retrieve-order-book
|
|
2659
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#futures-order-book
|
|
2660
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#futures-order-book-2
|
|
2661
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#options-order-book
|
|
2661
2662
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
2662
2663
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
2663
2664
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -2780,10 +2781,10 @@ class gate extends gate$1["default"] {
|
|
|
2780
2781
|
* @method
|
|
2781
2782
|
* @name gate#fetchTicker
|
|
2782
2783
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
2783
|
-
* @see https://www.gate.
|
|
2784
|
-
* @see https://www.gate.
|
|
2785
|
-
* @see https://www.gate.
|
|
2786
|
-
* @see https://www.gate.
|
|
2784
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-details-of-a-specifc-order
|
|
2785
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-futures-tickers
|
|
2786
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-futures-tickers-2
|
|
2787
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-tickers-of-options-contracts
|
|
2787
2788
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
2788
2789
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2789
2790
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -2944,10 +2945,10 @@ class gate extends gate$1["default"] {
|
|
|
2944
2945
|
* @method
|
|
2945
2946
|
* @name gate#fetchTickers
|
|
2946
2947
|
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
2947
|
-
* @see https://www.gate.
|
|
2948
|
-
* @see https://www.gate.
|
|
2949
|
-
* @see https://www.gate.
|
|
2950
|
-
* @see https://www.gate.
|
|
2948
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-details-of-a-specifc-order
|
|
2949
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-futures-tickers
|
|
2950
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-futures-tickers-2
|
|
2951
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-tickers-of-options-contracts
|
|
2951
2952
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
2952
2953
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2953
2954
|
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -3300,10 +3301,10 @@ class gate extends gate$1["default"] {
|
|
|
3300
3301
|
* @method
|
|
3301
3302
|
* @name gateio#fetchOHLCV
|
|
3302
3303
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
3303
|
-
* @see https://www.gate.
|
|
3304
|
-
* @see https://www.gate.
|
|
3305
|
-
* @see https://www.gate.
|
|
3306
|
-
* @see https://www.gate.
|
|
3304
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#market-candlesticks // spot
|
|
3305
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-futures-candlesticks // swap
|
|
3306
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#market-candlesticks // future
|
|
3307
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-options-candlesticks // option
|
|
3307
3308
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
3308
3309
|
* @param {string} timeframe the length of time each candle represents
|
|
3309
3310
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
@@ -3390,7 +3391,7 @@ class gate extends gate$1["default"] {
|
|
|
3390
3391
|
* @method
|
|
3391
3392
|
* @name gate#fetchFundingRateHistory
|
|
3392
3393
|
* @description fetches historical funding rate prices
|
|
3393
|
-
* @see https://www.gate.
|
|
3394
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#funding-rate-history
|
|
3394
3395
|
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
3395
3396
|
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
3396
3397
|
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
@@ -3499,10 +3500,10 @@ class gate extends gate$1["default"] {
|
|
|
3499
3500
|
* @method
|
|
3500
3501
|
* @name gate#fetchTrades
|
|
3501
3502
|
* @description get the list of most recent trades for a particular symbol
|
|
3502
|
-
* @see https://www.gate.
|
|
3503
|
-
* @see https://www.gate.
|
|
3504
|
-
* @see https://www.gate.
|
|
3505
|
-
* @see https://www.gate.
|
|
3503
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#retrieve-market-trades
|
|
3504
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#futures-trading-history
|
|
3505
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#futures-trading-history-2
|
|
3506
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#options-trade-history
|
|
3506
3507
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
3507
3508
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
3508
3509
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
@@ -3614,10 +3615,10 @@ class gate extends gate$1["default"] {
|
|
|
3614
3615
|
* @method
|
|
3615
3616
|
* @name gate#fetchOrderTrades
|
|
3616
3617
|
* @description fetch all the trades made from a single order
|
|
3617
|
-
* @see https://www.gate.
|
|
3618
|
-
* @see https://www.gate.
|
|
3619
|
-
* @see https://www.gate.
|
|
3620
|
-
* @see https://www.gate.
|
|
3618
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-personal-trading-history
|
|
3619
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-personal-trading-history-2
|
|
3620
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-personal-trading-history-3
|
|
3621
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-personal-trading-history-4
|
|
3621
3622
|
* @param {string} id order id
|
|
3622
3623
|
* @param {string} symbol unified market symbol
|
|
3623
3624
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
@@ -3656,10 +3657,10 @@ class gate extends gate$1["default"] {
|
|
|
3656
3657
|
* @method
|
|
3657
3658
|
* @name gate#fetchMyTrades
|
|
3658
3659
|
* @description Fetch personal trading history
|
|
3659
|
-
* @see https://www.gate.
|
|
3660
|
-
* @see https://www.gate.
|
|
3661
|
-
* @see https://www.gate.
|
|
3662
|
-
* @see https://www.gate.
|
|
3660
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-personal-trading-history
|
|
3661
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-personal-trading-history-2
|
|
3662
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-personal-trading-history-3
|
|
3663
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-personal-trading-history-4
|
|
3663
3664
|
* @param {string} symbol unified market symbol
|
|
3664
3665
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
3665
3666
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
@@ -3968,7 +3969,7 @@ class gate extends gate$1["default"] {
|
|
|
3968
3969
|
* @method
|
|
3969
3970
|
* @name gate#fetchDeposits
|
|
3970
3971
|
* @description fetch all deposits made to an account
|
|
3971
|
-
* @see https://www.gate.
|
|
3972
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#retrieve-deposit-records
|
|
3972
3973
|
* @param {string} code unified currency code
|
|
3973
3974
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
3974
3975
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
@@ -4006,7 +4007,7 @@ class gate extends gate$1["default"] {
|
|
|
4006
4007
|
* @method
|
|
4007
4008
|
* @name gate#fetchWithdrawals
|
|
4008
4009
|
* @description fetch all withdrawals made from an account
|
|
4009
|
-
* @see https://www.gate.
|
|
4010
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#retrieve-withdrawal-records
|
|
4010
4011
|
* @param {string} code unified currency code
|
|
4011
4012
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
4012
4013
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
@@ -4044,7 +4045,7 @@ class gate extends gate$1["default"] {
|
|
|
4044
4045
|
* @method
|
|
4045
4046
|
* @name gate#withdraw
|
|
4046
4047
|
* @description make a withdrawal
|
|
4047
|
-
* @see https://www.gate.
|
|
4048
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#withdraw
|
|
4048
4049
|
* @param {string} code unified currency code
|
|
4049
4050
|
* @param {float} amount the amount to withdraw
|
|
4050
4051
|
* @param {string} address the address to withdraw to
|
|
@@ -4224,13 +4225,13 @@ class gate extends gate$1["default"] {
|
|
|
4224
4225
|
* @method
|
|
4225
4226
|
* @name gate#createOrder
|
|
4226
4227
|
* @description Create an order on the exchange
|
|
4227
|
-
* @see https://www.gate.
|
|
4228
|
-
* @see https://www.gate.
|
|
4229
|
-
* @see https://www.gate.
|
|
4230
|
-
* @see https://www.gate.
|
|
4231
|
-
* @see https://www.gate.
|
|
4232
|
-
* @see https://www.gate.
|
|
4233
|
-
* @see https://www.gate.
|
|
4228
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#create-an-order
|
|
4229
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#create-a-price-triggered-order
|
|
4230
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#create-a-futures-order
|
|
4231
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#create-a-price-triggered-order-2
|
|
4232
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#create-a-futures-order-2
|
|
4233
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#create-a-price-triggered-order-3
|
|
4234
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#create-an-options-order
|
|
4234
4235
|
* @param {string} symbol Unified CCXT market symbol
|
|
4235
4236
|
* @param {string} type 'limit' or 'market' *"market" is contract only*
|
|
4236
4237
|
* @param {string} side 'buy' or 'sell'
|
|
@@ -4386,7 +4387,7 @@ class gate extends gate$1["default"] {
|
|
|
4386
4387
|
if (triggerValue !== undefined) {
|
|
4387
4388
|
throw new errors.NotSupported(this.id + ' createOrders() does not support advanced order properties (stopPrice, takeProfitPrice, stopLossPrice)');
|
|
4388
4389
|
}
|
|
4389
|
-
extendedParams['textIsRequired'] = true; //
|
|
4390
|
+
extendedParams['textIsRequired'] = true; // the exchange requires a text parameter for each order here
|
|
4390
4391
|
const orderRequest = this.createOrderRequest(marketId, type, side, amount, price, extendedParams);
|
|
4391
4392
|
ordersRequests.push(orderRequest);
|
|
4392
4393
|
}
|
|
@@ -4401,9 +4402,9 @@ class gate extends gate$1["default"] {
|
|
|
4401
4402
|
* @method
|
|
4402
4403
|
* @name gate#createOrders
|
|
4403
4404
|
* @description create a list of trade orders
|
|
4404
|
-
* @see https://www.gate.
|
|
4405
|
-
* @see https://www.gate.
|
|
4406
|
-
* @see https://www.gate.
|
|
4405
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-a-single-order-2
|
|
4406
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#create-a-batch-of-orders
|
|
4407
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#create-a-batch-of-futures-orders
|
|
4407
4408
|
* @param {Array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
|
|
4408
4409
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4409
4410
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -4687,7 +4688,7 @@ class gate extends gate$1["default"] {
|
|
|
4687
4688
|
* @method
|
|
4688
4689
|
* @name gate#createMarketBuyOrderWithCost
|
|
4689
4690
|
* @description create a market buy order by providing the symbol and cost
|
|
4690
|
-
* @see https://www.gate.
|
|
4691
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#create-an-order
|
|
4691
4692
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
4692
4693
|
* @param {float} cost how much you want to trade in units of the quote currency
|
|
4693
4694
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -4751,8 +4752,8 @@ class gate extends gate$1["default"] {
|
|
|
4751
4752
|
* @method
|
|
4752
4753
|
* @name gate#editOrder
|
|
4753
4754
|
* @description edit a trade order, gate currently only supports the modification of the price or amount fields
|
|
4754
|
-
* @see https://www.gate.
|
|
4755
|
-
* @see https://www.gate.
|
|
4755
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#amend-an-order
|
|
4756
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#amend-an-order-2
|
|
4756
4757
|
* @param {string} id order id
|
|
4757
4758
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
4758
4759
|
* @param {string} type 'market' or 'limit'
|
|
@@ -5112,10 +5113,10 @@ class gate extends gate$1["default"] {
|
|
|
5112
5113
|
* @method
|
|
5113
5114
|
* @name gate#fetchOrder
|
|
5114
5115
|
* @description Retrieves information on an order
|
|
5115
|
-
* @see https://www.gate.
|
|
5116
|
-
* @see https://www.gate.
|
|
5117
|
-
* @see https://www.gate.
|
|
5118
|
-
* @see https://www.gate.
|
|
5116
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-a-single-order
|
|
5117
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-a-single-order-2
|
|
5118
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-a-single-order-3
|
|
5119
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-a-single-order-4
|
|
5119
5120
|
* @param {string} id Order id
|
|
5120
5121
|
* @param {string} symbol Unified market symbol, *required for spot and margin*
|
|
5121
5122
|
* @param {object} [params] Parameters specified by the exchange api
|
|
@@ -5171,8 +5172,8 @@ class gate extends gate$1["default"] {
|
|
|
5171
5172
|
* @method
|
|
5172
5173
|
* @name gate#fetchOpenOrders
|
|
5173
5174
|
* @description fetch all unfilled currently open orders
|
|
5174
|
-
* @see https://www.gate.
|
|
5175
|
-
* @see https://www.gate.
|
|
5175
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-open-orders
|
|
5176
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#retrieve-running-auto-order-list
|
|
5176
5177
|
* @param {string} symbol unified market symbol
|
|
5177
5178
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
5178
5179
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
@@ -5190,14 +5191,14 @@ class gate extends gate$1["default"] {
|
|
|
5190
5191
|
* @method
|
|
5191
5192
|
* @name gate#fetchClosedOrders
|
|
5192
5193
|
* @description fetches information on multiple closed orders made by the user
|
|
5193
|
-
* @see https://www.gate.
|
|
5194
|
-
* @see https://www.gate.
|
|
5195
|
-
* @see https://www.gate.
|
|
5196
|
-
* @see https://www.gate.
|
|
5197
|
-
* @see https://www.gate.
|
|
5198
|
-
* @see https://www.gate.
|
|
5199
|
-
* @see https://www.gate.
|
|
5200
|
-
* @see https://www.gate.
|
|
5194
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-orders
|
|
5195
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#retrieve-running-auto-order-list
|
|
5196
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-futures-orders
|
|
5197
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-auto-orders
|
|
5198
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-futures-orders-2
|
|
5199
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-auto-orders-2
|
|
5200
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-options-orders
|
|
5201
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-futures-orders-by-time-range
|
|
5201
5202
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
5202
5203
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
5203
5204
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
@@ -5493,10 +5494,10 @@ class gate extends gate$1["default"] {
|
|
|
5493
5494
|
* @method
|
|
5494
5495
|
* @name gate#cancelOrder
|
|
5495
5496
|
* @description Cancels an open order
|
|
5496
|
-
* @see https://www.gate.
|
|
5497
|
-
* @see https://www.gate.
|
|
5498
|
-
* @see https://www.gate.
|
|
5499
|
-
* @see https://www.gate.
|
|
5497
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#cancel-a-single-order
|
|
5498
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#cancel-a-single-order-2
|
|
5499
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#cancel-a-single-order-3
|
|
5500
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#cancel-a-single-order-4
|
|
5500
5501
|
* @param {string} id Order id
|
|
5501
5502
|
* @param {string} symbol Unified market symbol
|
|
5502
5503
|
* @param {object} [params] Parameters specified by the exchange api
|
|
@@ -5631,8 +5632,8 @@ class gate extends gate$1["default"] {
|
|
|
5631
5632
|
* @method
|
|
5632
5633
|
* @name gate#cancelOrders
|
|
5633
5634
|
* @description cancel multiple orders
|
|
5634
|
-
* @see https://www.gate.
|
|
5635
|
-
* @see https://www.gate.
|
|
5635
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#cancel-a-batch-of-orders-with-an-id-list
|
|
5636
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#cancel-a-batch-of-orders-with-an-id-list-2
|
|
5636
5637
|
* @param {string[]} ids order ids
|
|
5637
5638
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
5638
5639
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -5680,7 +5681,7 @@ class gate extends gate$1["default"] {
|
|
|
5680
5681
|
* @method
|
|
5681
5682
|
* @name gate#cancelOrdersForSymbols
|
|
5682
5683
|
* @description cancel multiple orders for multiple symbols
|
|
5683
|
-
* @see https://www.gate.
|
|
5684
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#cancel-a-batch-of-orders-with-an-id-list
|
|
5684
5685
|
* @param {CancellationRequest[]} orders list of order ids with symbol, example [{"id": "a", "symbol": "BTC/USDT"}, {"id": "b", "symbol": "ETH/USDT"}]
|
|
5685
5686
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5686
5687
|
* @param {string[]} [params.clientOrderIds] client order ids
|
|
@@ -5720,10 +5721,10 @@ class gate extends gate$1["default"] {
|
|
|
5720
5721
|
* @method
|
|
5721
5722
|
* @name gate#cancelAllOrders
|
|
5722
5723
|
* @description cancel all open orders
|
|
5723
|
-
* @see https://www.gate.
|
|
5724
|
-
* @see https://www.gate.
|
|
5725
|
-
* @see https://www.gate.
|
|
5726
|
-
* @see https://www.gate.
|
|
5724
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#cancel-all-open-orders-in-specified-currency-pair
|
|
5725
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#cancel-all-open-orders-matched
|
|
5726
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#cancel-all-open-orders-matched-2
|
|
5727
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#cancel-all-open-orders-matched-3
|
|
5727
5728
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
5728
5729
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5729
5730
|
* @param {bool} [params.unifiedAccount] set to true for canceling unified account orders
|
|
@@ -5802,7 +5803,7 @@ class gate extends gate$1["default"] {
|
|
|
5802
5803
|
* @method
|
|
5803
5804
|
* @name gate#transfer
|
|
5804
5805
|
* @description transfer currency internally between wallets on the same account
|
|
5805
|
-
* @see https://www.gate.
|
|
5806
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#transfer-between-trading-accounts
|
|
5806
5807
|
* @param {string} code unified currency code for currency being transferred
|
|
5807
5808
|
* @param {float} amount the amount of currency to transfer
|
|
5808
5809
|
* @param {string} fromAccount the account to transfer currency from
|
|
@@ -5887,8 +5888,8 @@ class gate extends gate$1["default"] {
|
|
|
5887
5888
|
* @method
|
|
5888
5889
|
* @name gate#setLeverage
|
|
5889
5890
|
* @description set the level of leverage for a market
|
|
5890
|
-
* @see https://www.gate.
|
|
5891
|
-
* @see https://www.gate.
|
|
5891
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#update-position-leverage
|
|
5892
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#update-position-leverage-2
|
|
5892
5893
|
* @param {float} leverage the rate of leverage
|
|
5893
5894
|
* @param {string} symbol unified market symbol
|
|
5894
5895
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -6107,9 +6108,9 @@ class gate extends gate$1["default"] {
|
|
|
6107
6108
|
* @method
|
|
6108
6109
|
* @name gate#fetchPosition
|
|
6109
6110
|
* @description fetch data on an open contract position
|
|
6110
|
-
* @see https://www.gate.
|
|
6111
|
-
* @see https://www.gate.
|
|
6112
|
-
* @see https://www.gate.
|
|
6111
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-single-position
|
|
6112
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-single-position-2
|
|
6113
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-specified-contract-position
|
|
6113
6114
|
* @param {string} symbol unified market symbol of the market the position is held in
|
|
6114
6115
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6115
6116
|
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
@@ -6195,9 +6196,9 @@ class gate extends gate$1["default"] {
|
|
|
6195
6196
|
* @method
|
|
6196
6197
|
* @name gate#fetchPositions
|
|
6197
6198
|
* @description fetch all open positions
|
|
6198
|
-
* @see https://www.gate.
|
|
6199
|
-
* @see https://www.gate.
|
|
6200
|
-
* @see https://www.gate.
|
|
6199
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-positions-of-a-user
|
|
6200
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-positions-of-a-user-2
|
|
6201
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-user-s-positions-of-specified-underlying
|
|
6201
6202
|
* @param {string[]|undefined} symbols Not used by gate, but parsed internally by CCXT
|
|
6202
6203
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6203
6204
|
* @param {string} [params.settle] 'btc' or 'usdt' - settle currency for perpetual swap and future - default="usdt" for swap and "btc" for future
|
|
@@ -6306,8 +6307,8 @@ class gate extends gate$1["default"] {
|
|
|
6306
6307
|
* @method
|
|
6307
6308
|
* @name gate#fetchLeverageTiers
|
|
6308
6309
|
* @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
|
|
6309
|
-
* @see https://www.gate.
|
|
6310
|
-
* @see https://www.gate.
|
|
6310
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-futures-contracts
|
|
6311
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-futures-contracts-2
|
|
6311
6312
|
* @param {string[]} [symbols] list of unified market symbols
|
|
6312
6313
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6313
6314
|
* @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}, indexed by market symbols
|
|
@@ -6427,7 +6428,7 @@ class gate extends gate$1["default"] {
|
|
|
6427
6428
|
* @method
|
|
6428
6429
|
* @name gate#fetchMarketLeverageTiers
|
|
6429
6430
|
* @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
|
|
6430
|
-
* @see https://www.gate.
|
|
6431
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-risk-limit-tiers
|
|
6431
6432
|
* @param {string} symbol unified market symbol
|
|
6432
6433
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6433
6434
|
* @returns {object} a [leverage tiers structure]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}
|
|
@@ -6521,7 +6522,7 @@ class gate extends gate$1["default"] {
|
|
|
6521
6522
|
* @method
|
|
6522
6523
|
* @name gate#repayMargin
|
|
6523
6524
|
* @description repay borrowed margin and interest
|
|
6524
|
-
* @see https://www.gate.
|
|
6525
|
+
* @see https://www.gate.com/docs/apiv4/en/#repay-a-loan
|
|
6525
6526
|
* @param {string} symbol unified market symbol
|
|
6526
6527
|
* @param {string} code unified currency code of the currency to repay
|
|
6527
6528
|
* @param {float} amount the amount to repay
|
|
@@ -6550,8 +6551,8 @@ class gate extends gate$1["default"] {
|
|
|
6550
6551
|
* @method
|
|
6551
6552
|
* @name gate#repayCrossMargin
|
|
6552
6553
|
* @description repay cross margin borrowed margin and interest
|
|
6553
|
-
* @see https://www.gate.
|
|
6554
|
-
* @see https://www.gate.
|
|
6554
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#cross-margin-repayments
|
|
6555
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#borrow-or-repay
|
|
6555
6556
|
* @param {string} code unified currency code of the currency to repay
|
|
6556
6557
|
* @param {float} amount the amount to repay
|
|
6557
6558
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -6601,7 +6602,7 @@ class gate extends gate$1["default"] {
|
|
|
6601
6602
|
* @method
|
|
6602
6603
|
* @name gate#borrowIsolatedMargin
|
|
6603
6604
|
* @description create a loan to borrow margin
|
|
6604
|
-
* @see https://www.gate.
|
|
6605
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#marginuni
|
|
6605
6606
|
* @param {string} symbol unified market symbol, required for isolated margin
|
|
6606
6607
|
* @param {string} code unified currency code of the currency to borrow
|
|
6607
6608
|
* @param {float} amount the amount to borrow
|
|
@@ -6646,8 +6647,8 @@ class gate extends gate$1["default"] {
|
|
|
6646
6647
|
* @method
|
|
6647
6648
|
* @name gate#borrowMargin
|
|
6648
6649
|
* @description create a loan to borrow margin
|
|
6649
|
-
* @see https://www.gate.
|
|
6650
|
-
* @see https://www.gate.
|
|
6650
|
+
* @see https://www.gate.com/docs/apiv4/en/#create-a-cross-margin-borrow-loan
|
|
6651
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#borrow-or-repay
|
|
6651
6652
|
* @param {string} code unified currency code of the currency to borrow
|
|
6652
6653
|
* @param {float} amount the amount to borrow
|
|
6653
6654
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -6747,9 +6748,9 @@ class gate extends gate$1["default"] {
|
|
|
6747
6748
|
* @method
|
|
6748
6749
|
* @name gate#fetchBorrowInterest
|
|
6749
6750
|
* @description fetch the interest owed by the user for borrowing currency for margin trading
|
|
6750
|
-
* @see https://www.gate.
|
|
6751
|
-
* @see https://www.gate.
|
|
6752
|
-
* @see https://www.gate.
|
|
6751
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-interest-records
|
|
6752
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#interest-records-for-the-cross-margin-account
|
|
6753
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-interest-records-2
|
|
6753
6754
|
* @param {string} [code] unified currency code
|
|
6754
6755
|
* @param {string} [symbol] unified market symbol when fetching interest in isolated markets
|
|
6755
6756
|
* @param {int} [since] the earliest time in ms to fetch borrow interest for
|
|
@@ -6977,8 +6978,8 @@ class gate extends gate$1["default"] {
|
|
|
6977
6978
|
* @method
|
|
6978
6979
|
* @name gate#reduceMargin
|
|
6979
6980
|
* @description remove margin from a position
|
|
6980
|
-
* @see https://www.gate.
|
|
6981
|
-
* @see https://www.gate.
|
|
6981
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#update-position-margin
|
|
6982
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#update-position-margin-2
|
|
6982
6983
|
* @param {string} symbol unified market symbol
|
|
6983
6984
|
* @param {float} amount the amount of margin to remove
|
|
6984
6985
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -6991,8 +6992,8 @@ class gate extends gate$1["default"] {
|
|
|
6991
6992
|
* @method
|
|
6992
6993
|
* @name gate#addMargin
|
|
6993
6994
|
* @description add margin
|
|
6994
|
-
* @see https://www.gate.
|
|
6995
|
-
* @see https://www.gate.
|
|
6995
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#update-position-margin
|
|
6996
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#update-position-margin-2
|
|
6996
6997
|
* @param {string} symbol unified market symbol
|
|
6997
6998
|
* @param {float} amount amount of margin to add
|
|
6998
6999
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -7005,7 +7006,7 @@ class gate extends gate$1["default"] {
|
|
|
7005
7006
|
* @method
|
|
7006
7007
|
* @name gate#fetchOpenInterest
|
|
7007
7008
|
* @description Retrieves the open interest of a currency
|
|
7008
|
-
* @see https://www.gate.
|
|
7009
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#futures-stats
|
|
7009
7010
|
* @param {string} symbol Unified CCXT market symbol
|
|
7010
7011
|
* @param {string} timeframe "5m", "15m", "30m", "1h", "4h", "1d"
|
|
7011
7012
|
* @param {int} [since] the time(ms) of the earliest record to retrieve as a unix timestamp
|
|
@@ -7093,7 +7094,7 @@ class gate extends gate$1["default"] {
|
|
|
7093
7094
|
* @method
|
|
7094
7095
|
* @name gate#fetchSettlementHistory
|
|
7095
7096
|
* @description fetches historical settlement records
|
|
7096
|
-
* @see https://www.gate.
|
|
7097
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-settlement-history-2
|
|
7097
7098
|
* @param {string} symbol unified market symbol of the settlement history, required on gate
|
|
7098
7099
|
* @param {int} [since] timestamp in ms
|
|
7099
7100
|
* @param {int} [limit] number of records
|
|
@@ -7143,7 +7144,7 @@ class gate extends gate$1["default"] {
|
|
|
7143
7144
|
* @method
|
|
7144
7145
|
* @name gate#fetchMySettlementHistory
|
|
7145
7146
|
* @description fetches historical settlement records of the user
|
|
7146
|
-
* @see https://www.gate.
|
|
7147
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-my-options-settlements
|
|
7147
7148
|
* @param {string} symbol unified market symbol of the settlement history
|
|
7148
7149
|
* @param {int} [since] timestamp in ms
|
|
7149
7150
|
* @param {int} [limit] number of records
|
|
@@ -7273,11 +7274,11 @@ class gate extends gate$1["default"] {
|
|
|
7273
7274
|
* @method
|
|
7274
7275
|
* @name gate#fetchLedger
|
|
7275
7276
|
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
7276
|
-
* @see https://www.gate.
|
|
7277
|
-
* @see https://www.gate.
|
|
7278
|
-
* @see https://www.gate.
|
|
7279
|
-
* @see https://www.gate.
|
|
7280
|
-
* @see https://www.gate.
|
|
7277
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#query-account-book
|
|
7278
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-margin-account-balance-change-history
|
|
7279
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#query-account-book-2
|
|
7280
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#query-account-book-3
|
|
7281
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-account-changing-history
|
|
7281
7282
|
* @param {string} [code] unified currency code
|
|
7282
7283
|
* @param {int} [since] timestamp in ms of the earliest ledger entry
|
|
7283
7284
|
* @param {int} [limit] max number of ledger entries to return
|
|
@@ -7519,7 +7520,7 @@ class gate extends gate$1["default"] {
|
|
|
7519
7520
|
* @method
|
|
7520
7521
|
* @name gate#setPositionMode
|
|
7521
7522
|
* @description set dual/hedged mode to true or false for a swap market, make sure all positions are closed and no orders are open before setting dual mode
|
|
7522
|
-
* @see https://www.gate.
|
|
7523
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#enable-or-disable-dual-mode
|
|
7523
7524
|
* @param {bool} hedged set to true to enable dual mode
|
|
7524
7525
|
* @param {string|undefined} symbol if passed, dual mode is set for all markets with the same settle currency
|
|
7525
7526
|
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
@@ -7536,7 +7537,7 @@ class gate extends gate$1["default"] {
|
|
|
7536
7537
|
* @method
|
|
7537
7538
|
* @name gate#fetchUnderlyingAssets
|
|
7538
7539
|
* @description fetches the market ids of underlying assets for a specific contract market type
|
|
7539
|
-
* @see https://www.gate.
|
|
7540
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-underlyings
|
|
7540
7541
|
* @param {object} [params] exchange specific params
|
|
7541
7542
|
* @param {string} [params.type] the contract market type, 'option', 'swap' or 'future', the default is 'option'
|
|
7542
7543
|
* @returns {object[]} a list of [underlying assets]{@link https://docs.ccxt.com/#/?id=underlying-assets-structure}
|
|
@@ -7575,7 +7576,7 @@ class gate extends gate$1["default"] {
|
|
|
7575
7576
|
* @method
|
|
7576
7577
|
* @name gate#fetchLiquidations
|
|
7577
7578
|
* @description retrieves the public liquidations of a trading pair
|
|
7578
|
-
* @see https://www.gate.
|
|
7579
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#retrieve-liquidation-history
|
|
7579
7580
|
* @param {string} symbol unified CCXT market symbol
|
|
7580
7581
|
* @param {int} [since] the earliest time in ms to fetch liquidations for
|
|
7581
7582
|
* @param {int} [limit] the maximum number of liquidation structures to retrieve
|
|
@@ -7619,9 +7620,9 @@ class gate extends gate$1["default"] {
|
|
|
7619
7620
|
* @method
|
|
7620
7621
|
* @name gate#fetchMyLiquidations
|
|
7621
7622
|
* @description retrieves the users liquidated positions
|
|
7622
|
-
* @see https://www.gate.
|
|
7623
|
-
* @see https://www.gate.
|
|
7624
|
-
* @see https://www.gate.
|
|
7623
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-liquidation-history
|
|
7624
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-liquidation-history-2
|
|
7625
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-user-s-liquidation-history-of-specified-underlying
|
|
7625
7626
|
* @param {string} symbol unified CCXT market symbol
|
|
7626
7627
|
* @param {int} [since] the earliest time in ms to fetch liquidations for
|
|
7627
7628
|
* @param {int} [limit] the maximum number of liquidation structures to retrieve
|
|
@@ -7786,7 +7787,7 @@ class gate extends gate$1["default"] {
|
|
|
7786
7787
|
* @method
|
|
7787
7788
|
* @name gate#fetchGreeks
|
|
7788
7789
|
* @description fetches an option contracts greeks, financial metrics used to measure the factors that affect the price of an options contract
|
|
7789
|
-
* @see https://www.gate.
|
|
7790
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-tickers-of-options-contracts
|
|
7790
7791
|
* @param {string} symbol unified symbol of the market to fetch greeks for
|
|
7791
7792
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7792
7793
|
* @returns {object} a [greeks structure]{@link https://docs.ccxt.com/#/?id=greeks-structure}
|
|
@@ -7879,9 +7880,9 @@ class gate extends gate$1["default"] {
|
|
|
7879
7880
|
* @method
|
|
7880
7881
|
* @name gate#closePosition
|
|
7881
7882
|
* @description closes open positions for a market
|
|
7882
|
-
* @see https://www.gate.
|
|
7883
|
-
* @see https://www.gate.
|
|
7884
|
-
* @see https://www.gate.
|
|
7883
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#create-a-futures-order
|
|
7884
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#create-a-futures-order-2
|
|
7885
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#create-an-options-order
|
|
7885
7886
|
* @param {string} symbol Unified CCXT market symbol
|
|
7886
7887
|
* @param {string} side 'buy' or 'sell'
|
|
7887
7888
|
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
@@ -7901,9 +7902,9 @@ class gate extends gate$1["default"] {
|
|
|
7901
7902
|
* @method
|
|
7902
7903
|
* @name gate#fetchLeverage
|
|
7903
7904
|
* @description fetch the set leverage for a market
|
|
7904
|
-
* @see https://www.gate.
|
|
7905
|
-
* @see https://www.gate.
|
|
7906
|
-
* @see https://www.gate.
|
|
7905
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-unified-account-information
|
|
7906
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-detail-of-lending-market
|
|
7907
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#query-one-single-margin-currency-pair-deprecated
|
|
7907
7908
|
* @param {string} symbol unified market symbol
|
|
7908
7909
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7909
7910
|
* @param {boolean} [params.unified] default false, set to true for fetching the unified accounts leverage
|
|
@@ -8011,8 +8012,8 @@ class gate extends gate$1["default"] {
|
|
|
8011
8012
|
* @method
|
|
8012
8013
|
* @name gate#fetchLeverages
|
|
8013
8014
|
* @description fetch the set leverage for all leverage markets, only spot margin is supported on gate
|
|
8014
|
-
* @see https://www.gate.
|
|
8015
|
-
* @see https://www.gate.
|
|
8015
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-lending-markets
|
|
8016
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-supported-currency-pairs-supported-in-margin-trading-deprecated
|
|
8016
8017
|
* @param {string[]} symbols a list of unified market symbols
|
|
8017
8018
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8018
8019
|
* @param {boolean} [params.unified] default false, set to true for fetching unified account leverages
|
|
@@ -8073,7 +8074,7 @@ class gate extends gate$1["default"] {
|
|
|
8073
8074
|
* @method
|
|
8074
8075
|
* @name gate#fetchOption
|
|
8075
8076
|
* @description fetches option data that is commonly found in an option chain
|
|
8076
|
-
* @see https://www.gate.
|
|
8077
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#query-specified-contract-detail
|
|
8077
8078
|
* @param {string} symbol unified market symbol
|
|
8078
8079
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8079
8080
|
* @returns {object} an [option chain structure]{@link https://docs.ccxt.com/#/?id=option-chain-structure}
|
|
@@ -8131,7 +8132,7 @@ class gate extends gate$1["default"] {
|
|
|
8131
8132
|
* @method
|
|
8132
8133
|
* @name gate#fetchOptionChain
|
|
8133
8134
|
* @description fetches data for an underlying asset that is commonly found in an option chain
|
|
8134
|
-
* @see https://www.gate.
|
|
8135
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-the-contracts-with-specified-underlying-and-expiration-time
|
|
8135
8136
|
* @param {string} code base currency to fetch an option chain for
|
|
8136
8137
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8137
8138
|
* @param {string} [params.underlying] the underlying asset, can be obtained from fetchUnderlyingAssets ()
|
|
@@ -8257,8 +8258,8 @@ class gate extends gate$1["default"] {
|
|
|
8257
8258
|
* @method
|
|
8258
8259
|
* @name gate#fetchPositionsHistory
|
|
8259
8260
|
* @description fetches historical positions
|
|
8260
|
-
* @see https://www.gate.
|
|
8261
|
-
* @see https://www.gate.
|
|
8261
|
+
* @see https://www.gate.com/docs/developers/apiv4/#list-position-close-history
|
|
8262
|
+
* @see https://www.gate.com/docs/developers/apiv4/#list-position-close-history-2
|
|
8262
8263
|
* @param {string[]} symbols unified conract symbols, must all have the same settle currency and the same market type
|
|
8263
8264
|
* @param {int} [since] the earliest time in ms to fetch positions for
|
|
8264
8265
|
* @param {int} [limit] the maximum amount of records to fetch, default=1000
|