Skip to content

Developers

API reference

FXbase serves validated foreign-exchange rates over HTTPS: the latest rates, conversions, any past day and daily time series, as plain JSON.

Version 1.0.0REST · JSONBearer API keys

On this page

Quickstart

  1. Create an API key

    Sign in to the FXbase console and create a key under API keys. Keys start with centy_live_, and new accounts start on the free Developer plan.

  2. Keep it on your server

    Anyone with your key can spend your quota. Store it in the environment or a secrets manager and call the API from your backend; it does not accept cross-origin browser calls.

    Shell
    export FXBASE_API_KEY="centy_live_..."
  3. Make your first request

    Coming soonThe TypeScript and Python tabs use the official SDKs, which are not published yet. Until then, call the API with cURL or any HTTP client.

    curl "https://api.fxbase.dev/v1/latest?base=USD&symbols=EUR,INR" \
      -H "Authorization: Bearer $FXBASE_API_KEY"

Authentication

Send your key in the Authorization header of every request, as a Bearer token. A missing, revoked or wrong key gets 401 Unauthorized.

Header
Authorization: Bearer $FXBASE_API_KEY

Base URL

Every endpoint lives under /v1 on this host. Requests are HTTPS GETs and answers are JSON.

Base URL
https://api.fxbase.dev

Endpoints

Currency codes are ISO 4217, upper case (USD). Dates are UTC days, YYYY-MM-DD. Rates are units of each code per one unit of base.

List currencies

GET/v1/currencies

Every currency code the API knows.

Parameters

This endpoint takes no parameters.

Request

Coming soonThe TypeScript and Python tabs use the official SDKs, which are not published yet. Until then, call the API with cURL or any HTTP client.

curl "https://api.fxbase.dev/v1/currencies" \
  -H "Authorization: Bearer $FXBASE_API_KEY"

Response

200 OK · application/json
{
  "version": 4,
  "currencies": [
    "AUD",
    "CAD",
    "CHF",
    "EUR",
    "GBP",
    "INR",
    "JPY",
    "USD"
  ]
}

Response fields

versioninteger
Currency index version.
currenciesstring[]
ISO 4217 codes.
Status codes200400401403429500503
  • 200 OKEvery currency code the API knows.
  • 400 Bad RequestInvalid input (invalid_request, with fields), an unknown currency code (unknown_currency), a date out of range (invalid_date) or a bad range (invalid_range).
  • 401 UnauthorizedMissing or invalid API key or app token (unauthorized).
  • 403 ForbiddenThe key may not make this call: its plan (plan_required), or its scope, IP or referrer rules (forbidden).
  • 429 Too Many RequestsPer-minute rate limit (rate_limited) or monthly quota (quota_exceeded) exceeded.
  • 500 Internal Server ErrorUnexpected server error (internal_error); quote requestId to support.
  • 503 Service UnavailableThe service is temporarily unavailable; retry with backoff.

Latest rates

GET/v1/latest

The latest rates per one base unit.

Parameters

basestring · queryOptional
ISO 4217 code the rates are quoted per one unit of.Default USDPattern ^[A-Z]{3}$
symbolsstring · queryOptional
Comma-separated codes to quote, 1 to 200; omitted, every known code but base.Pattern ^[A-Z]{3}(?:,[A-Z]{3})*$At most 2,048 characters

Request

Coming soonThe TypeScript and Python tabs use the official SDKs, which are not published yet. Until then, call the API with cURL or any HTTP client.

curl "https://api.fxbase.dev/v1/latest?base=USD&symbols=EUR,INR" \
  -H "Authorization: Bearer $FXBASE_API_KEY"

Response

200 OK · application/json
{
  "base": "USD",
  "date": "2026-11-18",
  "timestamp": "2026-11-18T16:00:04Z",
  "source": "daily",
  "rates": {
    "EUR": 0.91126,
    "INR": 88.6215
  },
  "tier": "developer"
}

Response fields

