trade · wire operation
Apply events to a ledger and store the new ledger
Fold validated portfolio events (fills from trade.submit, deposits, corporate actions) onto a ledger through the ledger's own reducer and put the new ledger into the artifact store as a content-addressed portfolio handle. The write is the put: an unchanged ledger is the same handle; identical replays fold once and applied counts only new events. Changed event bodies are refused. Requires a writable artifact store and the portfolio:write capability. Opt-in (tradePack).
totalfinance.portfolio.record_events- MCP tool name
- totalfinance_portfolio_record_events
- Pack / profiles
- trade / full
- Default discovery
- Opt-in (select its pack or profile)
- Required capabilities
- portfolio:write
- Effects / authorization
- portfolio-state / none
- Cost / cancellation
- small / Do not assume inline interruption
- Handle-eligible inputs
- portfolio
- Idempotency
- required
Input schema
| Field | Type | Meaning |
|---|---|---|
portfolioRequired | object | object | string | — |
eventsRequired | object[] | Portfolio event envelopes to apply, in order |
createdTimestampMsRequired | integer | Epoch ms stamped on the new ledger’s handle — the caller’s clock |
Complete JSON Schema
Loading…
Output schema
| Field | Type | Meaning |
|---|---|---|
handleRequired | object | — |
appliedRequired | integer | — |
eventCountRequired | integer | — |
baseCurrencyRequired | string | — |
lastEffectiveTimestampMsRequired | number | null | — |
Complete JSON Schema
Loading…