# X-Rates API on SandBase

> X-Rates data API endpoints available through one SandBase API key.

Source: https://www.sandbase.ai/apis/x-rates

- Endpoints: 7
- Call: `POST https://api.sandbase.ai/v1/api/{vendor}/{endpoint}` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body
- Billing: pay per call from one SandBase balance; no provider account or subscription needed

## Endpoints

- [X-Rates 24H Percent Changes](https://www.sandbase.ai/apis/x-rates/24h-percent-changes.md): $0.03 per call
  Extracts the 'Percent Change in the Last 24 Hours' widget data for major currency pairs from the homepage. Returns ~8 major pairs with their percentage change and direction (up/down).
- [X-Rates Convert Currency](https://www.sandbase.ai/apis/x-rates/convert-currency.md): $0.03 per call
  Performs a currency conversion from one currency to another for a given amount. Returns the converted value and a text representation. Conversion uses the latest available rate.
- [X-Rates Current Rates Table](https://www.sandbase.ai/apis/x-rates/current-rates-table.md): $0.03 per call
  Fetches the current exchange rates table for a given base currency against all other supported currencies. Returns rate and inverse rate for each currency pair. The table includes ~50 currencies. Rate...
- [X-Rates Graph Data](https://www.sandbase.ai/apis/x-rates/graph-data.md): $0.03 per call
  Returns exchange rate trend data points for a currency pair for the current year, suitable for generating graphs. Each data point contains a month abbreviation label and that month's average rate valu...
- [X-Rates Historical Rates Table](https://www.sandbase.ai/apis/x-rates/historical-rates-table.md): $0.03 per call
  Fetches historical exchange rates for a base currency against all supported currencies on a specific date. The date must be in ISO YYYY-MM-DD format. Returns the same structure as the current rates ta...
- [X-Rates Monthly Average](https://www.sandbase.ai/apis/x-rates/monthly-average.md): $0.03 per call
  Retrieves monthly average exchange rates for a specific currency pair for a given year. Returns up to 12 monthly data points with the average rate and number of days in each month. Defaults to the cur...
- [X-Rates Supported Currencies](https://www.sandbase.ai/apis/x-rates/supported-currencies.md): $0.03 per call
  Retrieves the full list of supported currencies and their codes from x-rates.com. Returns approximately 54 currencies with their display names and ISO 4217 codes.

## Use it through SandBase

- Base URL: `https://api.sandbase.ai/v1`, with `Authorization: Bearer $SANDBASE_API_KEY`.
- Language models use the OpenAI-compatible `POST /v1/chat/completions`; media models use `POST /v1/run`; data APIs use `POST /v1/api/{vendor}/{endpoint}`.
- AI agents can connect through the SandBase MCP server or CLI: https://www.sandbase.ai/skill.md
- Every model and API page has a Markdown twin at the same URL plus `.md`. Full index: https://www.sandbase.ai/llms.txt
