swap_place_order

Place 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.

Server Okx Trade @okx_ai/okx-trade-mcp
Category Financial
Risk class Critical
Parameters 125 required

What swap_place_order does on Okx Trade

AI agents use swap_place_order to commit financial operations through Okx Trade — usually the final step of a payment, billing, or trading workflow. A call moves real money.

ParameterTypeRequiredDescription
px string Required for limit/post_only/fok/ioc
sz string Yes Number of contracts. Each contract = ctVal units (e.g. 0.1 ETH for ETH-USDT-SWAP). Query market_get_instruments for exact ctVal. Set tgtCcy=quote_ccy to specify
side string Yes buy=long, sell=short; hedge: use with posSide
instId string Yes e.g. BTC-USDT-SWAP
tdMode string Yes cross|isolated margin
tgtCcy string Size unit. base_ccy(default): sz in contracts; quote_ccy: sz in USDT notional value; margin: sz in USDT margin cost (actual position = sz * leverage)
clOrdId string Client order ID (max 32 chars)
ordType string Yes market=no px; limit/fok/ioc=px req; post_only=maker
posSide string net=one-way (default); long/short=hedge mode
slOrdPx string SL order price; -1=market
stpMode string Self-trade prevention: cancel_maker|cancel_taker|cancel_both
tpOrdPx string TP order price; -1=market

Parameters from the server's own tool schema.

Why swap_place_order needs a policy

This tool places real derivative (swap/futures) orders on the OKX exchange, directly committing financial obligations and moving funds. The description explicitly warns it 'Executes real trades', making this a Financial category tool with critical severity due to the potential for large, irreversible financial losses from leveraged positions.

From the tool's definition 'Place SWAP/FUTURES order', 'Executes real trades', 'tpTriggerPx/slTriggerPx'

Risk signalsHigh parameter count (18 properties)

Questions about swap_place_order

What does the swap_place_order tool do? +

Place 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. It is categorised as a Financial tool in the Okx Trade MCP Server, which means it involves financial transactions. Block by default and require explicit approval.

What parameters does swap_place_order accept? +

swap_place_order accepts 12 parameters: px, sz, side, instId, tdMode, tgtCcy, clOrdId, ordType, posSide, slOrdPx, stpMode, tpOrdPx. Required: sz, side, instId, tdMode, ordType. The full parameter table on this page comes from the server's own tool schema.

How do I enforce a policy on swap_place_order? +

Register the Okx Trade MCP server in PolicyLayer and add a rule for swap_place_order: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Okx Trade. Nothing to install.

What risk level is swap_place_order? +

swap_place_order is a Financial tool with critical risk. Critical-risk tools should be blocked by default and only enabled with explicit human approval.

Can I rate-limit swap_place_order? +

Yes. Add a rate_limit block to the swap_place_order rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.

How do I block swap_place_order completely? +

Set action: deny in the PolicyLayer policy for swap_place_order. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.

What MCP server provides swap_place_order? +

swap_place_order is provided by the Okx Trade MCP server (@okx_ai/okx-trade-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

// LOOK UP ANOTHER SERVER

Every MCP server has a record like this.

Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.

Teams ship this data inside their own products. See what a licence covers →

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.