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.
Authentication
Section titled “Authentication”Authorization: Bearer sk_live_...Endpoints
Section titled “Endpoints”GET /v1/treasury/balances
Section titled “GET /v1/treasury/balances”Aggregated balances across every wallet on every chain you operate.
Query
| Param | Type | Default |
|---|---|---|
chain | string | all |
asset | string | all |
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" } ] } ]}GET /v1/treasury/yield-positions
Section titled “GET /v1/treasury/yield-positions”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" } ]}GET /v1/treasury/snapshots/:id
Section titled “GET /v1/treasury/snapshots/:id”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" }}GET /v1/treasury/pnl
Section titled “GET /v1/treasury/pnl”Realized and unrealized PnL across a time range.
Query
| Param | Default |
|---|---|
range | 7d (also accepts 24h, 30d, all, or ISO dates) |
currency | USD |
{ "range": "7d", "realized": { "amount": "1234.56", "currency": "USD" }, "unrealized": { "amount": "342.10", "currency": "USD" }, "breakdown": [ /* per-protocol */ ]}POST /v1/treasury/put-to-work
Section titled “POST /v1/treasury/put-to-work”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.
POST /v1/treasury/cash-out
Section titled “POST /v1/treasury/cash-out”Pull funds back from a yield position to a liquid wallet.
{ "positionId": "pos_01HX2K3...", "amount": "5000.00", "toWallet": "0xabc..."}Webhooks
Section titled “Webhooks”treasury.position.openedtreasury.position.closedtreasury.put_to_work.completedtreasury.cash_out.completedtreasury.snapshot.taken
Errors
Section titled “Errors”| HTTP | Code |
|---|---|
| 401 | unauthorized |
| 403 | insufficient_role |
| 404 | position_not_found |
| 409 | position_busy |
| 422 | unsupported_protocol |