Tokens
Look up token addresses
Pass addresses to the token list to enrich portfolio holdings; unregistered tokens come back in missing.
Endpoint
The same list endpoint, given up to 50 token ids for one chain — such as the address values from a portfolio — returns logos and verification in one call. Every verification level is returned (unless you pass verification), so you can warn about flagged tokens a user holds. There is no paging in this mode.
Query
| Field | Required | Description |
|---|---|---|
| chainId | Yes | Gray3 chain ID |
| addresses | Yes | Comma-separated token ids (max 50) |
| verification | No | Optional filter; default is every level |
curl -sS "https://ledger.gray3.io/v1/tokens?chainId=ethereum&addresses=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0x1234567890abcdef1234567890abcdef12345678" \
-H "X-Gray-Project-Id: proj_your_project_id" \
-H "Authorization: Bearer gray_sk_your_secret"Response
HTTP 200 — success envelope wraps the payload in data.
{
"data": {
"items": [
{ "_id": "tok_…", "chainId": "ethereum", "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "symbol": "USDC", "verification": "verified", "…": "…" }
],
"missing": ["0x1234567890abcdef1234567890abcdef12345678"]
}
}Tokens not in the registry
missing lists the ids Gray has no registry entry for, for example a new or custom token. It still works everywhere else: balances, prices when available, transfers and webhooks. Show it with a generic icon and the symbol from the portfolio.
Token ids
Addresses are matched in the form the portfolio API returns. EVM addresses are lowercased. XRPL uses CURRENCY:issuer, Stellar CODE:issuer, Hedera 0.0.N, and Aptos/Sui the full coin type.
Errors
Errors use HTTP { "error": { "code", "message", "retryable" } }. Branch on code, not the message text.
| Code | HTTP | When |
|---|---|---|
| unauthorized | 401 | Missing or invalid project credentials |
| credits_exhausted | 402 | No credits left this billing period |
| invalid_argument | 400 | Unknown chainId, bad limit, cursor or verification, or more than 50 addresses |
| not_found | 404 | Unknown token id |
| rate_limit_exceeded | 429 | Throttle — retry with backoff (retryable) |
{
"error": {
"code": "unauthorized",
"message": "Human-readable detail (may be sanitized).",
"retryable": false
}
}