swap_amend_algo_order

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

Server Okx Trade @okx_ai/okx-trade-mcp
Category Write
Risk class Medium
Parameters 72 required

What swap_amend_algo_order does on Okx Trade

AI agents use swap_amend_algo_order to create or update resources in Okx Trade — usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Okx Trade environment.

ParameterTypeRequiredDescription
newSz string New contracts count
algoId string Yes Algo order ID
instId string Yes e.g. BTC-USDT-SWAP
newSlOrdPx string New SL order price; -1=market
newTpOrdPx string New TP order price; -1=market
newSlTriggerPx string New SL trigger price
newTpTriggerPx string New TP trigger price

Parameters from the server's own tool schema.

Why swap_amend_algo_order needs a policy

This tool modifies an existing algorithmic trading order by changing take-profit/stop-loss prices or size. It is a Write operation (reversible modification of an existing order) rather than Financial since it does not directly move money or commit financial obligations — it amends pending algo order parameters.

From the tool's definition Amend a pending SWAP/FUTURES algo order (modify TP/SL prices or size)

Questions about swap_amend_algo_order

What does the swap_amend_algo_order tool do? +

Amend 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. It is categorised as a Write tool in the Okx Trade MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.

What parameters does swap_amend_algo_order accept? +

swap_amend_algo_order accepts 7 parameters: newSz, algoId, instId, newSlOrdPx, newTpOrdPx, newSlTriggerPx, newTpTriggerPx. Required: algoId, instId. The full parameter table on this page comes from the server's own tool schema.

How do I enforce a policy on swap_amend_algo_order? +

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

swap_amend_algo_order is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.

Can I rate-limit swap_amend_algo_order? +

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

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

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