gateio-api 1.3.5 → 1.4.1

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.
Files changed (61) hide show
  1. package/README.md +49 -6
  2. package/dist/cjs/RestClient.d.ts +448 -0
  3. package/dist/cjs/RestClient.js +540 -0
  4. package/dist/cjs/RestClient.js.map +1 -1
  5. package/dist/cjs/index.d.ts +6 -0
  6. package/dist/cjs/index.js +6 -0
  7. package/dist/cjs/index.js.map +1 -1
  8. package/dist/cjs/lib/BaseRestClient.js +4 -1
  9. package/dist/cjs/lib/BaseRestClient.js.map +1 -1
  10. package/dist/cjs/lib/websocket/WsStore.d.ts +1 -1
  11. package/dist/cjs/lib/websocket/WsStore.js +21 -2
  12. package/dist/cjs/lib/websocket/WsStore.js.map +1 -1
  13. package/dist/cjs/types/request/alpha.d.ts +47 -0
  14. package/dist/cjs/types/request/alpha.js +7 -0
  15. package/dist/cjs/types/request/alpha.js.map +1 -0
  16. package/dist/cjs/types/request/crossex.d.ts +146 -0
  17. package/dist/cjs/types/request/crossex.js +7 -0
  18. package/dist/cjs/types/request/crossex.js.map +1 -0
  19. package/dist/cjs/types/request/otc.d.ts +60 -0
  20. package/dist/cjs/types/request/otc.js +7 -0
  21. package/dist/cjs/types/request/otc.js.map +1 -0
  22. package/dist/cjs/types/response/alpha.d.ts +71 -0
  23. package/dist/cjs/types/response/alpha.js +7 -0
  24. package/dist/cjs/types/response/alpha.js.map +1 -0
  25. package/dist/cjs/types/response/crossex.d.ts +325 -0
  26. package/dist/cjs/types/response/crossex.js +7 -0
  27. package/dist/cjs/types/response/crossex.js.map +1 -0
  28. package/dist/cjs/types/response/otc.d.ts +144 -0
  29. package/dist/cjs/types/response/otc.js +7 -0
  30. package/dist/cjs/types/response/otc.js.map +1 -0
  31. package/dist/mjs/RestClient.d.ts +448 -0
  32. package/dist/mjs/RestClient.js +540 -0
  33. package/dist/mjs/RestClient.js.map +1 -1
  34. package/dist/mjs/index.d.ts +6 -0
  35. package/dist/mjs/index.js +6 -0
  36. package/dist/mjs/index.js.map +1 -1
  37. package/dist/mjs/lib/BaseRestClient.js +4 -1
  38. package/dist/mjs/lib/BaseRestClient.js.map +1 -1
  39. package/dist/mjs/lib/websocket/WsStore.d.ts +1 -1
  40. package/dist/mjs/lib/websocket/WsStore.js +21 -2
  41. package/dist/mjs/lib/websocket/WsStore.js.map +1 -1
  42. package/dist/mjs/types/request/alpha.d.ts +47 -0
  43. package/dist/mjs/types/request/alpha.js +6 -0
  44. package/dist/mjs/types/request/alpha.js.map +1 -0
  45. package/dist/mjs/types/request/crossex.d.ts +146 -0
  46. package/dist/mjs/types/request/crossex.js +6 -0
  47. package/dist/mjs/types/request/crossex.js.map +1 -0
  48. package/dist/mjs/types/request/otc.d.ts +60 -0
  49. package/dist/mjs/types/request/otc.js +6 -0
  50. package/dist/mjs/types/request/otc.js.map +1 -0
  51. package/dist/mjs/types/response/alpha.d.ts +71 -0
  52. package/dist/mjs/types/response/alpha.js +6 -0
  53. package/dist/mjs/types/response/alpha.js.map +1 -0
  54. package/dist/mjs/types/response/crossex.d.ts +325 -0
  55. package/dist/mjs/types/response/crossex.js +6 -0
  56. package/dist/mjs/types/response/crossex.js.map +1 -0
  57. package/dist/mjs/types/response/otc.d.ts +144 -0
  58. package/dist/mjs/types/response/otc.js +6 -0
  59. package/dist/mjs/types/response/otc.js.map +1 -0
  60. package/llms.txt +8131 -5712
  61. package/package.json +1 -1
package/README.md CHANGED
@@ -26,9 +26,12 @@ Updated & performant JavaScript & Node.js SDK for the Gate.com (gate.io) REST AP
26
26
  - Strongly typed requests and responses.
27
27
  - Automated end-to-end tests ensuring reliability.
28
28
  - Actively maintained with a modern, promise-driven interface.
29
- - Gate.com REST APIs for Gate.com Spot, Margin, Perpetual Futures, Delivery Futures, Options & Announcements APIs.
29
+ - Gate.com REST APIs for Gate.com Spot, Margin, Perpetual Futures, Delivery Futures, Options, CrossEx, Alpha & OTC Trading APIs.
30
30
  - Unified RestClient for all Gate.com trading products.
31
31
  - Strongly typed on most requests and responses.
32
+ - Support for Cross-Exchange (CrossEx) trading across multiple exchanges
33
+ - Support for Alpha account trading (meme tokens and new listings)
34
+ - Support for OTC (fiat and stablecoin) trading
32
35
  - Support for seamless API authentication for private Gate.com REST API and WebSocket calls.