basestring
datestring (date)
The rates' UTC day.
timestampstring (date-time)
When the rates were fetched (ISO 8601, UTC).
source"live" | "hourly" | "daily"
live: intraday rates, refreshed every few minutes (Growth and Enterprise plans; Gold app installs); hourly: the intraday rates frozen at the top of each UTC hour (Startup plan, which gets live until the first snapshot lands); daily: the day's published rates (Developer plan).
ratesmap of number
Units of each code per one base unit.
tier"gold" | "free" | "developer" | "startup" | "growth" | "enterprise" | "internal"
The caller's plan. An API key: its FXbase plan (developer, startup, growth, enterprise), or internal for an s10n service key. An app install: gold or free.
Status codes200400401403404429500503
  • 200 OKThe latest rates per one base unit.
  • 400 Bad RequestInvalid input (invalid_request, with fields), an unknown currency code (unknown_currency), a date out of range (invalid_date) or a bad range (invalid_range).
  • 401 UnauthorizedMissing or invalid API key or app token (unauthorized).
  • 403 ForbiddenThe key may not make this call: its plan (plan_required), or its scope, IP or referrer rules (forbidden).
  • 404 Not FoundNo rates for that request (no_rates).
  • 429 Too Many RequestsPer-minute rate limit (rate_limited) or monthly quota (quota_exceeded) exceeded.
  • 500 Internal Server ErrorUnexpected server error (internal_error); quote requestId to support.
  • 503 Service UnavailableThe service is temporarily unavailable; retry with backoff.

Convert an amount

GET/v1/convert

An amount converted at the latest rate.

Parameters

fromstring · queryRequired
ISO 4217 code to convert from.Pattern ^[A-Z]{3}$
tostring · queryRequired
ISO 4217 code to convert to.Pattern ^[A-Z]{3}$
amountnumber · queryRequired
Amount of from, above 0 and at most 1000000000000000.Greater than 0At most 1,000,000,000,000,000

Request

Coming soonThe TypeScript and Python tabs use the official SDKs, which are not published yet. Until then, call the API with cURL or any HTTP client.

curl "https://api.fxbase.dev/v1/convert?from=USD&to=EUR&amount=100" \
  -H "Authorization: Bearer $FXBASE_API_KEY"

Response

200 OK · application/json
{
  "from": "USD",
  "to": "EUR",
  "amount": 100,
  "rate": 0.91126,
  "result": 91.126,
  "date": "2026-11-18",
  "timestamp": "2026-11-18T16:00:04Z",
  "source": "daily",
  "tier": "developer"
}

Response fields

fromstring
tostring
amountnumber
ratenumber
Units of to per one from.
resultnumber
amount × rate.
datestring (date)
The rates' UTC day.
timestampstring (date-time)
When the rates were fetched (ISO 8601, UTC).
source"live" | "hourly" | "daily"
live: intraday rates, refreshed every few minutes (Growth and Enterprise plans; Gold app installs); hourly: the intraday rates frozen at the top of each UTC hour (Startup plan, which gets live until the first snapshot lands); daily: the day's published rates (Developer plan).
tier"gold" | "free" | "developer" | "startup" | "growth" | "enterprise" | "internal"
The caller's plan. An API key: its FXbase plan (developer, startup, growth, enterprise), or internal for an s10n service key. An app install: gold or free.
Status codes200400401403404429500503
  • 200 OKAn amount converted at the latest rate.
  • 400 Bad RequestInvalid input (invalid_request, with fields), an unknown currency code (unknown_currency), a date out of range (invalid_date) or a bad range (invalid_range).
  • 401 UnauthorizedMissing or invalid API key or app token (unauthorized).
  • 403 ForbiddenThe key may not make this call: its plan (plan_required), or its scope, IP or referrer rules (forbidden).
  • 404 Not FoundNo rates for that request (no_rates).
  • 429 Too Many RequestsPer-minute rate limit (rate_limited) or monthly quota (quota_exceeded) exceeded.
  • 500 Internal Server ErrorUnexpected server error (internal_error); quote requestId to support.
  • 503 Service UnavailableThe service is temporarily unavailable; retry with backoff.

Rates of one date

GET/v1/historical/{date}

The daily rates of one date.

Needs a paid plan. Your plan sets how far back you can go.

Parameters

datestring (date) · pathRequired
A UTC calendar day, YYYY-MM-DD, from 1999-01-01 to today.
basestring · queryOptional
ISO 4217 code the rates are quoted per one unit of.Default USDPattern ^[A-Z]{3}$
symbolsstring · queryOptional
Comma-separated codes to quote, 1 to 200; omitted, every known code but base.Pattern ^[A-Z]{3}(?:,[A-Z]{3})*$At most 2,048 characters

Request

Coming soonThe TypeScript and Python tabs use the official SDKs, which are not published yet. Until then, call the API with cURL or any HTTP client.

curl "https://api.fxbase.dev/v1/historical/2026-11-11?base=USD&symbols=EUR,INR" \
  -H "Authorization: Bearer $FXBASE_API_KEY"

Response

200 OK · application/json
{
  "base": "USD",
  "date": "2026-11-11",
  "timestamp": "2026-11-11T16:00:03Z",
  "source": "daily",
  "rates": {
    "EUR": 0.90874,
    "INR": 88.4102
  }
}

