AI agents use swap_batch_orders to commit financial operations through Okx Trade — usually the final step of a payment, billing, or trading workflow. A call moves real money.
| Parameter | Type | Required | Description |
|---|---|---|---|
action | string | Yes | |
orders | array | Yes | Max 20. place:{instId,tdMode,side,ordType,sz,...}; cancel:{instId,ordId|clOrdId}; amend:{instId,ordId|clOrdId,newSz?,newPx?}. |
Parameters from the server's own tool schema.
This tool places, cancels, or amends futures/swap trading orders on OKX exchange, directly committing or modifying financial obligations. Batch execution of up to 20 orders amplifies the blast radius significantly. The [CAUTION] tag in the description further confirms the high-risk nature of this tool.
From the tool's definition Batch place/cancel/amend SWAP/FUTURES orders (max 20). action=place|cancel|amend
Attacks that exploit this kind of access
[CAUTION] Batch place/cancel/amend SWAP/FUTURES orders (max 20). action=place|cancel|amend. 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.
swap_batch_orders accepts 2 parameters: action, orders. Required: action, orders. The full parameter table on this page comes from the server's own tool schema.
Register the Okx Trade MCP server in PolicyLayer and add a rule for swap_batch_orders: 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.
swap_batch_orders is a Financial tool with critical risk. Critical-risk tools should be blocked by default and only enabled with explicit human approval.
Yes. Add a rate_limit block to the swap_batch_orders 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.
Set action: deny in the PolicyLayer policy for swap_batch_orders. 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.
swap_batch_orders 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.
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 →