AI agents use grid_create_order 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 |
|---|---|---|---|
sz | string | — | Margin in USDT or base coin (CoinM). Contract only |
lever | string | — | Leverage. Contract only |
maxPx | string | Yes | Upper price |
minPx | string | Yes | Lower price |
baseSz | string | — | Spot: base amount (e.g. BTC) |
instId | string | Yes | e.g. BTC-USDT, BTC-USDT-SWAP, BTC-USD-SWAP (coin-margined) |
basePos | boolean | — | Open base position for contract. Default: true |
gridNum | string | Yes | Number of grids |
quoteSz | string | — | Spot: quote amount (e.g. USDT) |
runType | string | — | 1=arithmetic (default); 2=geometric |
slRatio | string | — | SL ratio e.g. 0.1=10%. Contract only |
tpRatio | string | — | TP ratio e.g. 0.1=10%. Contract only |
Parameters from the server's own tool schema.
This tool creates a grid trading bot that actively commits and locks financial resources to execute automated buy/sell orders on a cryptocurrency exchange. It directly moves and locks funds, constituting a financial commitment. Misuse could result in significant financial loss through unintended automated trading positions.
From the tool's definition 'Create grid bot' that 'Locks funds' and involves trading instruments (spot, USDT-margined, or coin-margined contract) on OKX exchange
Risk signalsHigh parameter count (17 properties)
Attacks that exploit this kind of access
Create grid bot (spot, USDT-margined, or coin-margined contract). [CAUTION] Locks funds. Spot: quoteSz|baseSz. Contract: direction+lever+sz. 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.
grid_create_order accepts 12 parameters: sz, lever, maxPx, minPx, baseSz, instId, basePos, gridNum, quoteSz, runType, slRatio, tpRatio. Required: maxPx, minPx, instId, gridNum. 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 grid_create_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.
grid_create_order 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 grid_create_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.
Set action: deny in the PolicyLayer policy for grid_create_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.
grid_create_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.
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 →