Docs / Rates

Exchange rates

Returns a rate table from the European Central Bank, the Federal Reserve, or the Central Bank of Turkey.

GET/v1/rates
import { Client } from "@liveapiio/liveapi";

const client = new Client({ token: process.env.LIVEAPI_TOKEN });

const rates = await client.rates("tcmb");

Request

Send Authorization: Bearer YOUR_TOKEN. The token stays on your server. Each library reads it from the environment and calls this endpoint for you.

FieldTypeDescription
sourcestringecb, fed, or tcmb. Optional.
datestringCalendar day, YYYY-MM-DD. Optional.

Response

A 200 response uses one call. The table names its source, base currency, date, and one row per currency.

Errors

A failed request returns { "error": { "code", "message" } } and does not use a call.

StatusCodeWhen
400invalid_requestA required field is missing or has the wrong type.
503upstream_unavailableThe rate source is unavailable.
401unauthorizedThe bearer token is missing or not recognized.

We value your privacy

We use necessary cookies to run this website. With your consent, we would also like to use analytics and marketing cookies. Read our cookie policy.