Prepare order
perps_prepare_order_placePreviews opening a position (placing an order). Read-only safety gate: runs risk checks and returns a short-lived confirmation token (~90s). Present the summary, get explicit user confirmation, then call perps_execute_operation with the token. Makes no changes itself.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"contractId": "<contractId>",
"side": "<side>",
"type": "<type>",
"leverage": "<leverage>",
"amount": "<amount>",
"price": "<price>"
},
"name": "perps_prepare_order_place"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| side | Yes | Direction of the position to open. | |
| type | Yes | Order type. Only "market" can be opened — no Perps API, agent or public, takes a limit price, so a limit open has nothing to be limited by. | |
| price | Yes | Reference price as a decimal string. Required for market orders too: it is the slippage reference, not a limit price. | |
| amount | Yes | Margin (collateral) to commit, in USDT (taken from the USDT balance), as a decimal string. The contract's min_size_quote..max_size_quote applies to this value. Notional is roughly amount × leverage — exactly amount ÷ (1/leverage + taker_fee_pct), since the taker fee comes out of the margin — and base quantity is notional ÷ the slippage-widened price, floored to the contract's size_decimals. | |
| leverage | Yes | Integer leverage, from 1 to the contract's max_leverage. The user's choice: when they named none, ask before previewing instead of picking one yourself. | |
| autoClose | No | Optional take-profit / stop-loss attached to the order; each leg is checked against the contract's TP/SL buffer. | |
| contractId | Yes | Numeric contract id from perps_list_contracts. 0 is a real contract id, not a placeholder for "unset". |