grid_stop_order

[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 'stat...

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

What grid_stop_order does on Okx Trade

AI agents use grid_stop_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
algoId string Yes Grid bot algo order ID (not a trade ordId)
instId string Yes Instrument ID, e.g. BTC-USDT, BTC-USDT-SWAP
stopType string '1' (default): stop strategy and sell - spot grid sells all base assets back to quote; contract grid market-closes all positions. '2': stop strategy without sel
algoOrdType string Yes grid=Spot grid, contract_grid=Contract grid

Parameters from the server's own tool schema.

Why grid_stop_order needs a policy

This tool executes real financial trades on OKX exchange, closing positions and selling assets. It is explicitly marked as irreversible and involves moving real financial assets, placing it in the Financial category with critical severity due to the potential for significant monetary loss if misused.

From the tool's definition Stop a grid bot or close its remaining open position — real trades, irreversible. spot grid sells all base assets back to quote; contract grid market-closes all positions

Questions about grid_stop_order

What does the grid_stop_order tool do? +

[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. 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 grid_stop_order accept? +

grid_stop_order accepts 4 parameters: algoId, instId, stopType, algoOrdType. Required: algoId, instId, algoOrdType. The full parameter table on this page comes from the server's own tool schema.

How do I enforce a policy on grid_stop_order? +

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

grid_stop_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 grid_stop_order? +

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

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

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