Response fields

basestring
datestring (date)
The rates' UTC day.
timestampstring (date-time)
When the rates were fetched (ISO 8601, UTC).
source"live" | "hourly" | "daily"
live: intraday rates, refreshed every few minutes (Growth and Enterprise plans; Gold app installs); hourly: the intraday rates frozen at the top of each UTC hour (Startup plan, which gets live until the first snapshot lands); daily: the day's published rates (Developer plan).
ratesmap of number
Units of each code per one base unit.
Status codes200400401403404429500503
  • 200 OKThe daily rates of one date.
  • 400 Bad RequestInvalid input (invalid_request, with fields), an unknown currency code (unknown_currency), a date out of range (invalid_date) or a bad range (invalid_range).
  • 401 UnauthorizedMissing or invalid API key or app token (unauthorized).
  • 403 ForbiddenThe key may not make this call: its plan (plan_required), or its scope, IP or referrer rules (forbidden).
  • 404 Not FoundNo rates for that request (no_rates).
  • 429 Too Many RequestsPer-minute rate limit (rate_limited) or monthly quota (quota_exceeded) exceeded.
  • 500 Internal Server ErrorUnexpected server error (internal_error); quote requestId to support.
  • 503 Service UnavailableThe service is temporarily unavailable; retry with backoff.

Daily rates over a range

GET/v1/timeseries

Daily rates per date, oldest first.

Needs a paid plan. A range covers at most 366 days.

Parameters

basestring · queryOptional
ISO 4217 code the rates are quoted per one unit of.Default USDPattern ^[A-Z]{3}$
symbolsstring · queryRequired
Comma-separated codes to quote, 1 to 10.Pattern ^[A-Z]{3}(?:,[A-Z]{3})*$At most 2,048 characters
startstring (date) · queryRequired
First day of the range.
endstring (date) · queryOptional
Last day of the range, default today; at most 366 days after start.

Request

Coming soonThe TypeScript and Python tabs use the official SDKs, which are not published yet. Until then, call the API with cURL or any HTTP client.

curl "https://api.fxbase.dev/v1/timeseries?base=USD&symbols=EUR,INR&start=2026-11-02&end=2026-11-04" \
  -H "Authorization: Bearer $FXBASE_API_KEY"

Response

200 OK · application/json
{
  "base": "USD",
  "start": "2026-11-02",
  "end": "2026-11-04",
  "rates": {
    "2026-11-02": {
      "EUR": 0.90519,
      "INR": 88.2954
    },
    "2026-11-03": {
      "EUR": 0.90642,
      "INR": 88.3317
    },
    "2026-11-04": {
      "EUR": 0.90711,
      "INR": 88.3876
    }
  }
}

Response fields

basestring
startstring (date)
endstring (date)
ratesmap of map of number
Rates by UTC day, oldest first; days with no quote are absent.
Status codes200400401403404429500503
  • 200 OKDaily rates per date, oldest first.
  • 400 Bad RequestInvalid input (invalid_request, with fields), an unknown currency code (unknown_currency), a date out of range (invalid_date) or a bad range (invalid_range).
  • 401 UnauthorizedMissing or invalid API key or app token (unauthorized).
  • 403 ForbiddenThe key may not make this call: its plan (plan_required), or its scope, IP or referrer rules (forbidden).
  • 404 Not FoundNo rates for that request (no_rates).
  • 429 Too Many RequestsPer-minute rate limit (rate_limited) or monthly quota (quota_exceeded) exceeded.
  • 500 Internal Server ErrorUnexpected server error (internal_error); quote requestId to support.
  • 503 Service UnavailableThe service is temporarily unavailable; retry with backoff.

Data freshness

GET/v1/status

How fresh the daily rates are.

Parameters

This endpoint takes no parameters.

Request

Coming soonThe TypeScript and Python tabs use the official SDKs, which are not published yet. Until then, call the API with cURL or any HTTP client.

curl "https://api.fxbase.dev/v1/status" \
  -H "Authorization: Bearer $FXBASE_API_KEY"

Response

200 OK · application/json
{
  "date": "2026-11-18",
  "timestamp": "2026-11-18T16:00:04Z",
  "stale": false
}

Response fields