33
36
  - Robust WebSocket integration with configurable connection heartbeats & automatic reconnect then resubscribe workflows.
34
37
  - Event driven messaging.
@@ -36,8 +39,8 @@ Updated & performant JavaScript & Node.js SDK for the Gate.com (gate.io) REST AP
36
39
  - Automatically handle silent websocket disconnections through timed heartbeats, including the scheduled 24hr disconnect.
37
40
  - Automatically handle listenKey persistence and expiration/refresh.
38
41
  - Emit `reconnected` event when dropped connection is restored.
39
- - Support for Gate.com Spot, Margin, Perpetual Futures, Delivery Futures & Options.
40
- - WebSocket API for Gate.com Spot, Margin, Perpetual Futures & Delivery Futures.
42
+ - Support for Gate.com Spot, Margin, Perpetual Futures, Delivery Futures, Options, CrossEx, Alpha & OTC.
43
+ - WebSocket API for Gate.com Spot, Margin, Perpetual Futures, Delivery Futures & CrossEx.
41
44
  - Automatic connectivity via existing WebsocketClient, just call sendWSAPIRequest to trigger a request.
42
45
  - Automatic authentication, just call sendWSAPIRequest with channel & parameters.
43
46
  - Choose between two interfaces for WS API communication:
@@ -124,6 +127,9 @@ Most methods accept JS objects. These can be populated using parameters specifie
124
127
  - [Margin Trading API](https://www.gate.com/docs/developers/apiv4/en/#margin-new)
125
128
  - [Futures Trading API](https://www.gate.com/docs/developers/apiv4/en/#futures-new)
126
129
  - [Options Trading API](https://www.gate.com/docs/developers/apiv4/en/#options-new)
130
+ - [CrossEx Trading API](https://www.gate.com/docs/developers/apiv4/en/#crossex)
131
+ - [Alpha Trading API](https://www.gate.com/docs/developers/apiv4/en/#alpha)
132
+ - [OTC Trading API](https://www.gate.com/docs/developers/apiv4/en/#otc)
127
133
  - [WebSocket API](https://www.gate.com/docs/developers/apiv4/en/#websocket-api)
128
134
  - [REST Endpoint Function List](./docs/endpointFunctionList.md)
129
135
  - [TSDoc Documentation (autogenerated using typedoc)](https://tsdocs.dev/docs/gateio-api)
@@ -145,7 +151,7 @@ Create API credentials on Gate.com's website:
145
151
 
146
152
  ## REST API
147
153
 
148
- The SDK provides a unified `RestClient` for all Gate.com trading products including Spot, Margin, Perpetual Futures, Delivery Futures, and Options. This single client handles all REST API operations across all trading markets.
154
+ The SDK provides a unified `RestClient` for all Gate.com trading products including Spot, Margin, Perpetual Futures, Delivery Futures, Options, CrossEx, Alpha, and OTC Trading. This single client handles all REST API operations across all trading markets.
149
155
 
150
156
  To use any of Gate.com's REST APIs in JavaScript/TypeScript/Node.js, import (or require) the `RestClient`:
151
157
 
@@ -160,6 +166,7 @@ const client = new RestClient({
160
166
  apiSecret: PRIVATE_KEY,
161
167
  });
162
168
 
169
+ // Spot Trading Example
163
170
  client
164
171
  .getSpotTicker()
165
172
  .then((result) => {
@@ -171,8 +178,8 @@ client
171
178
 
172
179
  client
173
180
  .getSpotOrders({
174
- currency_pair: 'BTC_USDT', // Specify the currency pair
175
- status: 'open', // Specify the status of the orders to fetch
181
+ currency_pair: 'BTC_USDT',
182
+ status: 'open',
176
183
  })
177
184
  .then((result) => {
178
185
  console.log('getSpotOrders result: ', result);
@@ -180,6 +187,42 @@ client
180
187
  .catch((err) => {
181
188
  console.error('getSpotOrders error: ', err);
182
189
  });
190
+
191
+ // CrossEx Trading Example - Trade across multiple exchanges
192
+ client
193
+ .getCrossExSymbols()
194
+ .then((result) => {
195
+ console.log('CrossEx symbols: ', result);
196
+ })
197
+ .catch((err) => {
198
+ console.error('CrossEx error: ', err);
199
+ });
200
+
201
+ // Alpha Trading Example - Trade meme tokens and new listings
202
+ client
203
+ .getAlphaCurrencies()
204
+ .then((result) => {
205
+ console.log('Alpha currencies: ', result);
206
+ })
207
+ .catch((err) => {
208
+ console.error('Alpha error: ', err);
209
+ });
210
+
211
+ // OTC Trading Example - Fiat and stablecoin trading
212
+ client
213
+ .createOTCQuote({
214
+ side: 'BUY',
215
+ pay_coin: 'USDT',
216
+ get_coin: 'USD',
217
+ pay_amount: '1000',
218
+ create_quote_token: '1',
219
+ })
220
+ .then((result) => {
221
+ console.log('OTC quote: ', result);
222
+ })
223
+ .catch((err) => {
224
+ console.error('OTC error: ', err);
225
+ });
183
226
  ```
184
227
 
185
228
  See [RestClient](./src/RestClient.ts) for further information, or the [examples](./examples/) for lots of usage examples.
@@ -2,7 +2,9 @@ import { AxiosRequestConfig } from 'axios';
2
2
  import { BaseRestClient, RestClientType } from './lib/BaseRestClient.js';
3
3
  import { RestClientOptions } from './lib/requestUtils.js';
4
4
  import { CreateStpGroupReq } from './types/request/account.js';
5
+ import { CreateAlphaOrderReq, CreateAlphaQuoteReq, GetAlphaAccountBookReq, GetAlphaCurrenciesReq, GetAlphaOrderReq, GetAlphaOrdersReq, GetAlphaTickersReq } from './types/request/alpha.js';
5
6
  import { GetLoanCollateralRecordsReq, GetLoanOrdersReq, GetLoanRepaymentHistoryReq, SubmitLoanOrderReq, UpdateLoanCollateralReq } from './types/request/collateralLoan.js';
7
+ import { CloseCrossExPositionReq, CreateCrossExConvertOrderReq, CreateCrossExConvertQuoteReq, CreateCrossExOrderReq, CreateCrossExTransferReq, GetCrossExAccountBookReq, GetCrossExAccountsReq, GetCrossExAdlRankReq, GetCrossExCoinDiscountRateReq, GetCrossExHistoryMarginInterestsReq, GetCrossExHistoryMarginPositionsReq, GetCrossExHistoryOrdersReq, GetCrossExHistoryPositionsReq, GetCrossExHistoryTradesReq, GetCrossExInterestRateReq, GetCrossExMarginPositionLeverageReq, GetCrossExMarginPositionsReq, GetCrossExOpenOrdersReq, GetCrossExPositionLeverageReq, GetCrossExPositionsReq, GetCrossExRiskLimitsReq, GetCrossExSymbolsReq, GetCrossExTransferCoinsReq, GetCrossExTransferHistoryReq, ModifyCrossExOrderReq, SetCrossExMarginPositionLeverageReq, SetCrossExPositionLeverageReq, UpdateCrossExAccountReq } from './types/request/crossex.js';
6
8
  import { GetDeliveryAutoOrdersReq, GetDeliveryBookReq, GetDeliveryCandlesReq, GetDeliveryClosedPositionsReq, GetDeliveryLiquidationHistoryReq, GetDeliveryOrderBookReq, GetDeliveryOrdersReq, GetDeliverySettlementHistoryReq, GetDeliveryTradesReq, GetDeliveryTradingHistoryReq, SubmitDeliveryFuturesOrderReq } from './types/request/delivery.js';
7
9
  import { GetStructuredProductListReq, GetStructuredProductOrdersReq } from './types/request/earn.js';
8
10
  import { GetLendingInterestRecordsReq, GetLendingOrdersReq, GetLendingRecordsReq, SubmitLendOrRedeemReq } from './types/request/earnuni.js';
@@ -12,6 +14,7 @@ import { GetCrossMarginAccountHistoryReq, GetCrossMarginBorrowHistoryReq, GetCro
12
14
  import { GetMarginUNIInterestRecordsReq, GetMarginUNILoanRecordsReq, GetMarginUNILoansReq, GetMarginUNIMaxBorrowReq } from './types/request/marginuni.js';
13
15
  import { GetMultiLoanAdjustmentRecordsReq, GetMultiLoanOrdersReq, GetMultiLoanRepayRecordsReq, RepayMultiLoanReq, SubmitMultiLoanOrderReq, UpdateMultiLoanReq } from './types/request/multicollateralLoan.js';
14
16
  import { GetOptionsAccountChangeReq, GetOptionsCandlesReq, GetOptionsMySettlementsReq, GetOptionsOrderBookReq, GetOptionsOrdersReq, GetOptionsPersonalHistoryReq, GetOptionsSettlementHistoryReq, GetOptionsTradesReq, GetOptionsUnderlyingCandlesReq, OptionsMMPSettingsReq, SubmitOptionsOrderReq } from './types/request/options.js';
17
+ import { CancelOTCOrderReq, CreateOTCFiatOrderReq, CreateOTCQuoteReq, CreateOTCStablecoinOrderReq, GetOTCFiatOrderDetailReq, GetOTCFiatOrderListReq, GetOTCStablecoinOrderListReq, MarkOTCOrderAsPaidReq } from './types/request/otc.js';
15
18
  import { GetAgencyCommissionHistoryReq, GetAgencyTransactionHistoryReq, GetBrokerCommissionHistoryReq, GetBrokerTransactionHistoryReq, GetPartnerSubordinateListReq, PartnerTransactionReq } from './types/request/rebate.js';
16
19
  import { CancelSpotBatchOrdersReq, DeleteSpotOrderReq, GetSpotAccountBookReq, GetSpotAutoOrdersReq, GetSpotCandlesReq, GetSpotInsuranceHistoryReq, GetSpotOrderBookReq, GetSpotOrderReq, GetSpotOrdersReq, GetSpotTradesReq, GetSpotTradingHistoryReq, SubmitSpotClosePosCrossDisabledReq, SubmitSpotOrderReq, UpdateSpotBatchOrdersReq, UpdateSpotOrderReq } from './types/request/spot.js';
17
20
  import { CreateSubAccountApiKeyReq, CreateSubAccountReq, UpdateSubAccountApiKeyReq } from './types/request/subaccount.js';
@@ -19,7 +22,9 @@ import { GetUnifiedHistoryLendingRateReq, GetUnifiedInterestRecordsReq, GetUnifi
19
22
  import { GetMainSubTransfersReq, GetSavedAddressReq, GetSmallBalanceHistoryReq, GetWithdrawalDepositRecordsReq, ListPushOrdersReq, SubmitMainSubTransferReq, SubmitSubToSubTransferReq, SubmitTransferReq } from './types/request/wallet.js';
20
23
  import { SubmitWithdrawalReq } from './types/request/withdrawal.js';
21
24
  import { AccountDetail, AccountMainKey, AccountRateLimit, StpGroup, StpGroupUser } from './types/response/account.js';
25
+ import { AlphaAccount, AlphaAccountBook, AlphaCurrency, AlphaOrder, AlphaTicker, CreateAlphaOrderResp, CreateAlphaQuoteResp } from './types/response/alpha.js';
22
26
  import { LoanCollateralRatio, LoanCollateralRecord, LoanOrder, LoanRepaymentHistoryRecord } from './types/response/collateralloan.js';
27
+ import { CancelCrossExOrderResp, CloseCrossExPositionResp, CreateCrossExConvertQuoteResp, CreateCrossExOrderResp, CreateCrossExTransferResp, CrossExAccount, CrossExAccountBook, CrossExAdlRank, CrossExCoinDiscountRate, CrossExFeeRate, CrossExHistoryMarginInterest, CrossExHistoryMarginPosition, CrossExHistoryPosition, CrossExHistoryTrade, CrossExInterestRate, CrossExMarginPosition, CrossExMarginPositionLeverage, CrossExOrder, CrossExPosition, CrossExPositionLeverage, CrossExRiskLimit, CrossExSymbol, CrossExTransferCoin, CrossExTransferHistory, ModifyCrossExOrderResp, SetCrossExMarginPositionLeverageResp, SetCrossExPositionLeverageResp, UpdateCrossExAccountResp } from './types/response/crossex.js';
23
28
  import { DeliveryAccount, DeliveryBook, DeliveryCandle, DeliveryClosedPosition, DeliveryLiquidationHistoryRecord, DeliveryOrderBook, DeliverySettlementHistoryRecord, DeliveryTicker, DeliveryTrade, DeliveryTradingHistoryRecord } from './types/response/delivery.js';
24
29
  import { DualInvestmentOrder, DualInvestmentProduct, StructuredProduct, StructuredProductOrder } from './types/response/earn.js';
25
30
  import { LendingCurrency, LendingInterestRecord, LendingOrder, LendingRecord } from './types/response/earnuni.js';
@@ -29,6 +34,7 @@ import { CrossMarginAccount, CrossMarginAccountHistoryRecord, CrossMarginCurrenc
29
34
  import { LendingMarket, MarginUNIInterestRecord, MarginUNILoan, MarginUNILoanRecord, MarginUNIMaxBorrowable } from './types/response/marginuni.js';
30
35
  import { MultiLoanAdjustmentRecord, MultiLoanCurrencyQuota, MultiLoanFixedRate, MultiLoanOrder, MultiLoanRatio, MultiLoanRepayRecord, MultiLoanSupportedCurrencies, RepayMultiLoanResp, UpdateMultiLoanResp } from './types/response/multicollateralLoan.js';
31
36
  import { GetOptionsLiquidationResp, OptionsAccount, OptionsAccountChangeRecord, OptionsCandle, OptionsContract, OptionsMMPSettings, OptionsOrderBook, OptionsPositionsUnderlying, OptionsSettlementHistoryRecord, OptionsTicker, OptionsTrade, OptionsUnderlyingCandle, OptionsUserHistoryRecord, OptionsUserSettlement, SubmitOptionsOrderResp } from './types/response/options.js';
37
+ import { CancelOTCOrderResp, CreateOTCFiatOrderResp, CreateOTCQuoteResp, CreateOTCStablecoinOrderResp, GetOTCFiatOrderDetailResp, GetOTCFiatOrderListResp, GetOTCStablecoinOrderListResp, GetOTCUserDefaultBankResp, MarkOTCOrderAsPaidResp } from './types/response/otc.js';
32
38
  import { AgencyCommissionHistoryRecord, AgencyTransactionHistoryRecord, BrokerCommissionHistoryRecord, BrokerTransactionHistoryRecord, PartnerCommission, PartnerSubordinate, PartnerTransaction } from './types/response/rebate.js';
33
39
  import { DeleteSpotBatchOrdersResp, GetSpotOpenOrdersResp, SpotAccount, SpotAccountBook, SpotCandle, SpotCurrency, SpotFeeRates, SpotHistoricTradeRecord, SpotInsuranceHistory, SpotOrder, SpotOrderBook, SpotPriceTriggeredOrder, SpotTicker, SpotTrade, SubmitSpotBatchOrdersResp } from './types/response/spot.js';
34
40
  import { CreatedSubAccountAPIKey, SubAccount, SubAccountAPIKey, SubAccountMode } from './types/response/subaccount.js';
@@ -3106,4 +3112,446 @@ export declare class RestClient extends BaseRestClient {
3106
3112
  ref_uid: number;
3107
3113
  }[];
3108
3114
  }>;
3115
+ /**==========================================================================================================================
3116
+ * OTC
3117
+ * ==========================================================================================================================
3118
+ */
3119
+ /**
3120
+ * Fiat and stablecoin quote
3121
+ *
3122
+ * Create fiat and stablecoin quotes, supporting both PAY and GET directions
3123
+ *
3124
+ * @param params Quote parameters
3125
+ * @returns Promise with quote details including rate, amounts, and quote_token
3126
+ */
3127
+ createOTCQuote(params: CreateOTCQuoteReq): Promise<CreateOTCQuoteResp>;
3128
+ /**
3129
+ * Create fiat order
3130
+ *
3131
+ * Create a fiat order, supporting BUY for on-ramp and SELL for off-ramp
3132
+ *
3133
+ * @param params Fiat order parameters
3134
+ * @returns Promise with order creation confirmation
3135
+ */
3136
+ createOTCFiatOrder(params: CreateOTCFiatOrderReq): Promise<CreateOTCFiatOrderResp>;
3137
+ /**
3138
+ * Create stablecoin order
3139
+ *
3140
+ * Create stablecoin order
3141
+ *
3142
+ * @param params Stablecoin order parameters
3143
+ * @returns Promise with order creation confirmation
3144
+ */
3145
+ createOTCStablecoinOrder(params: CreateOTCStablecoinOrderReq): Promise<CreateOTCStablecoinOrderResp>;
3146
+ /**
3147
+ * Get user's default bank account information
3148
+ *
3149
+ * Get user's default bank account information for order placement
3150
+ *
3151
+ * @returns Promise with default bank account details
3152
+ */
3153
+ getOTCUserDefaultBank(): Promise<GetOTCUserDefaultBankResp>;
3154
+ /**
3155
+ * Mark fiat order as paid
3156
+ *
3157
+ * Mark fiat order as paid
3158
+ *
3159
+ * @param params Parameters with order_id
3160
+ * @returns Promise with confirmation
3161
+ */
3162
+ markOTCOrderAsPaid(params: MarkOTCOrderAsPaidReq): Promise<MarkOTCOrderAsPaidResp>;
3163
+ /**
3164
+ * Fiat order cancellation
3165
+ *
3166
+ * Cancel fiat order
3167
+ *
3168
+ * @param params Parameters with order_id
3169
+ * @returns Promise with cancellation confirmation
3170
+ */
3171
+ cancelOTCOrder(params: CancelOTCOrderReq): Promise<CancelOTCOrderResp>;
3172
+ /**
3173
+ * Fiat order list
3174
+ *
3175
+ * Query the fiat order list with filters such as type, currency, time range, and status
3176
+ *
3177
+ * @param params Filter parameters for fiat order list
3178
+ * @returns Promise with paginated fiat order list
3179
+ */
3180
+ getOTCFiatOrderList(params?: GetOTCFiatOrderListReq): Promise<GetOTCFiatOrderListResp>;
3181
+ /**
3182
+ * Stablecoin order list
3183
+ *
3184
+ * Query stablecoin order list with filtering by currency, time range, status, etc.
3185
+ *
3186
+ * @param params Filter parameters for stablecoin order list
3187
+ * @returns Promise with paginated stablecoin order list
3188
+ */
3189
+ getOTCStablecoinOrderList(params?: GetOTCStablecoinOrderListReq): Promise<GetOTCStablecoinOrderListResp>;
3190
+ /**
3191
+ * Fiat order details
3192
+ *
3193
+ * Query fiat order details
3194
+ *
3195
+ * @param params Parameters with order_id
3196
+ * @returns Promise with fiat order details
3197
+ */
3198
+ getOTCFiatOrderDetail(params: GetOTCFiatOrderDetailReq): Promise<GetOTCFiatOrderDetailResp>;
3199
+ /**==========================================================================================================================
3200
+ * CROSSEX
3201
+ * ==========================================================================================================================
3202
+ */
3203
+ /**
3204
+ * Query Trading Pair Information
3205
+ *
3206
+ * Query trading pair information for cross-exchange trading
3207
+ *
3208
+ * @param params Optional parameters to filter symbols
3209
+ * @returns Promise with array of symbol information
3210
+ */
3211
+ getCrossExSymbols(params?: GetCrossExSymbolsReq): Promise<CrossExSymbol[]>;
3212
+ /**
3213
+ * Query Risk Limit Information
3214
+ *
3215
+ * Query risk limit information for futures/margin trading pairs
3216
+ *
3217
+ * @param params Parameters with required symbols
3218
+ * @returns Promise with array of risk limit information
3219
+ */
3220
+ getCrossExRiskLimits(params: GetCrossExRiskLimitsReq): Promise<CrossExRiskLimit[]>;
3221
+ /**
3222
+ * Query Supported Transfer Currencies
3223
+ *
3224
+ * Query supported transfer currencies for cross-exchange
3225
+ *
3226
+ * @param params Optional currency filter
3227
+ * @returns Promise with array of transfer coin information
3228
+ */
3229
+ getCrossExTransferCoins(params?: GetCrossExTransferCoinsReq): Promise<CrossExTransferCoin[]>;
3230
+ /**
3231
+ * Fund Transfer
3232
+ *
3233
+ * Transfer funds between accounts. Rate limit: 10 requests per 10 seconds
3234
+ *
3235
+ * @param params Transfer parameters
3236
+ * @returns Promise with transfer confirmation
3237
+ */
3238
+ createCrossExTransfer(params: CreateCrossExTransferReq): Promise<CreateCrossExTransferResp>;
3239
+ /**
3240
+ * Query Fund Transfer History
3241
+ *
3242
+ * Query fund transfer history. Rate Limit: 200 requests per 10 seconds
3243
+ *
3244
+ * @param params Optional filter parameters
3245
+ * @returns Promise with array of transfer history records
3246
+ */
3247
+ getCrossExTransferHistory(params?: GetCrossExTransferHistoryReq): Promise<CrossExTransferHistory[]>;
3248
+ /**
3249
+ * Create an order
3250
+ *
3251
+ * Create an order for cross-exchange trading. Rate Limit: 100 requests per 10 seconds
3252
+ *
3253
+ * @param params Order parameters
3254
+ * @returns Promise with order creation response
3255
+ */
3256
+ createCrossExOrder(params: CreateCrossExOrderReq): Promise<CreateCrossExOrderResp>;
3257
+ /**
3258
+ * Cancel Order
3259
+ *
3260
+ * Cancel an order. Rate Limit: 100 requests per 10 seconds
3261
+ *
3262
+ * @param order_id Order ID or Text for Cancel Order
3263
+ * @returns Promise with cancellation confirmation
3264
+ */
3265
+ cancelCrossExOrder(order_id: string): Promise<CancelCrossExOrderResp>;
3266
+ /**
3267
+ * Modify Order
3268
+ *
3269
+ * Modify an existing order. Rate Limit: 100 requests per 10 seconds
3270
+ *
3271
+ * @param order_id Order ID or Text for Modify Order
3272
+ * @param params Modification parameters
3273
+ * @returns Promise with modification confirmation
3274
+ */
3275
+ modifyCrossExOrder(order_id: string, params: ModifyCrossExOrderReq): Promise<ModifyCrossExOrderResp>;
3276
+ /**
3277
+ * Query order details
3278
+ *
3279
+ * Query order details by order ID or custom text. Rate Limit: 200 requests per 10 seconds
3280
+ *
3281
+ * @param order_id Order ID or custom text
3282
+ * @returns Promise with order details
3283
+ */
3284
+ getCrossExOrder(order_id: string): Promise<CrossExOrder>;
3285
+ /**
3286
+ * Flash Swap Inquiry
3287
+ *
3288
+ * Create a flash swap quote. Rate Limit: 100 requests per day
3289
+ *
3290
+ * @param params Quote parameters
3291
+ * @returns Promise with quote details
3292
+ */
3293
+ createCrossExConvertQuote(params: CreateCrossExConvertQuoteReq): Promise<CreateCrossExConvertQuoteResp>;
3294
+ /**
3295
+ * Flash Swap Transaction
3296
+ *
3297
+ * Execute a flash swap transaction. Rate limit: 10 requests per 10 seconds
3298
+ *
3299
+ * @param params Parameters with quote_id
3300
+ * @returns Promise with transaction confirmation
3301
+ */
3302
+ createCrossExConvertOrder(params: CreateCrossExConvertOrderReq): Promise<{}>;
3303
+ /**
3304
+ * Modify Account Contract Position Mode and Account Mode
3305
+ *
3306
+ * Modify account settings. Rate Limit: 100 requests per 60 seconds
3307
+ *
3308
+ * @param params Account modification parameters
3309
+ * @returns Promise with update confirmation
3310
+ */
3311
+ updateCrossExAccount(params: UpdateCrossExAccountReq): Promise<UpdateCrossExAccountResp>;
3312
+ /**
3313
+ * Query Account Assets
3314
+ *
3315
+ * Query account assets and balances. Rate Limit: 200 requests per 10 seconds
3316
+ *
3317
+ * @param params Optional exchange_type filter
3318
+ * @returns Promise with account information
3319
+ */
3320
+ getCrossExAccounts(params?: GetCrossExAccountsReq): Promise<CrossExAccount>;
3321
+ /**
3322
+ * Modify Contract Trading Pair Leverage Multiplier
3323
+ *
3324
+ * Modify leverage for contract trading pair. Rate Limit: 100 requests per 10 seconds
3325
+ *
3326
+ * @param params Leverage modification parameters
3327
+ * @returns Promise with leverage update confirmation
3328
+ */
3329
+ setCrossExPositionLeverage(params: SetCrossExPositionLeverageReq): Promise<SetCrossExPositionLeverageResp>;
3330
+ /**
3331
+ * Query Contract Trading Pair Leverage Multiplier
3332
+ *
3333
+ * Query leverage for contract trading pairs. Rate Limit: 200 requests per 10 seconds
3334
+ *
3335
+ * @param params Optional symbols filter
3336
+ * @returns Promise with array of leverage information
3337
+ */
3338
+ getCrossExPositionLeverage(params?: GetCrossExPositionLeverageReq): Promise<CrossExPositionLeverage[]>;
3339
+ /**
3340
+ * Modify Leveraged Trading Pair Leverage Multiplier
3341
+ *
3342
+ * Modify leverage for margin trading pair. Rate Limit: 100 requests per 10 seconds
3343
+ *
3344
+ * @param params Leverage modification parameters
3345
+ * @returns Promise with leverage update confirmation
3346
+ */
3347
+ setCrossExMarginPositionLeverage(params: SetCrossExMarginPositionLeverageReq): Promise<SetCrossExMarginPositionLeverageResp>;
3348
+ /**
3349
+ * Query Leveraged Trading Pair Leverage Multiplier
3350
+ *
3351
+ * Query leverage for margin trading pairs. Rate Limit: 200 requests per 10 seconds
3352
+ *
3353
+ * @param params Optional symbols filter
3354
+ * @returns Promise with array of leverage information
3355
+ */
3356
+ getCrossExMarginPositionLeverage(params?: GetCrossExMarginPositionLeverageReq): Promise<CrossExMarginPositionLeverage[]>;
3357
+ /**
3358
+ * Full Close Position
3359
+ *
3360
+ * Fully close a position. Rate Limit: 100 requests per day
3361
+ *
3362
+ * @param params Position close parameters
3363
+ * @returns Promise with close position confirmation
3364
+ */
3365
+ closeCrossExPosition(params: CloseCrossExPositionReq): Promise<CloseCrossExPositionResp>;
3366
+ /**
3367
+ * Query margin asset interest rates
3368
+ *
3369
+ * Query interest rates for margin assets. Rate Limit: 200 requests per 10 seconds
3370
+ *
3371
+ * @param params Optional filter parameters
3372
+ * @returns Promise with array of interest rates
3373
+ */
3374
+ getCrossExInterestRate(params?: GetCrossExInterestRateReq): Promise<CrossExInterestRate[]>;
3375
+ /**
3376
+ * Query User Fee Rates
3377
+ *
3378
+ * Query user fee rates. Rate Limit: 200 requests per 10 seconds
3379
+ *
3380
+ * @returns Promise with fee rate information
3381
+ */
3382
+ getCrossExFeeRate(): Promise<CrossExFeeRate>;
3383
+ /**
3384
+ * Query Contract Positions
3385
+ *
3386
+ * Query contract positions. Rate Limit: 200 requests per 10 seconds
3387
+ *
3388
+ * @param params Optional filter parameters
3389
+ * @returns Promise with array of positions
3390
+ */
3391
+ getCrossExPositions(params?: GetCrossExPositionsReq): Promise<CrossExPosition[]>;
3392
+ /**
3393
+ * Query Leveraged Positions
3394
+ *
3395
+ * Query margin/leveraged positions. Rate Limit: 200 requests per 10 seconds
3396
+ *
3397
+ * @param params Optional filter parameters
3398
+ * @returns Promise with array of margin positions
3399
+ */
3400
+ getCrossExMarginPositions(params?: GetCrossExMarginPositionsReq): Promise<CrossExMarginPosition[]>;
3401
+ /**
3402
+ * Query ADL Position Reduction Ranking
3403
+ *
3404
+ * Query ADL position reduction ranking. Rate Limit: 200 requests per 10 seconds
3405
+ *
3406
+ * @param params Parameters with required symbol
3407
+ * @returns Promise with array of ADL rankings
3408
+ */
3409
+ getCrossExAdlRank(params: GetCrossExAdlRankReq): Promise<CrossExAdlRank[]>;
3410
+ /**
3411
+ * Query All Current Open Orders
3412
+ *
3413
+ * Query all current open orders. Rate Limit: 200 requests per 10 seconds
3414
+ *
3415
+ * @param params Optional filter parameters
3416
+ * @returns Promise with array of open orders
3417
+ */
3418
+ getCrossExOpenOrders(params?: GetCrossExOpenOrdersReq): Promise<CrossExOrder[]>;
3419
+ /**
3420
+ * Query order history
3421
+ *
3422
+ * Query historical orders. Rate Limit: 200 requests per 10 seconds
3423
+ *
3424
+ * @param params Optional filter parameters
3425
+ * @returns Promise with array of historical orders
3426
+ */
3427
+ getCrossExHistoryOrders(params?: GetCrossExHistoryOrdersReq): Promise<CrossExOrder[]>;
3428
+ /**
3429
+ * Query Contract Position History
3430
+ *
3431
+ * Query contract position history. Rate Limit: 200 requests per 10 seconds
3432
+ *
3433
+ * @param params Optional filter parameters
3434
+ * @returns Promise with array of historical positions
3435
+ */
3436
+ getCrossExHistoryPositions(params?: GetCrossExHistoryPositionsReq): Promise<CrossExHistoryPosition[]>;
3437
+ /**
3438
+ * Query Leveraged Position History
3439
+ *
3440
+ * Query margin position history. Rate Limit: 200 requests per 10 seconds
3441
+ *
3442
+ * @param params Optional filter parameters
3443
+ * @returns Promise with array of historical margin positions
3444
+ */
3445
+ getCrossExHistoryMarginPositions(params?: GetCrossExHistoryMarginPositionsReq): Promise<CrossExHistoryMarginPosition[]>;
3446
+ /**
3447
+ * Query Leveraged Interest Deduction History
3448
+ *
3449
+ * Query margin interest deduction history. Rate Limit: 200 requests per 10 seconds
3450
+ *
3451
+ * @param params Optional filter parameters
3452
+ * @returns Promise with array of interest deduction records
3453
+ */
3454
+ getCrossExHistoryMarginInterests(params?: GetCrossExHistoryMarginInterestsReq): Promise<CrossExHistoryMarginInterest[]>;
3455
+ /**
3456
+ * Query filled history
3457
+ *
3458
+ * Query trade execution history. Rate Limit: 200 requests per 10 seconds
3459
+ *
3460
+ * @param params Optional filter parameters
3461
+ * @returns Promise with array of trade records
3462
+ */
3463
+ getCrossExHistoryTrades(params?: GetCrossExHistoryTradesReq): Promise<CrossExHistoryTrade[]>;
3464
+ /**
3465
+ * Query Account Asset Change History
3466
+ *
3467
+ * Query account balance change history. Rate Limit: 200 requests per 10 seconds
3468
+ *
3469
+ * @param params Optional filter parameters
3470
+ * @returns Promise with array of account book records
3471
+ */
3472
+ getCrossExAccountBook(params?: GetCrossExAccountBookReq): Promise<CrossExAccountBook[]>;
3473
+ /**
3474
+ * Query currency discount rate
3475
+ *
3476
+ * Query currency discount rate (for margin currency in isolated exchange mode). Rate Limit: 200 requests per 10 seconds
3477
+ *
3478
+ * @param params Optional filter parameters
3479
+ * @returns Promise with array of coin discount rates
3480
+ */
3481
+ getCrossExCoinDiscountRate(params?: GetCrossExCoinDiscountRateReq): Promise<CrossExCoinDiscountRate[]>;
3482
+ /**==========================================================================================================================
3483
+ * ALPHA
3484
+ * ==========================================================================================================================
3485
+ */
3486
+ /**
3487
+ * Query position assets
3488
+ *
3489
+ * Query alpha account position assets
3490
+ *
3491
+ * @returns Promise with array of account balances
3492
+ */
3493
+ getAlphaAccounts(): Promise<AlphaAccount[]>;
3494
+ /**
3495
+ * Query asset transactions
3496
+ *
3497
+ * Query alpha account transaction history
3498
+ *
3499
+ * @param params Parameters with required from timestamp
3500
+ * @returns Promise with array of transaction records
3501
+ */
3502
+ getAlphaAccountBook(params: GetAlphaAccountBookReq): Promise<AlphaAccountBook[]>;
3503
+ /**
3504
+ * Alpha Quote API
3505
+ *
3506
+ * Get a quote for alpha trading. Quote is valid for 1 minute. Rate-limited at 10 requests per second per user.
3507
+ *
3508
+ * @param params Quote parameters
3509
+ * @returns Promise with quote details
3510
+ */
3511
+ createAlphaQuote(params: CreateAlphaQuoteReq): Promise<CreateAlphaQuoteResp>;
3512
+ /**
3513
+ * Alpha Order API
3514
+ *
3515
+ * Create an alpha order. Rate-limited at 5 requests per second per user.
3516
+ *
3517
+ * @param params Order parameters including quote_id
3518
+ * @returns Promise with order details
3519
+ */
3520
+ createAlphaOrder(params: CreateAlphaOrderReq): Promise<CreateAlphaOrderResp>;
3521
+ /**
3522
+ * Alpha Order List API
3523
+ *
3524
+ * Query alpha order list with filters
3525
+ *
3526
+ * @param params Filter parameters
3527
+ * @returns Promise with array of orders
3528
+ */
3529
+ getAlphaOrders(params: GetAlphaOrdersReq): Promise<AlphaOrder[]>;
3530
+ /**
3531
+ * Alpha Single Order Query API
3532
+ *
3533
+ * Query a single alpha order by order ID
3534
+ *
3535
+ * @param params Parameters with order_id
3536
+ * @returns Promise with order details
3537
+ */
3538
+ getAlphaOrder(params: GetAlphaOrderReq): Promise<AlphaOrder>;
3539
+ /**
3540
+ * Query currency information
3541
+ *
3542
+ * Query alpha currency information. When currency is provided, returns specific currency info; otherwise returns paginated list.
3543
+ *
3544
+ * @param params Optional filter parameters
3545
+ * @returns Promise with array of currency information
3546
+ */
3547
+ getAlphaCurrencies(params?: GetAlphaCurrenciesReq): Promise<AlphaCurrency[]>;
3548
+ /**
3549
+ * Query currency ticker
3550
+ *
3551
+ * Query alpha currency ticker. When currency is provided, returns specific ticker; otherwise returns paginated list.
3552
+ *
3553
+ * @param params Optional filter parameters
3554
+ * @returns Promise with array of ticker information
3555
+ */
3556
+ getAlphaTickers(params?: GetAlphaTickersReq): Promise<AlphaTicker[]>;
3109
3557
  }