Skip to content
TotalFinance

trade · wire operation

Create and store an explicitly defined portfolio ledger

Start here before portfolio.record_events: supply durable portfolioId, baseCurrency and explicit initial events (an empty array creates no cash). Uses the existing artifact store and ledger reducer. Requires portfolio:write and a writable store. Save the returned handle and open it with portfolio.inspect from portfolioPack (enable both trade and portfolio packs, or use --profile full); subsequent event writes return a new immutable handle. Opt-in (tradePack).

totalfinance.portfolio.create
MCP tool name
totalfinance_portfolio_create
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
None
Idempotency
required

Input schema

FieldTypeMeaning
portfolioIdRequiredstring—
baseCurrencyRequiredstring—
lotReliefOptional"fifo" | "lifo" | "highest-cost" | "specific-lot"Existing ledger default: fifo, echoed in the stored ledger
eventsRequiredobject[]Explicit initial events; [] means an empty, unfunded portfolio
provenanceOptionalobject—
createdTimestampMsRequiredintegerCaller clock in epoch milliseconds
Complete JSON Schema

Loading…

Output schema

FieldTypeMeaning
handleRequiredobject—
portfolioIdRequiredstring—
baseCurrencyRequiredstring—
eventCountRequiredinteger—
lotReliefRequired"fifo" | "lifo" | "highest-cost" | "specific-lot"—
inspectOperationRequiredstring—
Complete JSON Schema

Loading…