Finance

Stable

The financial capability family: managing money, portfolios and market activity under strict verification and human-authority rules.

Finance is the capability where the difference between plausible and correct is measured in money, and where the runtime’s insistence on verification and human authority stops being a nicety and becomes the entire point.

Every other capability can afford to be wrong occasionally and recover. A financial action that moves the wrong amount, to the wrong account, at the wrong time, may not be recoverable at all. The Finance family is therefore built on a single governing principle: the agent may analyse, model and propose without limit, but any action that moves money or commits capital crosses a hard authority boundary that the model cannot cross on its own.

The four financial capabilities#

Shared foundations#

All four capabilities inherit the same guarantees, so a control learned in one applies in the others.

  • Point-in-time correctness — every figure is dated. The agent reasons about what was known at a moment, never accidentally using a revised number to justify a past decision. See Time Series for the revision model this rests on.
  • Reconciliation before recommendation — a proposal is refused if the underlying balances and positions do not reconcile to source. The agent will not act on numbers it cannot tie out.
  • Idempotent action — every money-moving proposal carries an idempotency key, so a retry after an ambiguous failure can never double-execute.
  • Full attribution — each recommendation is traceable to the specific figures, as-of dates and assumptions that produced it, because a financial decision no one can audit is not a decision anyone should trust.

One account surface, every asset class#

A finance run rarely stays in one lane. The same run reconciles the books, reads the portfolio, and — where the account holds them — reaches into on-network wallets, because to the capability a funded crypto wallet is just another account in the same reconciled view. The example below walks a single run from cash and allocation through funding a wallet and proposing a crypto trade; note that every movement comes back held, never executed.

A finance run spanning cash, portfolio and on-network wallets
import { Pimsy } from class="tok-str">'@pimsy/sdk'

const pimsy = new Pimsy()
class="tok-com">
// Managing finances + portfolio: one reconciled snapshot of the account.
const summary = await pimsy.finance.overview({ owner: session.accountId })

summary.cash.reconciled        // true  — ledger ties out to statement source
summary.cash.runwayDays        // projected from recurring inflows/outflows
summary.portfolio.drift        // +8pt equities vs target allocation
class="tok-com">
// Digital-asset wallets read back as accounts in the very same view.
const wallets = await pimsy.finance.getWallets({ owner: session.accountId })
class="tok-com">// [
class="tok-com">//   { chain: class="tok-str">'btc', address: class="tok-str">'bc1qq7dv2t9g5wmvvr2ld8c4g5vdyhqvt52wfdwypu' },
class="tok-com">//   { chain: class="tok-str">'eth', address: class="tok-str">'0x01f65610e3fbE1Fc827bCF402Bdd37cC57F77788' },
class="tok-com">//   { chain: class="tok-str">'sol', address: class="tok-str">'2zSXygLwpdgyGr4aUKog3CqzJkuq7PiiqYdxws3yNof6' },
class="tok-com">// ]
class="tok-com">
// Fund a trading position from the reconciled cash balance.
class="tok-com">// This is a movement, so it is proposed and HELD — not executed.
const funding = await pimsy.finance.fund({
  from: summary.cash.accountId,
  to: wallets.find((w) => w.chain === class="tok-str">'sol').address,
  amount: { value: 2_500, currency: class="tok-str">'USD' },
  idempotencyKey: run.id,        // a retry after an ambiguous failure canclass="tok-str">'t double-fund
})
class="tok-com">
// Propose a crypto trade once funding clears. Analysis is autonomous;
class="tok-com">// the order itself waits for human execution authority.
const order = await pimsy.finance.trade({
  wallet: wallets.find((w) => w.chain === 'ethclass="tok-str">').address,
  side: 'buyclass="tok-str">',
  symbol: 'ETHclass="tok-str">',
  notional: { value: 1_500, currency: 'USDclass="tok-str">' },
  route: 'liveclass="tok-str">',                 // vs 'simclass="tok-str">'; the chosen route is recorded on the order
})

funding.status // 'heldclass="tok-str">'  — awaiting approval before any transfer settles
order.status   // 'held'  — awaiting approval before the trade is routed

Last updated 2026-09-06