paper_trade_close
Record a simulation-only market-day exit intent for an open trade, then evaluate after the 16-minute safety window to estimate fill without placing a live order.
Instructions
Durably record a simulation-only market DAY exit intent for an open trade; never sends a live or broker-paper order and does not close immediately. Evaluate later, after the 16-minute SIP safety window, to estimate fill.
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": {
"request_id": "<request_id>",
"trade_id": "<trade_id>"
},
"name": "paper_trade_close"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| backtest | No | ||
| trade_id | Yes | Trade UUID returned by paper_trade_record. | |
| latency_ms | No | Assumed order-to-market latency in milliseconds; defaults to 250 ms. Combined with submitted_at (or the session open for pre-open orders) to determine execution eligibility and the stored fill time. | |
| request_id | Yes | Caller-generated idempotency key. Reuse only to retry the exact same call; use a new value otherwise. | |
| submitted_at | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||