All API endpoints return JSON. All responses are utf-8 encoded.
GET /api/v1/scan?asset=CODE-ISSUER
Scans an asset and returns its capability report.
X-Assay-Undetermined: Set totruewhen a scan is degraded due to an upstream source outage (such as failure to reach StellarExpert). When present, the response body containsundetermined: trueandundetermined_checks, indicating that the source data was incomplete and the severity should be treated with caution.
200 OK: Successful scan (checkX-Assay-Undeterminedheader orundeterminedfield for source degradation).400 Bad Request: Invalid asset code or issuer, or missing?asset=parameter. Also returned for an identifier naming the network's native asset — see below.404 Not Found: Asset not found on the ledger.502 Bad Gateway: Scan failed due to an underlying network or upstream error.
The native asset (XLM) has no issuer account, so there are no authorization
flags to read and nothing to classify. An identifier that names it — native
or XLM, in any case, with no issuer half — is answered with
400 Bad Request and an explicit message, never a parse error and never a
report:
{ "error": "native asset has no issuer and no authorization flags: \"XLM\" cannot be scanned or attested" }It is refused by design: the native asset is never scanned and never attested,
so it stays exactly what integrating.md already uses it as —
a never-attested asset the on-chain gate refuses. GET /api/v1/history?asset=XLM
returns the same 400 and message. A credit asset whose code merely happens
to be XLM (XLM-G…) is an ordinary asset and scans normally.
GET /api/v1/exposure?account=G...&limit=10&cursor=0
Lists the trustlines an account holds and answers, per asset, with the asset's
issuer-level severity and its holder-trustline finding — the per-wallet form of
?holder= on the scan endpoint. There is no aggregate or portfolio score:
every asset carries its own severity and its own undetermined flag, and an
undetermined asset says nothing about any other asset on the page.
account(required): the holder'sG...address.limit(optional): page size, default10, clamped to a maximum of50. One page is up tolimitfull scans, which is why the bound exists.cursor(optional): index of the first trustline to return, for the next page.0starts; a cursor at or past the end returns an empty page.
account,total(trustlines on the account),limit(page size applied),count(assets in this page), andnext_cursor— absent on the last page.assets[]: per asset,asset(code/issuer),severity,undetermined,undetermined_checks, thefindingfrom the holder- trustline check, andreasonwhen that asset's scan failed outright (thefindingis then absent rather than rendered as a clear answer).
200 OK: Page returned. Individual assets may be undetermined — see each entry'sundeterminedfield; there is no header equivalent for a page.400 Bad Request: Missing or invalidaccount,limit, orcursor.404 Not Found: Account not found on the ledger.429 Too Many Requests: Rate limited.Retry-Aftergives the wait in seconds. Exposure is rate-limited per client address because one request runs a full scan per asset;/api/v1/scanis not affected.502 Bad Gateway: The account's trustline list could not be fetched.