All servers / Finance / OKX MCP server
OKX MCP server
OKX MCP Server - Model Context Protocol server for OKX exchange
Tested by ConnectATDScore 77 out of 100. Tested 2026-11-18 on package version 1.5.1. Package: @okx_ai/okx-trade-mcp
Score breakdown
| Runs | 18 / 20 | |
|---|---|---|
| Tool descriptions | 19 / 20 | |
| Package safety | 8 / 20 | |
| Maintenance | 20 / 20 | |
| Adoption | 12 / 20 |
What we saw
- Starts and answers the MCP handshake: yes (5.2 seconds including download)
- Tools offered: 73
- Last published: 2026-11-13
- Weekly downloads (npm): 1,910
- License: MIT · Direct dependencies: 4
Notes
- The package runs install scripts, which execute code when you install it.
Want this server set up for your team?
ConnectATD builds AI automation and wires up MCP servers like this one. Tell us what you are trying to do.
Talk to ConnectATDTools and how they are described
Agents choose tools from these descriptions. Under each name you can see how many of its parameters are explained.
spot_place_order15 of 16 parameters describedPlace a spot order. Attach TP/SL via tpTriggerPx/slTriggerPx. [CAUTION] Executes real trades.
spot_cancel_order1 of 3 parameters describedCancel an unfilled spot order.
spot_amend_order4 of 6 parameters describedAmend an unfilled spot order (modify price or size). To modify attached TP/SL, use the corresponding algo amend tool: spot_amend_algo_order (spot), swap_amend_algo_order (swap), futures_amend_algo_order (futures), option_amend_algo_order (option). Use spot_get_algo_orders to find the algoId for spot orders.
spot_get_orders8 of 9 parameters describedQuery spot orders. status: open(active)|history(7d)|archive(3mo).
spot_place_algo_order30 of 31 parameters describedPlace a spot algo order. [CAUTION] Executes real trades. conditional: single TP/SL. oco: TP+SL pair. move_order_stop: trailing stop. trigger: pending order at triggerPx. chase: follow best bid/ask. iceberg: split large order into child orders. twap: time-weighted split.
spot_amend_algo_order6 of 7 parameters describedAmend a pending spot algo order (modify TP/SL prices or size). Also covers TP/SL orders attached when placing the main order - look up algoId via spot_get_algo_orders first.
spot_cancel_algo_order1 of 2 parameters describedCancel a spot algo order (TP/SL).
spot_get_algo_orders7 of 7 parameters describedQuery spot algo orders (TP/SL) - pending or history.
spot_get_fills8 of 8 parameters describedGet spot transaction fills. archive=false(3d, default)|true(up to 3mo).
spot_batch_orders1 of 2 parameters described[CAUTION] Batch place/cancel/amend up to 20 spot orders. action: place|cancel|amend.
spot_get_order3 of 3 parameters describedGet details of a single spot order.
spot_batch_amend1 of 1 parameter described[CAUTION] Batch amend up to 20 unfilled spot orders.
spot_batch_cancel1 of 1 parameter described[CAUTION] Batch cancel up to 20 spot orders.
spot_set_leverage4 of 4 parameters describedSet leverage for SPOT margin trading. Provide exactly ONE of instId (pair-level) or ccy (currency-level cross, requires borrow-enabled account / multi-ccy / portfolio margin). [CAUTION] Changes risk parameters. Scenarios: • instId + mgnMode=isolated -> pair-level isolated margin • instId + mgnMode=cross -> pair-level cross margin (contract-mode account) • ccy + mgnMode=cross -> currency-level cross margin (spot-with-borrow / multi-ccy / portfolio margin) When ccy is supplied, mgnMode MUST be cross. posSide is never applicable to spot margin.
swap_place_order18 of 18 parameters describedPlace SWAP/FUTURES order. Attach TP/SL via tpTriggerPx/slTriggerPx. Before placing, use market_get_instruments to get ctVal (contract face value) - do NOT assume contract sizes. [CAUTION] Executes real trades.
swap_cancel_order2 of 3 parameters describedCancel an unfilled SWAP/FUTURES order.
swap_get_order2 of 3 parameters describedGet details of a single SWAP/FUTURES order by ordId or clOrdId.
swap_get_orders10 of 10 parameters describedQuery SWAP/FUTURES open orders, history (last 7 days), or archive (up to 3 months).
swap_get_positions2 of 3 parameters describedGet current SWAP/FUTURES positions.
swap_get_fills9 of 9 parameters describedGet SWAP/FUTURES fill details. archive=false (default): last 3 days; archive=true: up to 3 months.
swap_close_position4 of 5 parameters described[CAUTION] Close entire SWAP/FUTURES position at market.
swap_set_leverage3 of 4 parameters describedSet leverage for a SWAP/FUTURES instrument or position. [CAUTION] Changes risk parameters. Scenarios (SWAP/FUTURES only): • cross + any instId under the index -> sets leverage at the index level • isolated + buy-sell (net) posMode -> instId only • isolated + long-short (hedge) posMode -> instId + posSide=long|short (BOTH directions must be set separately) Not supported: PORTFOLIO MARGIN accounts cannot adjust cross leverage for SWAP/FUTURES - the request will be rejected by OKX. Use account_get_config first if unsure of the account's margin mode.
swap_get_leverage1 of 2 parameters describedGet current leverage for a SWAP/FUTURES instrument.
swap_batch_amend1 of 1 parameter described[CAUTION] Batch amend up to 20 unfilled SWAP/FUTURES orders.
swap_batch_cancel1 of 1 parameter described[CAUTION] Batch cancel up to 20 SWAP/FUTURES orders.
swap_amend_algo_order7 of 7 parameters describedAmend a pending SWAP/FUTURES algo order (modify TP/SL prices or size). Also covers TP/SL orders attached when placing the main order - look up algoId via swap_get_algo_orders first.
swap_batch_orders1 of 2 parameters described[CAUTION] Batch place/cancel/amend SWAP/FUTURES orders (max 20). action=place|cancel|amend.
option_place_order16 of 17 parameters describedPlace OPTION order. instId: {uly}-{expiry}-{strike}-C/P, e.g. BTC-USD-241227-50000-C. Before placing, use market_get_instruments to get ctVal (contract face value) - do NOT assume contract sizes. [CAUTION] Executes real trades.
option_cancel_order1 of 3 parameters describedCancel an unfilled OPTION order. Provide ordId or clOrdId.
option_batch_cancel1 of 1 parameter described[CAUTION] Batch cancel up to 20 OPTION orders.
option_amend_order3 of 5 parameters describedAmend an unfilled OPTION order (price and/or size). Provide ordId or clOrdId. To modify attached TP/SL, use option_amend_algo_order with the algoId from option_get_algo_orders.
option_get_order2 of 3 parameters describedGet details of a single OPTION order by ordId or clOrdId.
option_get_orders10 of 10 parameters describedList OPTION orders. status: live=pending (default), history=7d, archive=3mo.
option_get_positions2 of 2 parameters describedGet current OPTION positions including Greeks (delta, gamma, theta, vega).
option_get_fills8 of 8 parameters describedGet OPTION fill history. archive=false: last 3 days (default); archive=true: up to 3 months.
option_get_instruments2 of 2 parameters describedList available OPTION contracts for a given underlying (option chain). Use to find valid instIds before placing orders.
option_get_greeks2 of 2 parameters describedGet implied volatility and Greeks (delta, gamma, theta, vega) for OPTION contracts by underlying.
option_place_algo_order12 of 14 parameters describedPlace OPTION TP/SL algo order (conditional/oco). [CAUTION] Executes real trades. conditional=single TP/SL; oco=TP+SL pair. -1=market.
option_amend_algo_order7 of 7 parameters describedAmend a pending OPTION algo order (modify TP/SL prices or size). Also covers TP/SL orders attached when placing the main order - look up algoId via option_get_algo_orders first.
option_cancel_algo_orders1 of 1 parameter describedCancel OPTION algo orders (TP/SL). Each item: {algoId, instId}.
option_get_algo_orders8 of 8 parameters describedQuery pending or completed OPTION algo orders (TP/SL, OCO).
swap_place_algo_order35 of 35 parameters describedPlace a SWAP/FUTURES algo order. [CAUTION] Executes real trades. conditional: single TP, single SL, or both on one order. oco: TP+SL simultaneously - first trigger cancels the other. move_order_stop: trailing stop (callbackRatio or callbackSpread). trigger: pending order activated when triggerPx is hit (provide triggerPx + orderPx). chase: smart-follow best bid/ask. iceberg: split large order into child orders at intervals. twap: time-weighted average price order splitting.
swap_place_move_stop_order10 of 10 parameters described[DEPRECATED] Use swap_place_algo_order with ordType='move_order_stop' instead. Place a SWAP/FUTURES trailing stop order. [CAUTION] Executes real trades. Specify callbackRatio (e.g. '0.01'=1%) or callbackSpread (fixed price distance), not both. Optionally set activePx so tracking starts once market reaches that price.
swap_cancel_algo_orders1 of 1 parameter describedCancel one or more pending SWAP/FUTURES algo orders (TP/SL). Accepts a list of {algoId, instId} objects.
swap_get_algo_orders9 of 9 parameters describedQuery pending or completed SWAP/FUTURES algo orders (TP/SL, OCO, trailing stop).
account_get_balance1 of 1 parameter describedGet account balance for trading account. Returns balances for all currencies or a specific one.
account_transfer7 of 7 parameters describedTransfer funds between accounts (trading, funding, etc.). [CAUTION] Moves real funds.
account_get_max_size4 of 5 parameters describedGet max buy/sell order size for a SWAP/FUTURES instrument given current balance and leverage. Useful before placing orders.
account_get_asset_balance3 of 3 parameters describedGet funding account balance (asset account). Different from account_get_balance which queries the trading account. Optionally includes total asset valuation across all account types (trading, funding, earn, etc.).
account_get_bills7 of 9 parameters describedGet account ledger: fees paid, funding charges, realized PnL, transfers, etc. Default 20 records (last 7 days), max 100.
account_get_positions_history6 of 8 parameters describedGet closed position history for SWAP or FUTURES. Default 20 records, max 100.
account_get_trade_fee1 of 2 parameters describedGet maker/taker fee rates for the account. Useful to understand your fee tier before trading.
account_get_configno parametersGet account configuration: position mode (net vs hedge), account level, auto-loan settings, etc. Note: `settleCcy` is the current settlement currency for USDS-margined contracts. `settleCcyList` is the list of available settlement currencies to choose from. These fields only apply to USDS-margined contracts and can be ignored for standard USDT/coin-margined trading.
account_get_max_withdrawal1 of 1 parameter describedGet maximum withdrawable amount for a currency from the trading account. Useful before initiating a transfer or withdrawal.
account_get_max_avail_size4 of 4 parameters describedGet maximum available size for opening or reducing a position. Different from account_get_max_size which calculates new order size.
account_get_positions1 of 3 parameters describedGet current open positions across all instrument types (MARGIN, SWAP, FUTURES, OPTION, EVENTS). Use swap_get_positions for SWAP/FUTURES-only queries.
account_get_bills_archive7 of 9 parameters describedGet archived account ledger (bills older than 7 days, up to 3 months). Use account_get_bills for recent 7-day records. Default 20 records, max 100.
account_set_position_mode1 of 1 parameter describedSwitch between net position mode and long/short hedge mode. net: one position per instrument (default). long_short_mode: separate long and short positions. [CAUTION] Requires no open positions or pending orders.
account_get_balance_all5 of 5 parameters describedOne-shot snapshot of all OKX assets: trading-account equity + funding-account balances + optional cross-account valuation. Use when the user asks for total assets / net worth / 总资产 / all balances. Prefer this over calling account_get_balance + account_get_asset_balance separately. Returns {trading, funding, valuation, meta} with per-section error so partial failures don't block the rest.
grid_get_orders7 of 7 parameters describedList grid bots. status='active' for running; 'history' for stopped.
grid_get_order_details2 of 2 parameters describedGet grid bot detail by algo ID. Returns config, status, PnL, and position.
grid_get_sub_orders7 of 7 parameters describedQuery sub-orders (grid trades) of a bot. type='filled' for executed; 'live' for pending.
grid_create_order17 of 17 parameters describedCreate grid bot (spot, USDT-margined, or coin-margined contract). [CAUTION] Locks funds. Spot: quoteSz|baseSz. Contract: direction+lever+sz.
grid_amend_order10 of 10 parameters describedAmend a running grid bot. [CAUTION] Modifies a running bot. Use grid_list_orders to confirm the bot is running and obtain the algoId before calling. Supports two modes, which can be combined in a single call: • Price-range mode (maxPx+minPx+gridNum): change upper/lower price boundary and grid count. Contract grid: if new range requires more margin, pass topUpAmt; omit to auto-use the minimum required. Spot grid: topUpAmt is not supported. • TP/SL mode (instId + any of tpTriggerPx/slTriggerPx/tpRatio/slRatio): update take-profit and/or stop-loss. Pass '-1' to explicitly clear an existing TP or SL. tpTriggerPx/slTriggerPx are absolute prices; tpRatio/slRatio are profit ratios (e.g. '0.1' = 10%). When both sets of params are provided, both APIs are called sequentially. Do NOT use to create a new grid bot - use grid_create_order instead. Do NOT use to stop a grid bot - use grid_stop_order instead.
grid_stop_order4 of 4 parameters described[CAUTION] Stop a grid bot or close its remaining open position — real trades, irreversible. Workflow: (1) If the user has not specified which bot to stop, call grid_get_orders first and ask the user to confirm which bot before proceeding. (2) Call grid_get_order_details to check the current 'state' field. (3) If state='running' → call this tool: stopType='1' (default, clean exit) — spot grid sells all base assets back to quote; contract grid market-closes all positions. stopType='2' (keep assets) — spot grid keeps base assets as-is; contract grid cancels grid orders but leaves the position open. (4) If state='no_close_position' → call this tool with stopType='1' to close the remaining open position.
grid_get_positions2 of 2 parameters describedGet open contract-grid positions for an active or recently-stopped contract-grid bot. Returns liquidation price, margin ratio, and unrealized PnL.
grid_get_liquidate_price10 of 10 parameters describedEstimate the liquidation price for a contract-grid bot before creating it. Contract grid only. Requires the full intended config: instId, sz (margin), lever, the grid range (maxPx, minPx, gridNum) and direction. runType defaults to arithmetic ('1'); triggerStrategy is optional.
grid_close_position4 of 4 parameters described[CAUTION] Close the remaining open position of a contract-grid bot that was stopped with stopType='2'. Use grid_get_positions first to confirm the position exists and check its size before closing. Use mktClose=true for an immediate market close, or mktClose=false to place a limit close order (provide sz and px).
trade_get_history3 of 4 parameters describedQuery local audit log of tool calls made through this MCP server. Returns recent operations with timestamps, duration, params, and results. Use to review what trades or queries were executed in this session or past sessions.
skills_get_categoriesno parametersList all available skill categories in OKX Skills Marketplace. Use the returned categoryId as input to skills_search for category filtering. Do NOT use for searching or downloading skills - use skills_search or skills_download.
skills_search4 of 4 parameters describedSearch for skills in OKX Skills Marketplace by keyword or category. To get valid category IDs, call skills_get_categories first. Returns skill names for use with skills_download. Do NOT use for downloading - use skills_download.
skills_download3 of 3 parameters describedDownload a skill package from OKX Skills Marketplace to a local directory. Always call skills_search first to confirm the skill name exists. Downloads the latest approved version. NOTE: Downloads third-party developer content - does NOT install to agents. For full installation use CLI: okx skill add <name>. Use when the user wants to inspect or manually install a skill package.
system_get_capabilitiesno parametersReturn machine-readable server capabilities and module availability for agent planning.
Tested in a sandbox with an empty environment: no API keys, a throwaway folder, nothing from a real account. A passing test shows the server runs and responds. It is not a security audit.