OKX
OKX v5 REST API for trading, accounts, funding, earn, copy trading and market data.
Authentication
This connector uses Token-based authentication.
info
Set up your connection in the Abstra Console before using it in your workflows.
How to use
Using the Smart Chat
Execute the action "CHOOSE_ONE_ACTION_BELOW" from my connector "YOUR_CONNECTOR_NAME" using the params "PARAMS_HERE".
Using the Web Editor
from abstra.connectors import run_connection_action
result = run_connection_action(
connection_name="your_connection_name",
action_name="your_action_name",
params={
"param1": "value1",
"param2": "value2"
})
Available Actions
This connector provides 314 actions:
| Action | Purpose | Parameters |
|---|---|---|
| post_api_v5_account_account_level_switch_preset | Pre-set the required information for account mode switching. When switching from Portfolio margin mode back to Spot and futures mode / Multi-currency margin mode, and if there are existing cross-margin contract positions, it is mandatory to pre-set leverage. If the user does not follow the required settings, they will receive an error message during the pre-check or when setting the account mode. Rate limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . acctLv (string) . lever (string) . riskOffsetType (string) } (object) required |
| get_api_v5_account_account_position_risk | Get account and position risk Obtain basic information about accounts and positions on the same time snapshot Rate Limit: 10 requests per 2 seconds Rate limit rule: User ID Permission: Read | instType (string) |
| post_api_v5_account_activate_option | Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Trade | No parameters |
| get_api_v5_account_adjust_leverage_info | Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | instType (string) required mgnMode (string) required lever (string) required instId (string) ccy (string) posSide (string) |
| get_api_v5_account_balance | Retrieve a list of assets with non-zero balance, remaining balance, and available amount in the trading account. Interest-free quota and discount rates are public data and not displayed on the account interface. Rate Limit: 10 requests per 2 seconds Rate limit rule: User ID Permission: Read | ccy (string) |
| get_api_v5_account_bills | Retrieve the bills of the account. The bill refers to all transaction records that result in changing the balance of an account. Pagination is supported, and the response is sorted with the most recent first. This endpoint can retrieve data from the last 7 days. Rate Limit: 5 requests per second Rate limit rule: User ID Permission: Read | instType (string) instId (string) ccy (string) mgnMode (string) ctType (string) type (string) subType (string) after (string) before (string) begin (string) end (string) limit (string) |
| get_api_v5_account_bills_archive | Retrieve the account’s bills. The bill refers to all transaction records that result in changing the balance of an account. Pagination is supported, and the response is sorted with most recent first. This endpoint can retrieve data from the last 1 year since July 1, 2024. Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | instType (string) instId (string) ccy (string) mgnMode (string) ctType (string) type (string) subType (string) after (string) before (string) begin (string) end (string) limit (string) |
| get_api_v5_account_bills_history_archive | Apply for bill data since 1 February, 2021 except for the current quarter. Rate Limit: 10 requests per 2 seconds Rate limit rule: User ID Permission: Read | year (string) required quarter (string) required |
| post_api_v5_account_bills_history_archive | Apply for bill data since 1 February, 2021 except for the current quarter. Rate Limit:12 requests per day Rate limit rule: User ID Permission: Read | data: { . quarter (string) . year (string) } (object) required |
| get_api_v5_account_collateral_assets | Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | ccy (string) collateralEnabled (boolean) |
| get_api_v5_account_config | Retrieve current account configuration. Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | No parameters |
| get_api_v5_account_greeks | Retrieve a greeks list of all assets in the account. Rate Limit: 10 requests per 2 seconds Rate limit rule: User ID Permission: Read | ccy (string) |
| get_api_v5_account_instruments | Retrieve available instruments info of current account. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID + Instrument Type Permission: Read | instType (string) required uly (string) instFamily (string) instId (string) |
| get_api_v5_account_interest_accrued | Get interest accrued data. Only data within the last one year can be obtained. Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | type (string) ccy (string) instId (string) mgnMode (string) after (string) before (string) limit (string) |
| get_api_v5_account_interest_limits | Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | type (string) ccy (string) |
| get_api_v5_account_interest_rate | Get the user's current leveraged currency borrowing market interest rate Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | ccy (string) |
| get_api_v5_account_leverage_info | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | instId (string) ccy (string) mgnMode (string) required |
| get_api_v5_account_max_avail_size | Available balance for isolated margin positions and SPOT, available equity for cross margin positions. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | instId (string) required ccy (string) tdMode (string) required reduceOnly (boolean) px (string) |
| get_api_v5_account_max_loan | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | mgnMode (string) required instId (string) ccy (string) mgnCcy (string) |
| get_api_v5_account_max_size | The maximum quantity to buy or sell. It corresponds to the 'sz' from placement. Under the Portfolio Margin account, the calculation of the maximum buy/sell amount or open amount is not supported under the cross mode of derivatives. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | instId (string) required tdMode (string) required ccy (string) px (string) leverage (string) |
| get_api_v5_account_max_withdrawal | Retrieve the maximum transferable amount from trading account to funding account. If no currency is specified, the transferable amount of all owned currencies will be returned. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | ccy (string) |
| get_api_v5_account_mmp_config | This endpoint is used to get MMP configure information Only applicable to Option in Portfolio Margin mode, and MMP privilege is required. Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | instFamily (string) |
| post_api_v5_account_mmp_config | This endpoint is used to set MMP configure Only applicable to Option in Portfolio Margin mode, and MMP privilege is required. _What is MMP?Market Maker Protection MMP is an automated mechanism for market makers to pull their quotes when their executions exceed a certain thresholdqtyLimit within a certain time frametimeInterval. Once mmp is triggered, any pre-existing mmp pending ordersmmp and mmp_and_post_only orders will be automatically canceled, and new orders tagged as MMP will be reject | data: { . frozenInterval (string) . instFamily (string) . qtyLimit (string) . timeInterval (string) } (object) required |
| post_api_v5_account_mmp_reset | You can unfreeze by this endpoint once MMP is triggered. Only applicable to Option in Portfolio Margin mode, and MMP privilege is required. Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . instFamily (string) . instType (string) } (object) required |
| post_api_v5_account_position_builder | Calculates portfolio margin information for virtual position/assets or current position of the user. You can add up to 200 virtual positions and 200 virtual assets in one request. Rate Limit: 2 requests per 2 seconds Rate limit rule: User ID Permission: Read | data: { . acctLv (string) . greeksType (string) . inclRealPosAndEq (boolean) . lever (string) . simAsset (array) . simPos (array) } (object) required |
| get_api_v5_account_position_tiers | Retrieve cross position limitation of SWAP/FUTURES/OPTION under Portfolio margin mode. Rate Limit: 10 requests per 2 seconds Rate limit rule: User ID Permission: Read | instType (string) required uly (string) instFamily (string) |
| post_api_v5_account_position_margin_balance | Increase or decrease the margin of the isolated position. Margin reduction may result in the change of the actual leverage. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . amt (string) . ccy (string) . instId (string) . posSide (string) . type (string) } (object) required |
| get_api_v5_account_positions | Retrieve information on your positions. When the account is in net mode, net positions will be displayed, and when the account is in long/short mode, long or short positions will be displayed. Return in reverse chronological order using ctime. Rate Limit: 10 requests per 2 seconds Rate limit rule: User ID Permission: Read | instType (string) instId (string) posId (string) |
| get_api_v5_account_positions_history | Retrieve the updated position data for the last 3 months. Return in reverse chronological order using utime. Getting positions history is supported under Portfolio margin mode since . Rate Limit: 10 requests per 2 seconds Rate limit rule: User ID Permission: Read | instType (string) instId (string) mgnMode (string) type (string) posId (string) after (string) before (string) limit (string) |
| post_api_v5_account_quick_margin_borrow_repay | Please note that this endpoint will be deprecated soon. Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . amt (string) . ccy (string) . instId (string) . side (string) } (object) required |
| get_api_v5_account_quick_margin_borrow_repay_history | Get record in the past 3 months. Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | instId (string) ccy (string) side (string) after (string) before (string) begin (string) end (string) limit (string) |
| get_api_v5_account_risk_state | Only applicable to Portfolio margin account Rate Limit: 10 requests per 2 seconds Rate limit rule: User ID Permission: Read | No parameters |
| post_api_v5_account_set_account_level | You need to set on the Web/App for the first set of every account mode. If users plan to switch account modes while holding positions, they should first call the preset endpoint to conduct necessary settings, then call the precheck endpoint to get unmatched information, margin check, and other related information, and finally call the account mode switch endpoint to switch account modes. Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . acctLv (string) } (object) required |
| get_api_v5_account_set_account_switch_precheck | Retrieve precheck information for account mode switching. Rate limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | acctLv (string) required |
| post_api_v5_account_set_auto_loan | Only applicable to Multi-currency margin and Portfolio margin Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . autoLoan (boolean) } (object) required |
| post_api_v5_account_set_auto_repay | Only applicable to Spot mode enabled borrowing Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . autoRepay (boolean) } (object) required |
| post_api_v5_account_set_collateral_assets | Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . ccyList (array) . collateralEnabled (boolean) . type (string) } (object) required |
| post_api_v5_account_set_greeks | Set the display type of Greeks. Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . greeksType (string) } (object) required |
| post_api_v5_account_set_isolated_mode | You can set the currency margin and futures/perpetual Isolated margin trading mode Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . isoMode (string) . type (string) } (object) required |
| post_api_v5_account_set_leverage | There are 10 different scenarios for leverage setting: 1. Set leverage for MARGIN instruments under isolated-margin trade mode at pairs level. 2. Set leverage for MARGIN instruments under cross-margin trade mode and Spot mode enabled borrow at currency level. 3. Set leverage for MARGIN instruments under cross-margin trade mode and Spot and futures mode account mode at pairs level. 4. Set leverage for MARGIN instruments under cross-margin trade mode and Multi-currency margin at cu | data: { . ccy (string) . instId (string) . lever (string) . mgnMode (string) . posSide (string) } (object) required |
| post_api_v5_account_set_position_mode | Spot and futures mode and Multi-currency mode: FUTURES and SWAP support both long/short mode and net mode. In net mode, users can only have positions in one direction; In long/short mode, users can hold positions in long and short directions. Portfolio margin mode: FUTURES and SWAP only support net mode Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . posMode (string) } (object) required |
| post_api_v5_account_set_risk_offset_amt | Set risk offset amount. This does not represent the actual spot risk offset amount. Only applicable to Portfolio Margin Mode. Rate Limit: 10 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . ccy (string) . clSpotInUseAmt (string) } (object) required |
| get_api_v5_account_spot_borrow_repay_history | Retrieve the borrow/repay history under Spot mode Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | ccy (string) type (string) after (string) before (string) limit (string) |
| post_api_v5_account_spot_manual_borrow_repay | Only applicable to Spot mode enabled borrowing Rate Limit: 1 request per second Rate limit rule: User ID Permission: Trade | data: { . amt (string) . ccy (string) . side (string) } (object) required |
| get_api_v5_account_subaccount_balances | Query detailed balance info of Trading Account of a sub-account via the master account applies to master accounts only Rate limit:6 requests per 2 seconds Rate limit rule: User ID Permission: Read | subAcct (string) required |
| get_api_v5_account_subaccount_max_withdrawal | Retrieve the maximum withdrawal information of a sub-account via the master account applies to master accounts only. If no currency is specified, the transferable amount of all owned currencies will be returned. Rate limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | subAcct (string) required ccy (string) |
| get_api_v5_account_trade_fee | Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | instType (string) required instId (string) uly (string) instFamily (string) ruleType (string) required |
| get_api_v5_affiliate_invitee_detail | Rate limit:20 requests per 2 seconds Rate limit rule: User ID | uid (string) required |
| get_api_v5_asset_asset_valuation | View account asset valuation Rate Limit: 1 request per second Rate limit rule: User ID Permission: Read | ccy (string) |
| get_api_v5_asset_balances | Retrieve the funding account balances of all the assets and the amount that is available or on hold. Only asset information of a currency with a balance greater than 0 will be returned. Rate Limit: 6 requests per second Rate limit rule: User ID Permission: Read | ccy (string) |
| get_api_v5_asset_bills | Query the billing record in the past month. Rate Limit: 6 Requests per second Rate limit rule: User ID Permission: Read | ccy (string) type (string) clientId (string) after (string) before (string) limit (string) |
| post_api_v5_asset_cancel_withdrawal | You can cancel normal withdrawal requests, but you cannot cancel withdrawal requests on Lightning. Rate Limit: 6 requests per second Rate limit rule: User ID Permission: Trade | data: { . wdId (string) } (object) required |
| get_api_v5_asset_convert_currencies | Rate Limit: 6 requests per second Rate limit rule: User ID Permission: Read | No parameters |
| get_api_v5_asset_convert_currency_pair | Rate Limit: 6 requests per second Rate limit rule: User ID Permission: Read | fromCcy (string) required toCcy (string) required |
| post_api_v5_asset_convert_estimate_quote | Rate Limit: 10 requests per second Rate limit rule: User ID Rate Limit: 1 request per 5 seconds Rate limit rule: Instrument Permission: Read | data: { . baseCcy (string) . clQReqId (string) . quoteCcy (string) . rfqSz (string) . rfqSzCcy (string) . side (string) . tag (string) } (object) required |
| get_api_v5_asset_convert_history | Rate Limit: 6 requests per second Rate limit rule: User ID | clTReqId (string) after (string) before (string) limit (string) tag (string) |
| post_api_v5_asset_convert_trade | You should make before convert trade. Only assets in the trading account supported convert. Rate Limit: 10 requests per second Rate limit rule: User ID Permission: Trade For the same side buy/sell, there's a trading limit of 1 request per 5 seconds. | data: { . baseCcy (string) . clTReqId (string) . quoteCcy (string) . quoteId (string) . side (string) . sz (string) . szCcy (string) . tag (string) } (object) required |
| get_api_v5_asset_currencies | Retrieve a list of all currencies available which are related to the current account's KYC entity. Rate Limit: 6 requests per second Rate limit rule: User ID Permission: Read | ccy (string) |
| get_api_v5_asset_deposit_address | Retrieve the deposit addresses of currencies, including previously-used addresses. Rate Limit: 6 requests per second Rate limit rule: User ID Permission: Read | ccy (string) required |
| get_api_v5_asset_deposit_history | Retrieve the deposit records according to the currency, deposit status, and time range in reverse chronological order. The 100 most recent records are returned by default. Websocket API is also available, refer to . Rate Limit: 6 requests per second Rate limit rule: User ID Permission: Read | ccy (string) depId (string) fromWdId (string) txId (string) type (string) state (string) after (string) before (string) limit (string) |
| get_api_v5_asset_deposit_withdraw_status | Retrieve deposit's and withdrawal's detailed status and estimated complete time. Rate Limit: 1 request per 2 seconds Rate limit rule: User ID Permission: Read | wdId (string) txId (string) ccy (string) to (string) chain (string) |
| get_api_v5_asset_exchange_list | Authentication is not required for this public endpoint. Rate Limit: 6 requests per second Rate limit rule: IP | No parameters |
| get_api_v5_asset_monthly_statement | Retrieve monthly statement in the past year. Rate Limit: 10 requests per 2 seconds Rate limit rule: User ID Permission: Read | month (string) required |
| post_api_v5_asset_monthly_statement | Apply for monthly statement in the past year. Rate Limit: 20 requests per month Rate limit rule: User ID Permission: Read | data: { . month (string) } (object) required |
| get_api_v5_asset_non_tradable_assets | Rate Limit: 6 requests per second Rate limit rule: User ID Permission: Read | ccy (string) |
| get_api_v5_asset_subaccount_balances | Query detailed balance info of Funding Account of a sub-account via the master account applies to master accounts only Rate limit:6 requests per 2 seconds Rate limit rule: User ID Permission: Read | subAcct (string) required ccy (string) |
| get_api_v5_asset_subaccount_bills | Applies to master accounts only. Rate limit:6 requests per second Rate limit rule: User ID Permission: Read | ccy (string) type (string) subAcct (string) after (string) before (string) limit (string) |
| get_api_v5_asset_subaccount_managed_subaccount_bills | Only applicable to the trading team's master account to getting transfer records of managed sub accounts entrusted to oneself. Rate limit:6 requests per second Rate limit rule: User ID Permission: Read | ccy (string) type (string) subAcct (string) subUid (string) after (string) before (string) limit (string) |
| post_api_v5_asset_subaccount_transfer | Applies to master accounts only. Only API keys with Trade privilege can call this endpoint. Rate limit:1 request per second Rate limit rule: User ID Permission: Trade | data: { . amt (string) . ccy (string) . from (string) . fromSubAccount (string) . loanTrans (boolean) . omitPosRisk (string) . to (string) . toSubAccount (string) } (object) required |
| post_api_v5_asset_transfer | Only API keys with Trade privilege can call this endpoint. This endpoint supports the transfer of funds between your funding account and trading account, and from the master account to sub-accounts. Sub-account can transfer out to master account by default. Need to call to grant privilege first if you want sub-account transferring to another sub-account sub-accounts need to belong to same master account. _Failure of the request does not mean the transfer has failed. Recommend to call 'Get fu | data: { . amt (string) . ccy (string) . clientId (string) . from (string) . loanTrans (boolean) . omitPosRisk (string) . subAcct (string) . to (string) . type (string) } (object) required |
| get_api_v5_asset_transfer_state | Retrieve the transfer state data of the last 2 weeks. Rate Limit: 10 requests per second Rate limit rule: User ID Permission: Read | transId (string) clientId (string) type (string) |
| post_api_v5_asset_withdrawal | Only supported withdrawal of assets from funding account. Common sub-account does not support withdrawal. The API can only make withdrawal to verified addresses/account, and verified addresses can be set by WEB/APP. _About tagSome token deposits require a deposit address and a tag e.g. Memo/Payment ID, which is a string that guarantees the uniqueness of your deposit address. Follow the deposit procedure carefully, or you may risk losing your assets.For currencies with labels, if it is a wit | data: { . amt (string) . areaCode (string) . ccy (string) . chain (string) . clientId (string) . dest (string) . rcvrInfo (object) . toAddr (string) } (object) required |
| get_api_v5_asset_withdrawal_history | Retrieve the withdrawal records according to the currency, withdrawal status, and time range in reverse chronological order. The 100 most recent records are returned by default. Websocket API is also available, refer to . Rate Limit: 6 requests per second Rate limit rule: User ID Permission: Read | ccy (string) wdId (string) clientId (string) txId (string) type (string) state (string) after (string) before (string) limit (string) |
| post_api_v5_copytrading_algo_order | Set TP/SL for the current lead position that are not closed. Rate limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . instType (string) . slOrdPx (string) . slTriggerPx (string) . slTriggerPxType (string) . subPosId (string) . tag (string) . tpOrdPx (string) . tpTriggerPx (string) . tpTriggerPxType (string) } (object) required |
| post_api_v5_copytrading_amend_copy_settings | You need to use this endpoint to amend copy settings Rate limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . copyAmt (string) . copyInstIdType (string) . copyMgnMode (string) . copyMode (string) . copyRatio (string) . copyTotalAmt (string) . instId (string) . instType (string) . slRatio (string) . slTotalAmt (string) . subPosCloseType (string) . tag (string) . tpRatio (string) . uniqueCode (string) } (object) required |
| post_api_v5_copytrading_amend_profit_sharing_ratio | It is used to amend profit sharing ratio. Rate limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . instType (string) . profitSharingRatio (string) } (object) required |
| post_api_v5_copytrading_close_subposition | You can only close a lead position once a time. It is required to pass subPosId which can get from . Rate limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . instType (string) . ordType (string) . px (string) . subPosId (string) . tag (string) } (object) required |
| get_api_v5_copytrading_config | Retrieve current account configuration related to copy/lead trading. Rate limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | No parameters |
| get_api_v5_copytrading_copy_settings | Retrieve the copy settings about certain lead trader. Rate limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | instType (string) uniqueCode (string) required |
| get_api_v5_copytrading_current_lead_traders | Retrieve my lead traders. Rate limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | instType (string) |
| get_api_v5_copytrading_current_subpositions | Retrieve lead positions that are not closed. Returns reverse chronological order with openTime Rate limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | instType (string) instId (string) after (string) before (string) limit (string) |
| post_api_v5_copytrading_first_copy_settings | The first copy settings for the certain lead trader. You need to first copy settings after stopping copying. Rate limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . copyAmt (string) . copyInstIdType (string) . copyMgnMode (string) . copyMode (string) . copyRatio (string) . copyTotalAmt (string) . instId (string) . instType (string) . slRatio (string) . slTotalAmt (string) . subPosCloseType (string) . tag (string) . tpRatio (string) . uniqueCode (string) } (object) required |
| get_api_v5_copytrading_instruments | Retrieve instruments that are supported to lead by the platform. Retrieve instruments that the lead trader has set. Rate limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | instType (string) |
| get_api_v5_copytrading_profit_sharing_details | The leading trader gets profits shared details for the last 3 months. Rate limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | instType (string) after (string) before (string) limit (string) |
| get_api_v5_copytrading_public_config | Public endpoint. Retrieve copy trading parameter configuration information of copy settings Rate limit: 5 requests per 2 seconds Rate limit rule: IP Permission: Read | instType (string) |
| get_api_v5_copytrading_public_copy_traders | Public endpoint. Retrieve copy trader coming from certain lead trader. Return according to pnl from high to low Rate limit: 5 requests per 2 seconds Rate limit rule: IP Permission: Read | instType (string) uniqueCode (string) required limit (string) |
| get_api_v5_copytrading_public_current_subpositions | Public endpoint. Get current leading positions of lead trader Rate limit: 5 requests per 2 seconds Rate limit rule: IP Permission: Read | instType (string) uniqueCode (string) required after (string) before (string) limit (string) |
| get_api_v5_copytrading_public_lead_traders | Public endpoint. Retrieve lead trader ranks. Rate limit: 5 requests per 2 seconds Rate limit rule: IP Permission: Read | instType (string) sortType (string) state (string) minLeadDays (string) minAssets (string) maxAssets (string) minAum (string) maxAum (string) dataVer (string) page (string) limit (string) |
| get_api_v5_copytrading_public_pnl | Public endpoint. Retrieve lead trader daily pnl. Results are returned in counter chronological order. Rate limit: 5 requests per 2 seconds Rate limit rule: IP Permission: Read | instType (string) uniqueCode (string) required lastDays (string) required |
| get_api_v5_copytrading_public_preference_currency | Public endpoint. The most frequently traded crypto of this lead trader. Results are sorted by ratio from large to small. Rate limit: 5 requests per 2 seconds Rate limit rule: IP Permission: Read | instType (string) uniqueCode (string) required |
| get_api_v5_copytrading_public_stats | Public endpoint. Key data related to lead trader performance. Rate limit: 5 requests per 2 seconds Rate limit rule: IP Permission: Read | instType (string) uniqueCode (string) required lastDays (string) required |
| get_api_v5_copytrading_public_subpositions_history | Public endpoint. Retrieve the lead trader completed leading position of the last 3 months. Returns reverse chronological order with subPosId. Rate limit: 5 requests per 2 seconds Rate limit rule: IP Permission: Read | instType (string) uniqueCode (string) required after (string) before (string) limit (string) |
| get_api_v5_copytrading_public_weekly_pnl | Public endpoint. Retrieve lead trader weekly pnl. Results are returned in counter chronological order. Rate limit: 5 requests per 2 seconds Rate limit rule: IP Permission: Read | instType (string) uniqueCode (string) required |
| post_api_v5_copytrading_set_instruments | The leading trader can amend current leading instruments, need to set initial leading instruments while applying to become a leading trader. All non-leading instruments can't have position or pending orders for the current request when setting non-leading instruments as leading instruments. Rate limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . instId (string) . instType (string) } (object) required |
| post_api_v5_copytrading_stop_copy_trading | You need to use this endpoint to stop copy trading Rate limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . instType (string) . subPosCloseType (string) . uniqueCode (string) } (object) required |
| get_api_v5_copytrading_subpositions_history | Retrieve the completed lead position of the last 3 months. Returns reverse chronological order with subPosId. Rate limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | instType (string) instId (string) after (string) before (string) limit (string) |
| get_api_v5_copytrading_total_profit_sharing | The leading trader gets the total amount of profit shared since joining the platform. Rate limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | instType (string) |
| get_api_v5_copytrading_total_unrealized_profit_sharing | The leading trader gets the total unrealized amount of profit shared. Rate limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | instType (string) |
| get_api_v5_copytrading_unrealized_profit_sharing_details | The leading trader gets the profit sharing details that are expected to be shared in the next settlement cycle. The unrealized profit sharing details will update once there copy position is closed. Rate limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | instType (string) |
| post_api_v5_fiat_cancel_withdrawal | Cancel a pending fiat withdrawal order, currently only applicable to TRY Rate Limit: 3 requests per second Rate limit rule: User ID Permission: Trade | data: { . ordId (string) } (object) required |
| post_api_v5_fiat_create_withdrawal | Initiate a fiat withdrawal request Authenticated endpoint, Only for API keys with 'Withdrawal' access Only supported withdrawal of assets from funding account. Rate Limit: 3 requests per second Rate limit rule: User ID Permission: Withdraw | data: { . amt (string) . ccy (string) . clientId (string) . paymentAcctId (string) . paymentMethod (string) } (object) required |
| get_api_v5_fiat_deposit | Get fiat deposit order detail Rate Limit: 3 requests per second Rate limit rule: User ID Permission: Read | ordId (string) required |
| get_api_v5_fiat_deposit_order_history | Get fiat deposit order history Rate Limit: 3 requests per second Rate limit rule: User ID Permission: Read | ccy (string) paymentMethod (string) state (string) after (string) before (string) limit (string) |
| get_api_v5_fiat_deposit_payment_methods | To display all the available fiat deposit payment methods Rate Limit: 3 requests per second Rate limit rule: User ID Permission: Read | ccy (string) required |
| get_api_v5_fiat_withdrawal | Get fiat withdraw order detail Rate Limit: 3 requests per second Rate limit rule: User ID Permission: Read | ordId (string) required |
| get_api_v5_fiat_withdrawal_order_history | Get fiat withdrawal order history Rate Limit: 3 requests per second Rate limit rule: User ID Permission: Read | ccy (string) paymentMethod (string) state (string) after (string) before (string) limit (string) |
| get_api_v5_fiat_withdrawal_payment_methods | To display all the available fiat withdrawal payment methods Rate Limit: 3 requests per second Rate limit rule: User ID Permission: Read | ccy (string) required |
| post_api_v5_finance_flexible_loan_adjust_collateral | Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . collateralAmt (string) . collateralCcy (string) . type (string) } (object) required |
| get_api_v5_finance_flexible_loan_borrow_currencies | Get borrowable currencies Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | No parameters |
| get_api_v5_finance_flexible_loan_collateral_assets | Get collateral assets in funding account. Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | ccy (string) |
| get_api_v5_finance_flexible_loan_interest_accrued | Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | ccy (string) after (string) before (string) limit (string) |
| get_api_v5_finance_flexible_loan_loan_history | Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | type (string) after (string) before (string) limit (string) |
| get_api_v5_finance_flexible_loan_loan_info | Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | No parameters |
| get_api_v5_finance_flexible_loan_max_collateral_redeem_amount | Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | ccy (string) required |
| post_api_v5_finance_flexible_loan_max_loan | Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | data: { . borrowCcy (string) . supCollateral (array) } (object) required |
| get_api_v5_finance_savings_balance | Rate Limit: 6 requests per second Rate limit rule: User ID Permission: Read | ccy (string) |
| get_api_v5_finance_savings_lending_history | Return data in the past month. Rate Limit: 6 requests per second Rate limit rule: User ID Permission: Read | ccy (string) after (string) before (string) limit (string) |
| get_api_v5_finance_savings_lending_rate_history | Authentication is not required for this public endpoint. Only returned records after December 14, 2021. Rate Limit: 6 requests per second Rate limit rule: IP | ccy (string) after (string) before (string) limit (string) |
| get_api_v5_finance_savings_lending_rate_summary | Authentication is not required for this public endpoint. Rate Limit: 6 requests per second Rate limit rule: IP | ccy (string) |
| post_api_v5_finance_savings_purchase_redempt | Only the assets in the funding account can be used for saving. Rate Limit: 6 requests per second Rate limit rule: User ID Permission: Trade | data: { . amt (string) . ccy (string) . rate (string) . side (string) } (object) required |
| post_api_v5_finance_savings_set_lending_rate | Rate Limit: 6 requests per second Rate limit rule: User ID Permission: Trade | data: { . ccy (string) . rate (string) } (object) required |
| post_api_v5_finance_staking_defi_cancel | After cancelling, returning funds will go to the funding account. Rate Limit: 2 requests per second Rate limit rule: User ID Permission: Trade | data: { . ordId (string) . protocolType (string) } (object) required |
| get_api_v5_finance_staking_defi_eth_apy_history | Public endpoints don't need authorization. Rate Limit: 6 requests per second Rate limit rule: IP | days (string) required |
| get_api_v5_finance_staking_defi_eth_balance | The balance is a snapshot summarized all BETH assets including assets in redeeming in account. Rate Limit: 6 requests per second Rate limit rule: User ID Permission: Read | No parameters |
| get_api_v5_finance_staking_defi_eth_product_info | Rate Limit: 3 requests per second Rate limit rule: User ID Permission: Read | No parameters |
| post_api_v5_finance_staking_defi_eth_purchase | Staking ETH for BETH Only the assets in the funding account can be used. Rate Limit: 2 requests per second Rate limit rule: User ID Permission: Trade | data: { . amt (string) } (object) required |
| get_api_v5_finance_staking_defi_eth_purchase_redeem_history | Rate Limit: 6 requests per second Rate limit rule: User ID Permission: Read | type (string) status (string) after (string) before (string) limit (string) |
| post_api_v5_finance_staking_defi_eth_redeem | Only the assets in the funding account can be used. If your BETH is in your trading account, you can make funding transfer first. Rate Limit: 2 requests per second Rate limit rule: User ID Permission: Trade | data: { . amt (string) } (object) required |
| get_api_v5_finance_staking_defi_offers | Rate Limit: 3 requests per second Rate limit rule: User ID Permission: Read | productId (string) protocolType (string) ccy (string) |
| get_api_v5_finance_staking_defi_orders_active | Rate Limit: 3 requests per second Rate limit rule: User ID Permission: Read | productId (string) protocolType (string) ccy (string) state (string) |
| get_api_v5_finance_staking_defi_orders_history | Rate Limit: 3 requests per second Rate limit rule: User ID Permission: Read | productId (string) protocolType (string) ccy (string) after (string) before (string) limit (string) |
| post_api_v5_finance_staking_defi_purchase | Rate Limit: 2 requests per second Rate limit rule: User ID Permission: Trade | data: { . investData (array) . productId (string) . tag (string) . term (string) } (object) required |
| post_api_v5_finance_staking_defi_redeem | Rate Limit: 2 requests per second Rate limit rule: User ID Permission: Trade | data: { . allowEarlyRedeem (boolean) . ordId (string) . protocolType (string) } (object) required |
| get_api_v5_finance_staking_defi_sol_apy_history | Public endpoints don't need authorization. Rate Limit: 6 requests per second Rate limit rule: IP | days (string) required |
| get_api_v5_finance_staking_defi_sol_balance | The balance is summarized all OKSOL assets including assets in redeeming in account. Rate Limit: 6 requests per second Rate limit rule: User ID Permission: Read | No parameters |
| post_api_v5_finance_staking_defi_sol_purchase | Staking SOL for OKSOL Only the assets in the funding account can be used. Rate Limit: 2 requests per second Rate limit rule: User ID Permission: Trade | data: { . amt (string) } (object) required |
| get_api_v5_finance_staking_defi_sol_purchase_redeem_history | Rate Limit: 6 requests per second Rate limit rule: User ID Permission: Read | type (string) status (string) after (string) before (string) limit (string) |
| post_api_v5_finance_staking_defi_sol_redeem | Only the assets in the funding account can be used. If your OKSOL is in your trading account, you can make funding transfer first. Rate Limit: 2 requests per second Rate limit rule: User ID Permission: Trade | data: { . amt (string) } (object) required |
| get_api_v5_market_block_ticker | Retrieve the latest block trading volume in the last 24 hours. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP | instId (string) required |
| get_api_v5_market_block_tickers | Retrieve the latest block trading volume in the last 24 hours. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP | instType (string) required uly (string) instFamily (string) |
| get_api_v5_market_books | Retrieve order book of the instrument. Rate Limit: 40 requests per 2 seconds Rate limit rule: IP | instId (string) required sz (string) |
| get_api_v5_market_books_full | Retrieve order book of the instrument. The data will be updated once a second. Rate Limit: 10 requests per 2 seconds Rate limit rule: IP | instId (string) required sz (string) |
| get_api_v5_market_call_auction_details | Retrieve call auction details. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP | instId (string) required |
| get_api_v5_market_candles | Retrieve the candlestick charts. This endpoint can retrieve the latest 1,440 data entries. Charts are returned in groups based on the requested bar. Rate Limit: 40 requests per 2 seconds Rate limit rule: IP | instId (string) required bar (string) after (string) before (string) limit (string) |
| get_api_v5_market_exchange_rate | This interface provides the average exchange rate data for 2 weeks Rate Limit: 1 request per 2 seconds Rate limit rule: IP | No parameters |
| get_api_v5_market_history_candles | Retrieve history candlestick charts from recent yearsIt is last 3 months supported for 1s candlestick. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP | instId (string) required after (string) before (string) bar (string) limit (string) |
| get_api_v5_market_history_index_candles | Retrieve the candlestick charts of the index from recent years. Rate Limit: 10 requests per 2 seconds Rate limit rule: IP | instId (string) required after (string) before (string) bar (string) limit (string) |
| get_api_v5_market_history_mark_price_candles | Retrieve the candlestick charts of mark price from recent years. Rate Limit: 10 requests per 2 seconds Rate limit rule: IP | instId (string) required after (string) before (string) bar (string) limit (string) |
| get_api_v5_market_history_trades | Retrieve the recent transactions of an instrument from the last 3 months with pagination. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP | instId (string) required type (string) after (string) before (string) limit (string) |
| get_api_v5_market_index_candles | Retrieve the candlestick charts of the index. This endpoint can retrieve the latest 1,440 data entries. Charts are returned in groups based on the requested bar. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP | instId (string) required after (string) before (string) bar (string) limit (string) |
| get_api_v5_market_index_components | Get the index component information data on the market Rate Limit: 20 requests per 2 seconds Rate limit rule: IP | index (string) required |
| get_api_v5_market_index_tickers | Retrieve index tickers. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP | quoteCcy (string) instId (string) |
| get_api_v5_market_mark_price_candles | Retrieve the candlestick charts of mark price. This endpoint can retrieve the latest 1,440 data entries. Charts are returned in groups based on the requested bar. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP | instId (string) required after (string) before (string) bar (string) limit (string) |
| get_api_v5_market_option_instrument_family_trades | Retrieve the recent transactions of an instrument under same instFamily. The maximum is 100. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP | instFamily (string) required |
| get_api_v5_market_platform_24_volume | The 24-hour trading volume is calculated on a rolling basis. Rate Limit: 2 requests per 2 seconds Rate limit rule: IP | No parameters |
| get_api_v5_market_sprd_candles | Retrieve the candlestick charts. This endpoint can retrieve the latest 1,440 data entries. Charts are returned in groups based on the requested bar. Rate Limit: 40 requests per 2 seconds Rate limit rule: IP | sprdId (string) required bar (string) after (string) before (string) limit (string) |
| get_api_v5_market_sprd_history_candles | Retrieve history candlestick charts from recent years. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP | sprdId (string) required after (string) before (string) bar (string) limit (string) |
| get_api_v5_market_sprd_ticker | Retrieve the latest price snapshot, best bid/ask price and quantity. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP | sprdId (string) required |
| get_api_v5_market_ticker | Retrieve the latest price snapshot, best bid/ask price, and trading volume in the last 24 hours. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP | instId (string) required |
| get_api_v5_market_tickers | Retrieve the latest price snapshot, best bid/ask price, and trading volume in the last 24 hours. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP | instType (string) required uly (string) instFamily (string) |
| get_api_v5_market_trades | Retrieve the recent transactions of an instrument. Rate Limit: 100 requests per 2 seconds Rate limit rule: IP | instId (string) required limit (string) |
| get_api_v5_public_block_trades | Retrieve the recent block trading transactions of an instrument. Descending order by tradeId. The data will be updated 15 minutes after the block trade execution. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP | instId (string) required |
| get_api_v5_public_convert_contract_coin | Convert the crypto value to the number of contracts, or vice versa Rate Limit: 10 requests per 2 seconds Rate limit rule: IP | type (string) instId (string) required sz (string) required px (string) unit (string) opType (string) |
| get_api_v5_public_delivery_exercise_history | Retrieve delivery records of Futures and exercise records of Options in the last 3 months. Rate Limit: 40 requests per 2 seconds Rate limit rule: IP + Instrument Type + Uly | instType (string) required uly (string) instFamily (string) after (string) before (string) limit (string) |
| get_api_v5_public_discount_rate_interest_free_quota | Retrieve discount rate level and interest-free quota. Rate Limit: 2 requests per 2 seconds Rate limit rule: IP | ccy (string) discountLv (string) |
| get_api_v5_public_economic_calendar | Authentication is required for this endpoint. This endpoint is only supported in production environment. Get the macro-economic calendar data within 3 months. Historical data from 3 months ago is only available to users with trading fee tier VIP1 and above. Rate Limit: 1 request per 5 seconds Rate limit rule: IP | region (string) importance (string) before (string) after (string) limit (string) |
| get_api_v5_public_estimated_price | Retrieve the estimated delivery price which will only have a return value one hour before the delivery/exercise. Rate Limit: 10 requests per 2 seconds Rate limit rule: IP + Instrument ID | instId (string) required |
| get_api_v5_public_estimated_settlement_info | Retrieve the estimated settlement price which will only have a return value one hour before the settlement. Rate Limit: 10 requests per 2 seconds Rate limit rule: IP + Instrument ID | instId (string) required |
| get_api_v5_public_funding_rate | Retrieve funding rate. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP + Instrument ID | instId (string) required |
| get_api_v5_public_funding_rate_history | Retrieve funding rate history. This endpoint can retrieve data from the last 3 months. Rate Limit: 10 requests per 2 seconds Rate limit rule: IP + Instrument ID | instId (string) required before (string) after (string) limit (string) |
| get_api_v5_public_instrument_tick_bands | Get option tick bands information Rate Limit: 5 requests per 2 seconds Rate limit rule: IP | instType (string) required instFamily (string) |
| get_api_v5_public_instruments | Retrieve a list of instruments with open contracts for OKX. Retrieve available instruments info of current account, please refer to . Rate Limit: 20 requests per 2 seconds Rate limit rule: IP + Instrument Type | instType (string) required uly (string) instFamily (string) instId (string) |
| get_api_v5_public_insurance_fund | Get insurance fund balance information Rate Limit: 10 requests per 2 seconds Rate limit rule: IP | instType (string) required type (string) uly (string) instFamily (string) ccy (string) before (string) after (string) limit (string) |
| get_api_v5_public_interest_rate_loan_quota | Retrieve interest rate Rate Limit: 2 requests per 2 seconds Rate limit rule: IP | No parameters |
| get_api_v5_public_mark_price | Retrieve mark price. We set the mark price based on the SPOT index and at a reasonable basis to prevent individual users from manipulating the market and causing the contract price to fluctuate. Rate Limit: 10 requests per 2 seconds Rate limit rule: IP + Instrument ID | instType (string) required uly (string) instFamily (string) instId (string) |
| get_api_v5_public_open_interest | Retrieve the total open interest for contracts on OKX. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP + Instrument ID | instType (string) required uly (string) instFamily (string) instId (string) |
| get_api_v5_public_opt_summary | Retrieve option market data. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP +uly | uly (string) instFamily (string) expTime (string) |
| get_api_v5_public_option_trades | The maximum is 100. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP | instId (string) instFamily (string) optType (string) |
| get_api_v5_public_position_tiers | Retrieve position tiers information, maximum leverage depends on your borrowings and margin ratio. Rate Limit: 10 requests per 2 seconds Rate limit rule: IP | instType (string) required tdMode (string) required uly (string) instFamily (string) instId (string) ccy (string) tier (string) |
| get_api_v5_public_premium_history | It will return premium data in the past 6 months. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP | instId (string) required after (string) before (string) limit (string) |
| get_api_v5_public_price_limit | Retrieve the highest buy limit and lowest sell limit of the instrument. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP | instId (string) required |
| get_api_v5_public_settlement_history | Retrieve settlement records of futures in the last 3 months. Rate Limit: 40 requests per 2 seconds Rate limit rule: IP + Instrument Family | instFamily (string) required after (string) before (string) limit (string) |
| get_api_v5_public_time | Retrieve API server time. Rate Limit: 10 requests per 2 seconds Rate limit rule: IP | No parameters |
| get_api_v5_public_underlying | Rate Limit: 20 requests per 2 seconds Rate limit rule: IP | instType (string) required |
| post_api_v5_rfq_cancel_all_after | Cancel all quotes after the countdown timeout. Rate Limit: 1 request per second Rate limit rule: User ID Permission: Trade | data: { . timeOut (string) } (object) required |
| post_api_v5_rfq_cancel_all_quotes | Cancels all active Quotes. Rate Limit: 2 requests per 2 seconds Rate limit rule: User ID Permission: Trade | No parameters |
| post_api_v5_rfq_cancel_all_rfqs | Cancels all active RFQs. Rate Limit: 2 requests per 2 seconds Rate limit rule: User ID Permission: Trade | No parameters |
| post_api_v5_rfq_cancel_batch_quotes | Cancel one or multiple active Quotes in a single batch. Maximum 100 quote orders can be canceled per request. Rate Limit: 2 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . clQuoteIds (array) . quoteIds (array) } (object) required |
| post_api_v5_rfq_cancel_batch_rfqs | Cancel one or multiple active RFQs in a single batch. Maximum 100 RFQ orders can be canceled per request. Rate Limit: 2 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . clRfqIds (array) . rfqIds (array) } (object) required |
| post_api_v5_rfq_cancel_quote | Cancels an existing active Quote you have created in response to an RFQ. Rate Limit: 50 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . clQuoteId (string) . quoteId (string) . rfqId (string) } (object) required |
| post_api_v5_rfq_cancel_rfq | Cancel an existing active RFQ that you have created previously. Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . clRfqId (string) . rfqId (string) } (object) required |
| get_api_v5_rfq_counterparties | Retrieves the list of counterparties that the user is permitted to trade with. Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | No parameters |
| post_api_v5_rfq_create_quote | Allows the user to Quote an RFQ that they are a counterparty to. The user MUST quote the entire RFQ and not part of the legs or part of the quantity. Partial quoting is not allowed. Rate Limit: 50 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . anonymous (boolean) . clQuoteId (string) . expiresIn (string) . legs (array) . quoteSide (string) . rfqId (string) . tag (string) } (object) required |
| post_api_v5_rfq_create_rfq | Creates a new RFQ _Please select trading bot 'WAGMI' as the counterparty when submitting RFQs in demo trading.Prices provided on RFQs by the trading bot are for reference only. _ To learn more, please visit Rate Limit: 5 requests per 2 seconds; 150 requests per 12 hours Rate limit rule: User ID Permission: Trade | data: { . allowPartialExecution (boolean) . anonymous (boolean) . clRfqId (string) . counterparties (array) . legs (array) . tag (string) } (object) required |
| post_api_v5_rfq_execute_quote | Executes a Quote. It is only used by the creator of the RFQ Rate Limit: 2 requests per 3 seconds Rate limit rule: User ID Permission: Trade | data: { . legs (array) . quoteId (string) . rfqId (string) } (object) required |
| get_api_v5_rfq_maker_instrument_settings | Retrieve the products which makers want to quote and receive RFQs for, and the corresponding price and size limit. Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | No parameters |
| post_api_v5_rfq_maker_instrument_settings | Customize the products which makers want to quote and receive RFQs for, and the corresponding price and size limit. Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . data (array) . includeAll (boolean) . instType (string) } (object) required |
| get_api_v5_rfq_mmp_config | This endpoint is used to get MMP configure information and only applicable to block trading market makers Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | No parameters |
| post_api_v5_rfq_mmp_config | This endpoint is used to set MMP configure and only applicable to block trading makers Rate Limit: 1 request per 10 seconds Rate limit rule: User ID Permission: Trade | data: { . countLimit (string) . frozenInterval (string) . timeInterval (string) } (object) required |
| post_api_v5_rfq_mmp_reset | Reset the MMP status to be inactive. Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Trade | No parameters |
| get_api_v5_rfq_public_trades | Retrieves the executed block trades. The data will be updated 15 minutes after the block trade execution. Rate Limit: 5 requests per 2 seconds Rate limit rule: IP | beginId (string) endId (string) limit (string) |
| get_api_v5_rfq_quotes | Retrieve all Quotes that the user is a counterparty to either as the creator or the receiver. Rate Limit: 2 requests per 2 seconds Rate limit rule: User ID Permission: Read | rfqId (string) clRfqId (string) quoteId (string) clQuoteId (string) state (string) beginId (string) endId (string) limit (string) |
| get_api_v5_rfq_rfqs | Retrieves details of RFQs that the user is a counterparty to either as the creator or the receiver of the RFQ. Rate Limit: 2 requests per 2 seconds Rate limit rule: User ID Permission: Read | rfqId (string) clRfqId (string) state (string) beginId (string) endId (string) limit (string) |
| get_api_v5_rfq_trades | Retrieves the executed trades that the user is a counterparty to either as the creator or the receiver. Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Read | rfqId (string) clRfqId (string) quoteId (string) blockTdId (string) clQuoteId (string) beginId (string) endId (string) beginTs (string) endTs (string) limit (string) isSuccessful (boolean) |
| get_api_v5_rubik_stat_contracts_long_short_account_ratio | Retrieve the ratio of users with net long vs net short positions for Expiry Futures and Perpetual Futures. Rate Limit: 5 requests per 2 seconds Rate limit rule: IP | ccy (string) required begin (string) end (string) period (string) |
| get_api_v5_rubik_stat_contracts_long_short_account_ratio_contract | Retrieve the account long/short ratio of a contract. This endpoint can retrieve the latest 1,440 data entries. For period=1D, the data time range is up to January 1, 2024; for other periods, the data time range is up to early February 2024. Rate limit: 5 requests per 2 seconds Rate limit rule: IP + Instrument ID | instId (string) required period (string) end (string) begin (string) limit (string) |
| get_api_v5_rubik_stat_contracts_long_short_account_ratio_contract_top_trader | Retrieve the account net long/short ratio of a contract for top traders. Top traders refer to the top 5% of traders with the largest open position value. This endpoint can retrieve the latest 1,440 data entries. The data time range is up to March 22, 2024. Rate limit: 5 requests per 2 seconds Rate limit rule: IP + Instrument ID | instId (string) required period (string) end (string) begin (string) limit (string) |
| get_api_v5_rubik_stat_contracts_long_short_position_ratio_contract_top_trader | Retrieve the position long/short ratio of a contract for top traders. Top traders refer to the top 5% of traders with the largest open position value. This endpoint can retrieve the latest 1,440 data entries. The data time range is up to March 22, 2024. Rate limit: 5 requests per 2 seconds Rate limit rule: IP + Instrument ID | instId (string) required period (string) end (string) begin (string) limit (string) |
| get_api_v5_rubik_stat_contracts_open_interest_history | Retrieve the contract open interest statistics of futures and perp. This endpoint can retrieve the latest 1,440 data entries. For period=1D, the data time range is up to January 1, 2024; for other periods, the data time range is up to early February 2024. Rate limit: 10 requests per 2 seconds Rate limit rule: IP + Instrument ID | instId (string) required period (string) end (string) begin (string) limit (string) |
| get_api_v5_rubik_stat_contracts_open_interest_volume | Retrieve the open interest and trading volume for Expiry Futures and Perpetual Futures. Rate Limit: 5 requests per 2 seconds Rate limit rule: IP | ccy (string) required begin (string) end (string) period (string) |
| get_api_v5_rubik_stat_margin_loan_ratio | Retrieve the ratio of cumulative amount of quote currency to base currency. Rate Limit: 5 requests per 2 seconds Rate limit rule: IP | ccy (string) required begin (string) end (string) period (string) |
| get_api_v5_rubik_stat_option_open_interest_volume | Retrieve the open interest and trading volume for options. Rate Limit: 5 requests per 2 seconds Rate limit rule: IP | ccy (string) required period (string) |
| get_api_v5_rubik_stat_option_open_interest_volume_expiry | Retrieve the open interest and trading volume of calls and puts for each upcoming expiration. Rate Limit: 5 requests per 2 seconds Rate limit rule: IP | ccy (string) required period (string) |
| get_api_v5_rubik_stat_option_open_interest_volume_ratio | Retrieve the open interest ratio and trading volume ratio of calls vs puts. Rate Limit: 5 requests per 2 seconds Rate limit rule: IP | ccy (string) required period (string) |
| get_api_v5_rubik_stat_option_open_interest_volume_strike | Retrieve the taker volume for both buyers and sellers of calls and puts. Rate Limit: 5 requests per 2 seconds Rate limit rule: IP | ccy (string) required expTime (string) required period (string) |
| get_api_v5_rubik_stat_option_taker_block_volume | This shows the relative buy/sell volume for calls and puts. It shows whether traders are bullish or bearish on price and volatility. Rate Limit: 5 requests per 2 seconds Rate limit rule: IP | ccy (string) required period (string) |
| get_api_v5_rubik_stat_taker_volume | Retrieve the taker volume for both buyers and sellers. Rate Limit: 5 requests per 2 seconds Rate limit rule: IP | ccy (string) required instType (string) required begin (string) end (string) period (string) |
| get_api_v5_rubik_stat_taker_volume_contract | Retrieve the contract taker volume for both buyers and sellers. This endpoint can retrieve the latest 1,440 data entries. For period=1D, the data time range is up to January 1, 2024; for other periods, the data time range is up to early February 2024. Rate limit: 5 requests per 2 seconds Rate limit rule: IP + Instrument ID | instId (string) required period (string) unit (string) end (string) begin (string) limit (string) |
| get_api_v5_rubik_stat_trading_data_support_coin | Retrieve the currencies supported by the trading statistics endpoints. Rate Limit: 5 requests per 2 seconds Rate limit rule: IP | No parameters |
| post_api_v5_sprd_amend_order | Amend an incomplete order. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . clOrdId (string) . newPx (string) . newSz (string) . ordId (string) . reqId (string) } (object) required |
| get_api_v5_sprd_books | Retrieve the order book of the spread. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP Permission: Read | sprdId (string) required sz (string) |
| post_api_v5_sprd_cancel_all_after | Cancel all pending orders after the countdown timeout. Only applicable to spread trading. Rate Limit: 1 request per second Rate limit rule: User ID Permission: Trade | data: { . timeOut (string) } (object) required |
| post_api_v5_sprd_cancel_order | Cancel an incomplete order. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . clOrdId (string) . ordId (string) } (object) required |
| post_api_v5_sprd_mass_cancel | Cancel all pending orders. Rate Limit: 10 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . sprdId (string) } (object) required |
| get_api_v5_sprd_order | Retrieve order details. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | ordId (string) clOrdId (string) |
| post_api_v5_sprd_order | Place a new order Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . clOrdId (string) . ordType (string) . px (string) . side (string) . sprdId (string) . sz (string) . tag (string) } (object) required |
| get_api_v5_sprd_orders_history | Retrieve the completed order data for the last 21 days, and the incomplete orders filledSz =0 and state = canceled that have been canceled are only reserved for 2 hours. Results are returned in counter chronological order of orders creation. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | sprdId (string) ordType (string) state (string) beginId (string) endId (string) begin (string) end (string) limit (string) |
| get_api_v5_sprd_orders_history_archive | Retrieve the completed order data for the last 3 months, including those placed 3 months ago but completed in the last 3 months. Results are returned in counter chronological order. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | sprdId (string) ordType (string) state (string) instType (string) instFamily (string) beginId (string) endId (string) begin (string) end (string) limit (string) |
| get_api_v5_sprd_orders_pending | Retrieve all incomplete orders under the current account. Rate Limit: 10 requests per 2 seconds Rate limit rule: User ID Permission: Read | sprdId (string) ordType (string) state (string) beginId (string) endId (string) limit (string) |
| get_api_v5_sprd_public_trades | Retrieve the recent transactions of an instrument at most 500 records per request. Results are returned in counter chronological order. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP Permission: Read | sprdId (string) |
| get_api_v5_sprd_spreads | Retrieve all available spreads based on the request parameters. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP Permission: Read | baseCcy (string) instId (string) sprdId (string) state (string) |
| get_api_v5_sprd_trades | Retrieve historical transaction details . Results are returned in counter chronological order. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | sprdId (string) tradeId (string) ordId (string) beginId (string) endId (string) begin (string) end (string) limit (string) |
| get_api_v5_trade_account_rate_limit | Get account rate limit related information. Only new order requests and amendment order requests will be counted towards this limit. For batch order requests consisting of multiple orders, each order will be counted individually. For details, please refer to Rate Limit: 1 request per second Rate limit rule: User ID | No parameters |
| post_api_v5_trade_amend_algos | Amend unfilled algo orders Support Stop order and Trigger order only, not including Move_order_stop order, Iceberg order, TWAP order, Trailing Stop order. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID + Instrument ID Permission: Trade | data: { . algoClOrdId (string) . algoId (string) . cxlOnFail (boolean) . instId (string) . newSz (string) . reqId (string) } (object) required |
| post_api_v5_trade_amend_batch_orders | Amend incomplete orders in batches. Maximum 20 orders can be amended per request. Request parameters should be passed in the form of an array. Rate Limit: 300 orders per 2 seconds Rate Limit of lead instruments for Copy Trading: 4 orders per 2 seconds Rate limit rule except Options: User ID + Instrument ID Rate limit rule Options only: User ID + Instrument Family Permission: Trade Rate limit of this endpoint will also be affected by the rules and . _Unlike o | data: { . attachAlgoOrds (array) . clOrdId (string) . cxlOnFail (boolean) . instId (string) . newPx (string) . newPxUsd (string) . newPxVol (string) . newSz (string) . ordId (string) . reqId (string) } (object) required |
| post_api_v5_trade_amend_order | Amend an incomplete order. Rate Limit: 60 requests per 2 seconds Rate Limit of lead instruments for Copy Trading: 4 requests per 2 seconds Rate limit rule except Options: User ID + Instrument ID Rate limit rule Options only: User ID + Instrument Family Permission: Trade Rate limit of this endpoint will also be affected by the rules and . | data: { . attachAlgoOrds (array) . clOrdId (string) . cxlOnFail (boolean) . instId (string) . newPx (string) . newPxUsd (string) . newPxVol (string) . newSz (string) . ordId (string) . reqId (string) } (object) required |
| post_api_v5_trade_batch_orders | Place orders in batches. Maximum 20 orders can be placed per request. Request parameters should be passed in the form of an array. Orders will be placed in turn Rate Limit: 300 orders per 2 seconds Rate Limit of lead instruments for Copy Trading: 4 orders per 2 seconds Rate limit rule except Options: User ID + Instrument ID Rate limit rule Options only: User ID + Instrument Family Permission: Trade Rate limit of this endpoint will also be affected by the | data: { . attachAlgoOrds (array) . banAmend (boolean) . ccy (string) . clOrdId (string) . instId (string) . ordType (string) . posSide (string) . px (string) . pxUsd (string) . pxVol (string) . quickMgnType (string) . reduceOnly (boolean) . side (string) . stpId (string) . stpMode (string) . sz (string) . tag (string) . tdMode (string) . tgtCcy (string) } (object) required |
| post_api_v5_trade_cancel_advance_algos | This endpoint will be offline soon, please use Cancel unfilled algo orders including Iceberg order, TWAP order, Trailing Stop order. A maximum of 10 orders can be canceled per request. Request parameters should be passed in the form of an array. Rate Limit: 20 requests per 2 seconds Rate limit rule except Options: User ID + Instrument ID Rate limit rule Options only: User ID + Instrument Family Permission: Trade | data: { . algoId (string) . instId (string) } (object) required |
| post_api_v5_trade_cancel_algos | Cancel unfilled algo orders. A maximum of 10 orders can be canceled per request. Request parameters should be passed in the form of an array. Rate Limit: 20 requests per 2 seconds Rate limit rule except Options: User ID + Instrument ID Rate limit rule Options only: User ID + Instrument Family Permission: Trade | data: { . algoId (string) . instId (string) } (object) required |
| post_api_v5_trade_cancel_all_after | Cancel all pending orders after the countdown timeout. Applicable to all trading symbols through order book except Spread trading Rate Limit: 1 request per second Rate limit rule: User ID + tag Permission: Trade | data: { . tag (string) . timeOut (string) } (object) required |
| post_api_v5_trade_cancel_batch_orders | Cancel incomplete orders in batches. Maximum 20 orders can be canceled per request. Request parameters should be passed in the form of an array. Rate Limit: 300 orders per 2 seconds Rate limit rule except Options: User ID + Instrument ID Rate limit rule Options only: User ID + Instrument Family Permission: Trade _Unlike other endpoints, the rate limit of this endpoint is determined by the number of orders. If there is only one order in the request, it will consume th | data: { . clOrdId (string) . instId (string) . ordId (string) } (object) required |
| post_api_v5_trade_cancel_order | Cancel an incomplete order. Rate Limit: 60 requests per 2 seconds Rate limit rule except Options: User ID + Instrument ID Rate limit rule Options only: User ID + Instrument Family Permission: Trade | data: { . clOrdId (string) . instId (string) . ordId (string) } (object) required |
| post_api_v5_trade_close_position | Close the position of an instrument via a market order. Rate Limit: 20 requests per 2 seconds Rate limit rule except Options: User ID + Instrument ID Rate limit rule Options only: User ID + Instrument Family Permission: Trade | data: { . autoCxl (boolean) . ccy (string) . clOrdId (string) . instId (string) . mgnMode (string) . posSide (string) . tag (string) } (object) required |
| post_api_v5_trade_easy_convert | Convert small currencies to mainstream currencies. Rate Limit: 1 request per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . fromCcy (array) . source (string) . toCcy (string) } (object) required |
| get_api_v5_trade_easy_convert_currency_list | Get list of small convertibles and mainstream currencies. Only applicable to the crypto balance less than $10. Rate Limit: 1 request per 2 seconds Rate limit rule: User ID Permission: Read | source (string) |
| get_api_v5_trade_easy_convert_history | Get the history and status of easy convert trades in the past 7 days. Rate Limit: 1 request per 2 seconds Rate limit rule: User ID Permission: Read | after (string) before (string) limit (string) |
| get_api_v5_trade_fills | Retrieve recently-filled transaction details in the last 3 day. Rate Limit: 60 requests per 2 seconds Rate limit rule: User ID Permission: Read | instType (string) uly (string) instFamily (string) instId (string) ordId (string) subType (string) after (string) before (string) begin (string) end (string) limit (string) |
| get_api_v5_trade_fills_history | Retrieve recently-filled transaction details in the last 3 months. This endpoint can retrieve data from the last 1 year since July 1, 2024. Rate Limit: 10 requests per 2 seconds Rate limit rule: User ID Permission: Read | instType (string) required uly (string) instFamily (string) instId (string) ordId (string) subType (string) after (string) before (string) begin (string) end (string) limit (string) |
| post_api_v5_trade_mass_cancel | Cancel all the MMP pending orders of an instrument family. Only applicable to Option in Portfolio Margin mode, and MMP privilege is required. Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . instFamily (string) . instType (string) . lockInterval (string) } (object) required |
| post_api_v5_trade_one_click_repay | Trade one-click repay to repay cross debts. Isolated debts are not applicable. The maximum repayment amount is based on the remaining available balance of funding and trading accounts. Only applicable to Multi-currency margin/Portfolio margin. Rate Limit: 1 request per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . debtCcy (array) . repayCcy (string) } (object) required |
| get_api_v5_trade_one_click_repay_currency_list | Get list of debt currency data and repay currencies. Debt currencies include both cross and isolated debts. Only applicable to Multi-currency margin/Portfolio margin. Rate Limit: 1 request per 2 seconds Rate limit rule: User ID Permission: Read | debtType (string) |
| get_api_v5_trade_one_click_repay_currency_list_v2 | Get list of debt currency data and repay currencies. Only applicable to SPOT mode. Rate Limit: 1 request per 2 seconds Rate limit rule: User ID Permission: Read | No parameters |
| get_api_v5_trade_one_click_repay_history | Get the history and status of one-click repay trades in the past 7 days. Only applicable to Multi-currency margin/Portfolio margin. Rate Limit: 1 request per 2 seconds Rate limit rule: User ID Permission: Read | after (string) before (string) limit (string) |
| get_api_v5_trade_one_click_repay_history_v2 | Get the history and status of one-click repay trades in the past 7 days. Only applicable to SPOT mode. Rate Limit: 1 request per 2 seconds Rate limit rule: User ID Permission: Read | after (string) before (string) limit (string) |
| post_api_v5_trade_one_click_repay_v2 | Trade one-click repay to repay debts. Only applicable to SPOT mode. Rate Limit: 1 request per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . debtCcy (string) . repayCcyList (array) } (object) required |
| get_api_v5_trade_order | Retrieve order details. Rate Limit: 60 requests per 2 seconds Rate limit rule except Options: User ID + Instrument ID Rate limit rule Options only: User ID + Instrument Family Permission: Read | instId (string) required ordId (string) clOrdId (string) |
| post_api_v5_trade_order | You can place an order only if you have sufficient funds. Rate Limit: 60 requests per 2 seconds Rate Limit of lead instruments for Copy Trading: 4 requests per 2 seconds Rate limit rule except Options: User ID + Instrument ID Rate limit rule Options only: User ID + Instrument Family Permission: Trade Rate limit of this endpoint will also be affected by the rules and . | data: { . attachAlgoOrds (array) . banAmend (boolean) . ccy (string) . clOrdId (string) . instId (string) . ordType (string) . posSide (string) . px (string) . pxUsd (string) . pxVol (string) . quickMgnType (string) . reduceOnly (boolean) . side (string) . stpId (string) . stpMode (string) . sz (string) . tag (string) . tdMode (string) . tgtCcy (string) } (object) required |
| get_api_v5_trade_order_algo | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | algoId (string) algoClOrdId (string) |
| post_api_v5_trade_order_algo | The algo order includes trigger order, oco order, chase order, conditional order, twap order and trailing order. Rate Limit: 20 requests per 2 seconds Rate Limit of lead instruments for Copy Trading: 1 request per 2 seconds Rate limit rule except Options: User ID + Instrument ID Rate limit rule Options only: User ID + Instrument Family Permission: Trade | data: { . algoClOrdId (string) . ccy (string) . closeFraction (string) . instId (string) . ordType (string) . posSide (string) . side (string) . sz (string) . tag (string) . tdMode (string) . tgtCcy (string) } (object) required |
| post_api_v5_trade_order_precheck | This endpoint is used to precheck the account information before and after placing the order. Only applicable to Multi-currency margin mode, and Portfolio margin mode. Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . attachAlgoOrds (array) . instId (string) . ordType (string) . posSide (string) . px (string) . reduceOnly (boolean) . side (string) . sz (string) . tdMode (string) . tgtCcy (string) } (object) required |
| get_api_v5_trade_orders_algo_history | Retrieve a list of all algo orders under the current account in the last 3 months. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | ordType (string) required state (string) algoId (string) instType (string) instId (string) after (string) before (string) limit (string) |
| get_api_v5_trade_orders_algo_pending | Retrieve a list of untriggered Algo orders under the current account. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | ordType (string) required algoId (string) algoClOrdId (string) instType (string) instId (string) after (string) before (string) limit (string) |
| get_api_v5_trade_orders_history | Get completed orders which are placed in the last 7 days, including those placed 7 days ago but completed in the last 7 days. The incomplete orders that have been canceled are only reserved for 2 hours. Rate Limit: 40 requests per 2 seconds Rate limit rule: User ID Permission: Read | instType (string) required uly (string) instFamily (string) instId (string) ordType (string) state (string) category (string) after (string) before (string) begin (string) end (string) limit (string) |
| get_api_v5_trade_orders_history_archive | Get completed orders which are placed in the last 3 months, including those placed 3 months ago but completed in the last 3 months. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | instType (string) required uly (string) instFamily (string) instId (string) ordType (string) state (string) category (string) after (string) before (string) begin (string) end (string) limit (string) |
| get_api_v5_trade_orders_pending | Retrieve all incomplete orders under the current account. Rate Limit: 60 requests per 2 seconds Rate limit rule: User ID Permission: Read | instType (string) uly (string) instFamily (string) instId (string) ordType (string) state (string) after (string) before (string) limit (string) |
| post_api_v5_trading_bot_grid_adjust_investment | It is used to add investment and only applicable to contract gird. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . algoId (string) . amt (string) } (object) required |
| get_api_v5_trading_bot_grid_ai_param | Authentication is not required for this public endpoint. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP Permission: Read | algoOrdType (string) required instId (string) required direction (string) duration (string) |
| post_api_v5_trading_bot_grid_amend_order_algo | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . algoId (string) . instId (string) . slRatio (string) . slTriggerPx (string) . tpRatio (string) . tpTriggerPx (string) . triggerParams (array) } (object) required |
| post_api_v5_trading_bot_grid_cancel_close_order | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . algoId (string) . ordId (string) } (object) required |
| post_api_v5_trading_bot_grid_close_position | Close position when the contract grid stop type is 'keep position'. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . algoId (string) . mktClose (boolean) . px (string) . sz (string) } (object) required |
| post_api_v5_trading_bot_grid_compute_margin_balance | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . algoId (string) . amt (string) . type (string) } (object) required |
| get_api_v5_trading_bot_grid_grid_quantity | Authentication is not required for this public endpoint. Maximum grid quantity can be retrieved from this endpoint. Minimum grid quantity always is 2. Rate Limit: 5 requests per 2 seconds Rate limit rule: IP Permission: Read | instId (string) required runType (string) required algoOrdType (string) required maxPx (string) required minPx (string) required lever (string) |
| post_api_v5_trading_bot_grid_margin_balance | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . algoId (string) . amt (string) . percent (string) . type (string) } (object) required |
| post_api_v5_trading_bot_grid_min_investment | Authentication is not required for this public endpoint. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP Permission: Read | data: { . algoOrdType (string) . basePos (boolean) . direction (string) . gridNum (string) . instId (string) . investmentData (array) . investmentType (string) . lever (string) . maxPx (string) . minPx (string) . runType (string) . triggerStrategy (string) } (object) required |
| post_api_v5_trading_bot_grid_order_algo | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID + Instrument ID Permission: Trade | data: { . algoClOrdId (string) . algoOrdType (string) . gridNum (string) . instId (string) . maxPx (string) . minPx (string) . profitSharingRatio (string) . runType (string) . slTriggerPx (string) . tag (string) . tpTriggerPx (string) . triggerParams (array) } (object) required |
| post_api_v5_trading_bot_grid_order_instant_trigger | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID + Instrument ID Permission: Trade | data: { . algoId (string) } (object) required |
| get_api_v5_trading_bot_grid_orders_algo_details | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | algoOrdType (string) required algoId (string) required |
| get_api_v5_trading_bot_grid_orders_algo_history | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | algoOrdType (string) required algoId (string) instId (string) instType (string) after (string) before (string) limit (string) |
| get_api_v5_trading_bot_grid_orders_algo_pending | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | algoOrdType (string) required algoId (string) instId (string) instType (string) after (string) before (string) limit (string) |
| get_api_v5_trading_bot_grid_positions | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | algoOrdType (string) required algoId (string) required |
| post_api_v5_trading_bot_grid_stop_order_algo | A maximum of 10 orders can be stopped per request. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . algoId (string) . algoOrdType (string) . instId (string) . stopType (string) } (object) required |
| get_api_v5_trading_bot_grid_sub_orders | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | algoOrdType (string) required algoId (string) required type (string) required groupId (string) after (string) before (string) limit (string) |
| post_api_v5_trading_bot_grid_withdraw_income | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . algoId (string) } (object) required |
| get_api_v5_trading_bot_public_rsi_back_testing | Authentication is not required for this public endpoint. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP Permission: Read | instId (string) required timeframe (string) required thold (string) required timePeriod (string) required triggerCond (string) duration (string) |
| post_api_v5_trading_bot_recurring_amend_order_algo | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . algoId (string) . stgyName (string) } (object) required |
| post_api_v5_trading_bot_recurring_order_algo | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . algoClOrdId (string) . amt (string) . investmentCcy (string) . period (string) . recurringDay (string) . recurringHour (string) . recurringList (array) . recurringTime (string) . stgyName (string) . tag (string) . tdMode (string) . timeZone (string) } (object) required |
| get_api_v5_trading_bot_recurring_orders_algo_details | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | algoId (string) required |
| get_api_v5_trading_bot_recurring_orders_algo_history | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | algoId (string) after (string) before (string) limit (string) |
| get_api_v5_trading_bot_recurring_orders_algo_pending | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | algoId (string) after (string) before (string) limit (string) |
| post_api_v5_trading_bot_recurring_stop_order_algo | A maximum of 10 orders can be stopped per request. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . algoId (string) } (object) required |
| get_api_v5_trading_bot_recurring_sub_orders | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | algoId (string) required ordId (string) after (string) before (string) limit (string) |
| post_api_v5_trading_bot_signal_amend_tpsl | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . algoId (string) . exitSettingParam (string) } (object) required |
| post_api_v5_trading_bot_signal_cancel_sub_order | Cancel an incomplete order. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . algoId (string) . instId (string) . signalOrdId (string) } (object) required |
| post_api_v5_trading_bot_signal_close_position | Close the position of an instrument via a market order. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . algoId (string) . instId (string) } (object) required |
| post_api_v5_trading_bot_signal_create_signal | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . signalChanDesc (string) . signalChanName (string) } (object) required |
| get_api_v5_trading_bot_signal_event_history | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | algoId (string) required after (string) before (string) limit (string) |
| post_api_v5_trading_bot_signal_margin_balance | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . algoId (string) . allowReinvest (boolean) . amt (string) . type (string) } (object) required |
| post_api_v5_trading_bot_signal_order_algo | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . entrySettingParam (string) . exitSettingParam (string) . includeAll (boolean) . instIds (string) . investAmt (string) . lever (string) . ratio (string) . signalChanId (string) . subOrdType (string) } (object) required |
| get_api_v5_trading_bot_signal_orders_algo_details | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | algoOrdType (string) required algoId (string) required |
| get_api_v5_trading_bot_signal_orders_algo_history | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | algoOrdType (string) required algoId (string) required after (string) required before (string) limit (string) |
| get_api_v5_trading_bot_signal_orders_algo_pending | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | algoOrdType (string) required algoId (string) after (string) required before (string) limit (string) |
| get_api_v5_trading_bot_signal_positions | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | algoOrdType (string) required algoId (string) required |
| get_api_v5_trading_bot_signal_positions_history | Retrieve the updated position data for the last 3 months. Return in reverse chronological order using utime. Rate Limit: 1 request per 10 seconds Rate limit rule: User ID Permission: Read | algoId (string) required instId (string) after (string) before (string) limit (string) |
| post_api_v5_trading_bot_signal_set_instruments | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . algoId (string) . includeAll (boolean) . instIds (array) } (object) required |
| get_api_v5_trading_bot_signal_signals | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | signalSourceType (string) required signalChanId (string) after (string) before (string) limit (string) |
| post_api_v5_trading_bot_signal_stop_order_algo | A maximum of 10 orders can be stopped per request. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . algoId (string) } (object) required |
| post_api_v5_trading_bot_signal_sub_order | You can place an order only if you have sufficient funds. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Trade | data: { . algoId (string) . instId (string) . ordType (string) . px (string) . reduceOnly (boolean) . side (string) . sz (string) } (object) required |
| get_api_v5_trading_bot_signal_sub_orders | Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Read | algoId (string) required algoOrdType (string) required state (string) signalOrdId (string) after (string) before (string) begin (string) end (string) limit (string) type (string) clOrdId (string) |
| get_api_v5_users_entrust_subaccount_list | The trading team uses this interface to view the list of sub-accounts currently under escrow Rate limit:1 request per second Rate limit rule: User ID Permission: Read | subAcct (string) |
| get_api_v5_users_partner_if_rebate | This endpoint will be offline soon, please use It is used to get the user's affiliate rebate information for affiliate. Rate limit:20 requests per 2 seconds Rate limit rule: User ID Permission: Read | apiKey (string) required |
| get_api_v5_users_subaccount_list | Applies to master accounts only Rate limit:2 requests per 2 seconds Rate limit rule: User ID Permission: Read | enable (string) subAcct (string) after (string) before (string) limit (string) |
| post_api_v5_users_subaccount_modify_apikey | Applies to master accounts only and master accounts API Key must be linked to IP addresses. Only API keys with Trade privilege can call this endpoint. Rate limit:1 request per second Rate limit rule: User ID Permission: Trade | data: { . apiKey (string) . ip (string) . label (string) . perm (string) . subAcct (string) } (object) required |
| post_api_v5_users_subaccount_set_transfer_out | Set permission of transfer out for sub-account only applicable to master account API key. Sub-account can transfer out to master account by default. Rate Limit: 1 request per second Rate limit rule: User ID Permission: Trade | data: { . canTransOut (boolean) . subAcct (string) } (object) required |
| custom | Call any endpoint of the connected service while reusing the connection auth. Pass the full URL as _url. Other reserved keys: _method, _query, _body, _headers. Remaining params flow naturally — empty → GET, non-empty → POST JSON body. | _url (string) required _method (string) _query (object) _body _headers (object) |