Currency Exchange Rate API Documentation

Base URL: https://fx.ceyloncash.com

Endpoints

GET /

Provides definitions and example usage for each API endpoint.

Example: GET https://fx.ceyloncash.com/

GET /currency/{code}

Retrieves the latest exchange rate for the specified currency.

Parameters:

Example: GET https://fx.ceyloncash.com/currency/USD

Bitcoin Example: GET https://fx.ceyloncash.com/currency/BTC

Satoshi Example: GET https://fx.ceyloncash.com/currency/SATS

GET /currency/{code}/{date}

Retrieves the historical exchange rate for a specified currency on a specified date. Note: Bitcoin (BTC) and Satoshis (SATS) always return current price regardless of date.

Parameters:

Example: GET https://fx.ceyloncash.com/currency/USD/20241110

Bitcoin Example: GET https://fx.ceyloncash.com/currency/BTC/20241110

Satoshi Example: GET https://fx.ceyloncash.com/currency/SATS/20241110

GET /currencies

Retrieves the latest exchange rates for all currencies, including Bitcoin (BTC) and Satoshis (SATS).

Example: GET https://fx.ceyloncash.com/currencies

GET /refresh

Fetches the latest exchange rates from the external provider and caches them for the current date.

Example: GET https://fx.ceyloncash.com/refresh

Notes

Replace {code} with the currency code (e.g., USD, EUR), and {date} with the date in YYYYMMDD format.