How do I read the treasury?
Use GET /api/v1/treasury. It returns TreasuryDto. One call has all the numbers the app shows.
curl https://api.squeeze.plus/api/v1/treasury| Field | Type | Meaning |
|---|---|---|
mode | paper or live | How fills are made |
startingUsd | number | Starting cash |
cashUsd | number | Cash now |
inventoryUsd | number or null | Exit-bounded value of positions |
equityUsd | number or null | Cash plus inventory |
pnlUsd, pnlPct | number or null | Change from the start |
realizedPnlUsd | number | Closed profit and loss |
unrealizedPnlUsd | number or null | Open marks minus cost |
feesUsd, impactUsd | number | Costs paid so far |
peakUsd, maxDrawdownPct | number | Peak and worst fall |
trades, wins, losses | number | Fill counts |
openPositions | number | Positions held now |
buyback | object | Share, reserve, executed, token status |
vault | object | Address, status, owner, balances |
execution | object | mode, armed, reasons, lastQuote |
strategy | object | The rule settings |
positions | array | Open positions |
dataStatus | object | State, notes, and last times |
Each position has symbol, qty, costUsd, avgEntryUsd, entryGapPct, openedTs, markUsd, markVsBaseUsd, gapPct, pnlUsd, pnlPct, ageSeconds, and reason.
If a price is old, equityUsd keeps the last good mark. Read dataStatus too. inventoryUsd is null until all marks are fresh. Do not draw a missing value as zero.
Sample
Section titled “Sample”mode: "paper" with execution.armed: false is the state today. The reasons list says why live mode is off.