datestring (date)
The latest day with rates.
timestampstring (date-time)
When the rates were fetched (ISO 8601, UTC).
staleboolean
True when the latest day is more than 2 days old.
Status codes200400401403429500503
  • 200 OKHow fresh the daily rates are.
  • 400 Bad RequestInvalid input (invalid_request, with fields), an unknown currency code (unknown_currency), a date out of range (invalid_date) or a bad range (invalid_range).
  • 401 UnauthorizedMissing or invalid API key or app token (unauthorized).
  • 403 ForbiddenThe key may not make this call: its plan (plan_required), or its scope, IP or referrer rules (forbidden).
  • 429 Too Many RequestsPer-minute rate limit (rate_limited) or monthly quota (quota_exceeded) exceeded.
  • 500 Internal Server ErrorUnexpected server error (internal_error); quote requestId to support.
  • 503 Service UnavailableNo rates have been ingested (no_rates).

Errors

Errors are RFC 9457 problem details, sent as application/problem+json. Branch on code, which is stable; detail is for people.

429 Too Many Requests · application/problem+json
{
  "type": "about:blank",
  "title": "Too Many Requests",
  "status": 429,
  "detail": "Rate limit exceeded; retry after 12 seconds.",
  "code": "rate_limited",
  "requestId": "3f2b8c1e-6d4a-4f0b-9a7e-2c5d1e8f9a01"
}

Fields

typestring
A URI for the problem type. FXbase sends about:blank; branch on code instead.
titlestring
The HTTP status in words, such as Too Many Requests.
statusinteger
The HTTP status code, repeated in the body.
detailstring
A human-readable explanation of this occurrence. Show it in logs, not to end users.
codestring
A stable, machine-readable error code. Branch on this.
requestIdstring
The ID of this request, also sent as the x-request-id header. Quote it when you contact support.
fieldsstring[]Optional
Dotted paths of invalid inputs (invalid_request only).

Status codes

  • 400 Bad RequestInvalid input (invalid_request, with fields), an unknown currency code (unknown_currency), a date out of range (invalid_date) or a bad range (invalid_range).Codesinvalid_requestunknown_currencyinvalid_dateinvalid_range
  • 401 UnauthorizedMissing or invalid API key or app token (unauthorized).Codesunauthorized
  • 403 ForbiddenThe key may not make this call: its plan (plan_required), or its scope, IP or referrer rules (forbidden).Codesplan_requiredforbidden
  • 404 Not FoundNo rates for that request (no_rates).Codesno_rates
  • 429 Too Many RequestsPer-minute rate limit (rate_limited) or monthly quota (quota_exceeded) exceeded.Codesrate_limitedquota_exceeded
  • 500 Internal Server ErrorUnexpected server error (internal_error); quote requestId to support.Codesinternal_error
  • 503 Service UnavailableThe service is temporarily unavailable; retry with backoff.No rates have been ingested (no_rates).Codesno_rates

Retry a 429 after its Retry-After, and a 500, 502, 503 or 504 with exponential backoff. Fix the request before retrying any other 4xx. Stuck? Email support@s10n.app with the requestId.

Rate limits and quotas

Each key has a per-minute rate limit and a monthly request quota, both set by its plan. Every answer says how much budget is left, and a request over either limit gets 429 Too Many Requests with code rate_limited or quota_exceeded. Track usage in the console.

Retry-After
Seconds to wait: until the per-minute window frees up (rate_limited), or until the monthly quota resets at the start of the next UTC month (quota_exceeded).
RateLimit
Remaining budget, e.g. "rates";r=59;t=60; a spent monthly quota is "quota";r=0;t=<seconds to reset>.
RateLimit-Policy
The budget, e.g. "rates";q=60;w=60.
Response headers
RateLimit: "rates";r=59;t=60
RateLimit-Policy: "rates";q=60;w=60

q is the budget per window of w seconds, r what remains, and t the seconds until it resets.

Caching

Rates change at most a few times a day, so cache them. Every success carries an ETag; send it back in If-None-Match and an unchanged answer is a 304 Not Modified with no body.

ETag
Send it back as If-None-Match; an unchanged answer is 304 with no body.
Cache-Control
private, max-age=300.
Conditional request
curl "https://api.fxbase.dev/v1/latest?base=USD&symbols=EUR,INR" \
  -H "Authorization: Bearer $FXBASE_API_KEY" \
  -H 'If-None-Match: "<etag from the last answer>"'

SDKs

Official clients for TypeScript and Python are on the way, with typed responses, typed errors, retries that honour Retry-After, and an optional ETag cache. Until they are published, call the API with any HTTP client.

  • TypeScript and JavaScript

    Coming soon

    Node.js 18+, Deno, Bun and edge runtimes. No runtime dependencies, ESM and CommonJS.

    Coming soon to npm.

  • Python

    Coming soon

    Python 3.9+. Sync and asyncio clients on httpx, with typed responses.

    Coming soon to PyPI.