Appearance
GET /v1/tokens
Purpose
Returns all configured tokens sorted by id.
When to Call
- On app startup.
- When refreshing token catalog metadata.
Request
- Method:
GET - Path:
/v1/tokens - Query params: none (query params are ignored)
Response
200 OK returns an array of token objects:
json
[
{
"id": 0,
"instrumentId": "Amulet",
"name": "Canton",
"symbol": "CC",
"decimals": 10,
"iconUrl": "https://www.canton.network/hubfs/favicon.png",
"usdPrice": "0.1477",
"isVerified": true,
"instrumentAdmin": "DSO::1220..."
}
]Token fields:
id: numberinstrumentId: stringname: stringsymbol: stringdecimals: numbericonUrl: stringusdPrice: stringisVerified: booleaninstrumentAdmin: string
Errors
429 Too Many Requestswhen rate limit is exceeded.
Integration Notes
- Cache this response and reuse it for quote form validation.
- Use both
instrumentIdandinstrumentAdminfrom this endpoint when calling/v1/quote. - Default IP policy for
/v1/tokensis 30 requests per 60 seconds. - Need higher limits? Reach out on Discord.
Examples
bash
curl "https://api.hermes.ag/v1/tokens"ts
const response = await fetch('https://api.hermes.ag/v1/tokens');
const payload = await response.json();
if (!response.ok) {
throw new Error(JSON.stringify(payload));
}
const tokens = Array.isArray(payload) ? payload : [];