diff --git a/docs/endpointFunctionList.md b/docs/endpointFunctionList.md
index 81f0e6d..b90b254 100644
--- a/docs/endpointFunctionList.md
+++ b/docs/endpointFunctionList.md
@@ -1,28 +1,27 @@
-
# Endpoint maps
-
-
+
+
-Each REST client is a JavaScript class, which provides functions individually mapped to each endpoint available in the exchange's API offering.
+Each REST client is a JavaScript class, which provides functions individually mapped to each endpoint available in the exchange's API offering.
The following table shows all methods available in each REST client, whether the method requires authentication (automatically handled if API keys are provided), as well as the exact endpoint each method is connected to.
-This can be used to easily find which method to call, once you have [found which endpoint you're looking to use](https://github.com/tiagosiebler/awesome-crypto-examples/wiki/How-to-find-SDK-functions-that-match-API-docs-endpoint).
+This can be used to easily find which method to call, once you have [found which endpoint you're looking to use](https://github.com/sieblyio/awesome-crypto-examples/wiki/How-to-find-SDK-functions-that-match-API-docs-endpoint).
All REST clients are in the [src](/src) folder. For usage examples, make sure to check the [examples](/examples) folder.
List of clients:
+
- [RestClient](#RestClientts)
- [WebsocketAPIClient](#WebsocketAPIClientts)
-
If anything is missing or wrong, please open an issue or let us know in our [Node.js Traders](https://t.me/nodetraders) telegram group!
## How to use table
@@ -42,451 +41,477 @@ Table consists of 4 parts:
**Endpoint** is the URL that the function uses to call the endpoint. Best way to find exact function you need for the endpoint is to search for URL in this table and find corresponding function name.
-
# RestClient.ts
-This table includes all endpoints from the official Exchange API docs and corresponding SDK functions for each endpoint that are found in [RestClient.ts](/src/RestClient.ts).
+This table includes all endpoints from the official Exchange API docs and corresponding SDK functions for each endpoint that are found in [RestClient.ts](/src/RestClient.ts).
-| Function | AUTH | HTTP Method | Endpoint |
-| -------- | :------: | :------: | -------- |
-| [getSystemMaintenanceStatus()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L657) | | GET | `/v1/public/system_info` |
-| [submitWithdrawal()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L674) | :closed_lock_with_key: | POST | `/withdrawals` |
-| [submitSpotMainAccountTransfer()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L688) | :closed_lock_with_key: | POST | `/withdrawals/push` |
-| [cancelWithdrawal()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L704) | :closed_lock_with_key: | DELETE | `/withdrawals/{withdrawal_id}` |
-| [getCurrencyChains()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L721) | | GET | `/wallet/currency_chains` |
-| [createDepositAddress()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L731) | :closed_lock_with_key: | GET | `/wallet/deposit_address` |
-| [getWithdrawalRecords()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L745) | :closed_lock_with_key: | GET | `/wallet/withdrawals` |
-| [getDepositRecords()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L759) | :closed_lock_with_key: | GET | `/wallet/deposits` |
-| [submitTransfer()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L778) | :closed_lock_with_key: | POST | `/wallet/transfers` |
-| [submitMainSubTransfer()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L790) | :closed_lock_with_key: | POST | `/wallet/sub_account_transfers` |
-| [getMainSubTransfers()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L804) | :closed_lock_with_key: | GET | `/wallet/sub_account_transfers` |
-| [submitSubToSubTransfer()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L818) | :closed_lock_with_key: | POST | `/wallet/sub_account_to_sub_account` |
-| [getTransferStatus()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L833) | :closed_lock_with_key: | GET | `/wallet/order_status` |
-| [getWithdrawalStatus()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L849) | :closed_lock_with_key: | GET | `/wallet/withdraw_status` |
-| [getSubBalance()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L861) | :closed_lock_with_key: | GET | `/wallet/sub_account_balances` |
-| [getSubMarginBalances()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L873) | :closed_lock_with_key: | GET | `/wallet/sub_account_margin_balances` |
-| [getSubFuturesBalances()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L885) | :closed_lock_with_key: | GET | `/wallet/sub_account_futures_balances` |
-| [getSubCrossMarginBalances()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L898) | :closed_lock_with_key: | GET | `/wallet/sub_account_cross_margin_balances` |
-| [getSavedAddresses()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L910) | :closed_lock_with_key: | GET | `/wallet/saved_address` |
-| [getTradingFees()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L920) | :closed_lock_with_key: | GET | `/wallet/fee` |
-| [getBalances()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L941) | :closed_lock_with_key: | GET | `/wallet/total_balance` |
-| [getSmallBalances()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L950) | :closed_lock_with_key: | GET | `/wallet/small_balance` |
-| [convertSmallBalance()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L960) | :closed_lock_with_key: | POST | `/wallet/small_balance` |
-| [getSmallBalanceHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L973) | :closed_lock_with_key: | GET | `/wallet/small_balance_history` |
-| [getPushOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L985) | :closed_lock_with_key: | GET | `/wallet/push` |
-| [getLowCapExchangeList()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L994) | :closed_lock_with_key: | GET | `/wallet/getLowCapExchangeList` |
-| [createSubAccount()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1009) | :closed_lock_with_key: | POST | `/sub_accounts` |
-| [getSubAccounts()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1020) | :closed_lock_with_key: | GET | `/sub_accounts` |
-| [getSubAccount()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1030) | :closed_lock_with_key: | GET | `/sub_accounts/{user_id}` |
-| [createSubAccountApiKey()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1040) | :closed_lock_with_key: | POST | `/sub_accounts/{user_id}/keys` |
-| [getSubAccountApiKeys()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1053) | :closed_lock_with_key: | GET | `/sub_accounts/{user_id}/keys` |
-| [updateSubAccountApiKey()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1067) | :closed_lock_with_key: | PUT | `/sub_accounts/{user_id}/keys/{key}` |
-| [deleteSubAccountApiKey()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1078) | :closed_lock_with_key: | DELETE | `/sub_accounts/{user_id}/keys/{key}` |
-| [getSubAccountApiKey()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1093) | :closed_lock_with_key: | GET | `/sub_accounts/{user_id}/keys/{key}` |
-| [lockSubAccount()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1108) | :closed_lock_with_key: | POST | `/sub_accounts/{user_id}/lock` |
-| [unlockSubAccount()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1118) | :closed_lock_with_key: | POST | `/sub_accounts/{user_id}/unlock` |
-| [getSubAccountMode()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1132) | :closed_lock_with_key: | GET | `/sub_accounts/unified_mode` |
-| [getUnifiedAccountInfo()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1151) | :closed_lock_with_key: | GET | `/unified/accounts` |
-| [getUnifiedMaxBorrow()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1167) | :closed_lock_with_key: | GET | `/unified/borrowable` |
-| [getUnifiedMaxTransferable()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1183) | :closed_lock_with_key: | GET | `/unified/transferable` |
-| [getUnifiedMaxTransferables()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1198) | :closed_lock_with_key: | GET | `/unified/transferables` |
-| [getUnifiedBatchMaxBorrowable()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1207) | :closed_lock_with_key: | GET | `/unified/batch_borrowable` |
-| [submitUnifiedBorrowOrRepay()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1225) | :closed_lock_with_key: | POST | `/unified/loans` |
-| [getUnifiedLoans()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1237) | :closed_lock_with_key: | GET | `/unified/loans` |
-| [getUnifiedLoanRecords()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1247) | :closed_lock_with_key: | GET | `/unified/loan_records` |
-| [getUnifiedInterestRecords()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1259) | :closed_lock_with_key: | GET | `/unified/interest_records` |
-| [getUnifiedRiskUnitDetails()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1270) | :closed_lock_with_key: | GET | `/unified/risk_units` |
-| [setUnifiedAccountMode()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1282) | :closed_lock_with_key: | PUT | `/unified/unified_mode` |
-| [getUnifiedAccountMode()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1291) | :closed_lock_with_key: | GET | `/unified/unified_mode` |
-| [getUnifiedEstimateRate()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1303) | :closed_lock_with_key: | GET | `/unified/estimate_rate` |
-| [getUnifiedCurrencyDiscountTiers()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1314) | | GET | `/unified/currency_discount_tiers` |
-| [getLoanMarginTiers()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1326) | | GET | `/unified/loan_margin_tiers` |
-| [portfolioMarginCalculate()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1343) | | POST | `/unified/portfolio_calculator` |
-| [getUserCurrencyLeverageConfig()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1357) | :closed_lock_with_key: | GET | `/unified/leverage/user_currency_config` |
-| [getUserCurrencyLeverageSettings()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1371) | :closed_lock_with_key: | GET | `/unified/leverage/user_currency_setting` |
-| [updateUserCurrencyLeverage()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1386) | :closed_lock_with_key: | POST | `/unified/leverage/user_currency_setting` |
-| [getUnifiedLoanCurrencies()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1401) | :closed_lock_with_key: | GET | `/unified/currencies` |
-| [getHistoricalLendingRates()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1413) | :closed_lock_with_key: | GET | `/unified/history_loan_rate` |
-| [submitUnifiedLoanRepay()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1419) | :closed_lock_with_key: | POST | `/unified/loans/repay` |
-| [getEstimatedQuickRepayment()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1426) | :closed_lock_with_key: | GET | `/unified/estimated_quick_repayment` |
-| [createQuickRepayment()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1433) | :closed_lock_with_key: | POST | `/unified/quick_repayment` |
-| [setUnifiedDeltaNeutral()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1444) | :closed_lock_with_key: | POST | `/unified/delta_neutral` |
-| [getUnifiedDeltaNeutral()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1453) | :closed_lock_with_key: | GET | `/unified/delta_neutral` |
-| [getSpotCurrencies()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1473) | | GET | `/spot/currencies` |
-| [getSpotCurrency()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1483) | | GET | `/spot/currencies/{currency}` |
-| [getSpotCurrencyPairs()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1492) | | GET | `/spot/currency_pairs` |
-| [getSpotCurrencyPair()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1502) | | GET | `/spot/currency_pairs/{currency_pair}` |
-| [getSpotTicker()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1516) | | GET | `/spot/tickers` |
-| [getSpotOrderBook()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1531) | | GET | `/spot/order_book` |
-| [getSpotTrades()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1544) | | GET | `/spot/trades` |
-| [getSpotCandles()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1556) | | GET | `/spot/candlesticks` |
-| [getSpotFeeRates()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1568) | :closed_lock_with_key: | GET | `/spot/fee` |
-| [getSpotBatchFeeRates()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1577) | :closed_lock_with_key: | GET | `/spot/batch_fee` |
-| [getSpotAccounts()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1589) | :closed_lock_with_key: | GET | `/spot/accounts` |
-| [getSpotAccountBook()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1601) | :closed_lock_with_key: | GET | `/spot/account_book` |
-| [submitSpotBatchOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1620) | :closed_lock_with_key: | POST | `/spot/batch_orders` |
-| [getSpotOpenOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1647) | :closed_lock_with_key: | GET | `/spot/open_orders` |
-| [submitSpotClosePosCrossDisabled()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1663) | :closed_lock_with_key: | POST | `/spot/cross_liquidate_orders` |
-| [submitSpotOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1679) | :closed_lock_with_key: | POST | `/spot/orders` |
-| [getSpotOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1696) | :closed_lock_with_key: | GET | `/spot/orders` |
-| [cancelSpotOpenOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1711) | :closed_lock_with_key: | DELETE | `/spot/orders` |
-| [batchCancelSpotOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1739) | :closed_lock_with_key: | POST | `/spot/cancel_batch_orders` |
-| [getSpotOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1764) | :closed_lock_with_key: | GET | `/spot/orders/{order_id}` |
-| [updateSpotOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1781) | :closed_lock_with_key: | PATCH | `/spot/orders/{order_id}` |
-| [cancelSpotOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1809) | :closed_lock_with_key: | DELETE | `/spot/orders/{order_id}` |
-| [getSpotTradingHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1838) | :closed_lock_with_key: | GET | `/spot/my_trades` |
-| [submitSpotCountdownOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1867) | :closed_lock_with_key: | POST | `/spot/countdown_cancel_all` |
-| [batchUpdateSpotOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1886) | :closed_lock_with_key: | POST | `/spot/amend_batch_orders` |
-| [getSpotInsuranceHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1913) | :closed_lock_with_key: | GET | `/spot/insurance_history` |
-| [submitSpotPriceTriggerOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1927) | :closed_lock_with_key: | POST | `/spot/price_orders` |
-| [getSpotAutoOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1939) | :closed_lock_with_key: | GET | `/spot/price_orders` |
-| [cancelAllOpenSpotOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1951) | :closed_lock_with_key: | DELETE | `/spot/price_orders` |
-| [getPriceTriggeredOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1964) | :closed_lock_with_key: | GET | `/spot/price_orders/{order_id}` |
-| [cancelSpotTriggeredOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1976) | :closed_lock_with_key: | DELETE | `/spot/price_orders/{order_id}` |
-| [setCollateralCurrency()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L1990) | :closed_lock_with_key: | POST | `/unified/collateral_currencies` |
-| [getMarginAccounts()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2011) | :closed_lock_with_key: | GET | `/margin/accounts` |
-| [getMarginBalanceHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2025) | :closed_lock_with_key: | GET | `/margin/account_book` |
-| [getFundingAccounts()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2043) | :closed_lock_with_key: | GET | `/margin/funding_accounts` |
-| [updateAutoRepaymentSetting()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2061) | :closed_lock_with_key: | POST | `/margin/auto_repay` |
-| [getAutoRepaymentSetting()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2072) | :closed_lock_with_key: | GET | `/margin/auto_repay` |
-| [getMarginTransferableAmount()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2086) | :closed_lock_with_key: | GET | `/margin/transferable` |
-| [getCrossMarginCurrencies()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2103) | | GET | `/margin/cross/currencies` |
-| [getCrossMarginCurrency()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2114) | | GET | `/margin/cross/currencies/{currency}` |
-| [getCrossMarginAccount()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2126) | :closed_lock_with_key: | GET | `/margin/cross/accounts` |
-| [getCrossMarginAccountHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2139) | :closed_lock_with_key: | GET | `/margin/cross/account_book` |
-| [submitCrossMarginBorrowLoan()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2156) | :closed_lock_with_key: | POST | `/margin/cross/loans` |
-| [getCrossMarginBorrowHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2171) | :closed_lock_with_key: | GET | `/margin/cross/loans` |
-| [getCrossMarginBorrowLoan()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2184) | :closed_lock_with_key: | GET | `/margin/cross/loans/{loan_id}` |
-| [submitCrossMarginRepayment()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2199) | :closed_lock_with_key: | POST | `/margin/cross/repayments` |
-| [getCrossMarginRepayments()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2215) | :closed_lock_with_key: | GET | `/margin/cross/repayments` |
-| [getCrossMarginInterestRecords()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2228) | :closed_lock_with_key: | GET | `/margin/cross/interest_records` |
-| [getCrossMarginTransferableAmount()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2244) | :closed_lock_with_key: | GET | `/margin/cross/transferable` |
-| [getEstimatedInterestRates()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2260) | :closed_lock_with_key: | GET | `/margin/cross/estimate_rate` |
-| [getCrossMarginBorrowableAmount()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2274) | :closed_lock_with_key: | GET | `/margin/cross/borrowable` |
-| [getMarginUserLoanTiers()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2287) | :closed_lock_with_key: | GET | `/margin/user/loan_margin_tiers` |
-| [getMarginPublicLoanTiers()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2303) | | GET | `/margin/loan_margin_tiers` |
-| [setMarginUserLeverage()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2319) | :closed_lock_with_key: | POST | `/margin/leverage/user_market_setting` |
-| [getMarginUserAccounts()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2336) | :closed_lock_with_key: | GET | `/margin/user/account` |
-| [getLendingMarkets()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2351) | | GET | `/margin/uni/currency_pairs` |
-| [getLendingMarket()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2366) | | GET | `/margin/uni/currency_pairs/{currency_pair}` |
-| [getEstimatedInterestRate()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2378) | :closed_lock_with_key: | GET | `/margin/uni/estimate_rate` |
-| [submitMarginUNIBorrowOrRepay()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2388) | :closed_lock_with_key: | POST | `/margin/uni/loans` |
-| [getMarginUNILoans()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2404) | :closed_lock_with_key: | GET | `/margin/uni/loans` |
-| [getMarginUNILoanRecords()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2414) | :closed_lock_with_key: | GET | `/margin/uni/loan_records` |
-| [getMarginUNIInterestRecords()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2426) | :closed_lock_with_key: | GET | `/margin/uni/interest_records` |
-| [getMarginUNIMaxBorrow()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2438) | :closed_lock_with_key: | GET | `/margin/uni/borrowable` |
-| [getFlashSwapCurrencyPairs()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2454) | | GET | `/flash_swap/currency_pairs` |
-| [submitFlashSwapOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2470) | :closed_lock_with_key: | POST | `/flash_swap/orders` |
-| [getFlashSwapOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2482) | :closed_lock_with_key: | GET | `/flash_swap/orders` |
-| [getFlashSwapOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2494) | :closed_lock_with_key: | GET | `/flash_swap/orders/{order_id}` |
-| [submitFlashSwapOrderPreview()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2504) | :closed_lock_with_key: | POST | `/flash_swap/orders/preview` |
-| [getFuturesContracts()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2521) | | GET | `/futures/{settle}/contracts` |
-| [getFuturesContract()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2536) | | GET | `/futures/{settle}/contracts/{contract}` |
-| [getFuturesOrderBook()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2551) | | GET | `/futures/{settle}/order_book` |
-| [getFuturesTrades()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2564) | | GET | `/futures/{settle}/trades` |
-| [getFuturesCandles()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2579) | | GET | `/futures/{settle}/candlesticks` |
-| [getPremiumIndexKLines()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2592) | | GET | `/futures/{settle}/premium_index` |
-| [getFuturesTickers()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2605) | | GET | `/futures/{settle}/tickers` |
-| [getFundingRates()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2622) | | GET | `/futures/{settle}/funding_rate` |
-| [getBatchFundingRates()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2638) | | POST | `/futures/{settle}/funding_rates` |
-| [getFuturesInsuranceBalanceHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2656) | | GET | `/futures/{settle}/insurance` |
-| [getFuturesStats()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2675) | | GET | `/futures/{settle}/contract_stats` |
-| [getIndexConstituents()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2686) | | GET | `/futures/{settle}/index_constituents/{index}` |
-| [getLiquidationHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2703) | | GET | `/futures/{settle}/liq_orders` |
-| [getRiskLimitTiers()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2720) | | GET | `/futures/{settle}/risk_limit_tiers` |
-| [getFuturesAccount()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2733) | :closed_lock_with_key: | GET | `/futures/{settle}/accounts` |
-| [getFuturesAccountBook()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2747) | :closed_lock_with_key: | GET | `/futures/{settle}/account_book` |
-| [getFuturesPositions()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2760) | :closed_lock_with_key: | GET | `/futures/{settle}/positions` |
-| [getFuturesPosition()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2775) | :closed_lock_with_key: | GET | `/futures/{settle}/positions/{contract}` |
-| [updateFuturesMargin()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2792) | :closed_lock_with_key: | POST | `/futures/{settle}/positions/{contract}/margin` |
-| [updateFuturesLeverage()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2820) | :closed_lock_with_key: | POST | `/futures/{settle}/positions/{contract}/leverage` |
-| [getFuturesContractLeverage()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2840) | :closed_lock_with_key: | GET | `/futures/{settle}/get_leverage/{contract}` |
-| [updateFuturesPositionMode()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2856) | :closed_lock_with_key: | POST | `/futures/{settle}/positions/cross_mode` |
-| [updatePositionRiskLimit()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2873) | :closed_lock_with_key: | POST | `/futures/{settle}/positions/{contract}/risk_limit` |
-| [updateFuturesDualMode()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2893) | :closed_lock_with_key: | POST | `/futures/{settle}/dual_mode` |
-| [getDualModePosition()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2909) | :closed_lock_with_key: | GET | `/futures/{settle}/dual_comp/positions/{contract}` |
-| [updateDualModePositionMargin()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2924) | :closed_lock_with_key: | POST | `/futures/{settle}/dual_comp/positions/{contract}/margin` |
-| [updateDualModePositionLeverage()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2940) | :closed_lock_with_key: | POST | `/futures/{settle}/dual_comp/positions/{contract}/leverage` |
-| [updateDualModePositionRiskLimit()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2964) | :closed_lock_with_key: | POST | `/futures/{settle}/dual_comp/positions/{contract}/risk_limit` |
-| [submitFuturesOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L2991) | :closed_lock_with_key: | POST | `/futures/{settle}/orders` |
-| [getFuturesOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3012) | :closed_lock_with_key: | GET | `/futures/{settle}/orders` |
-| [cancelAllFuturesOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3027) | :closed_lock_with_key: | DELETE | `/futures/{settle}/orders` |
-| [getFuturesOrdersByTimeRange()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3047) | :closed_lock_with_key: | GET | `/futures/{settle}/orders_timerange` |
-| [submitFuturesBatchOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3070) | :closed_lock_with_key: | POST | `/futures/{settle}/batch_orders` |
-| [getFuturesOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3095) | :closed_lock_with_key: | GET | `/futures/{settle}/orders/{order_id}` |
-| [cancelFuturesOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3112) | :closed_lock_with_key: | DELETE | `/futures/{settle}/orders/{order_id}` |
-| [updateFuturesOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3137) | :closed_lock_with_key: | PUT | `/futures/{settle}/orders/{order_id}` |
-| [getFuturesTradingHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3158) | :closed_lock_with_key: | GET | `/futures/{settle}/my_trades` |
-| [getFuturesTradingHistoryByTimeRange()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3173) | :closed_lock_with_key: | GET | `/futures/{settle}/my_trades_timerange` |
-| [getFuturesPositionHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3186) | :closed_lock_with_key: | GET | `/futures/{settle}/position_close` |
-| [getFuturesLiquidationHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3199) | :closed_lock_with_key: | GET | `/futures/{settle}/liquidates` |
-| [getFuturesAutoDeleveragingHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3212) | :closed_lock_with_key: | GET | `/futures/{settle}/auto_deleverages` |
-| [setFuturesOrderCancelCountdown()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3229) | :closed_lock_with_key: | POST | `/futures/{settle}/countdown_cancel_all` |
-| [getFuturesUserTradingFees()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3246) | :closed_lock_with_key: | GET | `/futures/{settle}/fee` |
-| [batchCancelFuturesOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3264) | :closed_lock_with_key: | POST | `/futures/{settle}/batch_cancel_orders` |
-| [batchUpdateFuturesOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3291) | :closed_lock_with_key: | POST | `/futures/{settle}/batch_amend_orders` |
-| [getRiskLimitTable()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3313) | | GET | `/futures/{settle}/risk_limit_table` |
-| [submitFuturesPriceTriggeredOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3326) | :closed_lock_with_key: | POST | `/futures/{settle}/price_orders` |
-| [getFuturesAutoOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3339) | :closed_lock_with_key: | GET | `/futures/{settle}/price_orders` |
-| [cancelAllOpenFuturesOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3352) | :closed_lock_with_key: | DELETE | `/futures/{settle}/price_orders` |
-| [getFuturesPriceTriggeredOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3368) | :closed_lock_with_key: | GET | `/futures/{settle}/price_orders/{order_id}` |
-| [cancelFuturesPriceTriggeredOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3383) | :closed_lock_with_key: | DELETE | `/futures/{settle}/price_orders/{order_id}` |
-| [updateFuturesPriceTriggeredOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3398) | :closed_lock_with_key: | PUT | `/futures/{settle}/price_orders/amend` |
-| [createTrailOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3413) | :closed_lock_with_key: | POST | `/futures/{settle}/autoorder/v1/trail/create` |
-| [terminateTrailOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3431) | :closed_lock_with_key: | POST | `/futures/{settle}/autoorder/v1/trail/stop` |
-| [batchTerminateTrailOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3444) | :closed_lock_with_key: | POST | `/futures/{settle}/autoorder/v1/trail/stop_all` |
-| [getTrailOrderList()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3459) | :closed_lock_with_key: | GET | `/futures/{settle}/autoorder/v1/trail/list` |
-| [getTrailOrderDetail()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3472) | :closed_lock_with_key: | GET | `/futures/{settle}/autoorder/v1/trail/detail` |
-| [updateTrailOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3490) | :closed_lock_with_key: | POST | `/futures/{settle}/autoorder/v1/trail/update` |
-| [getTrailOrderChangeLog()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3503) | :closed_lock_with_key: | GET | `/futures/{settle}/autoorder/v1/trail/change_log` |
-| [createChaseOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3516) | :closed_lock_with_key: | POST | `/futures/{settle}/autoorder/v1/chase/create` |
-| [stopChaseOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3526) | :closed_lock_with_key: | POST | `/futures/{settle}/autoorder/v1/chase/stop` |
-| [stopAllChaseOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3536) | :closed_lock_with_key: | POST | `/futures/{settle}/autoorder/v1/chase/stop_all` |
-| [getChaseOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3548) | :closed_lock_with_key: | GET | `/futures/{settle}/autoorder/v1/chase/list` |
-| [getChaseOrderDetail()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3556) | :closed_lock_with_key: | GET | `/futures/{settle}/autoorder/v1/chase/detail` |
-| [getFuturesPositionCloseHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3565) | :closed_lock_with_key: | GET | `/futures/{settle}/position_close_history` |
-| [getFuturesInsuranceHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3574) | :closed_lock_with_key: | GET | `/futures/{settle}/insurance` |
-| [getAllDeliveryContracts()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3591) | | GET | `/delivery/{settle}/contracts` |
-| [getDeliveryContract()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3603) | | GET | `/delivery/{settle}/contracts/{contract}` |
-| [getDeliveryOrderBook()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3618) | | GET | `/delivery/{settle}/order_book` |
-| [getDeliveryTrades()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3631) | | GET | `/delivery/{settle}/trades` |
-| [getDeliveryCandles()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3645) | | GET | `/delivery/{settle}/candlesticks` |
-| [getDeliveryTickers()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3656) | | GET | `/delivery/{settle}/tickers` |
-| [getDeliveryInsuranceBalanceHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3673) | | GET | `/delivery/{settle}/insurance` |
-| [getDeliveryAccount()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3692) | :closed_lock_with_key: | GET | `/delivery/{settle}/accounts` |
-| [getDeliveryBook()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3703) | :closed_lock_with_key: | GET | `/delivery/{settle}/account_book` |
-| [getDeliveryPositions()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3714) | :closed_lock_with_key: | GET | `/delivery/{settle}/positions` |
-| [getDeliveryPosition()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3724) | :closed_lock_with_key: | GET | `/delivery/{settle}/positions/{contract}` |
-| [updateDeliveryMargin()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3739) | :closed_lock_with_key: | POST | `/delivery/{settle}/positions/{contract}/margin` |
-| [updateDeliveryLeverage()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3757) | :closed_lock_with_key: | POST | `/delivery/{settle}/positions/{contract}/leverage` |
-| [updateDeliveryRiskLimit()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3775) | :closed_lock_with_key: | POST | `/delivery/{settle}/positions/{contract}/risk_limit` |
-| [submitDeliveryOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3795) | :closed_lock_with_key: | POST | `/delivery/{settle}/orders` |
-| [getDeliveryOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3810) | :closed_lock_with_key: | GET | `/delivery/{settle}/orders` |
-| [cancelAllDeliveryOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3823) | :closed_lock_with_key: | DELETE | `/delivery/{settle}/orders` |
-| [getDeliveryOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3842) | :closed_lock_with_key: | GET | `/delivery/{settle}/orders/{order_id}` |
-| [cancelDeliveryOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3857) | :closed_lock_with_key: | DELETE | `/delivery/{settle}/orders/{order_id}` |
-| [getDeliveryTradingHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3872) | :closed_lock_with_key: | GET | `/delivery/{settle}/my_trades` |
-| [getDeliveryClosedPositions()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3885) | :closed_lock_with_key: | GET | `/delivery/{settle}/position_close` |
-| [getDeliveryLiquidationHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3898) | :closed_lock_with_key: | GET | `/delivery/{settle}/liquidates` |
-| [getDeliverySettlementHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3911) | :closed_lock_with_key: | GET | `/delivery/{settle}/settlements` |
-| [submitDeliveryTriggeredOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3924) | :closed_lock_with_key: | POST | `/delivery/{settle}/price_orders` |
-| [getDeliveryAutoOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3939) | :closed_lock_with_key: | GET | `/delivery/{settle}/price_orders` |
-| [cancelAllOpenDeliveryOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3952) | :closed_lock_with_key: | DELETE | `/delivery/{settle}/price_orders` |
-| [getDeliveryTriggeredOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3968) | :closed_lock_with_key: | GET | `/delivery/{settle}/price_orders/{order_id}` |
-| [cancelTriggeredDeliveryOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L3983) | :closed_lock_with_key: | DELETE | `/delivery/{settle}/price_orders/{order_id}` |
-| [getOptionsUnderlyings()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4002) | | GET | `/options/underlyings` |
-| [getOptionsExpirationTimes()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4012) | | GET | `/options/expirations` |
-| [getOptionsContracts()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4022) | | GET | `/options/contracts` |
-| [getOptionsContract()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4035) | | GET | `/options/contracts/{contract}` |
-| [getOptionsSettlementHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4045) | | GET | `/options/settlements` |
-| [getOptionsContractSettlement()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4057) | | GET | `/options/settlements/{contract}` |
-| [getOptionsMySettlements()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4072) | :closed_lock_with_key: | GET | `/options/my_settlements` |
-| [getOptionsOrderBook()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4086) | | GET | `/options/order_book` |
-| [getOptionsTickers()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4098) | | GET | `/options/tickers` |
-| [getOptionsUnderlyingTicker()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4112) | | GET | `/options/underlying/tickers/{underlying}` |
-| [getOptionsCandles()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4126) | | GET | `/options/candlesticks` |
-| [getOptionsUnderlyingCandles()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4136) | | GET | `/options/underlying/candlesticks` |
-| [getOptionsTrades()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4148) | | GET | `/options/trades` |
-| [getOptionsAccount()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4159) | :closed_lock_with_key: | GET | `/options/accounts` |
-| [getOptionsAccountChange()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4169) | :closed_lock_with_key: | GET | `/options/account_book` |
-| [getOptionsPositionsUnderlying()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4181) | :closed_lock_with_key: | GET | `/options/positions` |
-| [getOptionsPositionContract()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4193) | :closed_lock_with_key: | GET | `/options/positions/{contract}` |
-| [getOptionsLiquidation()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4205) | :closed_lock_with_key: | GET | `/options/position_close` |
-| [submitOptionsOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4218) | :closed_lock_with_key: | POST | `/options/orders` |
-| [getOptionsOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4230) | :closed_lock_with_key: | GET | `/options/orders` |
-| [cancelAllOpenOptionsOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4242) | :closed_lock_with_key: | DELETE | `/options/orders` |
-| [getOptionsOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4256) | :closed_lock_with_key: | GET | `/options/orders/{order_id}` |
-| [amendOptionsOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4268) | :closed_lock_with_key: | PUT | `/options/orders/{order_id}` |
-| [cancelOptionsOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4283) | :closed_lock_with_key: | DELETE | `/options/orders/{order_id}` |
-| [submitOptionsCountdownCancel()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4302) | :closed_lock_with_key: | POST | `/options/countdown_cancel_all` |
-| [getOptionsPersonalHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4318) | :closed_lock_with_key: | GET | `/options/my_trades` |
-| [setOptionsMMPSettings()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4330) | :closed_lock_with_key: | POST | `/options/mmp` |
-| [getOptionsMMPSettings()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4342) | :closed_lock_with_key: | GET | `/options/mmp` |
-| [resetOptionsMMPSettings()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4354) | :closed_lock_with_key: | POST | `/options/mmp/reset` |
-| [getLendingCurrencies()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4370) | | GET | `/earn/uni/currencies` |
-| [getLendingCurrency()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4380) | | GET | `/earn/uni/currencies/{currency}` |
-| [submitLendOrRedeemOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4390) | :closed_lock_with_key: | POST | `/earn/uni/lends` |
-| [getLendingOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4400) | :closed_lock_with_key: | GET | `/earn/uni/lends` |
-| [updateLendingOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4412) | :closed_lock_with_key: | PATCH | `/earn/uni/lends` |
-| [getLendingRecords()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4425) | :closed_lock_with_key: | GET | `/earn/uni/lend_records` |
-| [getLendingTotalInterest()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4438) | :closed_lock_with_key: | GET | `/earn/uni/interests/{currency}` |
-| [getLendingInterestRecords()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4451) | :closed_lock_with_key: | GET | `/earn/uni/interest_records` |
-| [updateInterestReinvestment()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4464) | :closed_lock_with_key: | PUT | `/earn/uni/interest_reinvest` |
-| [getLendingInterestStatus()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4480) | :closed_lock_with_key: | GET | `/earn/uni/interest_status/{currency}` |
-| [getLendingAnnualizedTrendChart()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4495) | :closed_lock_with_key: | GET | `/earn/uni/chart` |
-| [getLendingEstimatedRates()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4503) | :closed_lock_with_key: | GET | `/earn/uni/rate` |
-| [submitMultiLoanOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4520) | :closed_lock_with_key: | POST | `/loan/multi_collateral/orders` |
-| [getMultiLoanOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4532) | :closed_lock_with_key: | GET | `/loan/multi_collateral/orders` |
-| [getMultiLoanOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4544) | :closed_lock_with_key: | GET | `/loan/multi_collateral/orders/{order_id}` |
-| [repayMultiLoan()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4554) | :closed_lock_with_key: | POST | `/loan/multi_collateral/repay` |
-| [getMultiLoanRepayRecords()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4564) | :closed_lock_with_key: | GET | `/loan/multi_collateral/repay` |
-| [updateMultiLoan()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4576) | :closed_lock_with_key: | POST | `/loan/multi_collateral/mortgage` |
-| [getMultiLoanAdjustmentRecords()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4588) | :closed_lock_with_key: | GET | `/loan/multi_collateral/mortgage` |
-| [getMultiLoanCurrencyQuota()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4600) | :closed_lock_with_key: | GET | `/loan/multi_collateral/currency_quota` |
-| [getMultiLoanSupportedCurrencies()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4612) | | GET | `/loan/multi_collateral/currencies` |
-| [getMultiLoanRatio()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4621) | | GET | `/loan/multi_collateral/ltv` |
-| [getMultiLoanFixedRates()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4630) | | GET | `/loan/multi_collateral/fixed_rate` |
-| [getMultiLoanCurrentRates()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4643) | | GET | `/loan/multi_collateral/current_rate` |
-| [getDualInvestmentProducts()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4665) | | GET | `/earn/dual/investment_plan` |
-| [getDualInvestmentOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4676) | :closed_lock_with_key: | GET | `/earn/dual/orders` |
-| [submitDualInvestmentOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4688) | :closed_lock_with_key: | POST | `/earn/dual/orders` |
-| [getDualOrderRefundPreview()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4697) | :closed_lock_with_key: | GET | `/earn/dual/order-refund-preview` |
-| [submitDualOrderRefund()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4706) | :closed_lock_with_key: | POST | `/earn/dual/order-refund` |
-| [updateDualOrderReinvest()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4715) | :closed_lock_with_key: | POST | `/earn/dual/modify-order-reinvest` |
-| [getDualProjectRecommend()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4726) | :closed_lock_with_key: | GET | `/earn/dual/project-recommend` |
-| [getEarnFixedTermProducts()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4735) | | GET | `/earn/fixed-term/product` |
-| [getEarnFixedTermProductsByAsset()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4744) | | GET | `/earn/fixed-term/product/{asset}/list` |
-| [createEarnFixedTermLend()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4754) | :closed_lock_with_key: | POST | `/earn/fixed-term/user/lend` |
-| [getEarnFixedTermLends()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4763) | :closed_lock_with_key: | GET | `/earn/fixed-term/user/lend` |
-| [createEarnFixedTermPreRedeem()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4772) | :closed_lock_with_key: | POST | `/earn/fixed-term/user/pre-redeem` |
-| [getEarnFixedTermHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4783) | :closed_lock_with_key: | GET | `/earn/fixed-term/user/history` |
-| [createAutoInvestPlan()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4792) | :closed_lock_with_key: | POST | `/earn/autoinvest/plans/create` |
-| [updateAutoInvestPlan()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4801) | :closed_lock_with_key: | POST | `/earn/autoinvest/plans/update` |
-| [stopAutoInvestPlan()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4808) | :closed_lock_with_key: | POST | `/earn/autoinvest/plans/stop` |
-| [addAutoInvestPlanPosition()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4815) | :closed_lock_with_key: | POST | `/earn/autoinvest/plans/add_position` |
-| [getAutoInvestCoins()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4826) | :closed_lock_with_key: | GET | `/earn/autoinvest/coins` |
-| [getAutoInvestMinAmount()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4835) | :closed_lock_with_key: | POST | `/earn/autoinvest/min_invest_amount` |
-| [getAutoInvestPlanRecords()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4846) | :closed_lock_with_key: | GET | `/earn/autoinvest/plans/records` |
-| [getAutoInvestOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4855) | :closed_lock_with_key: | GET | `/earn/autoinvest/orders` |
-| [getAutoInvestConfig()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4864) | :closed_lock_with_key: | GET | `/earn/autoinvest/config` |
-| [getAutoInvestPlanDetail()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4871) | :closed_lock_with_key: | GET | `/earn/autoinvest/plans/detail` |
-| [getAutoInvestPlans()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4880) | :closed_lock_with_key: | GET | `/earn/autoinvest/plans/list_info` |
-| [getStakingCoins()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4892) | :closed_lock_with_key: | GET | `/earn/staking/coins` |
-| [submitStakingSwap()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4905) | :closed_lock_with_key: | POST | `/earn/staking/swap` |
-| [getAccountDetail()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4924) | :closed_lock_with_key: | GET | `/account/detail` |
-| [getAccountRateLimit()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4933) | :closed_lock_with_key: | GET | `/account/rate_limit` |
-| [createStpGroup()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4943) | :closed_lock_with_key: | POST | `/account/stp_groups` |
-| [getStpGroups()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4953) | :closed_lock_with_key: | GET | `/account/stp_groups` |
-| [getStpGroupUsers()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4963) | :closed_lock_with_key: | GET | `/account/stp_groups/{stp_id}/users` |
-| [addUsersToStpGroup()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4973) | :closed_lock_with_key: | POST | `/account/stp_groups/{stp_id}/users` |
-| [deleteUserFromStpGroup()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L4989) | :closed_lock_with_key: | DELETE | `/account/stp_groups/{stp_id}/users` |
-| [setGTDeduction()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5007) | :closed_lock_with_key: | POST | `/account/debit_fee` |
-| [getGTDeduction()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5018) | :closed_lock_with_key: | GET | `/account/debit_fee` |
-| [getAccountMainKeys()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5027) | :closed_lock_with_key: | GET | `/account/main_keys` |
-| [getAgencyTransactionHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5043) | :closed_lock_with_key: | GET | `/rebate/agency/transaction_history` |
-| [getAgencyCommissionHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5056) | :closed_lock_with_key: | GET | `/rebate/agency/commission_history` |
-| [getPartnerTransactionHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5070) | :closed_lock_with_key: | GET | `/rebate/partner/transaction_history` |
-| [getPartnerCommissionHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5085) | :closed_lock_with_key: | GET | `/rebate/partner/commission_history` |
-| [getPartnerSubordinateList()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5108) | :closed_lock_with_key: | GET | `/rebate/partner/sub_list` |
-| [getPartnerAgentDataAggregated()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5118) | :closed_lock_with_key: | GET | `/rebate/partner/data/aggregated` |
-| [getBrokerCommissionHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5131) | :closed_lock_with_key: | GET | `/rebate/broker/commission_history` |
-| [getBrokerTransactionHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5144) | :closed_lock_with_key: | GET | `/rebate/broker/transaction_history` |
-| [getUserRebateInfo()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5153) | :closed_lock_with_key: | GET | `/rebate/user/info` |
-| [createOTCQuote()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5188) | :closed_lock_with_key: | POST | `/otc/quote` |
-| [createOTCFiatOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5200) | :closed_lock_with_key: | POST | `/otc/order/create` |
-| [createOTCStablecoinOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5214) | :closed_lock_with_key: | POST | `/otc/stable_coin/order/create` |
-| [getOTCBankList()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5223) | :closed_lock_with_key: | GET | `/otc/bank/list` |
-| [getOTCBankListLegacy()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5230) | :closed_lock_with_key: | GET | `/otc/bank_list` |
-| [createOTCBank()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5237) | :closed_lock_with_key: | POST | `/otc/bank/delete` |
-| [deleteOTCBank()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5248) | :closed_lock_with_key: | POST | `/otc/bank/delete` |
-| [setDefaultOTCBank()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5255) | :closed_lock_with_key: | POST | `/otc/bank/set_default` |
-| [getOTCBankSupplementChecklist()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5262) | :closed_lock_with_key: | GET | `/otc/bank/bank_supplement_checklist` |
-| [submitOTCBankPersonalSupplement()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5271) | :closed_lock_with_key: | POST | `/otc/order/paid` |
-| [submitOTCBankEnterpriseSupplement()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5290) | :closed_lock_with_key: | POST | `/otc/order/paid` |
-| [markOTCOrderAsPaid()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5326) | :closed_lock_with_key: | POST | `/otc/order/paid` |
-| [cancelOTCOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5340) | :closed_lock_with_key: | POST | `/otc/order/cancel` |
-| [getOTCFiatOrderList()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5352) | :closed_lock_with_key: | GET | `/otc/order/list` |
-| [getOTCStablecoinOrderList()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5366) | :closed_lock_with_key: | GET | `/otc/stable_coin/order/list` |
-| [getOTCFiatOrderDetail()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5380) | :closed_lock_with_key: | GET | `/otc/order/detail` |
-| [getP2PMerchantUserInfo()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5394) | :closed_lock_with_key: | POST | `/p2p/merchant/account/get_user_info` |
-| [getP2PMerchantCounterpartyUserInfo()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5403) | :closed_lock_with_key: | POST | `/p2p/merchant/account/get_counterparty_user_info` |
-| [getP2PMerchantMyselfPayment()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5415) | :closed_lock_with_key: | POST | `/p2p/merchant/account/get_myself_payment` |
-| [getP2PMerchantSpotBalance()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5428) | :closed_lock_with_key: | POST | `/p2p/merchant/account/set_merchant_work_hours` |
-| [setP2PMerchantWorkHours()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5437) | :closed_lock_with_key: | POST | `/p2p/merchant/account/set_merchant_work_hours` |
-| [getP2PMerchantPendingTransactionList()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5448) | :closed_lock_with_key: | POST | `/p2p/merchant/transaction/get_pending_transaction_list` |
-| [getP2PMerchantCompletedTransactionList()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5460) | :closed_lock_with_key: | POST | `/p2p/merchant/transaction/get_completed_transaction_list` |
-| [getP2PMerchantTransactionDetails()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5472) | :closed_lock_with_key: | POST | `/p2p/merchant/transaction/get_transaction_details` |
-| [confirmP2PMerchantPayment()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5484) | :closed_lock_with_key: | POST | `/p2p/merchant/transaction/confirm-payment` |
-| [confirmP2PMerchantReceipt()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5495) | :closed_lock_with_key: | POST | `/p2p/merchant/transaction/confirm-receipt` |
-| [cancelP2PMerchantTransaction()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5506) | :closed_lock_with_key: | POST | `/p2p/merchant/transaction/cancel` |
-| [placeP2PMerchantBizPushOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5517) | :closed_lock_with_key: | POST | `/p2p/merchant/books/place_biz_push_order` |
-| [updateP2PMerchantAdsStatus()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5528) | :closed_lock_with_key: | POST | `/p2p/merchant/books/ads_update_status` |
-| [getP2PMerchantAdsDetail()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5541) | :closed_lock_with_key: | POST | `/p2p/merchant/books/ads_detail` |
-| [getP2PMerchantMyAdsList()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5550) | :closed_lock_with_key: | POST | `/p2p/merchant/books/my_ads_list` |
-| [getP2PMerchantAdsList()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5561) | :closed_lock_with_key: | POST | `/p2p/merchant/books/ads_list` |
-| [getP2PMerchantChatsList()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5570) | :closed_lock_with_key: | POST | `/p2p/merchant/chat/get_chats_list` |
-| [sendP2PMerchantChatMessage()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5581) | :closed_lock_with_key: | POST | `/p2p/merchant/chat/send_chat_message` |
-| [uploadP2PMerchantChatFile()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5592) | :closed_lock_with_key: | POST | `/p2p/merchant/chat/upload_chat_file` |
-| [getCrossExSymbols()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5613) | | GET | `/crossex/rule/symbols` |
-| [getCrossExRiskLimits()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5625) | | GET | `/crossex/rule/risk_limits` |
-| [getCrossExTransferCoins()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5639) | | GET | `/crossex/transfers/coin` |
-| [createCrossExTransfer()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5653) | :closed_lock_with_key: | POST | `/crossex/transfers` |
-| [getCrossExTransferHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5667) | :closed_lock_with_key: | GET | `/crossex/transfers` |
-| [createCrossExOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5681) | :closed_lock_with_key: | POST | `/crossex/orders` |
-| [cancelCrossExOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5695) | :closed_lock_with_key: | DELETE | `/crossex/orders/{order_id}` |
-| [modifyCrossExOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5708) | :closed_lock_with_key: | PUT | `/crossex/orders/{order_id}` |
-| [getCrossExOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5723) | :closed_lock_with_key: | GET | `/crossex/orders/{order_id}` |
-| [createCrossExConvertQuote()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5735) | :closed_lock_with_key: | POST | `/crossex/convert/quote` |
-| [createCrossExConvertOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5749) | :closed_lock_with_key: | POST | `/crossex/convert/orders` |
-| [updateCrossExAccount()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5763) | :closed_lock_with_key: | PUT | `/crossex/accounts` |
-| [getCrossExAccounts()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5777) | :closed_lock_with_key: | GET | `/crossex/accounts` |
-| [setCrossExPositionLeverage()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5789) | :closed_lock_with_key: | POST | `/crossex/positions/leverage` |
-| [getCrossExPositionLeverage()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5803) | :closed_lock_with_key: | GET | `/crossex/positions/leverage` |
-| [setCrossExMarginPositionLeverage()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5817) | :closed_lock_with_key: | POST | `/crossex/margin_positions/leverage` |
-| [getCrossExMarginPositionLeverage()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5833) | :closed_lock_with_key: | GET | `/crossex/margin_positions/leverage` |
-| [closeCrossExPosition()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5847) | :closed_lock_with_key: | POST | `/crossex/position` |
-| [getCrossExInterestRate()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5861) | :closed_lock_with_key: | GET | `/crossex/interest_rate` |
-| [getCrossExFeeRate()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5874) | :closed_lock_with_key: | GET | `/crossex/fee` |
-| [getCrossExPositions()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5886) | :closed_lock_with_key: | GET | `/crossex/positions` |
-| [getCrossExMarginPositions()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5900) | :closed_lock_with_key: | GET | `/crossex/margin_positions` |
-| [getCrossExAdlRank()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5914) | :closed_lock_with_key: | GET | `/crossex/adl_rank` |
-| [getCrossExOpenOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5926) | :closed_lock_with_key: | GET | `/crossex/open_orders` |
-| [getCrossExHistoryOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5940) | :closed_lock_with_key: | GET | `/crossex/history_orders` |
-| [getCrossExHistoryPositions()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5954) | :closed_lock_with_key: | GET | `/crossex/history_positions` |
-| [getCrossExHistoryMarginPositions()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5968) | :closed_lock_with_key: | GET | `/crossex/history_margin_positions` |
-| [getCrossExHistoryMarginInterests()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5982) | :closed_lock_with_key: | GET | `/crossex/history_margin_interests` |
-| [getCrossExHistoryTrades()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L5996) | :closed_lock_with_key: | GET | `/crossex/history_trades` |
-| [getCrossExAccountBook()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6010) | :closed_lock_with_key: | GET | `/crossex/account_book` |
-| [getCrossExCoinDiscountRate()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6024) | :closed_lock_with_key: | GET | `/crossex/coin_discount_rate` |
-| [getAlphaAccounts()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6042) | :closed_lock_with_key: | GET | `/alpha/accounts` |
-| [getAlphaAccountBook()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6054) | :closed_lock_with_key: | GET | `/alpha/account_book` |
-| [createAlphaQuote()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6068) | :closed_lock_with_key: | POST | `/alpha/quote` |
-| [createAlphaOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6080) | :closed_lock_with_key: | POST | `/alpha/orders` |
-| [getAlphaOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6092) | :closed_lock_with_key: | GET | `/alpha/orders` |
-| [getAlphaOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6104) | :closed_lock_with_key: | GET | `/alpha/order` |
-| [getAlphaCurrencies()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6116) | | GET | `/alpha/currencies` |
-| [getAlphaTickers()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6128) | | GET | `/alpha/tickers` |
-| [getTradFiMT5Account()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6134) | :closed_lock_with_key: | GET | `/tradfi/users/mt5-account` |
-| [getTradFiSymbolCategories()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6138) | | GET | `/tradfi/symbols/categories` |
-| [getTradFiSymbols()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6144) | | GET | `/tradfi/symbols` |
-| [getTradFiSymbolDetail()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6148) | :closed_lock_with_key: | GET | `/tradfi/symbols/detail` |
-| [getTradFiKlines()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6154) | | GET | `/tradfi/symbols/{symbol}/klines` |
-| [getTradFiTicker()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6161) | | GET | `/tradfi/symbols/{symbol}/tickers` |
-| [createTradFiUser()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6165) | :closed_lock_with_key: | POST | `/tradfi/users` |
-| [getTradFiAssets()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6169) | :closed_lock_with_key: | GET | `/tradfi/users/assets` |
-| [createTradFiTransaction()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6173) | :closed_lock_with_key: | POST | `/tradfi/transactions` |
-| [getTradFiTransactions()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6179) | :closed_lock_with_key: | GET | `/tradfi/transactions` |
-| [createTradFiOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6185) | :closed_lock_with_key: | POST | `/tradfi/orders` |
-| [getTradFiOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6191) | :closed_lock_with_key: | GET | `/tradfi/orders` |
-| [modifyTradFiOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6195) | :closed_lock_with_key: | PUT | `/tradfi/orders/{orderId}` |
-| [cancelTradFiOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6202) | :closed_lock_with_key: | DELETE | `/tradfi/orders/{orderId}` |
-| [getTradFiOrderHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6206) | :closed_lock_with_key: | GET | `/tradfi/orders/history` |
-| [getTradFiPositions()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6212) | :closed_lock_with_key: | GET | `/tradfi/positions` |
-| [modifyTradFiPosition()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6218) | :closed_lock_with_key: | PUT | `/tradfi/positions/{positionId}` |
-| [closeTradFiPosition()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6227) | :closed_lock_with_key: | POST | `/tradfi/positions/{positionId}/close` |
-| [getTradFiPositionHistory()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6236) | :closed_lock_with_key: | GET | `/tradfi/positions/history` |
-| [getTradFiOrderLog()](https://github.com/tiagosiebler/gateio-api/blob/master/src/RestClient.ts#L6245) | :closed_lock_with_key: | GET | `/tradfi/orders/log/{log_id}` |
+| Function | AUTH | HTTP Method | Endpoint |
+| ---------------------------------------------------------------------------------------------------------------------- | :--------------------: | :---------: | ------------------------------------------------------------- |
+| [getSystemMaintenanceStatus()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L703) | | GET | `/v1/public/system_info` |
+| [submitWithdrawal()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L720) | :closed_lock_with_key: | POST | `/withdrawals` |
+| [submitSpotMainAccountTransfer()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L734) | :closed_lock_with_key: | POST | `/withdrawals/push` |
+| [cancelWithdrawal()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L750) | :closed_lock_with_key: | DELETE | `/withdrawals/{withdrawal_id}` |
+| [getCurrencyChains()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L767) | | GET | `/wallet/currency_chains` |
+| [createDepositAddress()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L777) | :closed_lock_with_key: | GET | `/wallet/deposit_address` |
+| [getWithdrawalRecords()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L791) | :closed_lock_with_key: | GET | `/wallet/withdrawals` |
+| [getDepositRecords()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L805) | :closed_lock_with_key: | GET | `/wallet/deposits` |
+| [submitTransfer()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L824) | :closed_lock_with_key: | POST | `/wallet/transfers` |
+| [getTransfer()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L836) | :closed_lock_with_key: | GET | `/wallet/transfers` |
+| [submitMainSubTransfer()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L848) | :closed_lock_with_key: | POST | `/wallet/sub_account_transfers` |
+| [getMainSubTransfers()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L862) | :closed_lock_with_key: | GET | `/wallet/sub_account_transfers` |
+| [submitSubToSubTransfer()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L876) | :closed_lock_with_key: | POST | `/wallet/sub_account_to_sub_account` |
+| [getTransferStatus()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L891) | :closed_lock_with_key: | GET | `/wallet/order_status` |
+| [getWithdrawalStatus()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L907) | :closed_lock_with_key: | GET | `/wallet/withdraw_status` |
+| [getSubBalance()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L919) | :closed_lock_with_key: | GET | `/wallet/sub_account_balances` |
+| [getSubMarginBalances()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L931) | :closed_lock_with_key: | GET | `/wallet/sub_account_margin_balances` |
+| [getSubFuturesBalances()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L943) | :closed_lock_with_key: | GET | `/wallet/sub_account_futures_balances` |
+| [getSubCrossMarginBalances()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L956) | :closed_lock_with_key: | GET | `/wallet/sub_account_cross_margin_balances` |
+| [getSavedAddresses()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L968) | :closed_lock_with_key: | GET | `/wallet/saved_address` |
+| [getTradingFees()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L978) | :closed_lock_with_key: | GET | `/wallet/fee` |
+| [getBalances()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L999) | :closed_lock_with_key: | GET | `/wallet/total_balance` |
+| [getSmallBalances()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1008) | :closed_lock_with_key: | GET | `/wallet/small_balance` |
+| [convertSmallBalance()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1018) | :closed_lock_with_key: | POST | `/wallet/small_balance` |
+| [getSmallBalanceHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1031) | :closed_lock_with_key: | GET | `/wallet/small_balance_history` |
+| [getPushOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1043) | :closed_lock_with_key: | GET | `/wallet/push` |
+| [getLowCapExchangeList()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1052) | :closed_lock_with_key: | GET | `/wallet/getLowCapExchangeList` |
+| [createSubAccount()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1067) | :closed_lock_with_key: | POST | `/sub_accounts` |
+| [getSubAccounts()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1078) | :closed_lock_with_key: | GET | `/sub_accounts` |
+| [getSubAccount()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1088) | :closed_lock_with_key: | GET | `/sub_accounts/{user_id}` |
+| [createSubAccountApiKey()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1098) | :closed_lock_with_key: | POST | `/sub_accounts/{user_id}/keys` |
+| [getSubAccountApiKeys()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1111) | :closed_lock_with_key: | GET | `/sub_accounts/{user_id}/keys` |
+| [updateSubAccountApiKey()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1125) | :closed_lock_with_key: | PUT | `/sub_accounts/{user_id}/keys/{key}` |
+| [deleteSubAccountApiKey()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1136) | :closed_lock_with_key: | DELETE | `/sub_accounts/{user_id}/keys/{key}` |
+| [getSubAccountApiKey()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1151) | :closed_lock_with_key: | GET | `/sub_accounts/{user_id}/keys/{key}` |
+| [lockSubAccount()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1166) | :closed_lock_with_key: | POST | `/sub_accounts/{user_id}/lock` |
+| [unlockSubAccount()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1176) | :closed_lock_with_key: | POST | `/sub_accounts/{user_id}/unlock` |
+| [getSubAccountMode()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1190) | :closed_lock_with_key: | GET | `/sub_accounts/unified_mode` |
+| [getUnifiedAccountInfo()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1209) | :closed_lock_with_key: | GET | `/unified/accounts` |
+| [getUnifiedMaxBorrow()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1225) | :closed_lock_with_key: | GET | `/unified/borrowable` |
+| [getUnifiedMaxTransferable()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1241) | :closed_lock_with_key: | GET | `/unified/transferable` |
+| [getUnifiedMaxTransferables()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1256) | :closed_lock_with_key: | GET | `/unified/transferables` |
+| [getUnifiedBatchMaxBorrowable()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1265) | :closed_lock_with_key: | GET | `/unified/batch_borrowable` |
+| [submitUnifiedBorrowOrRepay()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1283) | :closed_lock_with_key: | POST | `/unified/loans` |
+| [getUnifiedLoans()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1295) | :closed_lock_with_key: | GET | `/unified/loans` |
+| [getUnifiedLoanRecords()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1305) | :closed_lock_with_key: | GET | `/unified/loan_records` |
+| [getUnifiedInterestRecords()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1317) | :closed_lock_with_key: | GET | `/unified/interest_records` |
+| [getUnifiedRiskUnitDetails()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1328) | :closed_lock_with_key: | GET | `/unified/risk_units` |
+| [setUnifiedAccountMode()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1340) | :closed_lock_with_key: | PUT | `/unified/unified_mode` |
+| [getUnifiedAccountMode()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1349) | :closed_lock_with_key: | GET | `/unified/unified_mode` |
+| [getUnifiedEstimateRate()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1361) | :closed_lock_with_key: | GET | `/unified/estimate_rate` |
+| [getUnifiedCurrencyDiscountTiers()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1372) | | GET | `/unified/currency_discount_tiers` |
+| [getLoanMarginTiers()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1384) | | GET | `/unified/loan_margin_tiers` |
+| [portfolioMarginCalculate()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1401) | | POST | `/unified/portfolio_calculator` |
+| [setUserLeverage()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1415) | :closed_lock_with_key: | POST | `/unified/leverage/user_setting` |
+| [getUserCurrencyLeverageConfig()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1429) | :closed_lock_with_key: | GET | `/unified/leverage/user_currency_config` |
+| [getUserCurrencyLeverageSettings()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1443) | :closed_lock_with_key: | GET | `/unified/leverage/user_currency_setting` |
+| [updateUserCurrencyLeverage()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1458) | :closed_lock_with_key: | POST | `/unified/leverage/user_currency_setting` |
+| [getUnifiedLoanCurrencies()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1473) | :closed_lock_with_key: | GET | `/unified/currencies` |
+| [getHistoricalLendingRates()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1485) | :closed_lock_with_key: | GET | `/unified/history_loan_rate` |
+| [submitUnifiedLoanRepay()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1491) | :closed_lock_with_key: | POST | `/unified/loans/repay` |
+| [getEstimatedQuickRepayment()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1498) | :closed_lock_with_key: | GET | `/unified/estimated_quick_repayment` |
+| [createQuickRepayment()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1505) | :closed_lock_with_key: | POST | `/unified/quick_repayment` |
+| [setUnifiedDeltaNeutral()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1516) | :closed_lock_with_key: | POST | `/unified/delta_neutral` |
+| [getUnifiedDeltaNeutral()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1525) | :closed_lock_with_key: | GET | `/unified/delta_neutral` |
+| [getSpotCurrencies()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1545) | | GET | `/spot/currencies` |
+| [getSpotCurrency()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1555) | | GET | `/spot/currencies/{currency}` |
+| [getSpotCurrencyPairs()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1564) | | GET | `/spot/currency_pairs` |
+| [getSpotCurrencyPair()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1574) | | GET | `/spot/currency_pairs/{currency_pair}` |
+| [getSpotTicker()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1588) | | GET | `/spot/tickers` |
+| [getSpotOrderBook()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1603) | | GET | `/spot/order_book` |
+| [getSpotTrades()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1616) | | GET | `/spot/trades` |
+| [getSpotCandles()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1628) | | GET | `/spot/candlesticks` |
+| [getSpotFeeRates()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1640) | :closed_lock_with_key: | GET | `/spot/fee` |
+| [getSpotBatchFeeRates()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1649) | :closed_lock_with_key: | GET | `/spot/batch_fee` |
+| [getSpotAccounts()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1661) | :closed_lock_with_key: | GET | `/spot/accounts` |
+| [getSpotAccountBook()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1673) | :closed_lock_with_key: | GET | `/spot/account_book` |
+| [submitSpotBatchOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1692) | :closed_lock_with_key: | POST | `/spot/batch_orders` |
+| [getSpotOpenOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1719) | :closed_lock_with_key: | GET | `/spot/open_orders` |
+| [submitSpotClosePosCrossDisabled()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1735) | :closed_lock_with_key: | POST | `/spot/cross_liquidate_orders` |
+| [submitSpotOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1751) | :closed_lock_with_key: | POST | `/spot/orders` |
+| [getSpotOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1768) | :closed_lock_with_key: | GET | `/spot/orders` |
+| [cancelSpotOpenOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1783) | :closed_lock_with_key: | DELETE | `/spot/orders` |
+| [batchCancelSpotOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1811) | :closed_lock_with_key: | POST | `/spot/cancel_batch_orders` |
+| [getSpotOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1836) | :closed_lock_with_key: | GET | `/spot/orders/{order_id}` |
+| [updateSpotOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1853) | :closed_lock_with_key: | PATCH | `/spot/orders/{order_id}` |
+| [cancelSpotOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1881) | :closed_lock_with_key: | DELETE | `/spot/orders/{order_id}` |
+| [getSpotTradingHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1910) | :closed_lock_with_key: | GET | `/spot/my_trades` |
+| [submitSpotCountdownOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1939) | :closed_lock_with_key: | POST | `/spot/countdown_cancel_all` |
+| [batchUpdateSpotOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1958) | :closed_lock_with_key: | POST | `/spot/amend_batch_orders` |
+| [getSpotInsuranceHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1985) | :closed_lock_with_key: | GET | `/spot/insurance_history` |
+| [submitSpotPriceTriggerOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L1999) | :closed_lock_with_key: | POST | `/spot/price_orders` |
+| [getSpotAutoOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2011) | :closed_lock_with_key: | GET | `/spot/price_orders` |
+| [cancelAllOpenSpotOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2023) | :closed_lock_with_key: | DELETE | `/spot/price_orders` |
+| [getPriceTriggeredOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2036) | :closed_lock_with_key: | GET | `/spot/price_orders/{order_id}` |
+| [cancelSpotTriggeredOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2048) | :closed_lock_with_key: | DELETE | `/spot/price_orders/{order_id}` |
+| [getSpotPovOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2062) | :closed_lock_with_key: | GET | `/spot/pov_orders` |
+| [createSpotPovOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2074) | :closed_lock_with_key: | POST | `/spot/pov_orders` |
+| [cancelSpotPovOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2086) | :closed_lock_with_key: | POST | `/spot/pov_orders/cancel` |
+| [getSpotPovOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2100) | :closed_lock_with_key: | GET | `/spot/pov_orders/{order_id}` |
+| [cancelSpotPovOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2112) | :closed_lock_with_key: | POST | `/spot/pov_orders/{order_id}/cancel` |
+| [setCollateralCurrency()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2124) | :closed_lock_with_key: | POST | `/unified/collateral_currencies` |
+| [getMarginAccounts()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2145) | :closed_lock_with_key: | GET | `/margin/accounts` |
+| [getMarginBalanceHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2159) | :closed_lock_with_key: | GET | `/margin/account_book` |
+| [getFundingAccounts()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2177) | :closed_lock_with_key: | GET | `/margin/funding_accounts` |
+| [updateAutoRepaymentSetting()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2195) | :closed_lock_with_key: | POST | `/margin/auto_repay` |
+| [getAutoRepaymentSetting()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2206) | :closed_lock_with_key: | GET | `/margin/auto_repay` |
+| [getMarginTransferableAmount()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2220) | :closed_lock_with_key: | GET | `/margin/transferable` |
+| [getCrossMarginCurrencies()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2237) | | GET | `/margin/cross/currencies` |
+| [getCrossMarginCurrency()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2248) | | GET | `/margin/cross/currencies/{currency}` |
+| [getCrossMarginAccount()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2260) | :closed_lock_with_key: | GET | `/margin/cross/accounts` |
+| [getCrossMarginAccountHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2273) | :closed_lock_with_key: | GET | `/margin/cross/account_book` |
+| [submitCrossMarginBorrowLoan()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2290) | :closed_lock_with_key: | POST | `/margin/cross/loans` |
+| [getCrossMarginBorrowHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2305) | :closed_lock_with_key: | GET | `/margin/cross/loans` |
+| [getCrossMarginBorrowLoan()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2318) | :closed_lock_with_key: | GET | `/margin/cross/loans/{loan_id}` |
+| [submitCrossMarginRepayment()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2333) | :closed_lock_with_key: | POST | `/margin/cross/repayments` |
+| [getCrossMarginRepayments()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2349) | :closed_lock_with_key: | GET | `/margin/cross/repayments` |
+| [getCrossMarginInterestRecords()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2362) | :closed_lock_with_key: | GET | `/margin/cross/interest_records` |
+| [getCrossMarginTransferableAmount()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2378) | :closed_lock_with_key: | GET | `/margin/cross/transferable` |
+| [getEstimatedInterestRates()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2394) | :closed_lock_with_key: | GET | `/margin/cross/estimate_rate` |
+| [getCrossMarginBorrowableAmount()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2408) | :closed_lock_with_key: | GET | `/margin/cross/borrowable` |
+| [getMarginUserLoanTiers()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2421) | :closed_lock_with_key: | GET | `/margin/user/loan_margin_tiers` |
+| [getMarginPublicLoanTiers()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2437) | | GET | `/margin/loan_margin_tiers` |
+| [setMarginUserLeverage()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2453) | :closed_lock_with_key: | POST | `/margin/leverage/user_market_setting` |
+| [getMarginUserAccounts()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2470) | :closed_lock_with_key: | GET | `/margin/user/account` |
+| [getLendingMarkets()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2485) | | GET | `/margin/uni/currency_pairs` |
+| [getLendingMarket()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2500) | | GET | `/margin/uni/currency_pairs/{currency_pair}` |
+| [getEstimatedInterestRate()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2512) | :closed_lock_with_key: | GET | `/margin/uni/estimate_rate` |
+| [submitMarginUNIBorrowOrRepay()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2522) | :closed_lock_with_key: | POST | `/margin/uni/loans` |
+| [getMarginUNILoans()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2538) | :closed_lock_with_key: | GET | `/margin/uni/loans` |
+| [getMarginUNILoanRecords()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2548) | :closed_lock_with_key: | GET | `/margin/uni/loan_records` |
+| [getMarginUNIInterestRecords()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2560) | :closed_lock_with_key: | GET | `/margin/uni/interest_records` |
+| [getMarginUNIMaxBorrow()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2572) | :closed_lock_with_key: | GET | `/margin/uni/borrowable` |
+| [getFlashSwapCurrencyPairs()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2588) | | GET | `/flash_swap/currency_pairs` |
+| [submitFlashSwapOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2604) | :closed_lock_with_key: | POST | `/flash_swap/orders` |
+| [getFlashSwapOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2616) | :closed_lock_with_key: | GET | `/flash_swap/orders` |
+| [getFlashSwapOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2628) | :closed_lock_with_key: | GET | `/flash_swap/orders/{order_id}` |
+| [submitFlashSwapOrderPreview()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2638) | :closed_lock_with_key: | POST | `/flash_swap/orders/preview` |
+| [getFuturesContracts()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2655) | | GET | `/futures/{settle}/contracts` |
+| [getFuturesContract()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2670) | | GET | `/futures/{settle}/contracts/{contract}` |
+| [getFuturesOrderBook()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2685) | | GET | `/futures/{settle}/order_book` |
+| [getFuturesTrades()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2698) | | GET | `/futures/{settle}/trades` |
+| [getFuturesCandles()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2713) | | GET | `/futures/{settle}/candlesticks` |
+| [getPremiumIndexKLines()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2726) | | GET | `/futures/{settle}/premium_index` |
+| [getFuturesTickers()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2739) | | GET | `/futures/{settle}/tickers` |
+| [getFundingRates()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2756) | | GET | `/futures/{settle}/funding_rate` |
+| [getBatchFundingRates()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2772) | | POST | `/futures/{settle}/funding_rates` |
+| [getFuturesInsuranceBalanceHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2790) | | GET | `/futures/{settle}/insurance` |
+| [getFuturesStats()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2809) | | GET | `/futures/{settle}/contract_stats` |
+| [getIndexConstituents()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2820) | | GET | `/futures/{settle}/index_constituents/{index}` |
+| [getLiquidationHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2837) | | GET | `/futures/{settle}/liq_orders` |
+| [getRiskLimitTiers()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2854) | | GET | `/futures/{settle}/risk_limit_tiers` |
+| [getFuturesAccount()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2867) | :closed_lock_with_key: | GET | `/futures/{settle}/accounts` |
+| [getFuturesAccountBook()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2881) | :closed_lock_with_key: | GET | `/futures/{settle}/account_book` |
+| [getFuturesPositions()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2894) | :closed_lock_with_key: | GET | `/futures/{settle}/positions` |
+| [getFuturesPosition()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2909) | :closed_lock_with_key: | GET | `/futures/{settle}/positions/{contract}` |
+| [updateFuturesMargin()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2926) | :closed_lock_with_key: | POST | `/futures/{settle}/positions/{contract}/margin` |
+| [updateFuturesLeverage()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2954) | :closed_lock_with_key: | POST | `/futures/{settle}/positions/{contract}/leverage` |
+| [getFuturesContractLeverage()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2974) | :closed_lock_with_key: | GET | `/futures/{settle}/get_leverage/{contract}` |
+| [updateFuturesPositionMode()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L2990) | :closed_lock_with_key: | POST | `/futures/{settle}/positions/cross_mode` |
+| [updatePositionRiskLimit()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3007) | :closed_lock_with_key: | POST | `/futures/{settle}/positions/{contract}/risk_limit` |
+| [updateFuturesDualMode()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3027) | :closed_lock_with_key: | POST | `/futures/{settle}/dual_mode` |
+| [getDualModePosition()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3043) | :closed_lock_with_key: | GET | `/futures/{settle}/dual_comp/positions/{contract}` |
+| [updateDualModePositionMargin()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3058) | :closed_lock_with_key: | POST | `/futures/{settle}/dual_comp/positions/{contract}/margin` |
+| [updateDualModePositionLeverage()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3074) | :closed_lock_with_key: | POST | `/futures/{settle}/dual_comp/positions/{contract}/leverage` |
+| [updateDualModePositionRiskLimit()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3098) | :closed_lock_with_key: | POST | `/futures/{settle}/dual_comp/positions/{contract}/risk_limit` |
+| [submitFuturesOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3125) | :closed_lock_with_key: | POST | `/futures/{settle}/orders` |
+| [getFuturesOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3146) | :closed_lock_with_key: | GET | `/futures/{settle}/orders` |
+| [cancelAllFuturesOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3161) | :closed_lock_with_key: | DELETE | `/futures/{settle}/orders` |
+| [getFuturesOrdersByTimeRange()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3181) | :closed_lock_with_key: | GET | `/futures/{settle}/orders_timerange` |
+| [submitFuturesBatchOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3204) | :closed_lock_with_key: | POST | `/futures/{settle}/batch_orders` |
+| [getFuturesOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3229) | :closed_lock_with_key: | GET | `/futures/{settle}/orders/{order_id}` |
+| [cancelFuturesOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3246) | :closed_lock_with_key: | DELETE | `/futures/{settle}/orders/{order_id}` |
+| [updateFuturesOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3271) | :closed_lock_with_key: | PUT | `/futures/{settle}/orders/{order_id}` |
+| [getFuturesTradingHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3292) | :closed_lock_with_key: | GET | `/futures/{settle}/my_trades` |
+| [getFuturesTradingHistoryByTimeRange()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3307) | :closed_lock_with_key: | GET | `/futures/{settle}/my_trades_timerange` |
+| [getFuturesPositionHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3320) | :closed_lock_with_key: | GET | `/futures/{settle}/position_close` |
+| [getFuturesLiquidationHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3333) | :closed_lock_with_key: | GET | `/futures/{settle}/liquidates` |
+| [getFuturesAutoDeleveragingHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3346) | :closed_lock_with_key: | GET | `/futures/{settle}/auto_deleverages` |
+| [setFuturesOrderCancelCountdown()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3363) | :closed_lock_with_key: | POST | `/futures/{settle}/countdown_cancel_all` |
+| [getFuturesUserTradingFees()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3380) | :closed_lock_with_key: | GET | `/futures/{settle}/fee` |
+| [batchCancelFuturesOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3398) | :closed_lock_with_key: | POST | `/futures/{settle}/batch_cancel_orders` |
+| [batchUpdateFuturesOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3425) | :closed_lock_with_key: | POST | `/futures/{settle}/batch_amend_orders` |
+| [getRiskLimitTable()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3447) | | GET | `/futures/{settle}/risk_limit_table` |
+| [submitFuturesPriceTriggeredOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3460) | :closed_lock_with_key: | POST | `/futures/{settle}/price_orders` |
+| [getFuturesAutoOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3473) | :closed_lock_with_key: | GET | `/futures/{settle}/price_orders` |
+| [cancelAllOpenFuturesOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3486) | :closed_lock_with_key: | DELETE | `/futures/{settle}/price_orders` |
+| [getFuturesPriceTriggeredOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3502) | :closed_lock_with_key: | GET | `/futures/{settle}/price_orders/{order_id}` |
+| [cancelFuturesPriceTriggeredOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3517) | :closed_lock_with_key: | DELETE | `/futures/{settle}/price_orders/{order_id}` |
+| [updateFuturesPriceTriggeredOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3532) | :closed_lock_with_key: | PUT | `/futures/{settle}/price_orders/amend` |
+| [createTrailOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3547) | :closed_lock_with_key: | POST | `/futures/{settle}/autoorder/v1/trail/create` |
+| [terminateTrailOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3565) | :closed_lock_with_key: | POST | `/futures/{settle}/autoorder/v1/trail/stop` |
+| [batchTerminateTrailOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3578) | :closed_lock_with_key: | POST | `/futures/{settle}/autoorder/v1/trail/stop_all` |
+| [getTrailOrderList()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3593) | :closed_lock_with_key: | GET | `/futures/{settle}/autoorder/v1/trail/list` |
+| [getTrailOrderDetail()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3606) | :closed_lock_with_key: | GET | `/futures/{settle}/autoorder/v1/trail/detail` |
+| [updateTrailOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3624) | :closed_lock_with_key: | POST | `/futures/{settle}/autoorder/v1/trail/update` |
+| [getTrailOrderChangeLog()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3637) | :closed_lock_with_key: | GET | `/futures/{settle}/autoorder/v1/trail/change_log` |
+| [createChaseOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3650) | :closed_lock_with_key: | POST | `/futures/{settle}/autoorder/v1/chase/create` |
+| [stopChaseOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3660) | :closed_lock_with_key: | POST | `/futures/{settle}/autoorder/v1/chase/stop` |
+| [stopAllChaseOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3670) | :closed_lock_with_key: | POST | `/futures/{settle}/autoorder/v1/chase/stop_all` |
+| [getChaseOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3682) | :closed_lock_with_key: | GET | `/futures/{settle}/autoorder/v1/chase/list` |
+| [getChaseOrderDetail()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3690) | :closed_lock_with_key: | GET | `/futures/{settle}/autoorder/v1/chase/detail` |
+| [getFuturesPositionCloseHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3699) | :closed_lock_with_key: | GET | `/futures/{settle}/position_close_history` |
+| [getFuturesInsuranceHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3708) | :closed_lock_with_key: | GET | `/futures/{settle}/insurance` |
+| [getAllDeliveryContracts()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3725) | | GET | `/delivery/{settle}/contracts` |
+| [getDeliveryContract()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3737) | | GET | `/delivery/{settle}/contracts/{contract}` |
+| [getDeliveryOrderBook()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3752) | | GET | `/delivery/{settle}/order_book` |
+| [getDeliveryTrades()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3765) | | GET | `/delivery/{settle}/trades` |
+| [getDeliveryCandles()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3779) | | GET | `/delivery/{settle}/candlesticks` |
+| [getDeliveryTickers()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3790) | | GET | `/delivery/{settle}/tickers` |
+| [getDeliveryInsuranceBalanceHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3807) | | GET | `/delivery/{settle}/insurance` |
+| [getDeliveryAccount()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3826) | :closed_lock_with_key: | GET | `/delivery/{settle}/accounts` |
+| [getDeliveryBook()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3837) | :closed_lock_with_key: | GET | `/delivery/{settle}/account_book` |
+| [getDeliveryPositions()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3848) | :closed_lock_with_key: | GET | `/delivery/{settle}/positions` |
+| [getDeliveryPosition()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3858) | :closed_lock_with_key: | GET | `/delivery/{settle}/positions/{contract}` |
+| [updateDeliveryMargin()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3873) | :closed_lock_with_key: | POST | `/delivery/{settle}/positions/{contract}/margin` |
+| [updateDeliveryLeverage()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3891) | :closed_lock_with_key: | POST | `/delivery/{settle}/positions/{contract}/leverage` |
+| [updateDeliveryRiskLimit()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3909) | :closed_lock_with_key: | POST | `/delivery/{settle}/positions/{contract}/risk_limit` |
+| [submitDeliveryOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3929) | :closed_lock_with_key: | POST | `/delivery/{settle}/orders` |
+| [getDeliveryOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3944) | :closed_lock_with_key: | GET | `/delivery/{settle}/orders` |
+| [cancelAllDeliveryOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3957) | :closed_lock_with_key: | DELETE | `/delivery/{settle}/orders` |
+| [getDeliveryOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3976) | :closed_lock_with_key: | GET | `/delivery/{settle}/orders/{order_id}` |
+| [cancelDeliveryOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L3991) | :closed_lock_with_key: | DELETE | `/delivery/{settle}/orders/{order_id}` |
+| [getDeliveryTradingHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4006) | :closed_lock_with_key: | GET | `/delivery/{settle}/my_trades` |
+| [getDeliveryClosedPositions()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4019) | :closed_lock_with_key: | GET | `/delivery/{settle}/position_close` |
+| [getDeliveryLiquidationHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4032) | :closed_lock_with_key: | GET | `/delivery/{settle}/liquidates` |
+| [getDeliverySettlementHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4045) | :closed_lock_with_key: | GET | `/delivery/{settle}/settlements` |
+| [submitDeliveryTriggeredOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4058) | :closed_lock_with_key: | POST | `/delivery/{settle}/price_orders` |
+| [getDeliveryAutoOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4073) | :closed_lock_with_key: | GET | `/delivery/{settle}/price_orders` |
+| [cancelAllOpenDeliveryOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4086) | :closed_lock_with_key: | DELETE | `/delivery/{settle}/price_orders` |
+| [getDeliveryTriggeredOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4102) | :closed_lock_with_key: | GET | `/delivery/{settle}/price_orders/{order_id}` |
+| [cancelTriggeredDeliveryOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4117) | :closed_lock_with_key: | DELETE | `/delivery/{settle}/price_orders/{order_id}` |
+| [getOptionsUnderlyings()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4136) | | GET | `/options/underlyings` |
+| [getOptionsExpirationTimes()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4146) | | GET | `/options/expirations` |
+| [getOptionsContracts()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4156) | | GET | `/options/contracts` |
+| [getOptionsContract()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4169) | | GET | `/options/contracts/{contract}` |
+| [getOptionsSettlementHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4179) | | GET | `/options/settlements` |
+| [getOptionsContractSettlement()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4191) | | GET | `/options/settlements/{contract}` |
+| [getOptionsMySettlements()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4206) | :closed_lock_with_key: | GET | `/options/my_settlements` |
+| [getOptionsOrderBook()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4220) | | GET | `/options/order_book` |
+| [getOptionsTickers()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4232) | | GET | `/options/tickers` |
+| [getOptionsUnderlyingTicker()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4246) | | GET | `/options/underlying/tickers/{underlying}` |
+| [getOptionsCandles()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4260) | | GET | `/options/candlesticks` |
+| [getOptionsUnderlyingCandles()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4270) | | GET | `/options/underlying/candlesticks` |
+| [getOptionsTrades()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4282) | | GET | `/options/trades` |
+| [getOptionsAccount()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4293) | :closed_lock_with_key: | GET | `/options/accounts` |
+| [getOptionsAccountChange()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4303) | :closed_lock_with_key: | GET | `/options/account_book` |
+| [getOptionsPositionsUnderlying()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4315) | :closed_lock_with_key: | GET | `/options/positions` |
+| [getOptionsPositionContract()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4327) | :closed_lock_with_key: | GET | `/options/positions/{contract}` |
+| [getOptionsLiquidation()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4339) | :closed_lock_with_key: | GET | `/options/position_close` |
+| [submitOptionsOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4352) | :closed_lock_with_key: | POST | `/options/orders` |
+| [getOptionsOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4364) | :closed_lock_with_key: | GET | `/options/orders` |
+| [cancelAllOpenOptionsOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4376) | :closed_lock_with_key: | DELETE | `/options/orders` |
+| [getOptionsOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4390) | :closed_lock_with_key: | GET | `/options/orders/{order_id}` |
+| [amendOptionsOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4402) | :closed_lock_with_key: | PUT | `/options/orders/{order_id}` |
+| [cancelOptionsOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4417) | :closed_lock_with_key: | DELETE | `/options/orders/{order_id}` |
+| [submitOptionsCountdownCancel()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4436) | :closed_lock_with_key: | POST | `/options/countdown_cancel_all` |
+| [getOptionsPersonalHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4452) | :closed_lock_with_key: | GET | `/options/my_trades` |
+| [setOptionsMMPSettings()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4464) | :closed_lock_with_key: | POST | `/options/mmp` |
+| [getOptionsMMPSettings()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4476) | :closed_lock_with_key: | GET | `/options/mmp` |
+| [resetOptionsMMPSettings()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4488) | :closed_lock_with_key: | POST | `/options/mmp/reset` |
+| [getLendingCurrencies()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4504) | | GET | `/earn/uni/currencies` |
+| [getLendingCurrency()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4514) | | GET | `/earn/uni/currencies/{currency}` |
+| [submitLendOrRedeemOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4524) | :closed_lock_with_key: | POST | `/earn/uni/lends` |
+| [getLendingOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4534) | :closed_lock_with_key: | GET | `/earn/uni/lends` |
+| [updateLendingOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4546) | :closed_lock_with_key: | PATCH | `/earn/uni/lends` |
+| [getLendingRecords()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4559) | :closed_lock_with_key: | GET | `/earn/uni/lend_records` |
+| [getLendingTotalInterest()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4572) | :closed_lock_with_key: | GET | `/earn/uni/interests/{currency}` |
+| [getLendingInterestRecords()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4585) | :closed_lock_with_key: | GET | `/earn/uni/interest_records` |
+| [updateInterestReinvestment()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4598) | :closed_lock_with_key: | PUT | `/earn/uni/interest_reinvest` |
+| [getLendingInterestStatus()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4614) | :closed_lock_with_key: | GET | `/earn/uni/interest_status/{currency}` |
+| [getLendingAnnualizedTrendChart()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4629) | :closed_lock_with_key: | GET | `/earn/uni/chart` |
+| [getLendingEstimatedRates()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4637) | :closed_lock_with_key: | GET | `/earn/uni/rate` |
+| [submitMultiLoanOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4654) | :closed_lock_with_key: | POST | `/loan/multi_collateral/orders` |
+| [getMultiLoanOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4666) | :closed_lock_with_key: | GET | `/loan/multi_collateral/orders` |
+| [getMultiLoanOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4678) | :closed_lock_with_key: | GET | `/loan/multi_collateral/orders/{order_id}` |
+| [repayMultiLoan()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4688) | :closed_lock_with_key: | POST | `/loan/multi_collateral/repay` |
+| [getMultiLoanRepayRecords()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4698) | :closed_lock_with_key: | GET | `/loan/multi_collateral/repay` |
+| [updateMultiLoan()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4710) | :closed_lock_with_key: | POST | `/loan/multi_collateral/mortgage` |
+| [getMultiLoanAdjustmentRecords()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4722) | :closed_lock_with_key: | GET | `/loan/multi_collateral/mortgage` |
+| [getMultiLoanCurrencyQuota()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4734) | :closed_lock_with_key: | GET | `/loan/multi_collateral/currency_quota` |
+| [getMultiLoanSupportedCurrencies()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4746) | | GET | `/loan/multi_collateral/currencies` |
+| [getMultiLoanRatio()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4755) | | GET | `/loan/multi_collateral/ltv` |
+| [getMultiLoanFixedRates()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4764) | | GET | `/loan/multi_collateral/fixed_rate` |
+| [getMultiLoanCurrentRates()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4777) | | GET | `/loan/multi_collateral/current_rate` |
+| [getDualInvestmentProducts()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4799) | | GET | `/earn/dual/investment_plan` |
+| [getDualInvestmentOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4810) | :closed_lock_with_key: | GET | `/earn/dual/orders` |
+| [submitDualInvestmentOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4822) | :closed_lock_with_key: | POST | `/earn/dual/orders` |
+| [getDualOrderRefundPreview()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4831) | :closed_lock_with_key: | GET | `/earn/dual/order-refund-preview` |
+| [submitDualOrderRefund()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4840) | :closed_lock_with_key: | POST | `/earn/dual/order-refund` |
+| [updateDualOrderReinvest()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4849) | :closed_lock_with_key: | POST | `/earn/dual/modify-order-reinvest` |
+| [getDualProjectRecommend()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4860) | :closed_lock_with_key: | GET | `/earn/dual/project-recommend` |
+| [getEarnFixedTermProducts()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4869) | | GET | `/earn/fixed-term/product` |
+| [getEarnFixedTermProductsByAsset()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4878) | | GET | `/earn/fixed-term/product/{asset}/list` |
+| [createEarnFixedTermLend()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4888) | :closed_lock_with_key: | POST | `/earn/fixed-term/user/lend` |
+| [getEarnFixedTermLends()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4897) | :closed_lock_with_key: | GET | `/earn/fixed-term/user/lend` |
+| [createEarnFixedTermPreRedeem()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4906) | :closed_lock_with_key: | POST | `/earn/fixed-term/user/pre-redeem` |
+| [getEarnFixedTermHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4917) | :closed_lock_with_key: | GET | `/earn/fixed-term/user/history` |
+| [createAutoInvestPlan()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4926) | :closed_lock_with_key: | POST | `/earn/autoinvest/plans/create` |
+| [updateAutoInvestPlan()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4935) | :closed_lock_with_key: | POST | `/earn/autoinvest/plans/update` |
+| [stopAutoInvestPlan()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4942) | :closed_lock_with_key: | POST | `/earn/autoinvest/plans/stop` |
+| [addAutoInvestPlanPosition()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4949) | :closed_lock_with_key: | POST | `/earn/autoinvest/plans/add_position` |
+| [getAutoInvestCoins()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4960) | :closed_lock_with_key: | GET | `/earn/autoinvest/coins` |
+| [getAutoInvestMinAmount()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4969) | :closed_lock_with_key: | POST | `/earn/autoinvest/min_invest_amount` |
+| [getAutoInvestPlanRecords()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4980) | :closed_lock_with_key: | GET | `/earn/autoinvest/plans/records` |
+| [getAutoInvestOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4989) | :closed_lock_with_key: | GET | `/earn/autoinvest/orders` |
+| [getAutoInvestConfig()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L4998) | :closed_lock_with_key: | GET | `/earn/autoinvest/config` |
+| [getAutoInvestPlanDetail()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5005) | :closed_lock_with_key: | GET | `/earn/autoinvest/plans/detail` |
+| [getAutoInvestPlans()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5014) | :closed_lock_with_key: | GET | `/earn/autoinvest/plans/list_info` |
+| [getStakingCoins()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5026) | :closed_lock_with_key: | GET | `/earn/staking/coins` |
+| [submitStakingSwap()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5039) | :closed_lock_with_key: | POST | `/earn/staking/swap` |
+| [getAccountDetail()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5058) | :closed_lock_with_key: | GET | `/account/detail` |
+| [getAccountRateLimit()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5067) | :closed_lock_with_key: | GET | `/account/rate_limit` |
+| [createStpGroup()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5077) | :closed_lock_with_key: | POST | `/account/stp_groups` |
+| [getStpGroups()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5087) | :closed_lock_with_key: | GET | `/account/stp_groups` |
+| [getStpGroupUsers()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5097) | :closed_lock_with_key: | GET | `/account/stp_groups/{stp_id}/users` |
+| [addUsersToStpGroup()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5107) | :closed_lock_with_key: | POST | `/account/stp_groups/{stp_id}/users` |
+| [deleteUserFromStpGroup()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5123) | :closed_lock_with_key: | DELETE | `/account/stp_groups/{stp_id}/users` |
+| [setGTDeduction()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5141) | :closed_lock_with_key: | POST | `/account/debit_fee` |
+| [getGTDeduction()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5152) | :closed_lock_with_key: | GET | `/account/debit_fee` |
+| [getAccountMainKeys()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5161) | :closed_lock_with_key: | GET | `/account/main_keys` |
+| [getAgencyTransactionHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5177) | :closed_lock_with_key: | GET | `/rebate/agency/transaction_history` |
+| [getAgencyCommissionHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5190) | :closed_lock_with_key: | GET | `/rebate/agency/commission_history` |
+| [getPartnerTransactionHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5204) | :closed_lock_with_key: | GET | `/rebate/partner/transaction_history` |
+| [getPartnerCommissionHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5219) | :closed_lock_with_key: | GET | `/rebate/partner/commission_history` |
+| [getPartnerSubordinateList()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5242) | :closed_lock_with_key: | GET | `/rebate/partner/sub_list` |
+| [getPartnerAgentDataAggregated()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5252) | :closed_lock_with_key: | GET | `/rebate/partner/data/aggregated` |
+| [getBrokerCommissionHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5265) | :closed_lock_with_key: | GET | `/rebate/broker/commission_history` |
+| [getBrokerTransactionHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5278) | :closed_lock_with_key: | GET | `/rebate/broker/transaction_history` |
+| [getUserRebateInfo()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5287) | :closed_lock_with_key: | GET | `/rebate/user/info` |
+| [createOTCQuote()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5322) | :closed_lock_with_key: | POST | `/otc/quote` |
+| [createOTCFiatOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5334) | :closed_lock_with_key: | POST | `/otc/order/create` |
+| [createOTCStablecoinOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5348) | :closed_lock_with_key: | POST | `/otc/stable_coin/order/create` |
+| [getOTCBankList()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5357) | :closed_lock_with_key: | GET | `/otc/bank/list` |
+| [getOTCBankListLegacy()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5364) | :closed_lock_with_key: | GET | `/otc/bank_list` |
+| [createOTCBank()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5371) | :closed_lock_with_key: | POST | `/otc/bank/delete` |
+| [deleteOTCBank()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5382) | :closed_lock_with_key: | POST | `/otc/bank/delete` |
+| [setDefaultOTCBank()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5389) | :closed_lock_with_key: | POST | `/otc/bank/set_default` |
+| [getOTCBankSupplementChecklist()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5396) | :closed_lock_with_key: | GET | `/otc/bank/bank_supplement_checklist` |
+| [submitOTCBankPersonalSupplement()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5405) | :closed_lock_with_key: | POST | `/otc/order/paid` |
+| [submitOTCBankEnterpriseSupplement()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5424) | :closed_lock_with_key: | POST | `/otc/order/paid` |
+| [markOTCOrderAsPaid()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5460) | :closed_lock_with_key: | POST | `/otc/order/paid` |
+| [cancelOTCOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5474) | :closed_lock_with_key: | POST | `/otc/order/cancel` |
+| [getOTCFiatOrderList()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5486) | :closed_lock_with_key: | GET | `/otc/order/list` |
+| [getOTCStablecoinOrderList()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5500) | :closed_lock_with_key: | GET | `/otc/stable_coin/order/list` |
+| [getOTCFiatOrderDetail()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5514) | :closed_lock_with_key: | GET | `/otc/order/detail` |
+| [getP2PMerchantUserInfo()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5528) | :closed_lock_with_key: | POST | `/p2p/merchant/account/get_user_info` |
+| [getP2PMerchantCounterpartyUserInfo()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5537) | :closed_lock_with_key: | POST | `/p2p/merchant/account/get_counterparty_user_info` |
+| [getP2PMerchantMyselfPayment()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5549) | :closed_lock_with_key: | POST | `/p2p/merchant/account/get_myself_payment` |
+| [getP2PMerchantSpotBalance()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5562) | :closed_lock_with_key: | POST | `/p2p/merchant/account/set_merchant_work_hours` |
+| [setP2PMerchantWorkHours()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5571) | :closed_lock_with_key: | POST | `/p2p/merchant/account/set_merchant_work_hours` |
+| [getP2PMerchantPendingTransactionList()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5582) | :closed_lock_with_key: | POST | `/p2p/merchant/transaction/get_pending_transaction_list` |
+| [getP2PMerchantCompletedTransactionList()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5594) | :closed_lock_with_key: | POST | `/p2p/merchant/transaction/get_completed_transaction_list` |
+| [getP2PMerchantTransactionDetails()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5606) | :closed_lock_with_key: | POST | `/p2p/merchant/transaction/get_transaction_details` |
+| [confirmP2PMerchantPayment()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5618) | :closed_lock_with_key: | POST | `/p2p/merchant/transaction/confirm-payment` |
+| [confirmP2PMerchantReceipt()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5629) | :closed_lock_with_key: | POST | `/p2p/merchant/transaction/confirm-receipt` |
+| [cancelP2PMerchantTransaction()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5640) | :closed_lock_with_key: | POST | `/p2p/merchant/transaction/cancel` |
+| [placeP2PMerchantBizPushOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5651) | :closed_lock_with_key: | POST | `/p2p/merchant/books/place_biz_push_order` |
+| [updateP2PMerchantAdsStatus()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5662) | :closed_lock_with_key: | POST | `/p2p/merchant/books/ads_update_status` |
+| [getP2PMerchantAdsDetail()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5675) | :closed_lock_with_key: | POST | `/p2p/merchant/books/ads_detail` |
+| [getP2PMerchantMyAdsList()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5684) | :closed_lock_with_key: | POST | `/p2p/merchant/books/my_ads_list` |
+| [getP2PMerchantAdsList()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5695) | :closed_lock_with_key: | POST | `/p2p/merchant/books/ads_list` |
+| [getP2PMerchantChatsList()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5704) | :closed_lock_with_key: | POST | `/p2p/merchant/chat/get_chats_list` |
+| [sendP2PMerchantChatMessage()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5715) | :closed_lock_with_key: | POST | `/p2p/merchant/chat/send_chat_message` |
+| [uploadP2PMerchantChatFile()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5726) | :closed_lock_with_key: | POST | `/p2p/merchant/chat/upload_chat_file` |
+| [getCrossExSymbols()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5747) | | GET | `/crossex/rule/symbols` |
+| [getCrossExRiskLimits()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5759) | | GET | `/crossex/rule/risk_limits` |
+| [getCrossExTransferCoins()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5773) | | GET | `/crossex/transfers/coin` |
+| [createCrossExTransfer()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5787) | :closed_lock_with_key: | POST | `/crossex/transfers` |
+| [getCrossExTransferHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5801) | :closed_lock_with_key: | GET | `/crossex/transfers` |
+| [createCrossExOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5815) | :closed_lock_with_key: | POST | `/crossex/orders` |
+| [cancelBatchCrossExOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5829) | :closed_lock_with_key: | POST | `/crossex/batch_cancel_orders` |
+| [cancelCrossExOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5843) | :closed_lock_with_key: | DELETE | `/crossex/orders/{order_id}` |
+| [modifyCrossExOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5856) | :closed_lock_with_key: | PUT | `/crossex/orders/{order_id}` |
+| [getCrossExOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5871) | :closed_lock_with_key: | GET | `/crossex/orders/{order_id}` |
+| [createCrossExConvertQuote()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5883) | :closed_lock_with_key: | POST | `/crossex/convert/quote` |
+| [createCrossExConvertOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5897) | :closed_lock_with_key: | POST | `/crossex/convert/orders` |
+| [updateCrossExAccount()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5911) | :closed_lock_with_key: | PUT | `/crossex/accounts` |
+| [getCrossExAccounts()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5925) | :closed_lock_with_key: | GET | `/crossex/accounts` |
+| [setCrossExPositionLeverage()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5937) | :closed_lock_with_key: | POST | `/crossex/positions/leverage` |
+| [getCrossExPositionLeverage()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5951) | :closed_lock_with_key: | GET | `/crossex/positions/leverage` |
+| [setCrossExMarginPositionLeverage()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5965) | :closed_lock_with_key: | POST | `/crossex/margin_positions/leverage` |
+| [getCrossExMarginPositionLeverage()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5981) | :closed_lock_with_key: | GET | `/crossex/margin_positions/leverage` |
+| [closeCrossExPosition()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L5995) | :closed_lock_with_key: | POST | `/crossex/position` |
+| [getCrossExInterestRate()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6009) | :closed_lock_with_key: | GET | `/crossex/interest_rate` |
+| [getCrossExFeeRate()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6022) | :closed_lock_with_key: | GET | `/crossex/fee` |
+| [getCrossExPositions()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6034) | :closed_lock_with_key: | GET | `/crossex/positions` |
+| [getCrossExMarginPositions()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6048) | :closed_lock_with_key: | GET | `/crossex/margin_positions` |
+| [getCrossExAdlRank()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6062) | :closed_lock_with_key: | GET | `/crossex/adl_rank` |
+| [getCrossExOpenOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6074) | :closed_lock_with_key: | GET | `/crossex/open_orders` |
+| [getCrossExHistoryOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6088) | :closed_lock_with_key: | GET | `/crossex/history_orders` |
+| [getCrossExHistoryPositions()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6102) | :closed_lock_with_key: | GET | `/crossex/history_positions` |
+| [getCrossExHistoryMarginPositions()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6116) | :closed_lock_with_key: | GET | `/crossex/history_margin_positions` |
+| [getCrossExHistoryMarginInterests()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6130) | :closed_lock_with_key: | GET | `/crossex/history_margin_interests` |
+| [getCrossExHistoryTrades()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6144) | :closed_lock_with_key: | GET | `/crossex/history_trades` |
+| [getCrossExAccountBook()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6158) | :closed_lock_with_key: | GET | `/crossex/account_book` |
+| [getCrossExCoinDiscountRate()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6172) | :closed_lock_with_key: | GET | `/crossex/coin_discount_rate` |
+| [getCrossExMarketTickers()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6186) | | GET | `/crossex/market/tickers` |
+| [getCrossExMarketFundingInfo()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6200) | | GET | `/crossex/market/funding_info` |
+| [getAlphaAccounts()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6218) | :closed_lock_with_key: | GET | `/alpha/accounts` |
+| [getAlphaAccountBook()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6230) | :closed_lock_with_key: | GET | `/alpha/account_book` |
+| [createAlphaQuote()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6244) | :closed_lock_with_key: | POST | `/alpha/quote` |
+| [createAlphaOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6256) | :closed_lock_with_key: | POST | `/alpha/orders` |
+| [getAlphaOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6268) | :closed_lock_with_key: | GET | `/alpha/orders` |
+| [getAlphaOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6280) | :closed_lock_with_key: | GET | `/alpha/order` |
+| [getAlphaCurrencies()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6292) | | GET | `/alpha/currencies` |
+| [getAlphaTickers()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6304) | | GET | `/alpha/tickers` |
+| [getTradFiMT5Account()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6310) | :closed_lock_with_key: | GET | `/tradfi/users/mt5-account` |
+| [getTradFiSymbolCategories()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6314) | | GET | `/tradfi/symbols/categories` |
+| [getTradFiSymbols()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6320) | | GET | `/tradfi/symbols` |
+| [getTradFiSymbolCommissions()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6332) | | GET | `/tradfi/symbols/commissions` |
+| [getTradFiSymbolDetail()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6338) | :closed_lock_with_key: | GET | `/tradfi/symbols/detail` |
+| [getTradFiKlines()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6344) | | GET | `/tradfi/symbols/{symbol}/klines` |
+| [getTradFiTicker()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6351) | | GET | `/tradfi/symbols/{symbol}/tickers` |
+| [createTradFiUser()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6355) | :closed_lock_with_key: | POST | `/tradfi/users` |
+| [getTradFiAssets()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6359) | :closed_lock_with_key: | GET | `/tradfi/users/assets` |
+| [createTradFiTransaction()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6363) | :closed_lock_with_key: | POST | `/tradfi/transactions` |
+| [getTradFiTransactions()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6369) | :closed_lock_with_key: | GET | `/tradfi/transactions` |
+| [createTradFiOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6375) | :closed_lock_with_key: | POST | `/tradfi/orders` |
+| [getTradFiOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6381) | :closed_lock_with_key: | GET | `/tradfi/orders` |
+| [modifyTradFiOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6385) | :closed_lock_with_key: | PUT | `/tradfi/orders/{orderId}` |
+| [cancelTradFiOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6392) | :closed_lock_with_key: | DELETE | `/tradfi/orders/{orderId}` |
+| [getTradFiOrderHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6396) | :closed_lock_with_key: | GET | `/tradfi/orders/history` |
+| [getTradFiPositions()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6402) | :closed_lock_with_key: | GET | `/tradfi/positions` |
+| [modifyTradFiPosition()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6408) | :closed_lock_with_key: | PUT | `/tradfi/positions/{positionId}` |
+| [closeTradFiPosition()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6417) | :closed_lock_with_key: | POST | `/tradfi/positions/{positionId}/close` |
+| [getTradFiPositionHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6426) | :closed_lock_with_key: | GET | `/tradfi/positions/history` |
+| [getTradFiOrderLog()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6435) | :closed_lock_with_key: | GET | `/tradfi/orders/log/{log_id}` |
+| [getStockUserAssets()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6449) | :closed_lock_with_key: | GET | `/stock/users/assets` |
+| [getStockSymbols()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6461) | | GET | `/stock/symbols` |
+| [getStockSymbolDetail()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6473) | :closed_lock_with_key: | GET | `/stock/symbols/detail` |
+| [getStockOrderBook()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6485) | | GET | `/stock/market/{symbol}/orderbook` |
+| [getStockOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6495) | :closed_lock_with_key: | GET | `/stock/orders` |
+| [createStockOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6509) | :closed_lock_with_key: | POST | `/stock/orders` |
+| [cancelAllStockOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6520) | :closed_lock_with_key: | DELETE | `/stock/orders` |
+| [getStockOrderHistory()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6530) | :closed_lock_with_key: | GET | `/stock/orders/history` |
+| [updateStockOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6543) | :closed_lock_with_key: | PUT | `/stock/orders/{orderId}` |
+| [cancelStockOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6556) | :closed_lock_with_key: | DELETE | `/stock/orders/{orderId}` |
+| [getStockPositions()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6568) | :closed_lock_with_key: | GET | `/stock/positions` |
+| [closeStockPosition()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6580) | :closed_lock_with_key: | POST | `/stock/positions/close` |
+| [getStockTransactions()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6592) | :closed_lock_with_key: | GET | `/stock/transactions` |
+| [createStockTransaction()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6606) | :closed_lock_with_key: | POST | `/stock/transactions` |
+| [getStockExchanges()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6617) | | GET | `/stock/exchanges` |
+| [getStockFeeRate()](https://github.com/sieblyio/gateio-api/blob/master/src/RestClient.ts#L6628) | | GET | `/stock/fee-rate` |
# WebsocketAPIClient.ts
-This table includes all endpoints from the official Exchange API docs and corresponding SDK functions for each endpoint that are found in [WebsocketAPIClient.ts](/src/WebsocketAPIClient.ts).
+This table includes all endpoints from the official Exchange API docs and corresponding SDK functions for each endpoint that are found in [WebsocketAPIClient.ts](/src/WebsocketAPIClient.ts).
This client provides WebSocket API endpoints which allow for faster interactions with the Gate.io API via a WebSocket connection.
-| Function | AUTH | HTTP Method | Endpoint |
-| -------- | :------: | :------: | -------- |
-| [submitNewSpotOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/WebsocketAPIClient.ts#L97) | :closed_lock_with_key: | WS | `spot.order_place` |
-| [cancelSpotOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/WebsocketAPIClient.ts#L111) | :closed_lock_with_key: | WS | `spot.order_cancel` |
-| [cancelSpotOrderById()](https://github.com/tiagosiebler/gateio-api/blob/master/src/WebsocketAPIClient.ts#L125) | :closed_lock_with_key: | WS | `spot.order_cancel_ids` |
-| [cancelSpotOrderForSymbol()](https://github.com/tiagosiebler/gateio-api/blob/master/src/WebsocketAPIClient.ts#L139) | :closed_lock_with_key: | WS | `spot.order_cancel_cp` |
-| [updateSpotOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/WebsocketAPIClient.ts#L153) | :closed_lock_with_key: | WS | `spot.order_amend` |
-| [getSpotOrderStatus()](https://github.com/tiagosiebler/gateio-api/blob/master/src/WebsocketAPIClient.ts#L167) | :closed_lock_with_key: | WS | `spot.order_status` |
-| [getSpotOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/WebsocketAPIClient.ts#L181) | :closed_lock_with_key: | WS | `spot.order_list` |
-| [submitNewFuturesOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/WebsocketAPIClient.ts#L203) | :closed_lock_with_key: | WS | `futures.order_place` |
-| [submitNewFuturesBatchOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/WebsocketAPIClient.ts#L219) | :closed_lock_with_key: | WS | `futures.order_batch_place` |
-| [cancelFuturesOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/WebsocketAPIClient.ts#L235) | :closed_lock_with_key: | WS | `futures.order_cancel` |
-| [cancelFuturesOrderById()](https://github.com/tiagosiebler/gateio-api/blob/master/src/WebsocketAPIClient.ts#L251) | :closed_lock_with_key: | WS | `futures.order_cancel_ids` |
-| [cancelFuturesAllOpenOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/WebsocketAPIClient.ts#L267) | :closed_lock_with_key: | WS | `futures.order_cancel_cp` |
-| [updateFuturesOrder()](https://github.com/tiagosiebler/gateio-api/blob/master/src/WebsocketAPIClient.ts#L283) | :closed_lock_with_key: | WS | `futures.order_amend` |
-| [getFuturesOrders()](https://github.com/tiagosiebler/gateio-api/blob/master/src/WebsocketAPIClient.ts#L299) | :closed_lock_with_key: | WS | `futures.order_list` |
-| [getFuturesOrderStatus()](https://github.com/tiagosiebler/gateio-api/blob/master/src/WebsocketAPIClient.ts#L315) | :closed_lock_with_key: | WS | `futures.order_status` |
\ No newline at end of file
+| Function | AUTH | HTTP Method | Endpoint |
+| ----------------------------------------------------------------------------------------------------------------- | :--------------------: | :---------: | --------------------------- |
+| [submitNewSpotOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/WebsocketAPIClient.ts#L97) | :closed_lock_with_key: | WS | `spot.order_place` |
+| [cancelSpotOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/WebsocketAPIClient.ts#L111) | :closed_lock_with_key: | WS | `spot.order_cancel` |
+| [cancelSpotOrderById()](https://github.com/sieblyio/gateio-api/blob/master/src/WebsocketAPIClient.ts#L125) | :closed_lock_with_key: | WS | `spot.order_cancel_ids` |
+| [cancelSpotOrderForSymbol()](https://github.com/sieblyio/gateio-api/blob/master/src/WebsocketAPIClient.ts#L139) | :closed_lock_with_key: | WS | `spot.order_cancel_cp` |
+| [updateSpotOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/WebsocketAPIClient.ts#L153) | :closed_lock_with_key: | WS | `spot.order_amend` |
+| [getSpotOrderStatus()](https://github.com/sieblyio/gateio-api/blob/master/src/WebsocketAPIClient.ts#L167) | :closed_lock_with_key: | WS | `spot.order_status` |
+| [getSpotOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/WebsocketAPIClient.ts#L181) | :closed_lock_with_key: | WS | `spot.order_list` |
+| [submitNewFuturesOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/WebsocketAPIClient.ts#L203) | :closed_lock_with_key: | WS | `futures.order_place` |
+| [submitNewFuturesBatchOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/WebsocketAPIClient.ts#L219) | :closed_lock_with_key: | WS | `futures.order_batch_place` |
+| [cancelFuturesOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/WebsocketAPIClient.ts#L235) | :closed_lock_with_key: | WS | `futures.order_cancel` |
+| [cancelFuturesOrderById()](https://github.com/sieblyio/gateio-api/blob/master/src/WebsocketAPIClient.ts#L251) | :closed_lock_with_key: | WS | `futures.order_cancel_ids` |
+| [cancelFuturesAllOpenOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/WebsocketAPIClient.ts#L267) | :closed_lock_with_key: | WS | `futures.order_cancel_cp` |
+| [updateFuturesOrder()](https://github.com/sieblyio/gateio-api/blob/master/src/WebsocketAPIClient.ts#L283) | :closed_lock_with_key: | WS | `futures.order_amend` |
+| [getFuturesOrders()](https://github.com/sieblyio/gateio-api/blob/master/src/WebsocketAPIClient.ts#L299) | :closed_lock_with_key: | WS | `futures.order_list` |
+| [getFuturesOrderStatus()](https://github.com/sieblyio/gateio-api/blob/master/src/WebsocketAPIClient.ts#L315) | :closed_lock_with_key: | WS | `futures.order_status` |
diff --git a/examples/apidoc/RestClient/cancelAllStockOrders.js b/examples/apidoc/RestClient/cancelAllStockOrders.js
new file mode 100644
index 0000000..273c17f
--- /dev/null
+++ b/examples/apidoc/RestClient/cancelAllStockOrders.js
@@ -0,0 +1,22 @@
+import { RestClient } from 'gateio-api';
+// or, if require is preferred:
+// const { RestClient } = require('gateio-api');
+
+// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
+// This Gate.io API SDK is available on npm via "npm install gateio-api"
+// ENDPOINT: /stock/orders
+// METHOD: DELETE
+// PUBLIC: NO
+
+const client = new RestClient({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+});
+
+client.cancelAllStockOrders(params)
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClient/cancelBatchCrossExOrders.js b/examples/apidoc/RestClient/cancelBatchCrossExOrders.js
new file mode 100644
index 0000000..c06d85d
--- /dev/null
+++ b/examples/apidoc/RestClient/cancelBatchCrossExOrders.js
@@ -0,0 +1,22 @@
+import { RestClient } from 'gateio-api';
+// or, if require is preferred:
+// const { RestClient } = require('gateio-api');
+
+// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
+// This Gate.io API SDK is available on npm via "npm install gateio-api"
+// ENDPOINT: /crossex/batch_cancel_orders
+// METHOD: POST
+// PUBLIC: NO
+
+const client = new RestClient({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+});
+
+client.cancelBatchCrossExOrders(params)
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClient/cancelSpotPovOrder.js b/examples/apidoc/RestClient/cancelSpotPovOrder.js
new file mode 100644
index 0000000..95034bf
--- /dev/null
+++ b/examples/apidoc/RestClient/cancelSpotPovOrder.js
@@ -0,0 +1,22 @@
+import { RestClient } from 'gateio-api';
+// or, if require is preferred:
+// const { RestClient } = require('gateio-api');
+
+// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
+// This Gate.io API SDK is available on npm via "npm install gateio-api"
+// ENDPOINT: /spot/pov_orders/{order_id}/cancel
+// METHOD: POST
+// PUBLIC: NO
+
+const client = new RestClient({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+});
+
+client.cancelSpotPovOrder(params)
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClient/cancelSpotPovOrders.js b/examples/apidoc/RestClient/cancelSpotPovOrders.js
new file mode 100644
index 0000000..887f5c3
--- /dev/null
+++ b/examples/apidoc/RestClient/cancelSpotPovOrders.js
@@ -0,0 +1,22 @@
+import { RestClient } from 'gateio-api';
+// or, if require is preferred:
+// const { RestClient } = require('gateio-api');
+
+// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
+// This Gate.io API SDK is available on npm via "npm install gateio-api"
+// ENDPOINT: /spot/pov_orders/cancel
+// METHOD: POST
+// PUBLIC: NO
+
+const client = new RestClient({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+});
+
+client.cancelSpotPovOrders(params)
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClient/cancelStockOrder.js b/examples/apidoc/RestClient/cancelStockOrder.js
new file mode 100644
index 0000000..f4a9ccb
--- /dev/null
+++ b/examples/apidoc/RestClient/cancelStockOrder.js
@@ -0,0 +1,22 @@
+import { RestClient } from 'gateio-api';
+// or, if require is preferred:
+// const { RestClient } = require('gateio-api');
+
+// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
+// This Gate.io API SDK is available on npm via "npm install gateio-api"
+// ENDPOINT: /stock/orders/{orderId}
+// METHOD: DELETE
+// PUBLIC: NO
+
+const client = new RestClient({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+});
+
+client.cancelStockOrder(params)
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClient/closeStockPosition.js b/examples/apidoc/RestClient/closeStockPosition.js
new file mode 100644
index 0000000..5806fa8
--- /dev/null
+++ b/examples/apidoc/RestClient/closeStockPosition.js
@@ -0,0 +1,22 @@
+import { RestClient } from 'gateio-api';
+// or, if require is preferred:
+// const { RestClient } = require('gateio-api');
+
+// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
+// This Gate.io API SDK is available on npm via "npm install gateio-api"
+// ENDPOINT: /stock/positions/close
+// METHOD: POST
+// PUBLIC: NO
+
+const client = new RestClient({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+});
+
+client.closeStockPosition(params)
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClient/createSpotPovOrder.js b/examples/apidoc/RestClient/createSpotPovOrder.js
new file mode 100644
index 0000000..2215de6
--- /dev/null
+++ b/examples/apidoc/RestClient/createSpotPovOrder.js
@@ -0,0 +1,22 @@
+import { RestClient } from 'gateio-api';
+// or, if require is preferred:
+// const { RestClient } = require('gateio-api');
+
+// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
+// This Gate.io API SDK is available on npm via "npm install gateio-api"
+// ENDPOINT: /spot/pov_orders
+// METHOD: POST
+// PUBLIC: NO
+
+const client = new RestClient({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+});
+
+client.createSpotPovOrder(params)
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClient/createStockOrder.js b/examples/apidoc/RestClient/createStockOrder.js
new file mode 100644
index 0000000..0ff3fe1
--- /dev/null
+++ b/examples/apidoc/RestClient/createStockOrder.js
@@ -0,0 +1,22 @@
+import { RestClient } from 'gateio-api';
+// or, if require is preferred:
+// const { RestClient } = require('gateio-api');
+
+// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
+// This Gate.io API SDK is available on npm via "npm install gateio-api"
+// ENDPOINT: /stock/orders
+// METHOD: POST
+// PUBLIC: NO
+
+const client = new RestClient({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+});
+
+client.createStockOrder(params)
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClient/createStockTransaction.js b/examples/apidoc/RestClient/createStockTransaction.js
new file mode 100644
index 0000000..01b6597
--- /dev/null
+++ b/examples/apidoc/RestClient/createStockTransaction.js
@@ -0,0 +1,22 @@
+import { RestClient } from 'gateio-api';
+// or, if require is preferred:
+// const { RestClient } = require('gateio-api');
+
+// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
+// This Gate.io API SDK is available on npm via "npm install gateio-api"
+// ENDPOINT: /stock/transactions
+// METHOD: POST
+// PUBLIC: NO
+
+const client = new RestClient({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+});
+
+client.createStockTransaction(params)
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClient/getCrossExMarketFundingInfo.js b/examples/apidoc/RestClient/getCrossExMarketFundingInfo.js
new file mode 100644
index 0000000..d796292
--- /dev/null
+++ b/examples/apidoc/RestClient/getCrossExMarketFundingInfo.js
@@ -0,0 +1,22 @@
+import { RestClient } from 'gateio-api';
+// or, if require is preferred:
+// const { RestClient } = require('gateio-api');
+
+// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
+// This Gate.io API SDK is available on npm via "npm install gateio-api"
+// ENDPOINT: /crossex/market/funding_info
+// METHOD: GET
+// PUBLIC: YES
+
+const client = new RestClient({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+});
+
+client.getCrossExMarketFundingInfo(params)
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClient/getCrossExMarketTickers.js b/examples/apidoc/RestClient/getCrossExMarketTickers.js
new file mode 100644
index 0000000..4a22dac
--- /dev/null
+++ b/examples/apidoc/RestClient/getCrossExMarketTickers.js
@@ -0,0 +1,22 @@
+import { RestClient } from 'gateio-api';
+// or, if require is preferred:
+// const { RestClient } = require('gateio-api');
+
+// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
+// This Gate.io API SDK is available on npm via "npm install gateio-api"
+// ENDPOINT: /crossex/market/tickers
+// METHOD: GET
+// PUBLIC: YES
+
+const client = new RestClient({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+});
+
+client.getCrossExMarketTickers(params)
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClient/getSpotPovOrder.js b/examples/apidoc/RestClient/getSpotPovOrder.js
new file mode 100644
index 0000000..737bb89
--- /dev/null
+++ b/examples/apidoc/RestClient/getSpotPovOrder.js
@@ -0,0 +1,22 @@
+import { RestClient } from 'gateio-api';
+// or, if require is preferred:
+// const { RestClient } = require('gateio-api');
+
+// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
+// This Gate.io API SDK is available on npm via "npm install gateio-api"
+// ENDPOINT: /spot/pov_orders/{order_id}
+// METHOD: GET
+// PUBLIC: NO
+
+const client = new RestClient({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+});
+
+client.getSpotPovOrder(params)
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClient/getSpotPovOrders.js b/examples/apidoc/RestClient/getSpotPovOrders.js
new file mode 100644
index 0000000..da989b3
--- /dev/null
+++ b/examples/apidoc/RestClient/getSpotPovOrders.js
@@ -0,0 +1,22 @@
+import { RestClient } from 'gateio-api';
+// or, if require is preferred:
+// const { RestClient } = require('gateio-api');
+
+// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
+// This Gate.io API SDK is available on npm via "npm install gateio-api"
+// ENDPOINT: /spot/pov_orders
+// METHOD: GET
+// PUBLIC: NO
+
+const client = new RestClient({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+});
+
+client.getSpotPovOrders(params)
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClient/getStockExchanges.js b/examples/apidoc/RestClient/getStockExchanges.js
new file mode 100644
index 0000000..750dab7
--- /dev/null
+++ b/examples/apidoc/RestClient/getStockExchanges.js
@@ -0,0 +1,22 @@
+import { RestClient } from 'gateio-api';
+// or, if require is preferred:
+// const { RestClient } = require('gateio-api');
+
+// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
+// This Gate.io API SDK is available on npm via "npm install gateio-api"
+// ENDPOINT: /stock/exchanges
+// METHOD: GET
+// PUBLIC: YES
+
+const client = new RestClient({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+});
+
+client.getStockExchanges(params)
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClient/getStockFeeRate.js b/examples/apidoc/RestClient/getStockFeeRate.js
new file mode 100644
index 0000000..fb30716
--- /dev/null
+++ b/examples/apidoc/RestClient/getStockFeeRate.js
@@ -0,0 +1,22 @@
+import { RestClient } from 'gateio-api';
+// or, if require is preferred:
+// const { RestClient } = require('gateio-api');
+
+// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
+// This Gate.io API SDK is available on npm via "npm install gateio-api"
+// ENDPOINT: /stock/fee-rate
+// METHOD: GET
+// PUBLIC: YES
+
+const client = new RestClient({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+});
+
+client.getStockFeeRate(params)
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClient/getStockOrderBook.js b/examples/apidoc/RestClient/getStockOrderBook.js
new file mode 100644
index 0000000..615a061
--- /dev/null
+++ b/examples/apidoc/RestClient/getStockOrderBook.js
@@ -0,0 +1,22 @@
+import { RestClient } from 'gateio-api';
+// or, if require is preferred:
+// const { RestClient } = require('gateio-api');
+
+// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
+// This Gate.io API SDK is available on npm via "npm install gateio-api"
+// ENDPOINT: /stock/market/{symbol}/orderbook
+// METHOD: GET
+// PUBLIC: YES
+
+const client = new RestClient({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+});
+
+client.getStockOrderBook(params)
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClient/getStockOrderHistory.js b/examples/apidoc/RestClient/getStockOrderHistory.js
new file mode 100644
index 0000000..ce647a0
--- /dev/null
+++ b/examples/apidoc/RestClient/getStockOrderHistory.js
@@ -0,0 +1,22 @@
+import { RestClient } from 'gateio-api';
+// or, if require is preferred:
+// const { RestClient } = require('gateio-api');
+
+// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
+// This Gate.io API SDK is available on npm via "npm install gateio-api"
+// ENDPOINT: /stock/orders/history
+// METHOD: GET
+// PUBLIC: NO
+
+const client = new RestClient({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+});
+
+client.getStockOrderHistory(params)
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClient/getStockOrders.js b/examples/apidoc/RestClient/getStockOrders.js
new file mode 100644
index 0000000..53fb600
--- /dev/null
+++ b/examples/apidoc/RestClient/getStockOrders.js
@@ -0,0 +1,22 @@
+import { RestClient } from 'gateio-api';
+// or, if require is preferred:
+// const { RestClient } = require('gateio-api');
+
+// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
+// This Gate.io API SDK is available on npm via "npm install gateio-api"
+// ENDPOINT: /stock/orders
+// METHOD: GET
+// PUBLIC: NO
+
+const client = new RestClient({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+});
+
+client.getStockOrders(params)
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClient/getStockPositions.js b/examples/apidoc/RestClient/getStockPositions.js
new file mode 100644
index 0000000..8fc945a
--- /dev/null
+++ b/examples/apidoc/RestClient/getStockPositions.js
@@ -0,0 +1,22 @@
+import { RestClient } from 'gateio-api';
+// or, if require is preferred:
+// const { RestClient } = require('gateio-api');
+
+// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
+// This Gate.io API SDK is available on npm via "npm install gateio-api"
+// ENDPOINT: /stock/positions
+// METHOD: GET
+// PUBLIC: NO
+
+const client = new RestClient({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+});
+
+client.getStockPositions(params)
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClient/getStockSymbolDetail.js b/examples/apidoc/RestClient/getStockSymbolDetail.js
new file mode 100644
index 0000000..f9e4ea5
--- /dev/null
+++ b/examples/apidoc/RestClient/getStockSymbolDetail.js
@@ -0,0 +1,22 @@
+import { RestClient } from 'gateio-api';
+// or, if require is preferred:
+// const { RestClient } = require('gateio-api');
+
+// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
+// This Gate.io API SDK is available on npm via "npm install gateio-api"
+// ENDPOINT: /stock/symbols/detail
+// METHOD: GET
+// PUBLIC: NO
+
+const client = new RestClient({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+});
+
+client.getStockSymbolDetail(params)
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClient/getStockSymbols.js b/examples/apidoc/RestClient/getStockSymbols.js
new file mode 100644
index 0000000..74d07c8
--- /dev/null
+++ b/examples/apidoc/RestClient/getStockSymbols.js
@@ -0,0 +1,22 @@
+import { RestClient } from 'gateio-api';
+// or, if require is preferred:
+// const { RestClient } = require('gateio-api');
+
+// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
+// This Gate.io API SDK is available on npm via "npm install gateio-api"
+// ENDPOINT: /stock/symbols
+// METHOD: GET
+// PUBLIC: YES
+
+const client = new RestClient({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+});
+
+client.getStockSymbols(params)
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClient/getStockTransactions.js b/examples/apidoc/RestClient/getStockTransactions.js
new file mode 100644
index 0000000..a662e99
--- /dev/null
+++ b/examples/apidoc/RestClient/getStockTransactions.js
@@ -0,0 +1,22 @@
+import { RestClient } from 'gateio-api';
+// or, if require is preferred:
+// const { RestClient } = require('gateio-api');
+
+// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
+// This Gate.io API SDK is available on npm via "npm install gateio-api"
+// ENDPOINT: /stock/transactions
+// METHOD: GET
+// PUBLIC: NO
+
+const client = new RestClient({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+});
+
+client.getStockTransactions(params)
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClient/getStockUserAssets.js b/examples/apidoc/RestClient/getStockUserAssets.js
new file mode 100644
index 0000000..8dc7df6
--- /dev/null
+++ b/examples/apidoc/RestClient/getStockUserAssets.js
@@ -0,0 +1,22 @@
+import { RestClient } from 'gateio-api';
+// or, if require is preferred:
+// const { RestClient } = require('gateio-api');
+
+// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
+// This Gate.io API SDK is available on npm via "npm install gateio-api"
+// ENDPOINT: /stock/users/assets
+// METHOD: GET
+// PUBLIC: NO
+
+const client = new RestClient({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+});
+
+client.getStockUserAssets(params)
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClient/getTradFiSymbolCommissions.js b/examples/apidoc/RestClient/getTradFiSymbolCommissions.js
new file mode 100644
index 0000000..852576b
--- /dev/null
+++ b/examples/apidoc/RestClient/getTradFiSymbolCommissions.js
@@ -0,0 +1,22 @@
+import { RestClient } from 'gateio-api';
+// or, if require is preferred:
+// const { RestClient } = require('gateio-api');
+
+// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
+// This Gate.io API SDK is available on npm via "npm install gateio-api"
+// ENDPOINT: /tradfi/symbols/commissions
+// METHOD: GET
+// PUBLIC: YES
+
+const client = new RestClient({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+});
+
+client.getTradFiSymbolCommissions(params)
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClient/getTransfer.js b/examples/apidoc/RestClient/getTransfer.js
new file mode 100644
index 0000000..5ba4658
--- /dev/null
+++ b/examples/apidoc/RestClient/getTransfer.js
@@ -0,0 +1,22 @@
+import { RestClient } from 'gateio-api';
+// or, if require is preferred:
+// const { RestClient } = require('gateio-api');
+
+// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
+// This Gate.io API SDK is available on npm via "npm install gateio-api"
+// ENDPOINT: /wallet/transfers
+// METHOD: GET
+// PUBLIC: NO
+
+const client = new RestClient({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+});
+
+client.getTransfer(params)
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClient/setUserLeverage.js b/examples/apidoc/RestClient/setUserLeverage.js
new file mode 100644
index 0000000..0626f0d
--- /dev/null
+++ b/examples/apidoc/RestClient/setUserLeverage.js
@@ -0,0 +1,22 @@
+import { RestClient } from 'gateio-api';
+// or, if require is preferred:
+// const { RestClient } = require('gateio-api');
+
+// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
+// This Gate.io API SDK is available on npm via "npm install gateio-api"
+// ENDPOINT: /unified/leverage/user_setting
+// METHOD: POST
+// PUBLIC: NO
+
+const client = new RestClient({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+});
+
+client.setUserLeverage(params)
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/examples/apidoc/RestClient/updateStockOrder.js b/examples/apidoc/RestClient/updateStockOrder.js
new file mode 100644
index 0000000..50cfe5a
--- /dev/null
+++ b/examples/apidoc/RestClient/updateStockOrder.js
@@ -0,0 +1,22 @@
+import { RestClient } from 'gateio-api';
+// or, if require is preferred:
+// const { RestClient } = require('gateio-api');
+
+// This example shows how to call this Gate.io API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "gateio-api" for Gate.io exchange
+// This Gate.io API SDK is available on npm via "npm install gateio-api"
+// ENDPOINT: /stock/orders/{orderId}
+// METHOD: PUT
+// PUBLIC: NO
+
+const client = new RestClient({
+ apiKey: 'insert_api_key_here',
+ apiSecret: 'insert_api_secret_here',
+});
+
+client.updateStockOrder(params)
+ .then((response) => {
+ console.log(response);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
diff --git a/llms.txt b/llms.txt
index 5062963..2e01180 100644
--- a/llms.txt
+++ b/llms.txt
@@ -48,6 +48,8 @@ Notes:
================================================================
Directory Structure
================================================================
+docs/
+ GATE_SDK_QUICKSTART_GUIDE.md
examples/
Rest/
futures/
@@ -113,6 +115,7 @@ src/
p2pMerchant.ts
rebate.ts
spot.ts
+ stock.ts
subaccount.ts
tradfi.ts
unified.ts
@@ -137,6 +140,7 @@ src/
p2pMerchant.ts
rebate.ts
spot.ts
+ stock.ts
subaccount.ts
tradfi.ts
unified.ts
@@ -189,6 +193,136 @@ Most examples also have minimal typescript, so if you rename them to "js" they s
node ./examples/spot/getTickers.js
```
+================
+File: src/lib/websocket/websocket-util.ts
+================
+import WebSocket from 'isomorphic-ws';
+⋮----
+import { WSAPIRequest } from '../../types/websockets/requests.js';
+import {
+ FuturesWSAPITopic,
+ SpotWSAPITopic,
+} from '../../types/websockets/wsAPI.js';
+⋮----
+/**
+ * Should be one WS key per unique URL. Some URLs may need a suffix.
+ */
+⋮----
+/**
+ * Spot & Margin
+ * https://www.gate.io/docs/developers/apiv4/ws/en/
+ */
+⋮----
+/**
+ * Perpetual futures (USDT)
+ * https://www.gate.io/docs/developers/futures/ws/en/#gate-io-futures-websocket-v4
+ */
+⋮----
+/**
+ * Perpetual futures (BTC)
+ * https://www.gate.io/docs/developers/futures/ws/en/#gate-io-futures-websocket-v4
+ */
+⋮----
+/**
+ * Delivery Futures (USDT)
+ * https://www.gate.io/docs/developers/delivery/ws/en/
+ */
+⋮----
+/**
+ * Delivery Futures (BTC)
+ * https://www.gate.io/docs/developers/delivery/ws/en/
+ */
+⋮----
+/**
+ * Options
+ * https://www.gate.io/docs/developers/options/ws/en/
+ */
+⋮----
+/**
+ * Announcements V4
+ * https://www.gate.io/docs/developers/options/ws/en/
+ */
+⋮----
+/** This is used to differentiate between each of the available websocket streams */
+export type WsKey = (typeof WS_KEY_MAP)[keyof typeof WS_KEY_MAP];
+⋮----
+export type FuturesWsKey =
+ | typeof WS_KEY_MAP.perpFuturesUSDTV4
+ | typeof WS_KEY_MAP.perpFuturesBTCV4
+ | typeof WS_KEY_MAP.deliveryFuturesUSDTV4
+ | typeof WS_KEY_MAP.deliveryFuturesBTCV4;
+⋮----
+export type WsMarket = 'all';
+⋮----
+/**
+ * Normalised internal format for a request (subscribe/unsubscribe/etc) on a topic, with optional parameters.
+ *
+ * - Topic: the topic this event is for
+ * - Payload: the parameters to include, optional. E.g. auth requires key + sign. Some topics allow configurable parameters.
+ */
+export interface WsTopicRequest<
+ TWSTopic extends string = string,
+ TWSPayload = any,
+> {
+ topic: TWSTopic;
+ payload?: TWSPayload;
+}
+⋮----
+/**
+ * Conveniently allow users to request a topic either as string topics or objects (containing string topic + params)
+ */
+export type WsTopicRequestOrStringTopic<
+ TWSTopic extends string,
+ TWSPayload = any,
+> = WsTopicRequest | string;
+⋮----
+/**
+ * Some exchanges have two livenet environments, some have test environments, some dont. This allows easy flexibility for different exchanges.
+ * Examples:
+ * - One livenet and one testnet: NetworkMap<'livenet' | 'testnet'>
+ * - One livenet, sometimes two, one testnet: NetworkMap<'livenet' | 'testnet', 'livenet2'>
+ * - Only one livenet, no other networks: NetworkMap<'livenet'>
+ */
+type NetworkMap<
+ TRequiredKeys extends string,
+ TOptionalKeys extends string | undefined = undefined,
+> = Record &
+ (TOptionalKeys extends string
+ ? Record
+ : Record);
+⋮----
+export function neverGuard(x: never, msg: string): Error
+⋮----
+/**
+ * WS API promises are stored using a primary key. This key is constructed using
+ * properties found in every request & reply.
+ */
+export function getPromiseRefForWSAPIRequest(
+ requestEvent: WSAPIRequest,
+): string
+⋮----
+export function getPrivateSpotTopics(): string[]
+⋮----
+// Consumeable channels for spot
+⋮----
+// WebSocket API for spot
+⋮----
+export function getPrivateFuturesTopics(): string[]
+⋮----
+// These are the same for perps vs delivery futures
+⋮----
+export function getPrivateOptionsTopics(): string[]
+⋮----
+/**
+ * ws.terminate() is undefined in browsers.
+ * This only works in node.js, not in browsers.
+ * Does nothing if `ws` is undefined. Does nothing in browsers.
+ */
+export function safeTerminateWs(
+ ws?: WebSocket | any,
+ fallbackToClose?: boolean,
+): boolean
+
================
File: src/lib/websocket/WsStore.types.ts
================
@@ -416,6 +550,37 @@ export interface MessageEventLike {
⋮----
export function isMessageEvent(msg: unknown): msg is MessageEventLike
+================
+File: src/lib/webCryptoAPI.ts
+================
+import { neverGuard } from './misc-util.js';
+⋮----
+function bufferToB64(buffer: ArrayBuffer): string
+⋮----
+export type SignEncodeMethod = 'hex' | 'base64';
+export type SignAlgorithm = 'SHA-256' | 'SHA-512';
+⋮----
+/**
+ * Similar to node crypto's `createHash()` function
+ */
+export async function hashMessage(
+ message: string,
+ method: SignEncodeMethod,
+ algorithm: SignAlgorithm,
+): Promise
+⋮----
+/**
+ * Sign a message, with a secret, using the Web Crypto API
+ */
+export async function signMessage(
+ message: string,
+ secret: string,
+ method: SignEncodeMethod,
+ algorithm: SignAlgorithm,
+): Promise
+⋮----
+export function checkWebCryptoAPISupported()
+
================
File: src/types/request/account.ts
================
@@ -1873,11 +2038,6 @@ File: .eslintrc.cjs
================
// 'no-unused-vars': ['warn'],
-================
-File: .nvmrc
-================
-v22.17.0
-
================
File: .prettierrc
================
@@ -3174,186 +3334,56 @@ async function start()
// );
================
-File: src/lib/websocket/websocket-util.ts
+File: src/lib/websocket/WsStore.ts
================
import WebSocket from 'isomorphic-ws';
⋮----
-import { WSAPIRequest } from '../../types/websockets/requests.js';
+import { DefaultLogger } from '../logger.js';
import {
- FuturesWSAPITopic,
- SpotWSAPITopic,
-} from '../../types/websockets/wsAPI.js';
+ DeferredPromise,
+ WSConnectedResult,
+ WsConnectionStateEnum,
+ WsStoredState,
+} from './WsStore.types.js';
⋮----
/**
- * Should be one WS key per unique URL. Some URLs may need a suffix.
+ * Simple comparison of two objects, recursive for nested objects
*/
+export function isDeepObjectMatch(object1: unknown, object2: unknown): boolean
⋮----
-/**
- * Spot & Margin
- * https://www.gate.io/docs/developers/apiv4/ws/en/
- */
+type DeferredPromiseRef =
+ (typeof DEFERRED_PROMISE_REF)[keyof typeof DEFERRED_PROMISE_REF];
⋮----
-/**
- * Perpetual futures (USDT)
- * https://www.gate.io/docs/developers/futures/ws/en/#gate-io-futures-websocket-v4
- */
+export class WsStore<
+WsKey extends string,
⋮----
-/**
- * Perpetual futures (BTC)
- * https://www.gate.io/docs/developers/futures/ws/en/#gate-io-futures-websocket-v4
- */
+constructor(logger: DefaultLogger)
⋮----
-/**
- * Delivery Futures (USDT)
- * https://www.gate.io/docs/developers/delivery/ws/en/
- */
+/** Get WS stored state for key, optionally create if missing */
+get(
+ key: WsKey,
+ createIfMissing?: true,
+ ): WsStoredState;
⋮----
-/**
- * Delivery Futures (BTC)
- * https://www.gate.io/docs/developers/delivery/ws/en/
- */
+get(
+ key: WsKey,
+ createIfMissing?: false,
+ ): WsStoredState | undefined;
⋮----
-/**
- * Options
- * https://www.gate.io/docs/developers/options/ws/en/
- */
+get(
+ key: WsKey,
+ createIfMissing?: boolean,
+): WsStoredState | undefined
⋮----
-/**
- * Announcements V4
- * https://www.gate.io/docs/developers/options/ws/en/
- */
+getKeys(): WsKey[]
⋮----
-/** This is used to differentiate between each of the available websocket streams */
-export type WsKey = (typeof WS_KEY_MAP)[keyof typeof WS_KEY_MAP];
+create(key: WsKey): WsStoredState | undefined
⋮----
-export type FuturesWsKey =
- | typeof WS_KEY_MAP.perpFuturesUSDTV4
- | typeof WS_KEY_MAP.perpFuturesBTCV4
- | typeof WS_KEY_MAP.deliveryFuturesUSDTV4
- | typeof WS_KEY_MAP.deliveryFuturesBTCV4;
+delete(key: WsKey): void
⋮----
-export type WsMarket = 'all';
+// TODO: should we allow this at all? Perhaps block this from happening...
⋮----
-/**
- * Normalised internal format for a request (subscribe/unsubscribe/etc) on a topic, with optional parameters.
- *
- * - Topic: the topic this event is for
- * - Payload: the parameters to include, optional. E.g. auth requires key + sign. Some topics allow configurable parameters.
- */
-export interface WsTopicRequest<
- TWSTopic extends string = string,
- TWSPayload = any,
-> {
- topic: TWSTopic;
- payload?: TWSPayload;
-}
-⋮----
-/**
- * Conveniently allow users to request a topic either as string topics or objects (containing string topic + params)
- */
-export type WsTopicRequestOrStringTopic<
- TWSTopic extends string,
- TWSPayload = any,
-> = WsTopicRequest | string;
-⋮----
-/**
- * Some exchanges have two livenet environments, some have test environments, some dont. This allows easy flexibility for different exchanges.
- * Examples:
- * - One livenet and one testnet: NetworkMap<'livenet' | 'testnet'>
- * - One livenet, sometimes two, one testnet: NetworkMap<'livenet' | 'testnet', 'livenet2'>
- * - Only one livenet, no other networks: NetworkMap<'livenet'>
- */
-type NetworkMap<
- TRequiredKeys extends string,
- TOptionalKeys extends string | undefined = undefined,
-> = Record &
- (TOptionalKeys extends string
- ? Record
- : Record);
-⋮----
-export function neverGuard(x: never, msg: string): Error
-⋮----
-/**
- * WS API promises are stored using a primary key. This key is constructed using
- * properties found in every request & reply.
- */
-export function getPromiseRefForWSAPIRequest(
- requestEvent: WSAPIRequest,
-): string
-⋮----
-export function getPrivateSpotTopics(): string[]
-⋮----
-// Consumeable channels for spot
-⋮----
-// WebSocket API for spot
-⋮----
-export function getPrivateFuturesTopics(): string[]
-⋮----
-// These are the same for perps vs delivery futures
-⋮----
-export function getPrivateOptionsTopics(): string[]
-⋮----
-/**
- * ws.terminate() is undefined in browsers.
- * This only works in node.js, not in browsers.
- * Does nothing if `ws` is undefined. Does nothing in browsers.
- */
-export function safeTerminateWs(
- ws?: WebSocket | any,
- fallbackToClose?: boolean,
-): boolean
-
-================
-File: src/lib/websocket/WsStore.ts
-================
-import WebSocket from 'isomorphic-ws';
-⋮----
-import { DefaultLogger } from '../logger.js';
-import {
- DeferredPromise,
- WSConnectedResult,
- WsConnectionStateEnum,
- WsStoredState,
-} from './WsStore.types.js';
-⋮----
-/**
- * Simple comparison of two objects, recursive for nested objects
- */
-export function isDeepObjectMatch(object1: unknown, object2: unknown): boolean
-⋮----
-type DeferredPromiseRef =
- (typeof DEFERRED_PROMISE_REF)[keyof typeof DEFERRED_PROMISE_REF];
-⋮----
-export class WsStore<
-WsKey extends string,
-⋮----
-constructor(logger: DefaultLogger)
-⋮----
-/** Get WS stored state for key, optionally create if missing */
-get(
- key: WsKey,
- createIfMissing?: true,
- ): WsStoredState;
-⋮----
-get(
- key: WsKey,
- createIfMissing?: false,
- ): WsStoredState | undefined;
-⋮----
-get(
- key: WsKey,
- createIfMissing?: boolean,
-): WsStoredState | undefined
-⋮----
-getKeys(): WsKey[]
-⋮----
-create(key: WsKey): WsStoredState | undefined
-⋮----
-delete(key: WsKey): void
-⋮----
-// TODO: should we allow this at all? Perhaps block this from happening...
-⋮----
-/* connection websocket */
+/* connection websocket */
⋮----
hasExistingActiveConnection(key: WsKey): boolean
⋮----
@@ -3478,2919 +3508,5654 @@ deleteTopic(key: WsKey, topic: TWSTopicSubscribeEventArgs)
// Check if we're subscribed to a topic like this
================
-File: src/lib/multipartUtil.ts
+File: src/lib/BaseWSClient.ts
================
-/** File payload for Gate multipart/form-data OTC endpoints */
-export type GateMultipartFile =
- | Blob
- | Buffer
- | { filename?: string; content: Blob | Buffer };
+import EventEmitter from 'events';
+import WebSocket from 'isomorphic-ws';
⋮----
-export function appendGateMultipartFile(
- form: FormData,
- fieldName: string,
- file: GateMultipartFile,
-): void
+import {
+ WebsocketClientOptions,
+ WSClientConfigurableOptions,
+} from '../types/websockets/client.js';
+import { WsOperation } from '../types/websockets/requests.js';
+import { WS_LOGGER_CATEGORY } from '../WebsocketClient.js';
+import { DefaultLogger } from './logger.js';
+import { isMessageEvent, MessageEventLike } from './requestUtils.js';
+import { checkWebCryptoAPISupported } from './webCryptoAPI.js';
+import {
+ safeTerminateWs,
+ WsTopicRequest,
+ WsTopicRequestOrStringTopic,
+} from './websocket/websocket-util.js';
+import { WsStore } from './websocket/WsStore.js';
+import {
+ WSConnectedResult,
+ WsConnectionStateEnum,
+} from './websocket/WsStore.types.js';
⋮----
-export function appendGateMultipartFields(
- form: FormData,
- fields: Record,
-): void
-
-================
-File: src/lib/webCryptoAPI.ts
-================
-import { neverGuard } from './misc-util.js';
+interface WSClientEventMap {
+ /** Connection opened. If this connection was previously opened and reconnected, expect the reconnected event instead */
+ open: (evt: {
+ wsKey: WsKey;
+ event: any;
+ wsUrl: string;
+ ws: WebSocket;
+ }) => void /** Reconnecting a dropped connection */;
+ reconnect: (evt: { wsKey: WsKey; event: any }) => void;
+ /** Successfully reconnected a connection that dropped */
+ reconnected: (evt: {
+ wsKey: WsKey;
+ event: any;
+ wsUrl: string;
+ ws: WebSocket;
+ }) => void;
+ /** Connection closed */
+ close: (evt: { wsKey: WsKey; event: any }) => void;
+ /** Received reply to websocket command (e.g. after subscribing to topics) */
+ response: (response: any & { wsKey: WsKey }) => void;
+ /** Received data for topic */
+ update: (response: any & { wsKey: WsKey }) => void;
+ /** Exception from ws client OR custom listeners (e.g. if you throw inside your event handler) */
+ exception: (response: any & { wsKey: WsKey }) => void;
+ error: (response: any & { wsKey: WsKey }) => void;
+ /** Confirmation that a connection successfully authenticated */
+ authenticated: (event: { wsKey: WsKey; event: any }) => void;
+}
⋮----
-function bufferToB64(buffer: ArrayBuffer): string
+/** Connection opened. If this connection was previously opened and reconnected, expect the reconnected event instead */
⋮----
-export type SignEncodeMethod = 'hex' | 'base64';
-export type SignAlgorithm = 'SHA-256' | 'SHA-512';
+}) => void /** Reconnecting a dropped connection */;
⋮----
-/**
- * Similar to node crypto's `createHash()` function
- */
-export async function hashMessage(
- message: string,
- method: SignEncodeMethod,
- algorithm: SignAlgorithm,
-): Promise
+/** Successfully reconnected a connection that dropped */
⋮----
-/**
- * Sign a message, with a secret, using the Web Crypto API
- */
-export async function signMessage(
- message: string,
- secret: string,
- method: SignEncodeMethod,
- algorithm: SignAlgorithm,
-): Promise
+/** Connection closed */
⋮----
-export function checkWebCryptoAPISupported()
-
-================
-File: src/types/request/options.ts
-================
-/**==========================================================================================================================
- * OPTIONS
- * ==========================================================================================================================
- */
-export interface GetOptionsSettlementHistoryReq {
- underlying: string;
- limit?: number;
- offset?: number;
- from?: number;
- to?: number;
-}
-export interface GetOptionsMySettlementsReq {
- underlying: string;
- contract?: string;
- limit?: number;
- offset?: number;
- from?: number;
- to?: number;
-}
+/** Received reply to websocket command (e.g. after subscribing to topics) */
⋮----
-export interface GetOptionsOrderBookReq {
- contract: string;
- interval?: '0' | '0.1' | '0.01';
- limit?: number;
- with_id?: boolean;
-}
+/** Received data for topic */
⋮----
-export interface GetOptionsCandlesReq {
- contract: string;
- limit?: number;
- from?: number;
- to?: number;
- interval?: '1m' | '5m' | '15m' | '30m' | '1h';
-}
+/** Exception from ws client OR custom listeners (e.g. if you throw inside your event handler) */
⋮----
-export interface GetOptionsUnderlyingCandlesReq {
- underlying: string;
- limit?: number;
- from?: number;
- to?: number;
- interval?: '1m' | '5m' | '15m' | '30m' | '1h';
-}
+/** Confirmation that a connection successfully authenticated */
⋮----
-export interface GetOptionsTradesReq {
- contract?: string;
- type?: 'C' | 'P';
- limit?: number;
- offset?: number;
- from?: number;
- to?: number;
+export interface EmittableEvent {
+ eventType: 'response' | 'update' | 'exception' | 'authenticated';
+ event: TEvent;
}
⋮----
-export interface GetOptionsAccountChangeReq {
- limit?: number;
- offset?: number;
- from?: number;
- to?: number;
- type?: 'dnw' | 'prem' | 'fee' | 'refr' | 'set';
-}
-⋮----
-export interface SubmitOptionsOrderReq {
- contract: string;
- size: number;
- iceberg?: number;
- price?: string;
- close?: boolean;
- reduce_only?: boolean;
- tif?: 'gtc' | 'ioc' | 'poc';
- text?: string;
+// Type safety for on and emit handlers: https://stackoverflow.com/a/61609010/880837
+export interface BaseWebsocketClient {
+ on>(
+ event: U,
+ listener: WSClientEventMap[U],
+ ): this;
+
+ emit>(
+ event: U,
+ ...args: Parameters[U]>
+ ): boolean;
}
⋮----
-export interface AmendOptionsOrderReq {
- contract: string; // Options contract name
- price: string; // Order price
- size: number; // Order size
-}
+on>(
+ event: U,
+ listener: WSClientEventMap[U],
+ ): this;
⋮----
-contract: string; // Options contract name
-price: string; // Order price
-size: number; // Order size
+emit>(
+ event: U,
+ ...args: Parameters[U]>
+ ): boolean;
⋮----
-export interface GetOptionsOrdersReq {
- contract?: string;
- underlying?: string;
- status: 'open' | 'finished';
- limit?: number;
- offset?: number;
- from?: number;
- to?: number;
-}
+/**
+ * Users can conveniently pass topics as strings or objects (object has topic name + optional params).
+ *
+ * This method normalises topics into objects (object has topic name + optional params).
+ */
+function getNormalisedTopicRequests(
+ wsTopicRequests: WsTopicRequestOrStringTopic[],
+): WsTopicRequest[]
⋮----
-export interface GetOptionsPersonalHistoryReq {
- underlying: string;
- contract?: string;
- limit?: number;
- offset?: number;
- from?: number;
- to?: number;
-}
+// passed as string, convert to object
⋮----
-export interface OptionsMMPSettingsReq {
- underlying: string;
- window: number; // Time window in milliseconds, between 1-5000, 0 to disable MMP
- frozen_period: number; // Frozen period in milliseconds, 0 to freeze indefinitely until reset API is called
- qty_limit: string; // Maximum transaction volume (positive number, up to 2 decimal places)
- delta_limit: string; // Maximum net delta value (positive number, up to 2 decimal places)
-}
+// already a normalised object, thanks to user
⋮----
-window: number; // Time window in milliseconds, between 1-5000, 0 to disable MMP
-frozen_period: number; // Frozen period in milliseconds, 0 to freeze indefinitely until reset API is called
-qty_limit: string; // Maximum transaction volume (positive number, up to 2 decimal places)
-delta_limit: string; // Maximum net delta value (positive number, up to 2 decimal places)
-
-================
-File: src/types/request/p2pMerchant.ts
-================
-/** P2P Merchant API request types */
+/**
+ * Base WebSocket abstraction layer. Handles connections, tracking each connection as a unique "WS Key"
+ */
+// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
+export abstract class BaseWebsocketClient<
⋮----
-export interface P2PMerchantGetCounterpartyUserInfoReq {
- biz_uid: string;
-}
+/**
+ * The WS connections supported by the client, each identified by a unique primary key
+ */
⋮----
-export interface P2PMerchantGetMyselfPaymentReq {
- fiat?: string;
-}
+/**
+ * State store to track a list of topics (topic requests) we are expected to be subscribed to if reconnected
+ */
⋮----
-export interface P2PMerchantGetPendingTransactionListReq {
- crypto_currency: string;
- fiat_currency: string;
- order_tab?: string;
- select_type?: string;
- status?: string;
- txid?: number;
- start_time?: number;
- end_time?: number;
-}
+constructor(
+ options?: WSClientConfigurableOptions,
+ logger?: typeof DefaultLogger,
+)
⋮----
-export interface P2PMerchantGetCompletedTransactionListReq {
- crypto_currency: string;
- fiat_currency: string;
- select_type?: string;
- status?: string;
- txid?: number;
- start_time?: number;
- end_time?: number;
- query_dispute?: number;
- page?: number;
- per_page?: number;
-}
+// Some defaults:
⋮----
-export interface P2PMerchantGetTransactionDetailsReq {
- txid: number;
- channel?: string;
-}
+// Gate.io only has one connection (for both public & private). Auth works with every sub, not on connect, so this is turned off.
⋮----
-export interface P2PMerchantConfirmPaymentReq {
- trade_id: string;
- payment_method: string;
-}
+// Gate.io requires auth to be added to every request, when subscribing to private topics. This is handled automatically.
⋮----
-export interface P2PMerchantConfirmReceiptReq {
- trade_id: string;
-}
+// Automatically re-auth WS API, if we were auth'd before and get reconnected
⋮----
-export interface P2PMerchantCancelTransactionReq {
- trade_id: string;
- reason_id?: string;
- reason_memo?: string;
-}
+// Check Web Crypto API support when credentials are provided and no custom sign function is used
⋮----
-export interface P2PMerchantPlaceBizPushOrderReq {
- currencyType: string;
- exchangeType: string;
- type: string;
- unitPrice: string;
- number: string;
- payType: string;
- minAmount?: string; // v4.106.102: No longer required; trade quantity priced by currencyType
- maxAmount?: string; // v4.106.102: No longer required; trade quantity priced by currencyType
- pay_type_json?: string;
- rateFixed?: string;
- oid?: string;
- tierLimit?: string;
- verifiedLimit?: string;
- regTimeLimit?: string;
- advertisersLimit?: string;
- hide_payment?: string;
- expire_min?: string;
- trade_tips?: string;
- auto_reply?: string;
- min_completed_limit?: string;
- max_completed_limit?: string;
- completed_rate_limit?: string;
- user_country_limit?: string;
- user_order_limit?: string;
- rateReferenceId?: string;
- rateOffset?: string;
- float_trend?: string;
- limitBasis?: string; // v4.106.102: 0 by crypto quantity, 1 by fiat amount; defaults to 0
- fiatMinAmount?: string; // v4.106.102: Required when limitBasis is 1
- fiatMaxAmount?: string; // v4.106.102: Required when limitBasis is 1
- polymarket_limit?: string; // v4.106.102: Restrict trading with Polymarket users
-}
+protected abstract isAuthOnConnectWsKey(wsKey: TWSKey): boolean;
⋮----
-minAmount?: string; // v4.106.102: No longer required; trade quantity priced by currencyType
-maxAmount?: string; // v4.106.102: No longer required; trade quantity priced by currencyType
+protected abstract sendPingEvent(wsKey: TWSKey, ws: WebSocket): void;
⋮----
-limitBasis?: string; // v4.106.102: 0 by crypto quantity, 1 by fiat amount; defaults to 0
-fiatMinAmount?: string; // v4.106.102: Required when limitBasis is 1
-fiatMaxAmount?: string; // v4.106.102: Required when limitBasis is 1
-polymarket_limit?: string; // v4.106.102: Restrict trading with Polymarket users
+protected abstract sendPongEvent(wsKey: TWSKey, ws: WebSocket): void;
⋮----
-/** POST /p2p/merchant/account/set_merchant_work_hours — v4.106.96 */
-export interface P2PMerchantSetMerchantWorkHoursReq {
- work_status: 0 | 1 | 2; // 0 resting, 1 working, 2 custom working hours
- cycle_type?: string;
- day_of_week?: string;
- time_zone?: string; // UTC offset -12 to +14
- start_time?: string;
- end_time?: string;
-}
+protected abstract isWsPing(data: any): boolean;
⋮----
-work_status: 0 | 1 | 2; // 0 resting, 1 working, 2 custom working hours
+protected abstract isWsPong(data: any): boolean;
⋮----
-time_zone?: string; // UTC offset -12 to +14
+protected abstract getWsAuthRequestEvent(wsKey: TWSKey): Promise