Skip to main content
GET
/
accounts
/
{external_id}
/
folio
Get Folio
curl --request GET \
  --url https://api.example.com/accounts/{external_id}/folio

Get Folio

Returns the sub-account’s portfolio, including wallet balances and DeFi positions across all networks.

Request

GET /accounts/:external_id/folio
GET /accounts/:external_id/folio?cached=true

Path parameters

ParameterTypeDescription
external_idstringThe sub-account’s external ID

Query parameters

ParameterTypeDefaultDescription
cachedbooleanfalseIf true, return the most recent cached folio instead of computing a fresh one. Faster but may be slightly stale.

Examples

curl https://prime-api.legend.xyz/accounts/acc_2o0yiljtp378/folio \
  -H "Authorization: Bearer $LEGEND_QUERY_KEY"
Response
{
  "folio": {
    ...
  }
}
A fresh folio requires reading on-chain state across multiple networks. This can take 10-30 seconds. Use cached=true when you need a fast response and can tolerate slightly stale data.

Errors

StatusCodeDescription
404account_not_foundAccount doesn’t exist
408timeoutFolio computation timed out (try cached=true)