trade · wire operation
Submit an authorized plan to the paper broker
Verify the grant against the plan, the portfolio and market hashes, the market instant, the account, and the idempotency key; journal submitted and acknowledged; return the content-addressed receipt — the SAME receipt for a retry with the same key and plan (no second order), trade.idempotency_conflict for the same key with another plan, trade.grant_expired for an expired grant. With `observations`, the open orders meet the market through the engines' own fill path. Top-level fills/events are only this call’s new deltas; the submission receipt is immutable. `currentOrders` is the authoritative journal-derived current state and cumulative filled/remaining quantities for this receipt. `recovery: { fills, events }` contains all persisted normalized fills and reproducible ledger envelopes for this receipt’s orders, including this call’s fills. Retry after a lost response and apply recovery.events with portfolio.record_events; identical events fold once. Recovery grows with later fills without replaying the fill engine. The journal continues transactionally from the required journal store under `<sourceId>:journal`; retries must retain that store and source. A grant atomically records its exact prepared submission before journal commit: a retry with the same key into the same store/journal recovers those events and reads the same receipt; any other submission of the grant is trade.grant_consumed. Every journal write recovers earlier pending submissions before allocating new identities. Inline history must match persisted history exactly. Inline grants must exist unchanged in the trusted authorization store. Paper only; requires trade:paper. Opt-in (tradePack).
totalfinance.trade.submit- MCP tool name
- totalfinance_trade_submit
- Pack / profiles
- trade / full
- Default discovery
- Opt-in (select its pack or profile)
- Required capabilities
- trade:paper
- Effects / authorization
- external-order / policy
- Cost / cancellation
- small / Do not assume inline interruption
- Handle-eligible inputs
- None
- Idempotency
- required
Input schema
| Field | Type | Meaning |
|---|---|---|
planRequired | object | — |
grantOptional | object | — |
grantHashOptional | string | — |
idempotencyKeyRequired | string | — |
nowRequired | number | Epoch ms — the submission instant |
portfolioHashRequired | string | — |
marketHashRequired | string | — |
marketAsOfRequired | number | — |
sourceIdRequired | string | The execution source (`paper:<account>` by convention); the journal id derives from it |
accountIdRequired | string | — |
baseCurrencyRequired | string | — |
instrumentsOptional | object | — |
ordersOptional | object[] | — |
journalOptional | object[] | Optional exact canonical snapshot of the persisted journal; checked inside the transaction. Never imports or replaces history. An execution-journal store is required. |
observationsOptional | object | — |
asOfOptional | number | Epoch ms — the instant the open orders meet the observations (default `now`) |
Complete JSON Schema
Loading…
Output schema
| Field | Type | Meaning |
|---|---|---|
receiptRequired | object | — |
currentOrdersRequired | object[] | Authoritative journal-derived state and cumulative fills for this receipt, distinct from the immutable submission receipt |
retriedRequired | boolean | — |
fillsRequired | object | — |
eventsRequired | object[] | — |
recoveryRequired | object | Cumulative persisted fills and reproducible ledger events for this receipt; safe to apply idempotently after a lost response. Top-level fills/events remain new deltas. |
journalRequired | object | — |
openRequired | string[] | — |
expiredRequired | string[] | — |
unfilledRequired | object[] | — |
Complete JSON Schema
Loading…