Skip to content

How do I read the treasury?

Use GET /api/v1/treasury. It returns TreasuryDto. One call has all the numbers the app shows.

Terminal window
curl https://api.squeeze.plus/api/v1/treasury
FieldTypeMeaning
modepaper or liveHow fills are made
startingUsdnumberStarting cash
cashUsdnumberCash now
inventoryUsdnumber or nullExit-bounded value of positions
equityUsdnumber or nullCash plus inventory
pnlUsd, pnlPctnumber or nullChange from the start
realizedPnlUsdnumberClosed profit and loss
unrealizedPnlUsdnumber or nullOpen marks minus cost
feesUsd, impactUsdnumberCosts paid so far
peakUsd, maxDrawdownPctnumberPeak and worst fall
trades, wins, lossesnumberFill counts
openPositionsnumberPositions held now
buybackobjectShare, reserve, executed, token status
vaultobjectAddress, status, owner, balances
executionobjectmode, armed, reasons, lastQuote
strategyobjectThe rule settings
positionsarrayOpen positions
dataStatusobjectState, 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.

mode: "paper" with execution.armed: false is the state today. The reasons list says why live mode is off.

Read the trade list.