Skip to content

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.

MethodPathPurpose
POST/v1/treasury/walletsRegister a wallet (idempotent; kicks a 90-day backfill for first-time addresses).
POST/v1/treasury/wallets/:address/refreshForce an incremental sync now (bypasses the 60 s cooldown).
GET/v1/treasury/wallets/:address/sync-statusOnboarding / incremental sync progress.
POST/v1/treasury/aggregatedAggregate snapshot across the supplied wallets. ETag-aware — pass If-None-Match to get 304 when unchanged.
MethodPathPurpose
POST/v1/dashboard/historyHistorical balance / value series for the supplied wallets.
POST/v1/dashboard/pnlRealized + unrealized PnL over a range.
POST/v1/dashboard/put-to-workLive LI.FI quote to move idle stablecoins into a yield vault.
POST/v1/dashboard/cash-outQuote / calldata to pull funds back from a position.
POST/v1/dashboard/redeem-directVanilla ERC-4626 redeem(shares, receiver, owner) calldata.
POST/v1/dashboard/redeem-cooldown-startEthena two-phase exit, phase 1: cooldownShares(shares) calldata.
POST/v1/dashboard/redeem-cooldown-claimEthena two-phase exit, phase 2: unstake(receiver) calldata.
GET/v1/dashboard/redeem-cooldown-stateLive Ethena cooldown state for a wallet (null when RPC is down).
GET/v1/dashboard/configFrontend 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.