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/js/src/gate.js
CHANGED
|
@@ -12,7 +12,7 @@ export default class gate extends Exchange {
|
|
|
12
12
|
describe() {
|
|
13
13
|
return this.deepExtend(super.describe(), {
|
|
14
14
|
'id': 'gate',
|
|
15
|
-
'name': 'Gate
|
|
15
|
+
'name': 'Gate',
|
|
16
16
|
'countries': ['KR'],
|
|
17
17
|
'rateLimit': 50,
|
|
18
18
|
'version': 'v4',
|
|
@@ -20,8 +20,8 @@ export default class gate extends Exchange {
|
|
|
20
20
|
'pro': true,
|
|
21
21
|
'urls': {
|
|
22
22
|
'logo': 'https://github.com/user-attachments/assets/64f988c5-07b6-4652-b5c1-679a6bf67c85',
|
|
23
|
-
'doc': 'https://www.gate.
|
|
24
|
-
'www': 'https://gate.
|
|
23
|
+
'doc': 'https://www.gate.com/docs/developers/apiv4/en/',
|
|
24
|
+
'www': 'https://gate.com',
|
|
25
25
|
'api': {
|
|
26
26
|
'public': {
|
|
27
27
|
'wallet': 'https://api.gateio.ws/api/v4',
|
|
@@ -72,7 +72,7 @@ export default class gate extends Exchange {
|
|
|
72
72
|
},
|
|
73
73
|
},
|
|
74
74
|
'referral': {
|
|
75
|
-
'url': 'https://www.gate.
|
|
75
|
+
'url': 'https://www.gate.com/share/CCXTGATE',
|
|
76
76
|
'discount': 0.2,
|
|
77
77
|
},
|
|
78
78
|
},
|
|
@@ -1030,7 +1030,7 @@ export default class gate extends Exchange {
|
|
|
1030
1030
|
},
|
|
1031
1031
|
},
|
|
1032
1032
|
},
|
|
1033
|
-
// https://www.gate.
|
|
1033
|
+
// https://www.gate.com/docs/developers/apiv4/en/#label-list
|
|
1034
1034
|
'exceptions': {
|
|
1035
1035
|
'exact': {
|
|
1036
1036
|
'INVALID_PARAM_VALUE': BadRequest,
|
|
@@ -1143,7 +1143,7 @@ export default class gate extends Exchange {
|
|
|
1143
1143
|
* @name gate#loadUnifiedStatus
|
|
1144
1144
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1145
1145
|
* @description returns unifiedAccount so the user can check if the unified account is enabled
|
|
1146
|
-
* @see https://www.gate.
|
|
1146
|
+
* @see https://www.gate.com/docs/developers/apiv4/#get-account-detail
|
|
1147
1147
|
* @returns {boolean} true or false if the enabled unified account is enabled or not and sets the unifiedAccount option if it is undefined
|
|
1148
1148
|
*/
|
|
1149
1149
|
async loadUnifiedStatus(params = {}) {
|
|
@@ -1181,7 +1181,7 @@ export default class gate extends Exchange {
|
|
|
1181
1181
|
* @method
|
|
1182
1182
|
* @name gate#fetchTime
|
|
1183
1183
|
* @description fetches the current integer timestamp in milliseconds from the exchange server
|
|
1184
|
-
* @see https://www.gate.
|
|
1184
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-server-current-time
|
|
1185
1185
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1186
1186
|
* @returns {int} the current integer timestamp in milliseconds from the exchange server
|
|
1187
1187
|
*/
|
|
@@ -1271,11 +1271,11 @@ export default class gate extends Exchange {
|
|
|
1271
1271
|
* @method
|
|
1272
1272
|
* @name gate#fetchMarkets
|
|
1273
1273
|
* @description retrieves data on all markets for gate
|
|
1274
|
-
* @see https://www.gate.
|
|
1275
|
-
* @see https://www.gate.
|
|
1276
|
-
* @see https://www.gate.
|
|
1277
|
-
* @see https://www.gate.
|
|
1278
|
-
* @see https://www.gate.
|
|
1274
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-currency-pairs-supported // spot
|
|
1275
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-supported-currency-pairs-supported-in-margin-trading // margin
|
|
1276
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-futures-contracts // swap
|
|
1277
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-futures-contracts-2 // future
|
|
1278
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-the-contracts-with-specified-underlying-and-expiration-time // option
|
|
1279
1279
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1280
1280
|
* @returns {object[]} an array of objects representing market data
|
|
1281
1281
|
*/
|
|
@@ -1335,7 +1335,7 @@ export default class gate extends Exchange {
|
|
|
1335
1335
|
// "sell_start": 1607313600,
|
|
1336
1336
|
// "buy_start": 1700492400,
|
|
1337
1337
|
// "type": "normal",
|
|
1338
|
-
// "trade_url": "https://www.gate.
|
|
1338
|
+
// "trade_url": "https://www.gate.com/trade/QTUM_ETH",
|
|
1339
1339
|
// }
|
|
1340
1340
|
//
|
|
1341
1341
|
// Margin
|
|
@@ -1909,7 +1909,7 @@ export default class gate extends Exchange {
|
|
|
1909
1909
|
* @method
|
|
1910
1910
|
* @name gate#fetchCurrencies
|
|
1911
1911
|
* @description fetches all available currencies on an exchange
|
|
1912
|
-
* @see https://www.gate.
|
|
1912
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-currencies-details
|
|
1913
1913
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1914
1914
|
* @returns {object} an associative dictionary of currencies
|
|
1915
1915
|
*/
|
|
@@ -2013,7 +2013,7 @@ export default class gate extends Exchange {
|
|
|
2013
2013
|
* @method
|
|
2014
2014
|
* @name gate#fetchFundingRate
|
|
2015
2015
|
* @description fetch the current funding rate
|
|
2016
|
-
* @see https://www.gate.
|
|
2016
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-a-single-contract
|
|
2017
2017
|
* @param {string} symbol unified market symbol
|
|
2018
2018
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2019
2019
|
* @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
|
|
@@ -2076,7 +2076,7 @@ export default class gate extends Exchange {
|
|
|
2076
2076
|
* @method
|
|
2077
2077
|
* @name gate#fetchFundingRates
|
|
2078
2078
|
* @description fetch the funding rate for multiple markets
|
|
2079
|
-
* @see https://www.gate.
|
|
2079
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-futures-contracts
|
|
2080
2080
|
* @param {string[]|undefined} symbols list of unified market symbols
|
|
2081
2081
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2082
2082
|
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rates-structure}, indexed by market symbols
|
|
@@ -2284,10 +2284,10 @@ export default class gate extends Exchange {
|
|
|
2284
2284
|
* @method
|
|
2285
2285
|
* @name gate#fetchDepositAddress
|
|
2286
2286
|
* @description fetch the deposit address for a currency associated with this account
|
|
2287
|
-
* @see https://www.gate.
|
|
2287
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#generate-currency-deposit-address
|
|
2288
2288
|
* @param {string} code unified currency code
|
|
2289
2289
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2290
|
-
* @param {string} [params.network] unified network code (not used directly by gate.
|
|
2290
|
+
* @param {string} [params.network] unified network code (not used directly by gate.com but used by ccxt to filter the response)
|
|
2291
2291
|
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
2292
2292
|
*/
|
|
2293
2293
|
async fetchDepositAddress(code, params = {}) {
|
|
@@ -2322,7 +2322,7 @@ export default class gate extends Exchange {
|
|
|
2322
2322
|
* @method
|
|
2323
2323
|
* @name gate#fetchTradingFee
|
|
2324
2324
|
* @description fetch the trading fees for a market
|
|
2325
|
-
* @see https://www.gate.
|
|
2325
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#retrieve-personal-trading-fee
|
|
2326
2326
|
* @param {string} symbol unified market symbol
|
|
2327
2327
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2328
2328
|
* @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
@@ -2354,7 +2354,7 @@ export default class gate extends Exchange {
|
|
|
2354
2354
|
* @method
|
|
2355
2355
|
* @name gate#fetchTradingFees
|
|
2356
2356
|
* @description fetch the trading fees for multiple markets
|
|
2357
|
-
* @see https://www.gate.
|
|
2357
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#retrieve-personal-trading-fee
|
|
2358
2358
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2359
2359
|
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
2360
2360
|
*/
|
|
@@ -2421,7 +2421,7 @@ export default class gate extends Exchange {
|
|
|
2421
2421
|
* @name gate#fetchTransactionFees
|
|
2422
2422
|
* @deprecated
|
|
2423
2423
|
* @description please use fetchDepositWithdrawFees instead
|
|
2424
|
-
* @see https://www.gate.
|
|
2424
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#retrieve-withdrawal-status
|
|
2425
2425
|
* @param {string[]|undefined} codes list of unified currency codes
|
|
2426
2426
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2427
2427
|
* @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
@@ -2461,10 +2461,11 @@ export default class gate extends Exchange {
|
|
|
2461
2461
|
withdrawFees = this.safeNumber(entry, 'withdraw_fix');
|
|
2462
2462
|
}
|
|
2463
2463
|
else {
|
|
2464
|
-
const
|
|
2465
|
-
for (let j = 0; j <
|
|
2466
|
-
const
|
|
2467
|
-
|
|
2464
|
+
const networkIds = Object.keys(withdrawFixOnChains);
|
|
2465
|
+
for (let j = 0; j < networkIds.length; j++) {
|
|
2466
|
+
const networkId = networkIds[j];
|
|
2467
|
+
const networkCode = this.networkIdToCode(networkId);
|
|
2468
|
+
withdrawFees[networkCode] = this.parseNumber(withdrawFixOnChains[networkId]);
|
|
2468
2469
|
}
|
|
2469
2470
|
}
|
|
2470
2471
|
result[code] = {
|
|
@@ -2479,7 +2480,7 @@ export default class gate extends Exchange {
|
|
|
2479
2480
|
* @method
|
|
2480
2481
|
* @name gate#fetchDepositWithdrawFees
|
|
2481
2482
|
* @description fetch deposit and withdraw fees
|
|
2482
|
-
* @see https://www.gate.
|
|
2483
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#retrieve-withdrawal-status
|
|
2483
2484
|
* @param {string[]|undefined} codes list of unified currency codes
|
|
2484
2485
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2485
2486
|
* @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
@@ -2562,8 +2563,8 @@ export default class gate extends Exchange {
|
|
|
2562
2563
|
* @method
|
|
2563
2564
|
* @name gate#fetchFundingHistory
|
|
2564
2565
|
* @description fetch the history of funding payments paid and received on this account
|
|
2565
|
-
* @see https://www.gate.
|
|
2566
|
-
* @see https://www.gate.
|
|
2566
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#query-account-book-2
|
|
2567
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#query-account-book-3
|
|
2567
2568
|
* @param {string} symbol unified market symbol
|
|
2568
2569
|
* @param {int} [since] the earliest time in ms to fetch funding history for
|
|
2569
2570
|
* @param {int} [limit] the maximum number of funding history structures to retrieve
|
|
@@ -2649,10 +2650,10 @@ export default class gate extends Exchange {
|
|
|
2649
2650
|
* @method
|
|
2650
2651
|
* @name gate#fetchOrderBook
|
|
2651
2652
|
* @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
2652
|
-
* @see https://www.gate.
|
|
2653
|
-
* @see https://www.gate.
|
|
2654
|
-
* @see https://www.gate.
|
|
2655
|
-
* @see https://www.gate.
|
|
2653
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#retrieve-order-book
|
|
2654
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#futures-order-book
|
|
2655
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#futures-order-book-2
|
|
2656
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#options-order-book
|
|
2656
2657
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
2657
2658
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
2658
2659
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -2775,10 +2776,10 @@ export default class gate extends Exchange {
|
|
|
2775
2776
|
* @method
|
|
2776
2777
|
* @name gate#fetchTicker
|
|
2777
2778
|
* @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
2778
|
-
* @see https://www.gate.
|
|
2779
|
-
* @see https://www.gate.
|
|
2780
|
-
* @see https://www.gate.
|
|
2781
|
-
* @see https://www.gate.
|
|
2779
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-details-of-a-specifc-order
|
|
2780
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-futures-tickers
|
|
2781
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-futures-tickers-2
|
|
2782
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-tickers-of-options-contracts
|
|
2782
2783
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
2783
2784
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2784
2785
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -2939,10 +2940,10 @@ export default class gate extends Exchange {
|
|
|
2939
2940
|
* @method
|
|
2940
2941
|
* @name gate#fetchTickers
|
|
2941
2942
|
* @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
|
2942
|
-
* @see https://www.gate.
|
|
2943
|
-
* @see https://www.gate.
|
|
2944
|
-
* @see https://www.gate.
|
|
2945
|
-
* @see https://www.gate.
|
|
2943
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-details-of-a-specifc-order
|
|
2944
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-futures-tickers
|
|
2945
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-futures-tickers-2
|
|
2946
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-tickers-of-options-contracts
|
|
2946
2947
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
2947
2948
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2948
2949
|
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -3295,10 +3296,10 @@ export default class gate extends Exchange {
|
|
|
3295
3296
|
* @method
|
|
3296
3297
|
* @name gateio#fetchOHLCV
|
|
3297
3298
|
* @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
3298
|
-
* @see https://www.gate.
|
|
3299
|
-
* @see https://www.gate.
|
|
3300
|
-
* @see https://www.gate.
|
|
3301
|
-
* @see https://www.gate.
|
|
3299
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#market-candlesticks // spot
|
|
3300
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-futures-candlesticks // swap
|
|
3301
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#market-candlesticks // future
|
|
3302
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-options-candlesticks // option
|
|
3302
3303
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
3303
3304
|
* @param {string} timeframe the length of time each candle represents
|
|
3304
3305
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
@@ -3385,7 +3386,7 @@ export default class gate extends Exchange {
|
|
|
3385
3386
|
* @method
|
|
3386
3387
|
* @name gate#fetchFundingRateHistory
|
|
3387
3388
|
* @description fetches historical funding rate prices
|
|
3388
|
-
* @see https://www.gate.
|
|
3389
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#funding-rate-history
|
|
3389
3390
|
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
3390
3391
|
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
3391
3392
|
* @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
|
|
@@ -3494,10 +3495,10 @@ export default class gate extends Exchange {
|
|
|
3494
3495
|
* @method
|
|
3495
3496
|
* @name gate#fetchTrades
|
|
3496
3497
|
* @description get the list of most recent trades for a particular symbol
|
|
3497
|
-
* @see https://www.gate.
|
|
3498
|
-
* @see https://www.gate.
|
|
3499
|
-
* @see https://www.gate.
|
|
3500
|
-
* @see https://www.gate.
|
|
3498
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#retrieve-market-trades
|
|
3499
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#futures-trading-history
|
|
3500
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#futures-trading-history-2
|
|
3501
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#options-trade-history
|
|
3501
3502
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
3502
3503
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
3503
3504
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
@@ -3609,10 +3610,10 @@ export default class gate extends Exchange {
|
|
|
3609
3610
|
* @method
|
|
3610
3611
|
* @name gate#fetchOrderTrades
|
|
3611
3612
|
* @description fetch all the trades made from a single order
|
|
3612
|
-
* @see https://www.gate.
|
|
3613
|
-
* @see https://www.gate.
|
|
3614
|
-
* @see https://www.gate.
|
|
3615
|
-
* @see https://www.gate.
|
|
3613
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-personal-trading-history
|
|
3614
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-personal-trading-history-2
|
|
3615
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-personal-trading-history-3
|
|
3616
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-personal-trading-history-4
|
|
3616
3617
|
* @param {string} id order id
|
|
3617
3618
|
* @param {string} symbol unified market symbol
|
|
3618
3619
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
@@ -3651,10 +3652,10 @@ export default class gate extends Exchange {
|
|
|
3651
3652
|
* @method
|
|
3652
3653
|
* @name gate#fetchMyTrades
|
|
3653
3654
|
* @description Fetch personal trading history
|
|
3654
|
-
* @see https://www.gate.
|
|
3655
|
-
* @see https://www.gate.
|
|
3656
|
-
* @see https://www.gate.
|
|
3657
|
-
* @see https://www.gate.
|
|
3655
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-personal-trading-history
|
|
3656
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-personal-trading-history-2
|
|
3657
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-personal-trading-history-3
|
|
3658
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-personal-trading-history-4
|
|
3658
3659
|
* @param {string} symbol unified market symbol
|
|
3659
3660
|
* @param {int} [since] the earliest time in ms to fetch trades for
|
|
3660
3661
|
* @param {int} [limit] the maximum number of trades structures to retrieve
|
|
@@ -3963,7 +3964,7 @@ export default class gate extends Exchange {
|
|
|
3963
3964
|
* @method
|
|
3964
3965
|
* @name gate#fetchDeposits
|
|
3965
3966
|
* @description fetch all deposits made to an account
|
|
3966
|
-
* @see https://www.gate.
|
|
3967
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#retrieve-deposit-records
|
|
3967
3968
|
* @param {string} code unified currency code
|
|
3968
3969
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
3969
3970
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
@@ -4001,7 +4002,7 @@ export default class gate extends Exchange {
|
|
|
4001
4002
|
* @method
|
|
4002
4003
|
* @name gate#fetchWithdrawals
|
|
4003
4004
|
* @description fetch all withdrawals made from an account
|
|
4004
|
-
* @see https://www.gate.
|
|
4005
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#retrieve-withdrawal-records
|
|
4005
4006
|
* @param {string} code unified currency code
|
|
4006
4007
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
4007
4008
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
@@ -4039,7 +4040,7 @@ export default class gate extends Exchange {
|
|
|
4039
4040
|
* @method
|
|
4040
4041
|
* @name gate#withdraw
|
|
4041
4042
|
* @description make a withdrawal
|
|
4042
|
-
* @see https://www.gate.
|
|
4043
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#withdraw
|
|
4043
4044
|
* @param {string} code unified currency code
|
|
4044
4045
|
* @param {float} amount the amount to withdraw
|
|
4045
4046
|
* @param {string} address the address to withdraw to
|
|
@@ -4219,13 +4220,13 @@ export default class gate extends Exchange {
|
|
|
4219
4220
|
* @method
|
|
4220
4221
|
* @name gate#createOrder
|
|
4221
4222
|
* @description Create an order on the exchange
|
|
4222
|
-
* @see https://www.gate.
|
|
4223
|
-
* @see https://www.gate.
|
|
4224
|
-
* @see https://www.gate.
|
|
4225
|
-
* @see https://www.gate.
|
|
4226
|
-
* @see https://www.gate.
|
|
4227
|
-
* @see https://www.gate.
|
|
4228
|
-
* @see https://www.gate.
|
|
4223
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#create-an-order
|
|
4224
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#create-a-price-triggered-order
|
|
4225
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#create-a-futures-order
|
|
4226
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#create-a-price-triggered-order-2
|
|
4227
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#create-a-futures-order-2
|
|
4228
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#create-a-price-triggered-order-3
|
|
4229
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#create-an-options-order
|
|
4229
4230
|
* @param {string} symbol Unified CCXT market symbol
|
|
4230
4231
|
* @param {string} type 'limit' or 'market' *"market" is contract only*
|
|
4231
4232
|
* @param {string} side 'buy' or 'sell'
|
|
@@ -4381,7 +4382,7 @@ export default class gate extends Exchange {
|
|
|
4381
4382
|
if (triggerValue !== undefined) {
|
|
4382
4383
|
throw new NotSupported(this.id + ' createOrders() does not support advanced order properties (stopPrice, takeProfitPrice, stopLossPrice)');
|
|
4383
4384
|
}
|
|
4384
|
-
extendedParams['textIsRequired'] = true; //
|
|
4385
|
+
extendedParams['textIsRequired'] = true; // the exchange requires a text parameter for each order here
|
|
4385
4386
|
const orderRequest = this.createOrderRequest(marketId, type, side, amount, price, extendedParams);
|
|
4386
4387
|
ordersRequests.push(orderRequest);
|
|
4387
4388
|
}
|
|
@@ -4396,9 +4397,9 @@ export default class gate extends Exchange {
|
|
|
4396
4397
|
* @method
|
|
4397
4398
|
* @name gate#createOrders
|
|
4398
4399
|
* @description create a list of trade orders
|
|
4399
|
-
* @see https://www.gate.
|
|
4400
|
-
* @see https://www.gate.
|
|
4401
|
-
* @see https://www.gate.
|
|
4400
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-a-single-order-2
|
|
4401
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#create-a-batch-of-orders
|
|
4402
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#create-a-batch-of-futures-orders
|
|
4402
4403
|
* @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
|
|
4403
4404
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4404
4405
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
@@ -4682,7 +4683,7 @@ export default class gate extends Exchange {
|
|
|
4682
4683
|
* @method
|
|
4683
4684
|
* @name gate#createMarketBuyOrderWithCost
|
|
4684
4685
|
* @description create a market buy order by providing the symbol and cost
|
|
4685
|
-
* @see https://www.gate.
|
|
4686
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#create-an-order
|
|
4686
4687
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
4687
4688
|
* @param {float} cost how much you want to trade in units of the quote currency
|
|
4688
4689
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -4746,8 +4747,8 @@ export default class gate extends Exchange {
|
|
|
4746
4747
|
* @method
|
|
4747
4748
|
* @name gate#editOrder
|
|
4748
4749
|
* @description edit a trade order, gate currently only supports the modification of the price or amount fields
|
|
4749
|
-
* @see https://www.gate.
|
|
4750
|
-
* @see https://www.gate.
|
|
4750
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#amend-an-order
|
|
4751
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#amend-an-order-2
|
|
4751
4752
|
* @param {string} id order id
|
|
4752
4753
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
4753
4754
|
* @param {string} type 'market' or 'limit'
|
|
@@ -5107,10 +5108,10 @@ export default class gate extends Exchange {
|
|
|
5107
5108
|
* @method
|
|
5108
5109
|
* @name gate#fetchOrder
|
|
5109
5110
|
* @description Retrieves information on an order
|
|
5110
|
-
* @see https://www.gate.
|
|
5111
|
-
* @see https://www.gate.
|
|
5112
|
-
* @see https://www.gate.
|
|
5113
|
-
* @see https://www.gate.
|
|
5111
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-a-single-order
|
|
5112
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-a-single-order-2
|
|
5113
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-a-single-order-3
|
|
5114
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-a-single-order-4
|
|
5114
5115
|
* @param {string} id Order id
|
|
5115
5116
|
* @param {string} symbol Unified market symbol, *required for spot and margin*
|
|
5116
5117
|
* @param {object} [params] Parameters specified by the exchange api
|
|
@@ -5166,8 +5167,8 @@ export default class gate extends Exchange {
|
|
|
5166
5167
|
* @method
|
|
5167
5168
|
* @name gate#fetchOpenOrders
|
|
5168
5169
|
* @description fetch all unfilled currently open orders
|
|
5169
|
-
* @see https://www.gate.
|
|
5170
|
-
* @see https://www.gate.
|
|
5170
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-open-orders
|
|
5171
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#retrieve-running-auto-order-list
|
|
5171
5172
|
* @param {string} symbol unified market symbol
|
|
5172
5173
|
* @param {int} [since] the earliest time in ms to fetch open orders for
|
|
5173
5174
|
* @param {int} [limit] the maximum number of open orders structures to retrieve
|
|
@@ -5185,14 +5186,14 @@ export default class gate extends Exchange {
|
|
|
5185
5186
|
* @method
|
|
5186
5187
|
* @name gate#fetchClosedOrders
|
|
5187
5188
|
* @description fetches information on multiple closed orders made by the user
|
|
5188
|
-
* @see https://www.gate.
|
|
5189
|
-
* @see https://www.gate.
|
|
5190
|
-
* @see https://www.gate.
|
|
5191
|
-
* @see https://www.gate.
|
|
5192
|
-
* @see https://www.gate.
|
|
5193
|
-
* @see https://www.gate.
|
|
5194
|
-
* @see https://www.gate.
|
|
5195
|
-
* @see https://www.gate.
|
|
5189
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-orders
|
|
5190
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#retrieve-running-auto-order-list
|
|
5191
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-futures-orders
|
|
5192
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-auto-orders
|
|
5193
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-futures-orders-2
|
|
5194
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-auto-orders-2
|
|
5195
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-options-orders
|
|
5196
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-futures-orders-by-time-range
|
|
5196
5197
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
5197
5198
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
5198
5199
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
@@ -5488,10 +5489,10 @@ export default class gate extends Exchange {
|
|
|
5488
5489
|
* @method
|
|
5489
5490
|
* @name gate#cancelOrder
|
|
5490
5491
|
* @description Cancels an open order
|
|
5491
|
-
* @see https://www.gate.
|
|
5492
|
-
* @see https://www.gate.
|
|
5493
|
-
* @see https://www.gate.
|
|
5494
|
-
* @see https://www.gate.
|
|
5492
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#cancel-a-single-order
|
|
5493
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#cancel-a-single-order-2
|
|
5494
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#cancel-a-single-order-3
|
|
5495
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#cancel-a-single-order-4
|
|
5495
5496
|
* @param {string} id Order id
|
|
5496
5497
|
* @param {string} symbol Unified market symbol
|
|
5497
5498
|
* @param {object} [params] Parameters specified by the exchange api
|
|
@@ -5626,8 +5627,8 @@ export default class gate extends Exchange {
|
|
|
5626
5627
|
* @method
|
|
5627
5628
|
* @name gate#cancelOrders
|
|
5628
5629
|
* @description cancel multiple orders
|
|
5629
|
-
* @see https://www.gate.
|
|
5630
|
-
* @see https://www.gate.
|
|
5630
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#cancel-a-batch-of-orders-with-an-id-list
|
|
5631
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#cancel-a-batch-of-orders-with-an-id-list-2
|
|
5631
5632
|
* @param {string[]} ids order ids
|
|
5632
5633
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
5633
5634
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -5675,7 +5676,7 @@ export default class gate extends Exchange {
|
|
|
5675
5676
|
* @method
|
|
5676
5677
|
* @name gate#cancelOrdersForSymbols
|
|
5677
5678
|
* @description cancel multiple orders for multiple symbols
|
|
5678
|
-
* @see https://www.gate.
|
|
5679
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#cancel-a-batch-of-orders-with-an-id-list
|
|
5679
5680
|
* @param {CancellationRequest[]} orders list of order ids with symbol, example [{"id": "a", "symbol": "BTC/USDT"}, {"id": "b", "symbol": "ETH/USDT"}]
|
|
5680
5681
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5681
5682
|
* @param {string[]} [params.clientOrderIds] client order ids
|
|
@@ -5715,10 +5716,10 @@ export default class gate extends Exchange {
|
|
|
5715
5716
|
* @method
|
|
5716
5717
|
* @name gate#cancelAllOrders
|
|
5717
5718
|
* @description cancel all open orders
|
|
5718
|
-
* @see https://www.gate.
|
|
5719
|
-
* @see https://www.gate.
|
|
5720
|
-
* @see https://www.gate.
|
|
5721
|
-
* @see https://www.gate.
|
|
5719
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#cancel-all-open-orders-in-specified-currency-pair
|
|
5720
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#cancel-all-open-orders-matched
|
|
5721
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#cancel-all-open-orders-matched-2
|
|
5722
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#cancel-all-open-orders-matched-3
|
|
5722
5723
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
5723
5724
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
5724
5725
|
* @param {bool} [params.unifiedAccount] set to true for canceling unified account orders
|
|
@@ -5797,7 +5798,7 @@ export default class gate extends Exchange {
|
|
|
5797
5798
|
* @method
|
|
5798
5799
|
* @name gate#transfer
|
|
5799
5800
|
* @description transfer currency internally between wallets on the same account
|
|
5800
|
-
* @see https://www.gate.
|
|
5801
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#transfer-between-trading-accounts
|
|
5801
5802
|
* @param {string} code unified currency code for currency being transferred
|
|
5802
5803
|
* @param {float} amount the amount of currency to transfer
|
|
5803
5804
|
* @param {string} fromAccount the account to transfer currency from
|
|
@@ -5882,8 +5883,8 @@ export default class gate extends Exchange {
|
|
|
5882
5883
|
* @method
|
|
5883
5884
|
* @name gate#setLeverage
|
|
5884
5885
|
* @description set the level of leverage for a market
|
|
5885
|
-
* @see https://www.gate.
|
|
5886
|
-
* @see https://www.gate.
|
|
5886
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#update-position-leverage
|
|
5887
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#update-position-leverage-2
|
|
5887
5888
|
* @param {float} leverage the rate of leverage
|
|
5888
5889
|
* @param {string} symbol unified market symbol
|
|
5889
5890
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -6102,9 +6103,9 @@ export default class gate extends Exchange {
|
|
|
6102
6103
|
* @method
|
|
6103
6104
|
* @name gate#fetchPosition
|
|
6104
6105
|
* @description fetch data on an open contract position
|
|
6105
|
-
* @see https://www.gate.
|
|
6106
|
-
* @see https://www.gate.
|
|
6107
|
-
* @see https://www.gate.
|
|
6106
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-single-position
|
|
6107
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-single-position-2
|
|
6108
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-specified-contract-position
|
|
6108
6109
|
* @param {string} symbol unified market symbol of the market the position is held in
|
|
6109
6110
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6110
6111
|
* @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
@@ -6190,9 +6191,9 @@ export default class gate extends Exchange {
|
|
|
6190
6191
|
* @method
|
|
6191
6192
|
* @name gate#fetchPositions
|
|
6192
6193
|
* @description fetch all open positions
|
|
6193
|
-
* @see https://www.gate.
|
|
6194
|
-
* @see https://www.gate.
|
|
6195
|
-
* @see https://www.gate.
|
|
6194
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-positions-of-a-user
|
|
6195
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-positions-of-a-user-2
|
|
6196
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-user-s-positions-of-specified-underlying
|
|
6196
6197
|
* @param {string[]|undefined} symbols Not used by gate, but parsed internally by CCXT
|
|
6197
6198
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6198
6199
|
* @param {string} [params.settle] 'btc' or 'usdt' - settle currency for perpetual swap and future - default="usdt" for swap and "btc" for future
|
|
@@ -6301,8 +6302,8 @@ export default class gate extends Exchange {
|
|
|
6301
6302
|
* @method
|
|
6302
6303
|
* @name gate#fetchLeverageTiers
|
|
6303
6304
|
* @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
|
|
6304
|
-
* @see https://www.gate.
|
|
6305
|
-
* @see https://www.gate.
|
|
6305
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-futures-contracts
|
|
6306
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-futures-contracts-2
|
|
6306
6307
|
* @param {string[]} [symbols] list of unified market symbols
|
|
6307
6308
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6308
6309
|
* @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}, indexed by market symbols
|
|
@@ -6422,7 +6423,7 @@ export default class gate extends Exchange {
|
|
|
6422
6423
|
* @method
|
|
6423
6424
|
* @name gate#fetchMarketLeverageTiers
|
|
6424
6425
|
* @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
|
|
6425
|
-
* @see https://www.gate.
|
|
6426
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-risk-limit-tiers
|
|
6426
6427
|
* @param {string} symbol unified market symbol
|
|
6427
6428
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6428
6429
|
* @returns {object} a [leverage tiers structure]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}
|
|
@@ -6516,7 +6517,7 @@ export default class gate extends Exchange {
|
|
|
6516
6517
|
* @method
|
|
6517
6518
|
* @name gate#repayMargin
|
|
6518
6519
|
* @description repay borrowed margin and interest
|
|
6519
|
-
* @see https://www.gate.
|
|
6520
|
+
* @see https://www.gate.com/docs/apiv4/en/#repay-a-loan
|
|
6520
6521
|
* @param {string} symbol unified market symbol
|
|
6521
6522
|
* @param {string} code unified currency code of the currency to repay
|
|
6522
6523
|
* @param {float} amount the amount to repay
|
|
@@ -6545,8 +6546,8 @@ export default class gate extends Exchange {
|
|
|
6545
6546
|
* @method
|
|
6546
6547
|
* @name gate#repayCrossMargin
|
|
6547
6548
|
* @description repay cross margin borrowed margin and interest
|
|
6548
|
-
* @see https://www.gate.
|
|
6549
|
-
* @see https://www.gate.
|
|
6549
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#cross-margin-repayments
|
|
6550
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#borrow-or-repay
|
|
6550
6551
|
* @param {string} code unified currency code of the currency to repay
|
|
6551
6552
|
* @param {float} amount the amount to repay
|
|
6552
6553
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -6596,7 +6597,7 @@ export default class gate extends Exchange {
|
|
|
6596
6597
|
* @method
|
|
6597
6598
|
* @name gate#borrowIsolatedMargin
|
|
6598
6599
|
* @description create a loan to borrow margin
|
|
6599
|
-
* @see https://www.gate.
|
|
6600
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#marginuni
|
|
6600
6601
|
* @param {string} symbol unified market symbol, required for isolated margin
|
|
6601
6602
|
* @param {string} code unified currency code of the currency to borrow
|
|
6602
6603
|
* @param {float} amount the amount to borrow
|
|
@@ -6641,8 +6642,8 @@ export default class gate extends Exchange {
|
|
|
6641
6642
|
* @method
|
|
6642
6643
|
* @name gate#borrowMargin
|
|
6643
6644
|
* @description create a loan to borrow margin
|
|
6644
|
-
* @see https://www.gate.
|
|
6645
|
-
* @see https://www.gate.
|
|
6645
|
+
* @see https://www.gate.com/docs/apiv4/en/#create-a-cross-margin-borrow-loan
|
|
6646
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#borrow-or-repay
|
|
6646
6647
|
* @param {string} code unified currency code of the currency to borrow
|
|
6647
6648
|
* @param {float} amount the amount to borrow
|
|
6648
6649
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -6742,9 +6743,9 @@ export default class gate extends Exchange {
|
|
|
6742
6743
|
* @method
|
|
6743
6744
|
* @name gate#fetchBorrowInterest
|
|
6744
6745
|
* @description fetch the interest owed by the user for borrowing currency for margin trading
|
|
6745
|
-
* @see https://www.gate.
|
|
6746
|
-
* @see https://www.gate.
|
|
6747
|
-
* @see https://www.gate.
|
|
6746
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-interest-records
|
|
6747
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#interest-records-for-the-cross-margin-account
|
|
6748
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-interest-records-2
|
|
6748
6749
|
* @param {string} [code] unified currency code
|
|
6749
6750
|
* @param {string} [symbol] unified market symbol when fetching interest in isolated markets
|
|
6750
6751
|
* @param {int} [since] the earliest time in ms to fetch borrow interest for
|
|
@@ -6972,8 +6973,8 @@ export default class gate extends Exchange {
|
|
|
6972
6973
|
* @method
|
|
6973
6974
|
* @name gate#reduceMargin
|
|
6974
6975
|
* @description remove margin from a position
|
|
6975
|
-
* @see https://www.gate.
|
|
6976
|
-
* @see https://www.gate.
|
|
6976
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#update-position-margin
|
|
6977
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#update-position-margin-2
|
|
6977
6978
|
* @param {string} symbol unified market symbol
|
|
6978
6979
|
* @param {float} amount the amount of margin to remove
|
|
6979
6980
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -6986,8 +6987,8 @@ export default class gate extends Exchange {
|
|
|
6986
6987
|
* @method
|
|
6987
6988
|
* @name gate#addMargin
|
|
6988
6989
|
* @description add margin
|
|
6989
|
-
* @see https://www.gate.
|
|
6990
|
-
* @see https://www.gate.
|
|
6990
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#update-position-margin
|
|
6991
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#update-position-margin-2
|
|
6991
6992
|
* @param {string} symbol unified market symbol
|
|
6992
6993
|
* @param {float} amount amount of margin to add
|
|
6993
6994
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -7000,7 +7001,7 @@ export default class gate extends Exchange {
|
|
|
7000
7001
|
* @method
|
|
7001
7002
|
* @name gate#fetchOpenInterest
|
|
7002
7003
|
* @description Retrieves the open interest of a currency
|
|
7003
|
-
* @see https://www.gate.
|
|
7004
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#futures-stats
|
|
7004
7005
|
* @param {string} symbol Unified CCXT market symbol
|
|
7005
7006
|
* @param {string} timeframe "5m", "15m", "30m", "1h", "4h", "1d"
|
|
7006
7007
|
* @param {int} [since] the time(ms) of the earliest record to retrieve as a unix timestamp
|
|
@@ -7088,7 +7089,7 @@ export default class gate extends Exchange {
|
|
|
7088
7089
|
* @method
|
|
7089
7090
|
* @name gate#fetchSettlementHistory
|
|
7090
7091
|
* @description fetches historical settlement records
|
|
7091
|
-
* @see https://www.gate.
|
|
7092
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-settlement-history-2
|
|
7092
7093
|
* @param {string} symbol unified market symbol of the settlement history, required on gate
|
|
7093
7094
|
* @param {int} [since] timestamp in ms
|
|
7094
7095
|
* @param {int} [limit] number of records
|
|
@@ -7138,7 +7139,7 @@ export default class gate extends Exchange {
|
|
|
7138
7139
|
* @method
|
|
7139
7140
|
* @name gate#fetchMySettlementHistory
|
|
7140
7141
|
* @description fetches historical settlement records of the user
|
|
7141
|
-
* @see https://www.gate.
|
|
7142
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-my-options-settlements
|
|
7142
7143
|
* @param {string} symbol unified market symbol of the settlement history
|
|
7143
7144
|
* @param {int} [since] timestamp in ms
|
|
7144
7145
|
* @param {int} [limit] number of records
|
|
@@ -7268,11 +7269,11 @@ export default class gate extends Exchange {
|
|
|
7268
7269
|
* @method
|
|
7269
7270
|
* @name gate#fetchLedger
|
|
7270
7271
|
* @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
|
|
7271
|
-
* @see https://www.gate.
|
|
7272
|
-
* @see https://www.gate.
|
|
7273
|
-
* @see https://www.gate.
|
|
7274
|
-
* @see https://www.gate.
|
|
7275
|
-
* @see https://www.gate.
|
|
7272
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#query-account-book
|
|
7273
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-margin-account-balance-change-history
|
|
7274
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#query-account-book-2
|
|
7275
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#query-account-book-3
|
|
7276
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-account-changing-history
|
|
7276
7277
|
* @param {string} [code] unified currency code
|
|
7277
7278
|
* @param {int} [since] timestamp in ms of the earliest ledger entry
|
|
7278
7279
|
* @param {int} [limit] max number of ledger entries to return
|
|
@@ -7514,7 +7515,7 @@ export default class gate extends Exchange {
|
|
|
7514
7515
|
* @method
|
|
7515
7516
|
* @name gate#setPositionMode
|
|
7516
7517
|
* @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
|
|
7517
|
-
* @see https://www.gate.
|
|
7518
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#enable-or-disable-dual-mode
|
|
7518
7519
|
* @param {bool} hedged set to true to enable dual mode
|
|
7519
7520
|
* @param {string|undefined} symbol if passed, dual mode is set for all markets with the same settle currency
|
|
7520
7521
|
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
@@ -7531,7 +7532,7 @@ export default class gate extends Exchange {
|
|
|
7531
7532
|
* @method
|
|
7532
7533
|
* @name gate#fetchUnderlyingAssets
|
|
7533
7534
|
* @description fetches the market ids of underlying assets for a specific contract market type
|
|
7534
|
-
* @see https://www.gate.
|
|
7535
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-underlyings
|
|
7535
7536
|
* @param {object} [params] exchange specific params
|
|
7536
7537
|
* @param {string} [params.type] the contract market type, 'option', 'swap' or 'future', the default is 'option'
|
|
7537
7538
|
* @returns {object[]} a list of [underlying assets]{@link https://docs.ccxt.com/#/?id=underlying-assets-structure}
|
|
@@ -7570,7 +7571,7 @@ export default class gate extends Exchange {
|
|
|
7570
7571
|
* @method
|
|
7571
7572
|
* @name gate#fetchLiquidations
|
|
7572
7573
|
* @description retrieves the public liquidations of a trading pair
|
|
7573
|
-
* @see https://www.gate.
|
|
7574
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#retrieve-liquidation-history
|
|
7574
7575
|
* @param {string} symbol unified CCXT market symbol
|
|
7575
7576
|
* @param {int} [since] the earliest time in ms to fetch liquidations for
|
|
7576
7577
|
* @param {int} [limit] the maximum number of liquidation structures to retrieve
|
|
@@ -7614,9 +7615,9 @@ export default class gate extends Exchange {
|
|
|
7614
7615
|
* @method
|
|
7615
7616
|
* @name gate#fetchMyLiquidations
|
|
7616
7617
|
* @description retrieves the users liquidated positions
|
|
7617
|
-
* @see https://www.gate.
|
|
7618
|
-
* @see https://www.gate.
|
|
7619
|
-
* @see https://www.gate.
|
|
7618
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-liquidation-history
|
|
7619
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-liquidation-history-2
|
|
7620
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-user-s-liquidation-history-of-specified-underlying
|
|
7620
7621
|
* @param {string} symbol unified CCXT market symbol
|
|
7621
7622
|
* @param {int} [since] the earliest time in ms to fetch liquidations for
|
|
7622
7623
|
* @param {int} [limit] the maximum number of liquidation structures to retrieve
|
|
@@ -7781,7 +7782,7 @@ export default class gate extends Exchange {
|
|
|
7781
7782
|
* @method
|
|
7782
7783
|
* @name gate#fetchGreeks
|
|
7783
7784
|
* @description fetches an option contracts greeks, financial metrics used to measure the factors that affect the price of an options contract
|
|
7784
|
-
* @see https://www.gate.
|
|
7785
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-tickers-of-options-contracts
|
|
7785
7786
|
* @param {string} symbol unified symbol of the market to fetch greeks for
|
|
7786
7787
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7787
7788
|
* @returns {object} a [greeks structure]{@link https://docs.ccxt.com/#/?id=greeks-structure}
|
|
@@ -7874,9 +7875,9 @@ export default class gate extends Exchange {
|
|
|
7874
7875
|
* @method
|
|
7875
7876
|
* @name gate#closePosition
|
|
7876
7877
|
* @description closes open positions for a market
|
|
7877
|
-
* @see https://www.gate.
|
|
7878
|
-
* @see https://www.gate.
|
|
7879
|
-
* @see https://www.gate.
|
|
7878
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#create-a-futures-order
|
|
7879
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#create-a-futures-order-2
|
|
7880
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#create-an-options-order
|
|
7880
7881
|
* @param {string} symbol Unified CCXT market symbol
|
|
7881
7882
|
* @param {string} side 'buy' or 'sell'
|
|
7882
7883
|
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
@@ -7896,9 +7897,9 @@ export default class gate extends Exchange {
|
|
|
7896
7897
|
* @method
|
|
7897
7898
|
* @name gate#fetchLeverage
|
|
7898
7899
|
* @description fetch the set leverage for a market
|
|
7899
|
-
* @see https://www.gate.
|
|
7900
|
-
* @see https://www.gate.
|
|
7901
|
-
* @see https://www.gate.
|
|
7900
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-unified-account-information
|
|
7901
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#get-detail-of-lending-market
|
|
7902
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#query-one-single-margin-currency-pair-deprecated
|
|
7902
7903
|
* @param {string} symbol unified market symbol
|
|
7903
7904
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
7904
7905
|
* @param {boolean} [params.unified] default false, set to true for fetching the unified accounts leverage
|
|
@@ -8006,8 +8007,8 @@ export default class gate extends Exchange {
|
|
|
8006
8007
|
* @method
|
|
8007
8008
|
* @name gate#fetchLeverages
|
|
8008
8009
|
* @description fetch the set leverage for all leverage markets, only spot margin is supported on gate
|
|
8009
|
-
* @see https://www.gate.
|
|
8010
|
-
* @see https://www.gate.
|
|
8010
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-lending-markets
|
|
8011
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-supported-currency-pairs-supported-in-margin-trading-deprecated
|
|
8011
8012
|
* @param {string[]} symbols a list of unified market symbols
|
|
8012
8013
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8013
8014
|
* @param {boolean} [params.unified] default false, set to true for fetching unified account leverages
|
|
@@ -8068,7 +8069,7 @@ export default class gate extends Exchange {
|
|
|
8068
8069
|
* @method
|
|
8069
8070
|
* @name gate#fetchOption
|
|
8070
8071
|
* @description fetches option data that is commonly found in an option chain
|
|
8071
|
-
* @see https://www.gate.
|
|
8072
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#query-specified-contract-detail
|
|
8072
8073
|
* @param {string} symbol unified market symbol
|
|
8073
8074
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8074
8075
|
* @returns {object} an [option chain structure]{@link https://docs.ccxt.com/#/?id=option-chain-structure}
|
|
@@ -8126,7 +8127,7 @@ export default class gate extends Exchange {
|
|
|
8126
8127
|
* @method
|
|
8127
8128
|
* @name gate#fetchOptionChain
|
|
8128
8129
|
* @description fetches data for an underlying asset that is commonly found in an option chain
|
|
8129
|
-
* @see https://www.gate.
|
|
8130
|
+
* @see https://www.gate.com/docs/developers/apiv4/en/#list-all-the-contracts-with-specified-underlying-and-expiration-time
|
|
8130
8131
|
* @param {string} code base currency to fetch an option chain for
|
|
8131
8132
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
8132
8133
|
* @param {string} [params.underlying] the underlying asset, can be obtained from fetchUnderlyingAssets ()
|
|
@@ -8252,8 +8253,8 @@ export default class gate extends Exchange {
|
|
|
8252
8253
|
* @method
|
|
8253
8254
|
* @name gate#fetchPositionsHistory
|
|
8254
8255
|
* @description fetches historical positions
|
|
8255
|
-
* @see https://www.gate.
|
|
8256
|
-
* @see https://www.gate.
|
|
8256
|
+
* @see https://www.gate.com/docs/developers/apiv4/#list-position-close-history
|
|
8257
|
+
* @see https://www.gate.com/docs/developers/apiv4/#list-position-close-history-2
|
|
8257
8258
|
* @param {string[]} symbols unified conract symbols, must all have the same settle currency and the same market type
|
|
8258
8259
|
* @param {int} [since] the earliest time in ms to fetch positions for
|
|
8259
8260
|
* @param {int} [limit] the maximum amount of records to fetch, default=1000
|