swap_place_algo_order

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

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

What swap_place_algo_order does on Okx Trade

AI agents use swap_place_algo_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
sz string Number of contracts to close (NOT USDT amount). Use market_get_instruments to get ctVal for conversion. Required unless closeFraction is provided (conditional/o
side string Yes sell=close long, buy=close short
pxVar string Price variance % [0.0001, 0.01]; provide pxVar OR pxSpread (iceberg/twap only)
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)
ordType string Yes conditional=single TP/SL or both; oco=TP+SL pair; move_order_stop=trailing stop; trigger=pending order; chase=follow best bid/ask; iceberg=split order; twap=tim
orderPx string Order price submitted when trigger fires; -1=market (trigger only)
posSide string net=one-way (default); long/short=hedge mode
pxLimit string Order price ceiling >= 0 (iceberg/twap only)
slOrdPx string SL order price; -1=market (recommended) (conditional/oco only)
stpMode string Self-trade prevention: cancel_maker|cancel_taker|cancel_both

Parameters from the server's own tool schema.

Why swap_place_algo_order needs a policy

This tool directly places algorithmic trading orders (conditional, OCO, trailing stop, trigger, iceberg, TWAP, etc.) on a derivatives exchange (SWAP/FUTURES), committing real financial obligations and moving funds. The description explicitly warns 'Executes real trades.' This is a clear Financial category tool with critical severity given the potential for large leveraged positions to be opened or closed.

From the tool's definition Place a SWAP/FUTURES algo order. [CAUTION] Executes real trades.

Risk signalsHigh parameter count (35 properties)

Questions about swap_place_algo_order

What does the swap_place_algo_order tool do? +

Place 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. 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_algo_order accept? +

swap_place_algo_order accepts 12 parameters: sz, side, pxVar, instId, tdMode, tgtCcy, ordType, orderPx, posSide, pxLimit, slOrdPx, stpMode. Required: 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_algo_order? +

Register the Okx Trade MCP server in PolicyLayer and add a rule for swap_place_algo_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_algo_order? +

swap_place_algo_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_algo_order? +

Yes. Add a rate_limit block to the swap_place_algo_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_algo_order completely? +

Set action: deny in the PolicyLayer policy for swap_place_algo_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_algo_order? +

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