Skip to main content

OKX

OKX v5 REST API for trading, accounts, funding, earn, copy trading and market data.

OKX Logo

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:

ActionPurposeParameters
post_api_v5_account_account_level_switch_presetPre-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: Tradedata: {
. acctLv (string)
. lever (string)
. riskOffsetType (string)
} (object) required
get_api_v5_account_account_position_riskGet 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: ReadinstType (string)
post_api_v5_account_activate_optionRate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: TradeNo parameters
get_api_v5_account_adjust_leverage_infoRate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: ReadinstType (string) required
mgnMode (string) required
lever (string) required
instId (string)
ccy (string)
posSide (string)
get_api_v5_account_balanceRetrieve 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: Readccy (string)
get_api_v5_account_billsRetrieve 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: ReadinstType (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_archiveRetrieve 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: ReadinstType (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_archiveApply 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: Readyear (string) required
quarter (string) required
post_api_v5_account_bills_history_archiveApply for bill data since 1 February, 2021 except for the current quarter. Rate Limit:12 requests per day Rate limit rule: User ID Permission: Readdata: {
. quarter (string)
. year (string)
} (object) required
get_api_v5_account_collateral_assetsRate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Readccy (string)
collateralEnabled (boolean)
get_api_v5_account_configRetrieve current account configuration. Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: ReadNo parameters
get_api_v5_account_greeksRetrieve a greeks list of all assets in the account. Rate Limit: 10 requests per 2 seconds Rate limit rule: User ID Permission: Readccy (string)
get_api_v5_account_instrumentsRetrieve available instruments info of current account. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID + Instrument Type Permission: ReadinstType (string) required
uly (string)
instFamily (string)
instId (string)
get_api_v5_account_interest_accruedGet 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: Readtype (string)
ccy (string)
instId (string)
mgnMode (string)
after (string)
before (string)
limit (string)
get_api_v5_account_interest_limitsRate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Readtype (string)
ccy (string)
get_api_v5_account_interest_rateGet the user's current leveraged currency borrowing market interest rate Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Readccy (string)
get_api_v5_account_leverage_infoRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: ReadinstId (string)
ccy (string)
mgnMode (string) required
get_api_v5_account_max_avail_sizeAvailable 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: ReadinstId (string) required
ccy (string)
tdMode (string) required
reduceOnly (boolean)
px (string)
get_api_v5_account_max_loanRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: ReadmgnMode (string) required
instId (string)
ccy (string)
mgnCcy (string)
get_api_v5_account_max_sizeThe 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: ReadinstId (string) required
tdMode (string) required
ccy (string)
px (string)
leverage (string)
get_api_v5_account_max_withdrawalRetrieve 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: Readccy (string)
get_api_v5_account_mmp_configThis 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: ReadinstFamily (string)
post_api_v5_account_mmp_configThis 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 rejectdata: {
. frozenInterval (string)
. instFamily (string)
. qtyLimit (string)
. timeInterval (string)
} (object) required
post_api_v5_account_mmp_resetYou 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: Tradedata: {
. instFamily (string)
. instType (string)
} (object) required
post_api_v5_account_position_builderCalculates 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: Readdata: {
. acctLv (string)
. greeksType (string)
. inclRealPosAndEq (boolean)
. lever (string)
. simAsset (array)
. simPos (array)
} (object) required
get_api_v5_account_position_tiersRetrieve cross position limitation of SWAP/FUTURES/OPTION under Portfolio margin mode. Rate Limit: 10 requests per 2 seconds Rate limit rule: User ID Permission: ReadinstType (string) required
uly (string)
instFamily (string)
post_api_v5_account_position_margin_balanceIncrease 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: Tradedata: {
. amt (string)
. ccy (string)
. instId (string)
. posSide (string)
. type (string)
} (object) required
get_api_v5_account_positionsRetrieve 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: ReadinstType (string)
instId (string)
posId (string)
get_api_v5_account_positions_historyRetrieve 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: ReadinstType (string)
instId (string)
mgnMode (string)
type (string)
posId (string)
after (string)
before (string)
limit (string)
post_api_v5_account_quick_margin_borrow_repayPlease note that this endpoint will be deprecated soon. Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. amt (string)
. ccy (string)
. instId (string)
. side (string)
} (object) required
get_api_v5_account_quick_margin_borrow_repay_historyGet record in the past 3 months. Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: ReadinstId (string)
ccy (string)
side (string)
after (string)
before (string)
begin (string)
end (string)
limit (string)
get_api_v5_account_risk_stateOnly applicable to Portfolio margin account Rate Limit: 10 requests per 2 seconds Rate limit rule: User ID Permission: ReadNo parameters
post_api_v5_account_set_account_levelYou 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: Tradedata: {
. acctLv (string)
} (object) required
get_api_v5_account_set_account_switch_precheckRetrieve precheck information for account mode switching. Rate limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: ReadacctLv (string) required
post_api_v5_account_set_auto_loanOnly applicable to Multi-currency margin and Portfolio margin Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. autoLoan (boolean)
} (object) required
post_api_v5_account_set_auto_repayOnly applicable to Spot mode enabled borrowing Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. autoRepay (boolean)
} (object) required
post_api_v5_account_set_collateral_assetsRate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. ccyList (array)
. collateralEnabled (boolean)
. type (string)
} (object) required
post_api_v5_account_set_greeksSet the display type of Greeks. Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. greeksType (string)
} (object) required
post_api_v5_account_set_isolated_modeYou 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: Tradedata: {
. isoMode (string)
. type (string)
} (object) required
post_api_v5_account_set_leverageThere 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 cudata: {
. ccy (string)
. instId (string)
. lever (string)
. mgnMode (string)
. posSide (string)
} (object) required
post_api_v5_account_set_position_modeSpot 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: Tradedata: {
. posMode (string)
} (object) required
post_api_v5_account_set_risk_offset_amtSet 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: Tradedata: {
. ccy (string)
. clSpotInUseAmt (string)
} (object) required
get_api_v5_account_spot_borrow_repay_historyRetrieve the borrow/repay history under Spot mode Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Readccy (string)
type (string)
after (string)
before (string)
limit (string)
post_api_v5_account_spot_manual_borrow_repayOnly applicable to Spot mode enabled borrowing Rate Limit: 1 request per second Rate limit rule: User ID Permission: Tradedata: {
. amt (string)
. ccy (string)
. side (string)
} (object) required
get_api_v5_account_subaccount_balancesQuery 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: ReadsubAcct (string) required
get_api_v5_account_subaccount_max_withdrawalRetrieve 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: ReadsubAcct (string) required
ccy (string)
get_api_v5_account_trade_feeRate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: ReadinstType (string) required
instId (string)
uly (string)
instFamily (string)
ruleType (string) required
get_api_v5_affiliate_invitee_detailRate limit:20 requests per 2 seconds Rate limit rule: User IDuid (string) required
get_api_v5_asset_asset_valuationView account asset valuation Rate Limit: 1 request per second Rate limit rule: User ID Permission: Readccy (string)
get_api_v5_asset_balancesRetrieve 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: Readccy (string)
get_api_v5_asset_billsQuery the billing record in the past month. Rate Limit: 6 Requests per second Rate limit rule: User ID Permission: Readccy (string)
type (string)
clientId (string)
after (string)
before (string)
limit (string)
post_api_v5_asset_cancel_withdrawalYou 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: Tradedata: {
. wdId (string)
} (object) required
get_api_v5_asset_convert_currenciesRate Limit: 6 requests per second Rate limit rule: User ID Permission: ReadNo parameters
get_api_v5_asset_convert_currency_pairRate Limit: 6 requests per second Rate limit rule: User ID Permission: ReadfromCcy (string) required
toCcy (string) required
post_api_v5_asset_convert_estimate_quoteRate Limit: 10 requests per second Rate limit rule: User ID Rate Limit: 1 request per 5 seconds Rate limit rule: Instrument Permission: Readdata: {
. baseCcy (string)
. clQReqId (string)
. quoteCcy (string)
. rfqSz (string)
. rfqSzCcy (string)
. side (string)
. tag (string)
} (object) required
get_api_v5_asset_convert_historyRate Limit: 6 requests per second Rate limit rule: User IDclTReqId (string)
after (string)
before (string)
limit (string)
tag (string)
post_api_v5_asset_convert_tradeYou 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_currenciesRetrieve 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: Readccy (string)
get_api_v5_asset_deposit_addressRetrieve the deposit addresses of currencies, including previously-used addresses. Rate Limit: 6 requests per second Rate limit rule: User ID Permission: Readccy (string) required
get_api_v5_asset_deposit_historyRetrieve 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: Readccy (string)
depId (string)
fromWdId (string)
txId (string)
type (string)
state (string)
after (string)
before (string)
limit (string)
get_api_v5_asset_deposit_withdraw_statusRetrieve deposit's and withdrawal's detailed status and estimated complete time. Rate Limit: 1 request per 2 seconds Rate limit rule: User ID Permission: ReadwdId (string)
txId (string)
ccy (string)
to (string)
chain (string)
get_api_v5_asset_exchange_listAuthentication is not required for this public endpoint. Rate Limit: 6 requests per second Rate limit rule: IPNo parameters
get_api_v5_asset_monthly_statementRetrieve monthly statement in the past year. Rate Limit: 10 requests per 2 seconds Rate limit rule: User ID Permission: Readmonth (string) required
post_api_v5_asset_monthly_statementApply for monthly statement in the past year. Rate Limit: 20 requests per month Rate limit rule: User ID Permission: Readdata: {
. month (string)
} (object) required
get_api_v5_asset_non_tradable_assetsRate Limit: 6 requests per second Rate limit rule: User ID Permission: Readccy (string)
get_api_v5_asset_subaccount_balancesQuery 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: ReadsubAcct (string) required
ccy (string)
get_api_v5_asset_subaccount_billsApplies to master accounts only. Rate limit:6 requests per second Rate limit rule: User ID Permission: Readccy (string)
type (string)
subAcct (string)
after (string)
before (string)
limit (string)
get_api_v5_asset_subaccount_managed_subaccount_billsOnly 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: Readccy (string)
type (string)
subAcct (string)
subUid (string)
after (string)
before (string)
limit (string)
post_api_v5_asset_subaccount_transferApplies 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: Tradedata: {
. amt (string)
. ccy (string)
. from (string)
. fromSubAccount (string)
. loanTrans (boolean)
. omitPosRisk (string)
. to (string)
. toSubAccount (string)
} (object) required
post_api_v5_asset_transferOnly 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 fudata: {
. 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_stateRetrieve the transfer state data of the last 2 weeks. Rate Limit: 10 requests per second Rate limit rule: User ID Permission: ReadtransId (string)
clientId (string)
type (string)
post_api_v5_asset_withdrawalOnly 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 witdata: {
. amt (string)
. areaCode (string)
. ccy (string)
. chain (string)
. clientId (string)
. dest (string)
. rcvrInfo (object)
. toAddr (string)
} (object) required
get_api_v5_asset_withdrawal_historyRetrieve 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: Readccy (string)
wdId (string)
clientId (string)
txId (string)
type (string)
state (string)
after (string)
before (string)
limit (string)
post_api_v5_copytrading_algo_orderSet TP/SL for the current lead position that are not closed. Rate limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. 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_settingsYou need to use this endpoint to amend copy settings Rate limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. 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_ratioIt is used to amend profit sharing ratio. Rate limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. instType (string)
. profitSharingRatio (string)
} (object) required
post_api_v5_copytrading_close_subpositionYou 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: Tradedata: {
. instType (string)
. ordType (string)
. px (string)
. subPosId (string)
. tag (string)
} (object) required
get_api_v5_copytrading_configRetrieve current account configuration related to copy/lead trading. Rate limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: ReadNo parameters
get_api_v5_copytrading_copy_settingsRetrieve the copy settings about certain lead trader. Rate limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: ReadinstType (string)
uniqueCode (string) required
get_api_v5_copytrading_current_lead_tradersRetrieve my lead traders. Rate limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: ReadinstType (string)
get_api_v5_copytrading_current_subpositionsRetrieve 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: ReadinstType (string)
instId (string)
after (string)
before (string)
limit (string)
post_api_v5_copytrading_first_copy_settingsThe 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: Tradedata: {
. 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_instrumentsRetrieve 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: ReadinstType (string)
get_api_v5_copytrading_profit_sharing_detailsThe leading trader gets profits shared details for the last 3 months. Rate limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: ReadinstType (string)
after (string)
before (string)
limit (string)
get_api_v5_copytrading_public_configPublic endpoint. Retrieve copy trading parameter configuration information of copy settings Rate limit: 5 requests per 2 seconds Rate limit rule: IP Permission: ReadinstType (string)
get_api_v5_copytrading_public_copy_tradersPublic 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: ReadinstType (string)
uniqueCode (string) required
limit (string)
get_api_v5_copytrading_public_current_subpositionsPublic endpoint. Get current leading positions of lead trader Rate limit: 5 requests per 2 seconds Rate limit rule: IP Permission: ReadinstType (string)
uniqueCode (string) required
after (string)
before (string)
limit (string)
get_api_v5_copytrading_public_lead_tradersPublic endpoint. Retrieve lead trader ranks. Rate limit: 5 requests per 2 seconds Rate limit rule: IP Permission: ReadinstType (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_pnlPublic 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: ReadinstType (string)
uniqueCode (string) required
lastDays (string) required
get_api_v5_copytrading_public_preference_currencyPublic 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: ReadinstType (string)
uniqueCode (string) required
get_api_v5_copytrading_public_statsPublic endpoint. Key data related to lead trader performance. Rate limit: 5 requests per 2 seconds Rate limit rule: IP Permission: ReadinstType (string)
uniqueCode (string) required
lastDays (string) required
get_api_v5_copytrading_public_subpositions_historyPublic 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: ReadinstType (string)
uniqueCode (string) required
after (string)
before (string)
limit (string)
get_api_v5_copytrading_public_weekly_pnlPublic 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: ReadinstType (string)
uniqueCode (string) required
post_api_v5_copytrading_set_instrumentsThe 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: Tradedata: {
. instId (string)
. instType (string)
} (object) required
post_api_v5_copytrading_stop_copy_tradingYou need to use this endpoint to stop copy trading Rate limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. instType (string)
. subPosCloseType (string)
. uniqueCode (string)
} (object) required
get_api_v5_copytrading_subpositions_historyRetrieve 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: ReadinstType (string)
instId (string)
after (string)
before (string)
limit (string)
get_api_v5_copytrading_total_profit_sharingThe 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: ReadinstType (string)
get_api_v5_copytrading_total_unrealized_profit_sharingThe leading trader gets the total unrealized amount of profit shared. Rate limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: ReadinstType (string)
get_api_v5_copytrading_unrealized_profit_sharing_detailsThe 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: ReadinstType (string)
post_api_v5_fiat_cancel_withdrawalCancel a pending fiat withdrawal order, currently only applicable to TRY Rate Limit: 3 requests per second Rate limit rule: User ID Permission: Tradedata: {
. ordId (string)
} (object) required
post_api_v5_fiat_create_withdrawalInitiate 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: Withdrawdata: {
. amt (string)
. ccy (string)
. clientId (string)
. paymentAcctId (string)
. paymentMethod (string)
} (object) required
get_api_v5_fiat_depositGet fiat deposit order detail Rate Limit: 3 requests per second Rate limit rule: User ID Permission: ReadordId (string) required
get_api_v5_fiat_deposit_order_historyGet fiat deposit order history Rate Limit: 3 requests per second Rate limit rule: User ID Permission: Readccy (string)
paymentMethod (string)
state (string)
after (string)
before (string)
limit (string)
get_api_v5_fiat_deposit_payment_methodsTo display all the available fiat deposit payment methods Rate Limit: 3 requests per second Rate limit rule: User ID Permission: Readccy (string) required
get_api_v5_fiat_withdrawalGet fiat withdraw order detail Rate Limit: 3 requests per second Rate limit rule: User ID Permission: ReadordId (string) required
get_api_v5_fiat_withdrawal_order_historyGet fiat withdrawal order history Rate Limit: 3 requests per second Rate limit rule: User ID Permission: Readccy (string)
paymentMethod (string)
state (string)
after (string)
before (string)
limit (string)
get_api_v5_fiat_withdrawal_payment_methodsTo display all the available fiat withdrawal payment methods Rate Limit: 3 requests per second Rate limit rule: User ID Permission: Readccy (string) required
post_api_v5_finance_flexible_loan_adjust_collateralRate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. collateralAmt (string)
. collateralCcy (string)
. type (string)
} (object) required
get_api_v5_finance_flexible_loan_borrow_currenciesGet borrowable currencies Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: ReadNo parameters
get_api_v5_finance_flexible_loan_collateral_assetsGet collateral assets in funding account. Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Readccy (string)
get_api_v5_finance_flexible_loan_interest_accruedRate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Readccy (string)
after (string)
before (string)
limit (string)
get_api_v5_finance_flexible_loan_loan_historyRate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Readtype (string)
after (string)
before (string)
limit (string)
get_api_v5_finance_flexible_loan_loan_infoRate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: ReadNo parameters
get_api_v5_finance_flexible_loan_max_collateral_redeem_amountRate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Readccy (string) required
post_api_v5_finance_flexible_loan_max_loanRate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Readdata: {
. borrowCcy (string)
. supCollateral (array)
} (object) required
get_api_v5_finance_savings_balanceRate Limit: 6 requests per second Rate limit rule: User ID Permission: Readccy (string)
get_api_v5_finance_savings_lending_historyReturn data in the past month. Rate Limit: 6 requests per second Rate limit rule: User ID Permission: Readccy (string)
after (string)
before (string)
limit (string)
get_api_v5_finance_savings_lending_rate_historyAuthentication is not required for this public endpoint. Only returned records after December 14, 2021. Rate Limit: 6 requests per second Rate limit rule: IPccy (string)
after (string)
before (string)
limit (string)
get_api_v5_finance_savings_lending_rate_summaryAuthentication is not required for this public endpoint. Rate Limit: 6 requests per second Rate limit rule: IPccy (string)
post_api_v5_finance_savings_purchase_redemptOnly the assets in the funding account can be used for saving. Rate Limit: 6 requests per second Rate limit rule: User ID Permission: Tradedata: {
. amt (string)
. ccy (string)
. rate (string)
. side (string)
} (object) required
post_api_v5_finance_savings_set_lending_rateRate Limit: 6 requests per second Rate limit rule: User ID Permission: Tradedata: {
. ccy (string)
. rate (string)
} (object) required
post_api_v5_finance_staking_defi_cancelAfter cancelling, returning funds will go to the funding account. Rate Limit: 2 requests per second Rate limit rule: User ID Permission: Tradedata: {
. ordId (string)
. protocolType (string)
} (object) required
get_api_v5_finance_staking_defi_eth_apy_historyPublic endpoints don't need authorization. Rate Limit: 6 requests per second Rate limit rule: IPdays (string) required
get_api_v5_finance_staking_defi_eth_balanceThe 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: ReadNo parameters
get_api_v5_finance_staking_defi_eth_product_infoRate Limit: 3 requests per second Rate limit rule: User ID Permission: ReadNo parameters
post_api_v5_finance_staking_defi_eth_purchaseStaking 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: Tradedata: {
. amt (string)
} (object) required
get_api_v5_finance_staking_defi_eth_purchase_redeem_historyRate Limit: 6 requests per second Rate limit rule: User ID Permission: Readtype (string)
status (string)
after (string)
before (string)
limit (string)
post_api_v5_finance_staking_defi_eth_redeemOnly 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: Tradedata: {
. amt (string)
} (object) required
get_api_v5_finance_staking_defi_offersRate Limit: 3 requests per second Rate limit rule: User ID Permission: ReadproductId (string)
protocolType (string)
ccy (string)
get_api_v5_finance_staking_defi_orders_activeRate Limit: 3 requests per second Rate limit rule: User ID Permission: ReadproductId (string)
protocolType (string)
ccy (string)
state (string)
get_api_v5_finance_staking_defi_orders_historyRate Limit: 3 requests per second Rate limit rule: User ID Permission: ReadproductId (string)
protocolType (string)
ccy (string)
after (string)
before (string)
limit (string)
post_api_v5_finance_staking_defi_purchaseRate Limit: 2 requests per second Rate limit rule: User ID Permission: Tradedata: {
. investData (array)
. productId (string)
. tag (string)
. term (string)
} (object) required
post_api_v5_finance_staking_defi_redeemRate Limit: 2 requests per second Rate limit rule: User ID Permission: Tradedata: {
. allowEarlyRedeem (boolean)
. ordId (string)
. protocolType (string)
} (object) required
get_api_v5_finance_staking_defi_sol_apy_historyPublic endpoints don't need authorization. Rate Limit: 6 requests per second Rate limit rule: IPdays (string) required
get_api_v5_finance_staking_defi_sol_balanceThe balance is summarized all OKSOL assets including assets in redeeming in account. Rate Limit: 6 requests per second Rate limit rule: User ID Permission: ReadNo parameters
post_api_v5_finance_staking_defi_sol_purchaseStaking 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: Tradedata: {
. amt (string)
} (object) required
get_api_v5_finance_staking_defi_sol_purchase_redeem_historyRate Limit: 6 requests per second Rate limit rule: User ID Permission: Readtype (string)
status (string)
after (string)
before (string)
limit (string)
post_api_v5_finance_staking_defi_sol_redeemOnly 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: Tradedata: {
. amt (string)
} (object) required
get_api_v5_market_block_tickerRetrieve the latest block trading volume in the last 24 hours. Rate Limit: 20 requests per 2 seconds Rate limit rule: IPinstId (string) required
get_api_v5_market_block_tickersRetrieve the latest block trading volume in the last 24 hours. Rate Limit: 20 requests per 2 seconds Rate limit rule: IPinstType (string) required
uly (string)
instFamily (string)
get_api_v5_market_booksRetrieve order book of the instrument. Rate Limit: 40 requests per 2 seconds Rate limit rule: IPinstId (string) required
sz (string)
get_api_v5_market_books_fullRetrieve order book of the instrument. The data will be updated once a second. Rate Limit: 10 requests per 2 seconds Rate limit rule: IPinstId (string) required
sz (string)
get_api_v5_market_call_auction_detailsRetrieve call auction details. Rate Limit: 20 requests per 2 seconds Rate limit rule: IPinstId (string) required
get_api_v5_market_candlesRetrieve 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: IPinstId (string) required
bar (string)
after (string)
before (string)
limit (string)
get_api_v5_market_exchange_rateThis interface provides the average exchange rate data for 2 weeks Rate Limit: 1 request per 2 seconds Rate limit rule: IPNo parameters
get_api_v5_market_history_candlesRetrieve history candlestick charts from recent yearsIt is last 3 months supported for 1s candlestick. Rate Limit: 20 requests per 2 seconds Rate limit rule: IPinstId (string) required
after (string)
before (string)
bar (string)
limit (string)
get_api_v5_market_history_index_candlesRetrieve the candlestick charts of the index from recent years. Rate Limit: 10 requests per 2 seconds Rate limit rule: IPinstId (string) required
after (string)
before (string)
bar (string)
limit (string)
get_api_v5_market_history_mark_price_candlesRetrieve the candlestick charts of mark price from recent years. Rate Limit: 10 requests per 2 seconds Rate limit rule: IPinstId (string) required
after (string)
before (string)
bar (string)
limit (string)
get_api_v5_market_history_tradesRetrieve the recent transactions of an instrument from the last 3 months with pagination. Rate Limit: 20 requests per 2 seconds Rate limit rule: IPinstId (string) required
type (string)
after (string)
before (string)
limit (string)
get_api_v5_market_index_candlesRetrieve 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: IPinstId (string) required
after (string)
before (string)
bar (string)
limit (string)
get_api_v5_market_index_componentsGet the index component information data on the market Rate Limit: 20 requests per 2 seconds Rate limit rule: IPindex (string) required
get_api_v5_market_index_tickersRetrieve index tickers. Rate Limit: 20 requests per 2 seconds Rate limit rule: IPquoteCcy (string)
instId (string)
get_api_v5_market_mark_price_candlesRetrieve 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: IPinstId (string) required
after (string)
before (string)
bar (string)
limit (string)
get_api_v5_market_option_instrument_family_tradesRetrieve the recent transactions of an instrument under same instFamily. The maximum is 100. Rate Limit: 20 requests per 2 seconds Rate limit rule: IPinstFamily (string) required
get_api_v5_market_platform_24_volumeThe 24-hour trading volume is calculated on a rolling basis. Rate Limit: 2 requests per 2 seconds Rate limit rule: IPNo parameters
get_api_v5_market_sprd_candlesRetrieve 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: IPsprdId (string) required
bar (string)
after (string)
before (string)
limit (string)
get_api_v5_market_sprd_history_candlesRetrieve history candlestick charts from recent years. Rate Limit: 20 requests per 2 seconds Rate limit rule: IPsprdId (string) required
after (string)
before (string)
bar (string)
limit (string)
get_api_v5_market_sprd_tickerRetrieve the latest price snapshot, best bid/ask price and quantity. Rate Limit: 20 requests per 2 seconds Rate limit rule: IPsprdId (string) required
get_api_v5_market_tickerRetrieve 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: IPinstId (string) required
get_api_v5_market_tickersRetrieve 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: IPinstType (string) required
uly (string)
instFamily (string)
get_api_v5_market_tradesRetrieve the recent transactions of an instrument. Rate Limit: 100 requests per 2 seconds Rate limit rule: IPinstId (string) required
limit (string)
get_api_v5_public_block_tradesRetrieve 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: IPinstId (string) required
get_api_v5_public_convert_contract_coinConvert the crypto value to the number of contracts, or vice versa Rate Limit: 10 requests per 2 seconds Rate limit rule: IPtype (string)
instId (string) required
sz (string) required
px (string)
unit (string)
opType (string)
get_api_v5_public_delivery_exercise_historyRetrieve 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 + UlyinstType (string) required
uly (string)
instFamily (string)
after (string)
before (string)
limit (string)
get_api_v5_public_discount_rate_interest_free_quotaRetrieve discount rate level and interest-free quota. Rate Limit: 2 requests per 2 seconds Rate limit rule: IPccy (string)
discountLv (string)
get_api_v5_public_economic_calendarAuthentication 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: IPregion (string)
importance (string)
before (string)
after (string)
limit (string)
get_api_v5_public_estimated_priceRetrieve 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 IDinstId (string) required
get_api_v5_public_estimated_settlement_infoRetrieve 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 IDinstId (string) required
get_api_v5_public_funding_rateRetrieve funding rate. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP + Instrument IDinstId (string) required
get_api_v5_public_funding_rate_historyRetrieve 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 IDinstId (string) required
before (string)
after (string)
limit (string)
get_api_v5_public_instrument_tick_bandsGet option tick bands information Rate Limit: 5 requests per 2 seconds Rate limit rule: IPinstType (string) required
instFamily (string)
get_api_v5_public_instrumentsRetrieve 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 TypeinstType (string) required
uly (string)
instFamily (string)
instId (string)
get_api_v5_public_insurance_fundGet insurance fund balance information Rate Limit: 10 requests per 2 seconds Rate limit rule: IPinstType (string) required
type (string)
uly (string)
instFamily (string)
ccy (string)
before (string)
after (string)
limit (string)
get_api_v5_public_interest_rate_loan_quotaRetrieve interest rate Rate Limit: 2 requests per 2 seconds Rate limit rule: IPNo parameters
get_api_v5_public_mark_priceRetrieve 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 IDinstType (string) required
uly (string)
instFamily (string)
instId (string)
get_api_v5_public_open_interestRetrieve the total open interest for contracts on OKX. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP + Instrument IDinstType (string) required
uly (string)
instFamily (string)
instId (string)
get_api_v5_public_opt_summaryRetrieve option market data. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP +ulyuly (string)
instFamily (string)
expTime (string)
get_api_v5_public_option_tradesThe maximum is 100. Rate Limit: 20 requests per 2 seconds Rate limit rule: IPinstId (string)
instFamily (string)
optType (string)
get_api_v5_public_position_tiersRetrieve position tiers information, maximum leverage depends on your borrowings and margin ratio. Rate Limit: 10 requests per 2 seconds Rate limit rule: IPinstType (string) required
tdMode (string) required
uly (string)
instFamily (string)
instId (string)
ccy (string)
tier (string)
get_api_v5_public_premium_historyIt will return premium data in the past 6 months. Rate Limit: 20 requests per 2 seconds Rate limit rule: IPinstId (string) required
after (string)
before (string)
limit (string)
get_api_v5_public_price_limitRetrieve the highest buy limit and lowest sell limit of the instrument. Rate Limit: 20 requests per 2 seconds Rate limit rule: IPinstId (string) required
get_api_v5_public_settlement_historyRetrieve settlement records of futures in the last 3 months. Rate Limit: 40 requests per 2 seconds Rate limit rule: IP + Instrument FamilyinstFamily (string) required
after (string)
before (string)
limit (string)
get_api_v5_public_timeRetrieve API server time. Rate Limit: 10 requests per 2 seconds Rate limit rule: IPNo parameters
get_api_v5_public_underlyingRate Limit: 20 requests per 2 seconds Rate limit rule: IPinstType (string) required
post_api_v5_rfq_cancel_all_afterCancel all quotes after the countdown timeout. Rate Limit: 1 request per second Rate limit rule: User ID Permission: Tradedata: {
. timeOut (string)
} (object) required
post_api_v5_rfq_cancel_all_quotesCancels all active Quotes. Rate Limit: 2 requests per 2 seconds Rate limit rule: User ID Permission: TradeNo parameters
post_api_v5_rfq_cancel_all_rfqsCancels all active RFQs. Rate Limit: 2 requests per 2 seconds Rate limit rule: User ID Permission: TradeNo parameters
post_api_v5_rfq_cancel_batch_quotesCancel 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: Tradedata: {
. clQuoteIds (array)
. quoteIds (array)
} (object) required
post_api_v5_rfq_cancel_batch_rfqsCancel 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: Tradedata: {
. clRfqIds (array)
. rfqIds (array)
} (object) required
post_api_v5_rfq_cancel_quoteCancels 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: Tradedata: {
. clQuoteId (string)
. quoteId (string)
. rfqId (string)
} (object) required
post_api_v5_rfq_cancel_rfqCancel an existing active RFQ that you have created previously. Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. clRfqId (string)
. rfqId (string)
} (object) required
get_api_v5_rfq_counterpartiesRetrieves 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: ReadNo parameters
post_api_v5_rfq_create_quoteAllows 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: Tradedata: {
. anonymous (boolean)
. clQuoteId (string)
. expiresIn (string)
. legs (array)
. quoteSide (string)
. rfqId (string)
. tag (string)
} (object) required
post_api_v5_rfq_create_rfqCreates 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: Tradedata: {
. allowPartialExecution (boolean)
. anonymous (boolean)
. clRfqId (string)
. counterparties (array)
. legs (array)
. tag (string)
} (object) required
post_api_v5_rfq_execute_quoteExecutes 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: Tradedata: {
. legs (array)
. quoteId (string)
. rfqId (string)
} (object) required
get_api_v5_rfq_maker_instrument_settingsRetrieve 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: ReadNo parameters
post_api_v5_rfq_maker_instrument_settingsCustomize 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: Tradedata: {
. data (array)
. includeAll (boolean)
. instType (string)
} (object) required
get_api_v5_rfq_mmp_configThis 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: ReadNo parameters
post_api_v5_rfq_mmp_configThis 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: Tradedata: {
. countLimit (string)
. frozenInterval (string)
. timeInterval (string)
} (object) required
post_api_v5_rfq_mmp_resetReset the MMP status to be inactive. Rate Limit: 5 requests per 2 seconds Rate limit rule: User ID Permission: TradeNo parameters
get_api_v5_rfq_public_tradesRetrieves 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: IPbeginId (string)
endId (string)
limit (string)
get_api_v5_rfq_quotesRetrieve 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: ReadrfqId (string)
clRfqId (string)
quoteId (string)
clQuoteId (string)
state (string)
beginId (string)
endId (string)
limit (string)
get_api_v5_rfq_rfqsRetrieves 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: ReadrfqId (string)
clRfqId (string)
state (string)
beginId (string)
endId (string)
limit (string)
get_api_v5_rfq_tradesRetrieves 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: ReadrfqId (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_ratioRetrieve 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: IPccy (string) required
begin (string)
end (string)
period (string)
get_api_v5_rubik_stat_contracts_long_short_account_ratio_contractRetrieve 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 IDinstId (string) required
period (string)
end (string)
begin (string)
limit (string)
get_api_v5_rubik_stat_contracts_long_short_account_ratio_contract_top_traderRetrieve 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 IDinstId (string) required
period (string)
end (string)
begin (string)
limit (string)
get_api_v5_rubik_stat_contracts_long_short_position_ratio_contract_top_traderRetrieve 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 IDinstId (string) required
period (string)
end (string)
begin (string)
limit (string)
get_api_v5_rubik_stat_contracts_open_interest_historyRetrieve 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 IDinstId (string) required
period (string)
end (string)
begin (string)
limit (string)
get_api_v5_rubik_stat_contracts_open_interest_volumeRetrieve the open interest and trading volume for Expiry Futures and Perpetual Futures. Rate Limit: 5 requests per 2 seconds Rate limit rule: IPccy (string) required
begin (string)
end (string)
period (string)
get_api_v5_rubik_stat_margin_loan_ratioRetrieve the ratio of cumulative amount of quote currency to base currency. Rate Limit: 5 requests per 2 seconds Rate limit rule: IPccy (string) required
begin (string)
end (string)
period (string)
get_api_v5_rubik_stat_option_open_interest_volumeRetrieve the open interest and trading volume for options. Rate Limit: 5 requests per 2 seconds Rate limit rule: IPccy (string) required
period (string)
get_api_v5_rubik_stat_option_open_interest_volume_expiryRetrieve the open interest and trading volume of calls and puts for each upcoming expiration. Rate Limit: 5 requests per 2 seconds Rate limit rule: IPccy (string) required
period (string)
get_api_v5_rubik_stat_option_open_interest_volume_ratioRetrieve the open interest ratio and trading volume ratio of calls vs puts. Rate Limit: 5 requests per 2 seconds Rate limit rule: IPccy (string) required
period (string)
get_api_v5_rubik_stat_option_open_interest_volume_strikeRetrieve the taker volume for both buyers and sellers of calls and puts. Rate Limit: 5 requests per 2 seconds Rate limit rule: IPccy (string) required
expTime (string) required
period (string)
get_api_v5_rubik_stat_option_taker_block_volumeThis 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: IPccy (string) required
period (string)
get_api_v5_rubik_stat_taker_volumeRetrieve the taker volume for both buyers and sellers. Rate Limit: 5 requests per 2 seconds Rate limit rule: IPccy (string) required
instType (string) required
begin (string)
end (string)
period (string)
get_api_v5_rubik_stat_taker_volume_contractRetrieve 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 IDinstId (string) required
period (string)
unit (string)
end (string)
begin (string)
limit (string)
get_api_v5_rubik_stat_trading_data_support_coinRetrieve the currencies supported by the trading statistics endpoints. Rate Limit: 5 requests per 2 seconds Rate limit rule: IPNo parameters
post_api_v5_sprd_amend_orderAmend an incomplete order. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. clOrdId (string)
. newPx (string)
. newSz (string)
. ordId (string)
. reqId (string)
} (object) required
get_api_v5_sprd_booksRetrieve the order book of the spread. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP Permission: ReadsprdId (string) required
sz (string)
post_api_v5_sprd_cancel_all_afterCancel all pending orders after the countdown timeout. Only applicable to spread trading. Rate Limit: 1 request per second Rate limit rule: User ID Permission: Tradedata: {
. timeOut (string)
} (object) required
post_api_v5_sprd_cancel_orderCancel an incomplete order. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. clOrdId (string)
. ordId (string)
} (object) required
post_api_v5_sprd_mass_cancelCancel all pending orders. Rate Limit: 10 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. sprdId (string)
} (object) required
get_api_v5_sprd_orderRetrieve order details. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: ReadordId (string)
clOrdId (string)
post_api_v5_sprd_orderPlace a new order Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. clOrdId (string)
. ordType (string)
. px (string)
. side (string)
. sprdId (string)
. sz (string)
. tag (string)
} (object) required
get_api_v5_sprd_orders_historyRetrieve 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: ReadsprdId (string)
ordType (string)
state (string)
beginId (string)
endId (string)
begin (string)
end (string)
limit (string)
get_api_v5_sprd_orders_history_archiveRetrieve 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: ReadsprdId (string)
ordType (string)
state (string)
instType (string)
instFamily (string)
beginId (string)
endId (string)
begin (string)
end (string)
limit (string)
get_api_v5_sprd_orders_pendingRetrieve all incomplete orders under the current account. Rate Limit: 10 requests per 2 seconds Rate limit rule: User ID Permission: ReadsprdId (string)
ordType (string)
state (string)
beginId (string)
endId (string)
limit (string)
get_api_v5_sprd_public_tradesRetrieve 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: ReadsprdId (string)
get_api_v5_sprd_spreadsRetrieve all available spreads based on the request parameters. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP Permission: ReadbaseCcy (string)
instId (string)
sprdId (string)
state (string)
get_api_v5_sprd_tradesRetrieve historical transaction details . Results are returned in counter chronological order. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: ReadsprdId (string)
tradeId (string)
ordId (string)
beginId (string)
endId (string)
begin (string)
end (string)
limit (string)
get_api_v5_trade_account_rate_limitGet 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 IDNo parameters
post_api_v5_trade_amend_algosAmend 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: Tradedata: {
. algoClOrdId (string)
. algoId (string)
. cxlOnFail (boolean)
. instId (string)
. newSz (string)
. reqId (string)
} (object) required
post_api_v5_trade_amend_batch_ordersAmend 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 odata: {
. 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_orderAmend 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_ordersPlace 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 thedata: {
. 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_algosThis 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: Tradedata: {
. algoId (string)
. instId (string)
} (object) required
post_api_v5_trade_cancel_algosCancel 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: Tradedata: {
. algoId (string)
. instId (string)
} (object) required
post_api_v5_trade_cancel_all_afterCancel 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: Tradedata: {
. tag (string)
. timeOut (string)
} (object) required
post_api_v5_trade_cancel_batch_ordersCancel 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 thdata: {
. clOrdId (string)
. instId (string)
. ordId (string)
} (object) required
post_api_v5_trade_cancel_orderCancel 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: Tradedata: {
. clOrdId (string)
. instId (string)
. ordId (string)
} (object) required
post_api_v5_trade_close_positionClose 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: Tradedata: {
. autoCxl (boolean)
. ccy (string)
. clOrdId (string)
. instId (string)
. mgnMode (string)
. posSide (string)
. tag (string)
} (object) required
post_api_v5_trade_easy_convertConvert small currencies to mainstream currencies. Rate Limit: 1 request per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. fromCcy (array)
. source (string)
. toCcy (string)
} (object) required
get_api_v5_trade_easy_convert_currency_listGet 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: Readsource (string)
get_api_v5_trade_easy_convert_historyGet 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: Readafter (string)
before (string)
limit (string)
get_api_v5_trade_fillsRetrieve recently-filled transaction details in the last 3 day. Rate Limit: 60 requests per 2 seconds Rate limit rule: User ID Permission: ReadinstType (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_historyRetrieve 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: ReadinstType (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_cancelCancel 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: Tradedata: {
. instFamily (string)
. instType (string)
. lockInterval (string)
} (object) required
post_api_v5_trade_one_click_repayTrade 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: Tradedata: {
. debtCcy (array)
. repayCcy (string)
} (object) required
get_api_v5_trade_one_click_repay_currency_listGet 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: ReaddebtType (string)
get_api_v5_trade_one_click_repay_currency_list_v2Get 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: ReadNo parameters
get_api_v5_trade_one_click_repay_historyGet 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: Readafter (string)
before (string)
limit (string)
get_api_v5_trade_one_click_repay_history_v2Get 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: Readafter (string)
before (string)
limit (string)
post_api_v5_trade_one_click_repay_v2Trade one-click repay to repay debts. Only applicable to SPOT mode. Rate Limit: 1 request per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. debtCcy (string)
. repayCcyList (array)
} (object) required
get_api_v5_trade_orderRetrieve 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: ReadinstId (string) required
ordId (string)
clOrdId (string)
post_api_v5_trade_orderYou 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_algoRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: ReadalgoId (string)
algoClOrdId (string)
post_api_v5_trade_order_algoThe 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: Tradedata: {
. 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_precheckThis 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: Tradedata: {
. 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_historyRetrieve 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: ReadordType (string) required
state (string)
algoId (string)
instType (string)
instId (string)
after (string)
before (string)
limit (string)
get_api_v5_trade_orders_algo_pendingRetrieve a list of untriggered Algo orders under the current account. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: ReadordType (string) required
algoId (string)
algoClOrdId (string)
instType (string)
instId (string)
after (string)
before (string)
limit (string)
get_api_v5_trade_orders_historyGet 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: ReadinstType (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_archiveGet 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: ReadinstType (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_pendingRetrieve all incomplete orders under the current account. Rate Limit: 60 requests per 2 seconds Rate limit rule: User ID Permission: ReadinstType (string)
uly (string)
instFamily (string)
instId (string)
ordType (string)
state (string)
after (string)
before (string)
limit (string)
post_api_v5_trading_bot_grid_adjust_investmentIt is used to add investment and only applicable to contract gird. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. algoId (string)
. amt (string)
} (object) required
get_api_v5_trading_bot_grid_ai_paramAuthentication is not required for this public endpoint. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP Permission: ReadalgoOrdType (string) required
instId (string) required
direction (string)
duration (string)
post_api_v5_trading_bot_grid_amend_order_algoRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. algoId (string)
. instId (string)
. slRatio (string)
. slTriggerPx (string)
. tpRatio (string)
. tpTriggerPx (string)
. triggerParams (array)
} (object) required
post_api_v5_trading_bot_grid_cancel_close_orderRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. algoId (string)
. ordId (string)
} (object) required
post_api_v5_trading_bot_grid_close_positionClose position when the contract grid stop type is 'keep position'. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. algoId (string)
. mktClose (boolean)
. px (string)
. sz (string)
} (object) required
post_api_v5_trading_bot_grid_compute_margin_balanceRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. algoId (string)
. amt (string)
. type (string)
} (object) required
get_api_v5_trading_bot_grid_grid_quantityAuthentication 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: ReadinstId (string) required
runType (string) required
algoOrdType (string) required
maxPx (string) required
minPx (string) required
lever (string)
post_api_v5_trading_bot_grid_margin_balanceRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. algoId (string)
. amt (string)
. percent (string)
. type (string)
} (object) required
post_api_v5_trading_bot_grid_min_investmentAuthentication is not required for this public endpoint. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP Permission: Readdata: {
. 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_algoRate Limit: 20 requests per 2 seconds Rate limit rule: User ID + Instrument ID Permission: Tradedata: {
. 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_triggerRate Limit: 20 requests per 2 seconds Rate limit rule: User ID + Instrument ID Permission: Tradedata: {
. algoId (string)
} (object) required
get_api_v5_trading_bot_grid_orders_algo_detailsRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: ReadalgoOrdType (string) required
algoId (string) required
get_api_v5_trading_bot_grid_orders_algo_historyRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: ReadalgoOrdType (string) required
algoId (string)
instId (string)
instType (string)
after (string)
before (string)
limit (string)
get_api_v5_trading_bot_grid_orders_algo_pendingRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: ReadalgoOrdType (string) required
algoId (string)
instId (string)
instType (string)
after (string)
before (string)
limit (string)
get_api_v5_trading_bot_grid_positionsRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: ReadalgoOrdType (string) required
algoId (string) required
post_api_v5_trading_bot_grid_stop_order_algoA maximum of 10 orders can be stopped per request. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. algoId (string)
. algoOrdType (string)
. instId (string)
. stopType (string)
} (object) required
get_api_v5_trading_bot_grid_sub_ordersRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: ReadalgoOrdType (string) required
algoId (string) required
type (string) required
groupId (string)
after (string)
before (string)
limit (string)
post_api_v5_trading_bot_grid_withdraw_incomeRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. algoId (string)
} (object) required
get_api_v5_trading_bot_public_rsi_back_testingAuthentication is not required for this public endpoint. Rate Limit: 20 requests per 2 seconds Rate limit rule: IP Permission: ReadinstId (string) required
timeframe (string) required
thold (string) required
timePeriod (string) required
triggerCond (string)
duration (string)
post_api_v5_trading_bot_recurring_amend_order_algoRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. algoId (string)
. stgyName (string)
} (object) required
post_api_v5_trading_bot_recurring_order_algoRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. 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_detailsRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: ReadalgoId (string) required
get_api_v5_trading_bot_recurring_orders_algo_historyRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: ReadalgoId (string)
after (string)
before (string)
limit (string)
get_api_v5_trading_bot_recurring_orders_algo_pendingRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: ReadalgoId (string)
after (string)
before (string)
limit (string)
post_api_v5_trading_bot_recurring_stop_order_algoA maximum of 10 orders can be stopped per request. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. algoId (string)
} (object) required
get_api_v5_trading_bot_recurring_sub_ordersRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: ReadalgoId (string) required
ordId (string)
after (string)
before (string)
limit (string)
post_api_v5_trading_bot_signal_amend_tpslRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. algoId (string)
. exitSettingParam (string)
} (object) required
post_api_v5_trading_bot_signal_cancel_sub_orderCancel an incomplete order. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. algoId (string)
. instId (string)
. signalOrdId (string)
} (object) required
post_api_v5_trading_bot_signal_close_positionClose the position of an instrument via a market order. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. algoId (string)
. instId (string)
} (object) required
post_api_v5_trading_bot_signal_create_signalRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. signalChanDesc (string)
. signalChanName (string)
} (object) required
get_api_v5_trading_bot_signal_event_historyRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: ReadalgoId (string) required
after (string)
before (string)
limit (string)
post_api_v5_trading_bot_signal_margin_balanceRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. algoId (string)
. allowReinvest (boolean)
. amt (string)
. type (string)
} (object) required
post_api_v5_trading_bot_signal_order_algoRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. 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_detailsRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: ReadalgoOrdType (string) required
algoId (string) required
get_api_v5_trading_bot_signal_orders_algo_historyRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: ReadalgoOrdType (string) required
algoId (string) required
after (string) required
before (string)
limit (string)
get_api_v5_trading_bot_signal_orders_algo_pendingRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: ReadalgoOrdType (string) required
algoId (string)
after (string) required
before (string)
limit (string)
get_api_v5_trading_bot_signal_positionsRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: ReadalgoOrdType (string) required
algoId (string) required
get_api_v5_trading_bot_signal_positions_historyRetrieve 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: ReadalgoId (string) required
instId (string)
after (string)
before (string)
limit (string)
post_api_v5_trading_bot_signal_set_instrumentsRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. algoId (string)
. includeAll (boolean)
. instIds (array)
} (object) required
get_api_v5_trading_bot_signal_signalsRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: ReadsignalSourceType (string) required
signalChanId (string)
after (string)
before (string)
limit (string)
post_api_v5_trading_bot_signal_stop_order_algoA maximum of 10 orders can be stopped per request. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. algoId (string)
} (object) required
post_api_v5_trading_bot_signal_sub_orderYou can place an order only if you have sufficient funds. Rate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: Tradedata: {
. algoId (string)
. instId (string)
. ordType (string)
. px (string)
. reduceOnly (boolean)
. side (string)
. sz (string)
} (object) required
get_api_v5_trading_bot_signal_sub_ordersRate Limit: 20 requests per 2 seconds Rate limit rule: User ID Permission: ReadalgoId (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_listThe 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: ReadsubAcct (string)
get_api_v5_users_partner_if_rebateThis 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: ReadapiKey (string) required
get_api_v5_users_subaccount_listApplies to master accounts only Rate limit:2 requests per 2 seconds Rate limit rule: User ID Permission: Readenable (string)
subAcct (string)
after (string)
before (string)
limit (string)
post_api_v5_users_subaccount_modify_apikeyApplies 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: Tradedata: {
. apiKey (string)
. ip (string)
. label (string)
. perm (string)
. subAcct (string)
} (object) required
post_api_v5_users_subaccount_set_transfer_outSet 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: Tradedata: {
. canTransOut (boolean)
. subAcct (string)
} (object) required
customCall 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)