gateio-api 1.3.1 → 1.3.3

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.
@@ -7,7 +7,7 @@ import { GetDeliveryAutoOrdersReq, GetDeliveryBookReq, GetDeliveryCandlesReq, Ge
7
7
  import { GetStructuredProductListReq, GetStructuredProductOrdersReq } from './types/request/earn.js';
8
8
  import { GetLendingInterestRecordsReq, GetLendingOrdersReq, GetLendingRecordsReq, SubmitLendOrRedeemReq } from './types/request/earnuni.js';
9
9
  import { GetFlashSwapOrdersReq, SubmitFlashSwapOrderPreviewReq, SubmitFlashSwapOrderReq } from './types/request/flashswap.js';
10
- import { BatchAmendOrderReq, DeleteAllFuturesOrdersReq, GetFundingRatesReq, GetFuturesAccountBookReq, GetFuturesAutoOrdersReq, GetFuturesCandlesReq, GetFuturesInsuranceReq, GetFuturesLiquidationHistoryReq, GetFuturesOrderBookReq, GetFuturesOrdersByTimeRangeReq, GetFuturesOrdersReq, GetFuturesPositionCloseHistoryReq, GetFuturesPositionHistoryReq, GetFuturesPositionsReq, GetFuturesStatsReq, GetFuturesTradesReq, GetFuturesTradingHistoryByTimeRangeReq, GetFuturesTradingHistoryReq, GetLiquidationHistoryReq, GetRiskLimitTableReq, GetRiskLimitTiersReq, SubmitFuturesOrderReq, SubmitFuturesTriggeredOrderReq, UpdateDualModePositionLeverageReq, UpdateDualModePositionMarginReq, UpdateFuturesOrderReq } from './types/request/futures.js';
10
+ import { BatchAmendOrderReq, DeleteAllFuturesOrdersReq, GetFundingRatesReq, GetFuturesAccountBookReq, GetFuturesAutoOrdersReq, GetFuturesCandlesReq, GetFuturesInsuranceReq, GetFuturesLiquidationHistoryReq, GetFuturesOrderBookReq, GetFuturesOrdersByTimeRangeReq, GetFuturesOrdersReq, GetFuturesPositionCloseHistoryReq, GetFuturesPositionHistoryReq, GetFuturesPositionsReq, GetFuturesStatsReq, GetFuturesTradesReq, GetFuturesTradingHistoryByTimeRangeReq, GetFuturesTradingHistoryReq, GetLiquidationHistoryReq, GetRiskLimitTableReq, GetRiskLimitTiersReq, SubmitFuturesOrderReq, SubmitFuturesTriggeredOrderReq, UpdateDualModePositionLeverageReq, UpdateDualModePositionMarginReq, UpdateFuturesOrderReq, UpdateFuturesPriceTriggeredOrderReq } from './types/request/futures.js';
11
11
  import { GetCrossMarginAccountHistoryReq, GetCrossMarginBorrowHistoryReq, GetCrossMarginInterestRecordsReq, GetCrossMarginRepaymentsReq, GetMarginBalanceHistoryReq, SubmitCrossMarginBorrowLoanReq } from './types/request/margin.js';
12
12
  import { GetMarginUNIInterestRecordsReq, GetMarginUNILoanRecordsReq, GetMarginUNILoansReq, GetMarginUNIMaxBorrowReq } from './types/request/marginuni.js';
13
13
  import { GetMultiLoanAdjustmentRecordsReq, GetMultiLoanOrdersReq, GetMultiLoanRepayRecordsReq, RepayMultiLoanReq, SubmitMultiLoanOrderReq, UpdateMultiLoanReq } from './types/request/multicollateralLoan.js';
@@ -18,7 +18,7 @@ import { CreateSubAccountApiKeyReq, CreateSubAccountReq, UpdateSubAccountApiKeyR
18
18
  import { GetUnifiedHistoryLendingRateReq, GetUnifiedInterestRecordsReq, GetUnifiedLoanRecordsReq, GetUnifiedLoansReq, PortfolioMarginCalculatorReq, SetUnifiedAccountModeReq, SubmitUnifiedBorrowOrRepayReq, SubmitUnifiedLoanRepayReq } from './types/request/unified.js';
19
19
  import { GetMainSubTransfersReq, GetSavedAddressReq, GetSmallBalanceHistoryReq, GetWithdrawalDepositRecordsReq, ListPushOrdersReq, SubmitMainSubTransferReq, SubmitSubToSubTransferReq, SubmitTransferReq } from './types/request/wallet.js';
20
20
  import { SubmitWithdrawalReq } from './types/request/withdrawal.js';
21
- import { AccountDetail, AccountRateLimit, StpGroup, StpGroupUser } from './types/response/account.js';
21
+ import { AccountDetail, AccountMainKey, AccountRateLimit, StpGroup, StpGroupUser } from './types/response/account.js';
22
22
  import { LoanCollateralRatio, LoanCollateralRecord, LoanOrder, LoanRepaymentHistoryRecord } from './types/response/collateralloan.js';
23
23
  import { DeliveryAccount, DeliveryBook, DeliveryCandle, DeliveryClosedPosition, DeliveryLiquidationHistoryRecord, DeliveryOrderBook, DeliverySettlementHistoryRecord, DeliveryTicker, DeliveryTrade, DeliveryTradingHistoryRecord } from './types/response/delivery.js';
24
24
  import { DualInvestmentOrder, DualInvestmentProduct, StructuredProduct, StructuredProductOrder } from './types/response/earn.js';
@@ -33,7 +33,7 @@ import { AgencyCommissionHistoryRecord, AgencyTransactionHistoryRecord, BrokerCo
33
33
  import { DeleteSpotBatchOrdersResp, GetSpotOpenOrdersResp, SpotAccount, SpotAccountBook, SpotCandle, SpotCurrency, SpotFeeRates, SpotHistoricTradeRecord, SpotInsuranceHistory, SpotOrder, SpotOrderBook, SpotPriceTriggeredOrder, SpotTicker, SpotTrade, SubmitSpotBatchOrdersResp } from './types/response/spot.js';
34
34
  import { CreatedSubAccountAPIKey, SubAccount, SubAccountAPIKey, SubAccountMode } from './types/response/subaccount.js';
35
35
  import { MarginTier, PortfolioMarginCalculation, UnifiedAccountInfo, UnifiedCurrencyDiscountTiers, UnifiedHistoryLendingRate, UnifiedInterestRecord, UnifiedLoan, UnifiedLoanCurrency, UnifiedLoanRecord, UnifiedRiskUnitDetails, UserCurrencyLeverageConfig } from './types/response/unified.js';
36
- import { CreateDepositAddressResp, CurrencyChain, GetBalancesResp, PushOrder, SavedAddress, SmallBalanceHistoryRecord, SmallBalanceRecord, SubAccountCrossMarginBalancesResp, SubAccountFuturesBalancesResp, SubAccountMarginBalance, SubAccountTransferRecord, TradingFees, WithdrawalStatus } from './types/response/wallet.js';
36
+ import { CreateDepositAddressResp, CurrencyChain, DepositRecord, GetBalancesResp, PushOrder, SavedAddress, SmallBalanceHistoryRecord, SmallBalanceRecord, SubAccountCrossMarginBalancesResp, SubAccountFuturesBalancesResp, SubAccountMarginBalance, SubAccountTransferRecord, TradingFees, WithdrawalStatus } from './types/response/wallet.js';
37
37
  import { WithdrawalRecord } from './types/response/withdrawal.js';
38
38
  import { CurrencyPair, FromToPageLimit } from './types/shared.js';
39
39
  /**
@@ -95,7 +95,7 @@ export declare class RestClient extends BaseRestClient {
95
95
  * Cancel withdrawal with specified ID
96
96
  *
97
97
  * @param params Parameters containing the withdrawal ID
98
- * @returns Promise<Withdraw>
98
+ * @returns Promise<WithdrawalRecord>
99
99
  */
100
100
  cancelWithdrawal(params: {
101
101
  withdrawal_id: string;
@@ -108,7 +108,7 @@ export declare class RestClient extends BaseRestClient {
108
108
  * List chains supported for specified currency
109
109
  *
110
110
  * @param params Parameters containing the currency name
111
- * @returns Promise< GetCurrencyChainsResp[][]>
111
+ * @returns Promise<CurrencyChain[]>
112
112
  */
113
113
  getCurrencyChains(params: {
114
114
  currency: string;
@@ -137,9 +137,9 @@ export declare class RestClient extends BaseRestClient {
137
137
  * Record time range cannot exceed 30 days
138
138
  *
139
139
  * @param params Parameters for filtering deposit records
140
- * @returns Promise<Withdraw[]>
140
+ * @returns Promise<DepositRecord[]>
141
141
  */
142
- getDepositRecords(params?: GetWithdrawalDepositRecordsReq): Promise<WithdrawalRecord[]>;
142
+ getDepositRecords(params?: GetWithdrawalDepositRecordsReq): Promise<DepositRecord[]>;
143
143
  /**
144
144
  * Transfer between trading accounts
145
145
  *
@@ -205,7 +205,7 @@ export declare class RestClient extends BaseRestClient {
205
205
  * Retrieve withdrawal status
206
206
  *
207
207
  * @param params Parameters for retrieving withdrawal status
208
- * @returns Promise<GetWithdrawalStatusResp[]>
208
+ * @returns Promise<WithdrawalStatus[]>
209
209
  */
210
210
  getWithdrawalStatus(params?: {
211
211
  currency?: string;
@@ -322,6 +322,12 @@ export declare class RestClient extends BaseRestClient {
322
322
  * @returns Promise<PushOrder[]>
323
323
  */
324
324
  getPushOrders(params?: ListPushOrdersReq): Promise<PushOrder[]>;
325
+ /**
326
+ * Retrieve the list of low-liquidity or low-cap tokens
327
+ *
328
+ * @returns Promise<string[]>
329
+ */
330
+ getLowCapExchangeList(): Promise<string[]>;
325
331
  /**==========================================================================================================================
326
332
  * SUBACCOUNT
327
333
  * ==========================================================================================================================
@@ -370,6 +376,8 @@ export declare class RestClient extends BaseRestClient {
370
376
  /**
371
377
  * Update API key of the sub-account
372
378
  *
379
+ * Note: This interface cannot modify the mode account type attribute
380
+ *
373
381
  * @param params Parameters for updating API key of the sub-account
374
382
  * @returns Promise<any>
375
383
  */
@@ -432,8 +440,10 @@ export declare class RestClient extends BaseRestClient {
432
440
  *
433
441
  * The assets of each currency in the account will be adjusted according to their liquidity, defined by corresponding adjustment coefficients, and then uniformly converted to USD to calculate the total asset value and position value of the account.
434
442
  *
443
+ * For specific formulas, please refer to Margin Formula
444
+ *
435
445
  * @param params Parameters for retrieving unified account information
436
- * @returns Promise<GetUnifiedAccountInfoResp>
446
+ * @returns Promise<UnifiedAccountInfo>
437
447
  */
438
448
  getUnifiedAccountInfo(params?: {
439
449
  currency?: string;
@@ -877,9 +887,16 @@ export declare class RestClient extends BaseRestClient {
877
887
  /**
878
888
  * List personal trading history
879
889
  *
880
- * Spot, portfolio and margin trades are queried by default. If cross margin trades are needed, account must be set to cross_margin.
890
+ * By default query of transaction records for spot, unified account and warehouse-by-site leverage accounts.
891
+ *
892
+ * The history within a specified time range can be queried by specifying from or (and) to.
881
893
  *
882
- * You can also set from and/or to to query by time range. If you don't specify from and/or to parameters, only the last 7 days of data will be returned. The range of from and to is not allowed to exceed 30 days. Time range parameters are handled as order finish time.
894
+ * If no time parameters are specified, only data for the last 7 days can be obtained.
895
+ * If only any parameter of from or to is specified, only 7-day data from the start (or end) of the specified time is returned.
896
+ * The range not allowed to exceed 30 days.
897
+ * The parameters of the time range filter are processed according to the order end time.
898
+ *
899
+ * The maximum number of pages when searching data using limit&page paging function is 100,0, that is, limit * (page - 1) <= 100,0.
883
900
  *
884
901
  * @param params Parameters for listing personal trading history
885
902
  * @returns Promise<GetSpotTradingHistoryResp[]>
@@ -1527,6 +1544,8 @@ export declare class RestClient extends BaseRestClient {
1527
1544
  /**
1528
1545
  * Query futures account
1529
1546
  *
1547
+ * Query account information for classic future account and unified account
1548
+ *
1530
1549
  * @param params Parameters for querying futures account
1531
1550
  * @returns Promise<GetFuturesAccountResp>
1532
1551
  */
@@ -1552,6 +1571,8 @@ export declare class RestClient extends BaseRestClient {
1552
1571
  /**
1553
1572
  * Get single position
1554
1573
  *
1574
+ * Clarifies dual-position query method when holding both long and short positions in the same contract market
1575
+ *
1555
1576
  * @param params Parameters for retrieving a single position
1556
1577
  * @returns Promise<Position>
1557
1578
  */
@@ -1562,6 +1583,8 @@ export declare class RestClient extends BaseRestClient {
1562
1583
  /**
1563
1584
  * Update position margin
1564
1585
  *
1586
+ * Under the new risk limit rules, the position limit is related to the leverage you set; a lower leverage will result in a higher position limit. Please use the leverage adjustment api to adjust the position limit.
1587
+ *
1565
1588
  * @param params Parameters for updating position margin
1566
1589
  * @returns Promise<Position>
1567
1590
  */
@@ -1573,6 +1596,17 @@ export declare class RestClient extends BaseRestClient {
1573
1596
  /**
1574
1597
  * Update position leverage
1575
1598
  *
1599
+ * Position Mode Switching Rules:
1600
+ * - leverage ≠ 0: Isolated Margin Mode (Regardless of whether cross_leverage_limit is filled, this parameter will be ignored)
1601
+ * - leverage = 0: Cross Margin Mode (Use cross_leverage_limit to set the leverage multiple)
1602
+ *
1603
+ * Examples:
1604
+ * - Set isolated margin with 10x leverage: leverage=10
1605
+ * - Set cross margin with 10x leverage: leverage=0&cross_leverage_limit=10
1606
+ * - leverage=5&cross_leverage_limit=10 → Result: Isolated margin with 5x leverage (cross_leverage_limit is ignored)
1607
+ *
1608
+ * Warning: Incorrect settings may cause unexpected position mode switching, affecting risk management.
1609
+ *
1576
1610
  * @param params Parameters for updating position leverage
1577
1611
  * @returns Promise<Position>
1578
1612
  */
@@ -1581,6 +1615,7 @@ export declare class RestClient extends BaseRestClient {
1581
1615
  contract: string;
1582
1616
  leverage: string;
1583
1617
  cross_leverage_limit?: string;
1618
+ pid?: number;
1584
1619
  }): Promise<FuturesPosition>;
1585
1620
  /**
1586
1621
  * Update position by store mode
@@ -1646,6 +1681,14 @@ export declare class RestClient extends BaseRestClient {
1646
1681
  * @param params Parameters for updating position risk limit in dual mode
1647
1682
  * @returns Promise<Position[]>
1648
1683
  */
1684
+ /**
1685
+ * Update position risk limit in dual mode
1686
+ *
1687
+ * See risk limit rules for more information
1688
+ *
1689
+ * @param params Parameters for updating position risk limit in dual mode
1690
+ * @returns Promise<FuturesPosition[]>
1691
+ */
1649
1692
  updateDualModePositionRiskLimit(params: {
1650
1693
  settle: 'btc' | 'usdt' | 'usd';
1651
1694
  contract: string;
@@ -1901,6 +1944,15 @@ export declare class RestClient extends BaseRestClient {
1901
1944
  settle: 'btc' | 'usdt' | 'usd';
1902
1945
  order_id: string;
1903
1946
  }): Promise<FuturesPriceTriggeredOrder>;
1947
+ /**
1948
+ * Update a single price-triggered order
1949
+ *
1950
+ * @param params Parameters for updating a price-triggered order
1951
+ * @returns Promise<{ id: number }>
1952
+ */
1953
+ updateFuturesPriceTriggeredOrder(params: UpdateFuturesPriceTriggeredOrderReq): Promise<{
1954
+ id: number;
1955
+ }>;
1904
1956
  getFuturesPositionCloseHistory(params: GetFuturesPositionCloseHistoryReq): Promise<FuturesPositionHistoryRecord[]>;
1905
1957
  getFuturesInsuranceHistory(params: GetFuturesInsuranceReq): Promise<FuturesInsuranceHistory[]>;
1906
1958
  /**==========================================================================================================================
@@ -2298,6 +2350,8 @@ export declare class RestClient extends BaseRestClient {
2298
2350
  /**
2299
2351
  * List options account
2300
2352
  *
2353
+ * Indicates support for querying both classic options accounts and unified accounts
2354
+ *
2301
2355
  * @returns Promise<GetOptionsAccountResp>
2302
2356
  */
2303
2357
  getOptionsAccount(): Promise<OptionsAccount>;
@@ -2761,9 +2815,8 @@ export declare class RestClient extends BaseRestClient {
2761
2815
  * ==========================================================================================================================
2762
2816
  */
2763
2817
  /**
2764
- * ETH2 swap
2765
- *
2766
- * @param params Parameters for ETH2 swap
2818
+ * ETH swap (formerly ETH2 swap)
2819
+ * @param params Parameters for ETH swap (1 - ETH to GTETH, 2 - GTETH to ETH)
2767
2820
  * @returns Promise<any>
2768
2821
  */
2769
2822
  submitEth2Swap(params: {
@@ -2771,9 +2824,7 @@ export declare class RestClient extends BaseRestClient {
2771
2824
  amount: string;
2772
2825
  }): Promise<any>;
2773
2826
  /**
2774
- * Get ETH2 historical rate of return data
2775
- *
2776
- * Returns the ETH earnings rate record for the last 31 days
2827
+ * Get GTETH historical rate of return data (formerly ETH2)
2777
2828
  *
2778
2829
  * @returns Promise<Array<{date_time: number, date: string, rate: string}>>
2779
2830
  */
@@ -2936,6 +2987,12 @@ export declare class RestClient extends BaseRestClient {
2936
2987
  getGTDeduction(): Promise<{
2937
2988
  enabled: boolean;
2938
2989
  }>;
2990
+ /**
2991
+ * Query all main account API key information
2992
+ *
2993
+ * @returns Promise<AccountMainKey[]>
2994
+ */
2995
+ getAccountMainKeys(): Promise<AccountMainKey[]>;
2939
2996
  /**==========================================================================================================================
2940
2997
  * REBATES
2941
2998
  * ==========================================================================================================================
@@ -101,7 +101,7 @@ class RestClient extends BaseRestClient_js_1.BaseRestClient {
101
101
  * Cancel withdrawal with specified ID
102
102
  *
103
103
  * @param params Parameters containing the withdrawal ID
104
- * @returns Promise<Withdraw>
104
+ * @returns Promise<WithdrawalRecord>
105
105
  */
106
106
  cancelWithdrawal(params) {
107
107
  return this.deletePrivate(`/withdrawals/${params.withdrawal_id}`);
@@ -114,7 +114,7 @@ class RestClient extends BaseRestClient_js_1.BaseRestClient {
114
114
  * List chains supported for specified currency
115
115
  *
116
116
  * @param params Parameters containing the currency name
117
- * @returns Promise< GetCurrencyChainsResp[][]>
117
+ * @returns Promise<CurrencyChain[]>
118
118
  */
119
119
  getCurrencyChains(params) {
120
120
  return this.get('/wallet/currency_chains', params);
@@ -145,7 +145,7 @@ class RestClient extends BaseRestClient_js_1.BaseRestClient {
145
145
  * Record time range cannot exceed 30 days
146
146
  *
147
147
  * @param params Parameters for filtering deposit records
148
- * @returns Promise<Withdraw[]>
148
+ * @returns Promise<DepositRecord[]>
149
149
  */
150
150
  getDepositRecords(params) {
151
151
  return this.getPrivate('/wallet/deposits', params);
@@ -219,7 +219,7 @@ class RestClient extends BaseRestClient_js_1.BaseRestClient {
219
219
  * Retrieve withdrawal status
220
220
  *
221
221
  * @param params Parameters for retrieving withdrawal status
222
- * @returns Promise<GetWithdrawalStatusResp[]>
222
+ * @returns Promise<WithdrawalStatus[]>
223
223
  */
224
224
  getWithdrawalStatus(params) {
225
225
  return this.getPrivate('/wallet/withdraw_status', params);
@@ -333,6 +333,14 @@ class RestClient extends BaseRestClient_js_1.BaseRestClient {
333
333
  getPushOrders(params) {
334
334
  return this.getPrivate('/wallet/push', params);
335
335
  }
336
+ /**
337
+ * Retrieve the list of low-liquidity or low-cap tokens
338
+ *
339
+ * @returns Promise<string[]>
340
+ */
341
+ getLowCapExchangeList() {
342
+ return this.getPrivate('/wallet/getLowCapExchangeList');
343
+ }
336
344
  /**==========================================================================================================================
337
345
  * SUBACCOUNT
338
346
  * ==========================================================================================================================
@@ -386,6 +394,8 @@ class RestClient extends BaseRestClient_js_1.BaseRestClient {
386
394
  /**
387
395
  * Update API key of the sub-account
388
396
  *
397
+ * Note: This interface cannot modify the mode account type attribute
398
+ *
389
399
  * @param params Parameters for updating API key of the sub-account
390
400
  * @returns Promise<any>
391
401
  */
@@ -451,8 +461,10 @@ class RestClient extends BaseRestClient_js_1.BaseRestClient {
451
461
  *
452
462
  * The assets of each currency in the account will be adjusted according to their liquidity, defined by corresponding adjustment coefficients, and then uniformly converted to USD to calculate the total asset value and position value of the account.
453
463
  *
464
+ * For specific formulas, please refer to Margin Formula
465
+ *
454
466
  * @param params Parameters for retrieving unified account information
455
- * @returns Promise<GetUnifiedAccountInfoResp>
467
+ * @returns Promise<UnifiedAccountInfo>
456
468
  */
457
469
  getUnifiedAccountInfo(params) {
458
470
  return this.getPrivate('/unified/accounts', params);
@@ -967,9 +979,16 @@ class RestClient extends BaseRestClient_js_1.BaseRestClient {
967
979
  /**
968
980
  * List personal trading history
969
981
  *
970
- * Spot, portfolio and margin trades are queried by default. If cross margin trades are needed, account must be set to cross_margin.
982
+ * By default query of transaction records for spot, unified account and warehouse-by-site leverage accounts.
983
+ *
984
+ * The history within a specified time range can be queried by specifying from or (and) to.
971
985
  *
972
- * You can also set from and/or to to query by time range. If you don't specify from and/or to parameters, only the last 7 days of data will be returned. The range of from and to is not allowed to exceed 30 days. Time range parameters are handled as order finish time.
986
+ * If no time parameters are specified, only data for the last 7 days can be obtained.
987
+ * If only any parameter of from or to is specified, only 7-day data from the start (or end) of the specified time is returned.
988
+ * The range not allowed to exceed 30 days.
989
+ * The parameters of the time range filter are processed according to the order end time.
990
+ *
991
+ * The maximum number of pages when searching data using limit&page paging function is 100,0, that is, limit * (page - 1) <= 100,0.
973
992
  *
974
993
  * @param params Parameters for listing personal trading history
975
994
  * @returns Promise<GetSpotTradingHistoryResp[]>
@@ -1636,6 +1655,8 @@ class RestClient extends BaseRestClient_js_1.BaseRestClient {
1636
1655
  /**
1637
1656
  * Query futures account
1638
1657
  *
1658
+ * Query account information for classic future account and unified account
1659
+ *
1639
1660
  * @param params Parameters for querying futures account
1640
1661
  * @returns Promise<GetFuturesAccountResp>
1641
1662
  */
@@ -1667,6 +1688,8 @@ class RestClient extends BaseRestClient_js_1.BaseRestClient {
1667
1688
  /**
1668
1689
  * Get single position
1669
1690
  *
1691
+ * Clarifies dual-position query method when holding both long and short positions in the same contract market
1692
+ *
1670
1693
  * @param params Parameters for retrieving a single position
1671
1694
  * @returns Promise<Position>
1672
1695
  */
@@ -1676,6 +1699,8 @@ class RestClient extends BaseRestClient_js_1.BaseRestClient {
1676
1699
  /**
1677
1700
  * Update position margin
1678
1701
  *
1702
+ * Under the new risk limit rules, the position limit is related to the leverage you set; a lower leverage will result in a higher position limit. Please use the leverage adjustment api to adjust the position limit.
1703
+ *
1679
1704
  * @param params Parameters for updating position margin
1680
1705
  * @returns Promise<Position>
1681
1706
  */
@@ -1688,6 +1713,17 @@ class RestClient extends BaseRestClient_js_1.BaseRestClient {
1688
1713
  /**
1689
1714
  * Update position leverage
1690
1715
  *
1716
+ * Position Mode Switching Rules:
1717
+ * - leverage ≠ 0: Isolated Margin Mode (Regardless of whether cross_leverage_limit is filled, this parameter will be ignored)
1718
+ * - leverage = 0: Cross Margin Mode (Use cross_leverage_limit to set the leverage multiple)
1719
+ *
1720
+ * Examples:
1721
+ * - Set isolated margin with 10x leverage: leverage=10
1722
+ * - Set cross margin with 10x leverage: leverage=0&cross_leverage_limit=10
1723
+ * - leverage=5&cross_leverage_limit=10 → Result: Isolated margin with 5x leverage (cross_leverage_limit is ignored)
1724
+ *
1725
+ * Warning: Incorrect settings may cause unexpected position mode switching, affecting risk management.
1726
+ *
1691
1727
  * @param params Parameters for updating position leverage
1692
1728
  * @returns Promise<Position>
1693
1729
  */
@@ -1766,6 +1802,14 @@ class RestClient extends BaseRestClient_js_1.BaseRestClient {
1766
1802
  * @param params Parameters for updating position risk limit in dual mode
1767
1803
  * @returns Promise<Position[]>
1768
1804
  */
1805
+ /**
1806
+ * Update position risk limit in dual mode
1807
+ *
1808
+ * See risk limit rules for more information
1809
+ *
1810
+ * @param params Parameters for updating position risk limit in dual mode
1811
+ * @returns Promise<FuturesPosition[]>
1812
+ */
1769
1813
  updateDualModePositionRiskLimit(params) {
1770
1814
  const { settle, contract, ...query } = params;
1771
1815
  return this.postPrivate(`/futures/${settle}/dual_comp/positions/${contract}/risk_limit`, { query: query });
@@ -2092,6 +2136,18 @@ class RestClient extends BaseRestClient_js_1.BaseRestClient {
2092
2136
  cancelFuturesPriceTriggeredOrder(params) {
2093
2137
  return this.deletePrivate(`/futures/${params.settle}/price_orders/${params.order_id}`);
2094
2138
  }
2139
+ /**
2140
+ * Update a single price-triggered order
2141
+ *
2142
+ * @param params Parameters for updating a price-triggered order
2143
+ * @returns Promise<{ id: number }>
2144
+ */
2145
+ updateFuturesPriceTriggeredOrder(params) {
2146
+ const { settle, order_id, ...body } = params;
2147
+ return this.putPrivate(`/futures/${settle}/price_orders/${order_id}`, {
2148
+ body: body,
2149
+ });
2150
+ }
2095
2151
  getFuturesPositionCloseHistory(params) {
2096
2152
  return this.getPrivate(`/futures/${params.settle}/position_close_history`, params);
2097
2153
  }
@@ -2526,6 +2582,8 @@ class RestClient extends BaseRestClient_js_1.BaseRestClient {
2526
2582
  /**
2527
2583
  * List options account
2528
2584
  *
2585
+ * Indicates support for querying both classic options accounts and unified accounts
2586
+ *
2529
2587
  * @returns Promise<GetOptionsAccountResp>
2530
2588
  */
2531
2589
  getOptionsAccount() {
@@ -3001,18 +3059,15 @@ class RestClient extends BaseRestClient_js_1.BaseRestClient {
3001
3059
  * ==========================================================================================================================
3002
3060
  */
3003
3061
  /**
3004
- * ETH2 swap
3005
- *
3006
- * @param params Parameters for ETH2 swap
3062
+ * ETH swap (formerly ETH2 swap)
3063
+ * @param params Parameters for ETH swap (1 - ETH to GTETH, 2 - GTETH to ETH)
3007
3064
  * @returns Promise<any>
3008
3065
  */
3009
3066
  submitEth2Swap(params) {
3010
3067
  return this.postPrivate('/earn/staking/eth2/swap', { body: params });
3011
3068
  }
3012
3069
  /**
3013
- * Get ETH2 historical rate of return data
3014
- *
3015
- * Returns the ETH earnings rate record for the last 31 days
3070
+ * Get GTETH historical rate of return data (formerly ETH2)
3016
3071
  *
3017
3072
  * @returns Promise<Array<{date_time: number, date: string, rate: string}>>
3018
3073
  */
@@ -3181,6 +3236,14 @@ class RestClient extends BaseRestClient_js_1.BaseRestClient {
3181
3236
  getGTDeduction() {
3182
3237
  return this.getPrivate('/account/debit_fee');
3183
3238
  }
3239
+ /**
3240
+ * Query all main account API key information
3241
+ *
3242
+ * @returns Promise<AccountMainKey[]>
3243
+ */
3244
+ getAccountMainKeys() {
3245
+ return this.getPrivate('/account/main_keys');
3246
+ }
3184
3247
  /**==========================================================================================================================
3185
3248
  * REBATES
3186
3249
  * ==========================================================================================================================