GET /api/markets returns the lending-market rates consumed by the lending and borrowing forms.
| Parameter | Required | Description |
|---|---|---|
asset |
No | Comma-separated asset symbols. Values are case-insensitive and normalized to the canonical symbols XLM, USDC, BTC, and ETH. Omit the parameter to request every supported market. |
Unknown symbols return 400 with a list of supported assets.
Successful responses use this shape:
{
"markets": [
{
"asset": "XLM",
"supplyApr": 8.5,
"borrowApr": 12,
"utilization": 0.71,
"totalSupply": 2500000,
"totalBorrow": 1775000
}
],
"timestamp": "2026-06-21T12:00:00.000Z",
"source": "Soroban RPC stub (server relay)"
}supplyApr and borrowApr are annual percentage rates. utilization is a decimal from 0 to 1.
Public requests are cached for 30 seconds with 60 seconds of stale-while-revalidate support:
Cache-Control: public, max-age=30, stale-while-revalidate=60Requests with an Authorization header, session or token cookie, or x-user-id header bypass shared caching and return:
Cache-Control: no-store, no-cache, must-revalidate, proxy-revalidate
X-Cache: BYPASSThe borrowing form consumes borrowApr from this endpoint and uses the local fallback rates only when the request is loading, fails, or returns no usable market entry for the selected asset. The live rate is surfaced in the UI with a subtle "rates as of … • live" status indicator when it is available.