GET /v1/rates/{base}/{quote}
Reads the current stored direct exchange rate for a currency pair. This is the one REST endpoint for data access in this milestone.
Need this over MCP instead? See get_rate →.
Auth
Authorization: ApiKey <key> — required.
Missing, invalid, or revoked key → 401 unauthorized:
{ "code": "unauthorized", "message": "A valid API key is required.", "request_id": "..." }Path parameters
base,quote— trimmed, uppercased, must match^[A-Z0-9]{2,10}$.
Invalid format → 400 invalid_asset_symbol (checked before billing):
{ "code": "invalid_asset_symbol", "message": "Asset symbol format is invalid.", "request_id": "..." }Billing
Exactly one request unit is charged before the rate is read. If your
account’s quota is already exhausted, the response is 429 with extra
fields beyond the standard error envelope:
{
"code": "quota_exceeded",
"message": "Request-unit quota exceeded for the current billing period.",
"request_id": "...",
"limit": 500,
"remaining": 0,
"reset_at": "2026-11-01T00:00:00Z"
}Success — 200
curl https://your-getratesapi-host/v1/rates/EUR/USD \
-H "Authorization: ApiKey gra_live_0000000000000000000000000000000000000000000000000000000000000000"const res = await fetch("https://your-getratesapi-host/v1/rates/EUR/USD", {
headers: {
Authorization: "ApiKey gra_live_0000000000000000000000000000000000000000000000000000000000000000",
},
});
const rate = await res.json();{
"base": "EUR",
"quote": "USD",
"rate": "1.174582",
"as_of": "2026-09-29T11:41:32.241582Z",
"type": "direct"
}rateis an exact decimal string, never a JSON number.as_ofis RFC3339Nano UTC — the stored observation time, not the request time.typeis always"direct"today — there are no derived cross pairs in this milestone’s scope.
Other error outcomes
These happen after a successful charge — the unit is already consumed, with no refund:
| Status | Code | Message |
|---|---|---|
404 | unsupported_pair | “The requested currency pair is not currently supported.” |
503 | temporarily_unavailable | “The service is temporarily unable to serve this rate. Please retry.” |
Any method other than GET/HEAD on this path returns 405 method_not_allowed.