Treasury API
The Treasury API powers the Treasury Dashboard: register wallets, read aggregated balances and PnL, and build calldata for moving funds into and out of yield. It is a separate service from the merchant API.
Base URL: https://treasury-api.harness.stablecoinx.com
Most endpoints are POST with a JSON body (wallet sets, ranges, amounts) rather than GET with query params. Exact request/response shapes are in the OpenAPI: treasury-api.harness.stablecoinx.com/openapi.yaml.
Wallets
Section titled “Wallets”| Method | Path | Purpose |
|---|---|---|
POST | /v1/treasury/wallets | Register a wallet (idempotent; kicks a 90-day backfill for first-time addresses). |
POST | /v1/treasury/wallets/:address/refresh | Force an incremental sync now (bypasses the 60 s cooldown). |
GET | /v1/treasury/wallets/:address/sync-status | Onboarding / incremental sync progress. |
POST | /v1/treasury/aggregated | Aggregate snapshot across the supplied wallets. ETag-aware — pass If-None-Match to get 304 when unchanged. |
Dashboard
Section titled “Dashboard”| Method | Path | Purpose |
|---|---|---|
POST | /v1/dashboard/history | Historical balance / value series for the supplied wallets. |
POST | /v1/dashboard/pnl | Realized + unrealized PnL over a range. |
POST | /v1/dashboard/put-to-work | Live LI.FI quote to move idle stablecoins into a yield vault. |
POST | /v1/dashboard/cash-out | Quote / calldata to pull funds back from a position. |
POST | /v1/dashboard/redeem-direct | Vanilla ERC-4626 redeem(shares, receiver, owner) calldata. |
POST | /v1/dashboard/redeem-cooldown-start | Ethena two-phase exit, phase 1: cooldownShares(shares) calldata. |
POST | /v1/dashboard/redeem-cooldown-claim | Ethena two-phase exit, phase 2: unstake(receiver) calldata. |
GET | /v1/dashboard/redeem-cooldown-state | Live Ethena cooldown state for a wallet (null when RPC is down). |
GET | /v1/dashboard/config | Frontend bootstrap — supported chains, stablecoin list, floYSH deeplink + APY. |
The put-to-work / cash-out / redeem endpoints return calldata or quotes, not signed transactions — your wallet signs and submits. Yield routing is via the LI.FI Earn catalog (Aave, Morpho, Yearn, …); Ethena sUSDe uses the two-phase cooldown→unstake flow; floYSH is surfaced as a deeplink.
Related
Section titled “Related”- Treasury Dashboard — the operator-facing surface over these endpoints.
- L2 Bridge & Vault Compose — how cross-chain settlement into yield works.