Skip to content

Treasury API

The Treasury API exposes everything the Treasury Dashboard shows — and a few things it doesn’t, like raw snapshot reads and historical PnL queries.

Authorization: Bearer sk_live_...

Aggregated balances across every wallet on every chain you operate.

Query

ParamTypeDefault
chainstringall
assetstringall
groupBy"chain" | "asset" | "wallet""asset"

Response

{
"asOf": "2026-05-26T17:00:00Z",
"totalUSD": "1234567.89",
"groups": [
{
"key": "USDC",
"totalUSD": "780000.00",
"items": [
{ "chain": "base", "wallet": "0xabc...", "amount": "300000.00" },
{ "chain": "arbitrum", "wallet": "0xdef...", "amount": "480000.00" }
]
}
]
}

Active yield positions across all supported protocols.

{
"positions": [
{
"id": "pos_01HX2K3...",
"protocol": "ethena_sUSDe",
"principal": "500000.00",
"currentValue": "501230.50",
"apy": "12.4",
"openedAt": "2026-04-01T00:00:00Z"
}
]
}

Read a specific snapshot. Snapshots are taken every 5 minutes.

{
"id": "snap_01HX2K3...",
"takenAt": "2026-05-26T16:55:00Z",
"wallets": [ /* per-wallet inventory */ ],
"positions": [ /* yield positions */ ],
"prices": { "USDC": "1.0000", "sUSDe": "1.024" }
}

Realized and unrealized PnL across a time range.

Query

ParamDefault
range7d (also accepts 24h, 30d, all, or ISO dates)
currencyUSD
{
"range": "7d",
"realized": { "amount": "1234.56", "currency": "USD" },
"unrealized": { "amount": "342.10", "currency": "USD" },
"breakdown": [ /* per-protocol */ ]
}

Move idle stablecoins into a yield position.

{
"fromWallet": "0xabc...",
"asset": "USDC",
"amount": "10000.00",
"protocol": "ethena_sUSDe"
}

Returns a transactionId you can poll or subscribe to via webhook.

Pull funds back from a yield position to a liquid wallet.

{
"positionId": "pos_01HX2K3...",
"amount": "5000.00",
"toWallet": "0xabc..."
}
  • treasury.position.opened
  • treasury.position.closed
  • treasury.put_to_work.completed
  • treasury.cash_out.completed
  • treasury.snapshot.taken
HTTPCode
401unauthorized
403insufficient_role
404position_not_found
409position_busy
422unsupported_protocol