### Get Live Rates Requests Source: https://forexrateapi.com/documentation Requests for real-time exchange rate data. The second example demonstrates the use of the math parameter to apply transformations to the rates. ```http https://api.forexrateapi.com/v1/latest ?api_key=[API_KEY] &base=USD ¤cies=EUR,JPY,INRCopy ``` ```http https://api.forexrateapi.com/v1/latest ?api_key=[API_KEY] &base=USD ¤cies=EUR,JPY,INR &math=multiply(value,1.005)Copy ``` -------------------------------- ### GET /v1/symbols Source: https://forexrateapi.com/documentation Retrieves a list of all supported currencies. ```APIDOC ## GET /v1/symbols ### Description Retrieves a list of all supported currencies. ### Method GET ### Endpoint https://api.forexrateapi.com/v1/symbols ### Parameters None ### Response #### Success Response (200) - **symbols** (object) - A dictionary of currency codes and their names. #### Response Example { "success": true, "symbols": { "USD": "United States Dollar", "EUR": "Euro" } } ``` -------------------------------- ### Hourly Rates API Request (timestamp form) Source: https://forexrateapi.com/documentation Example request using start and end UNIX timestamps for hour-precision queries. ```http https://api.forexrateapi.com/v1/hourly ?api_key=[API_KEY] &base=USD ¤cy=EUR &start=1762128000 &end=1762146000Copy ``` -------------------------------- ### GET /v1/latest Source: https://forexrateapi.com/documentation Retrieves real-time exchange rate data for all available or specific currencies. ```APIDOC ## GET /v1/latest ### Description Retrieves real-time exchange rate data for all available or specific currencies. ### Method GET ### Endpoint https://api.forexrateapi.com/v1/latest ### Parameters #### Query Parameters - **base** (string) - Optional - The base currency (default: USD). - **symbols** (string) - Optional - Comma-separated list of currencies to retrieve. ### Response #### Success Response (200) - **base** (string) - The base currency. - **date** (string) - The date of the rates. - **rates** (object) - A dictionary of currency codes and their exchange rates. #### Response Example { "success": true, "base": "USD", "date": "2025-01-01", "rates": { "EUR": 0.85, "GBP": 0.75 } } ``` -------------------------------- ### cURL Request for Minutely Rates Source: https://forexrateapi.com/documentation Example of how to perform a minutely rates request using the cURL command-line tool. ```bash curl "https://api.forexrateapi.com/v1/minutely?api_key=[API_KEY]&base=USD¤cy=EUR&start_date=2026-08-01&end_date=2026-08-01" ``` -------------------------------- ### GET /v1/change Source: https://forexrateapi.com/documentation Requests any currency change parameters (margin, percentage). ```APIDOC ## GET /v1/change ### Description Requests any currency change parameters (margin, percentage). n ### Method GET ### Endpoint https://api.forexrateapi.com/v1/change ### Parameters #### Query Parameters - **base** (string) - Required - The base currency (e.g., EUR). n- **start_date** (string) - Required - The start date (YYYY-MM-DD). n- **end_date** (string) - Required - The end date (YYYY-MM-DD). ### Response #### Success Response (200) - **base** (string) - The base currency. - **start_date** (string) - The start date. - **end_date** (string) - The end date. - **change** (object) - An object containing change parameters (margin, percentage). #### Response Example { "success": true, "base": "EUR", "start_date": "2021-01-01", "end_date": "2021-05-01", "change": { "margin": 0.05, "percentage": 5.0 } } ``` -------------------------------- ### GET /v1/usage Source: https://forexrateapi.com/documentation Checks your API usage and quota for the current month. ```APIDOC ## GET /v1/usage ### Description Checks your API usage and quota for the current month. ### Method GET ### Endpoint https://api.forexrateapi.com/v1/usage ### Parameters None ### Response #### Success Response (200) - **usage** (object) - An object containing usage details. #### Response Example { "success": true, "usage": { "requests": 100, "limit": 1000 } } ``` -------------------------------- ### Hourly Rates API Request (date form) Source: https://forexrateapi.com/documentation Example request using start_date and end_date parameters to specify the time range. ```http https://api.forexrateapi.com/v1/hourly ?api_key=[API_KEY] &base=USD ¤cy=EUR &start_date=2025-11-03 &end_date=2025-11-03Copy ``` -------------------------------- ### Currency Convert API Request Source: https://forexrateapi.com/documentation Example request to convert a specific amount from one currency to another. ```http https://api.forexrateapi.com/v1/convert ?api_key=[API_KEY] &from=USD &to=EUR &amount=100 &date=2021-04-23 ``` -------------------------------- ### GET /v1/latest Source: https://forexrateapi.com/documentation Retrieves the latest exchange rates for supported symbols. Requires an API key for authentication. ```APIDOC ## GET /v1/latest ### Description Retrieves the latest exchange rates for supported symbols. Requires an API key for authentication. ### Method GET ### Endpoint https://api.forexrateapi.com/v1/latest ### Parameters #### Query Parameters - **api_key** (string) - Required - Your API key for authentication. ### Request Example https://api.forexrateapi.com/v1/latest?api_key=API_KEY ### Response #### Success Response (200) - **rates** (object) - Exchange rates keyed by currency symbol. - **base** (string) - Base currency. - **date** (string) - Date of the rates. #### Response Example { "base": "USD", "date": "2023-01-01", "rates": { "EUR": 0.85, "GBP": 0.75 } } ``` -------------------------------- ### GET /v1/minutely Source: https://forexrateapi.com/documentation Retrieves Enterprise minute-level data for one currency over a time range. ```APIDOC ## GET /v1/minutely ### Description Retrieves Enterprise minute-level data for one currency over a time range. ### Method GET ### Endpoint https://api.forexrateapi.com/v1/minutely ### Parameters #### Query Parameters - **currency** (string) - Required - The currency code (e.g., EUR). - **start_date** (string) - Required - The start date (YYYY-MM-DD). - **end_date** (string) - Required - The end date (YYYY-MM-DD). n ### Response #### Success Response (200) - **base** (string) - The base currency. - **start_date** (string) - The start date. - **end_date** (string) - The end date. - **rates** (object) - A dictionary of timestamps and exchange rates. #### Response Example { "success": true, "base": "EUR", n "start_date": "2026-08-01", n "end_date": "2026-08-01", n "rates": { "2026-08-01T00:00:00Z": { "USD": 1.1 } } } ``` -------------------------------- ### Request Latest Rates via URL Source: https://forexrateapi.com/documentation Example of a basic request to the latest rates endpoint using an API key as a query parameter. ```http https://api.forexrateapi.com/v1/latest?api_key=[API_KEY] ``` -------------------------------- ### Currency Convert API Response Source: https://forexrateapi.com/documentation Example JSON response showing the conversion result and exchange rate information. ```json { "success": true, "query": { "from": "USD", "to": "EUR", "amount": 100 }, "info": { "quote": 0.82657397, "timestamp": 1619135999 }, "result": 82.65739676 } ``` -------------------------------- ### GET /v1/ohlc Source: https://forexrateapi.com/documentation Retrieves open, high, low, and close prices for a currency pair. ```APIDOC ## GET /v1/ohlc ### Description Retrieves open, high, low, and close prices for a currency pair. ### Method GET ### Endpoint https://api.forexrateapi.com/v1/ohlc ### Parameters #### Query Parameters - **base** (string) - Required - The base currency (e.g., EUR). n- **currency** (string) - Required - The quote currency (e.g., USD). - **date** (string) - Required - The date (YYYY-MM-DD). n ### Response #### Success Response (200) - **base** (string) - The base currency. - **currency** (string) - The quote currency. - **date** (string) - The date. - **ohlc** (object) - An object with open, high, low, close values. #### Response Example { "success": true, "base": "EUR", n "currency": "USD", n "date": "2025-01-28", n "ohlc": { "open": 1.1, "high": 1.2, "low": 1.0, "close": 1.15 } } ``` -------------------------------- ### GET /v1/latest Source: https://forexrateapi.com/documentation Returns real-time exchange rate data (delayed) depending on your subscription plan. Supports optional base currency, currency filtering, and math operations. ```APIDOC ## GET /v1/latest ### Description Returns real-time exchange rate data (delayed) depending on your subscription plan. Supports optional base currency, currency filtering, and math operations. ### Method GET ### Endpoint https://api.forexrateapi.com/v1/latest ### Parameters #### Query Parameters - **api_key** (string) - Required - Your API Key. - **base** (string) - Optional - Specify a base currency. Base Currency will default to USD if this parameter is not defined. - **currencies** (string) - Optional - Specify a comma-separated list of currency codes to limit API responses to specified currencies. If this parameter is not defined, the API will return all forex currencies. - **math** (string) - Optional - Specify math operators to perform on the result. Use **value** to refer to the rates. Specify one or more of the mathematical operators **add**, **subtract**, **multiply**, and/or **divide**. ### Request Example https://api.forexrateapi.com/v1/latest?api_key=[API_KEY]&base=USD¤cies=EUR,JPY,INR ### Response #### Success Response (200) - **success** (boolean) - Returns true or false depending if the API Request succeeded. If false, refer to API Errors. - **base** (string) - Returns base currency used for the request. - **timestamp** (integer) - Returns the UNIX timestamp the given exchange rates were collected. - **rates** (object) - Returns exchange rate data for the currencies requested. #### Response Example { "success": true, "base": "USD", "timestamp": 1672259320, "rates": { "EUR": 0.94215187, "INR": 82.86, "JPY": 134.413 } } ``` -------------------------------- ### API Request for Usage Source: https://forexrateapi.com/documentation A GET request to the usage endpoint requires the api_key parameter. ```http https://api.forexrateapi.com/v1/usage ?api_key=[API_KEY]Copy ``` -------------------------------- ### Timeframe API Request Source: https://forexrateapi.com/documentation Example request to retrieve historical rates for a specified time period. Free plans are limited to a 30-day window and a 5-day range. ```http https://api.forexrateapi.com/v1/timeframe ?api_key=[API_KEY] &start_date=2021-04-22 &end_date=2021-04-23 &base=USD ¤cies=EUR,JPY,INR ``` -------------------------------- ### GET /v1/convert Source: https://forexrateapi.com/documentation Converts one currency to another based on real-time or historic exchange rate data. ```APIDOC ## GET /v1/convert ### Description Converts one currency to another based on real-time or historic exchange rate data. ### Method GET ### Endpoint https://api.forexrateapi.com/v1/convert ### Parameters #### Query Parameters - **from** (string) - Required - The source currency code (e.g., USD). n- **to** (string) - Required - The target currency code (e.g., EUR). n- **amount** (number) - Required - The amount to convert. ### Response #### Success Response (200) - **from** (string) - The source currency. - **to** (string) - The target currency. - **amount** (number) - The amount converted. - **rate** (number) - The exchange rate used. - **result** (number) - The converted amount. #### Response Example { "success": true, "from": "USD", n "to": "EUR", n "amount": 100, "rate": 0.85, "result": 85 } ``` -------------------------------- ### GET /v1/ping Source: https://forexrateapi.com/documentation Tests latency for the API endpoint. ```APIDOC ## GET /v1/ping ### Description Tests latency for the API endpoint. ### Method GET ### Endpoint https://api.forexrateapi.com/v1/ping ### Parameters None ### Response #### Success Response (200) - **pong** (string) - A simple response indicating the server is reachable. #### Response Example { "success": true, "pong": "pong" } ``` -------------------------------- ### GET /v1/hourly Source: https://forexrateapi.com/documentation Retrieves hourly exchange rate data for a currency over a date range. ```APIDOC ## GET /v1/hourly ### Description Retrieves hourly exchange rate data for a currency over a date range. ### Method GET ### Endpoint https://api.forexrateapi.com/v1/hourly ### Parameters #### Query Parameters - **currency** (string) - Required - The currency code (e.g., EUR). - **start_date** (string) - Required - The start date (YYYY-MM-DD). - **end_date** (string) - Required - The end date (YYYY-MM-DD). n ### Response #### Success Response (200) - **base** (string) - The base currency. - **start_date** (string) - The start date. - **end_date** (string) - The end date. - **rates** (object) - A dictionary of timestamps and exchange rates. #### Response Example { "success": true, "base": "EUR", "start_date": "2025-11-03", "end_date": "2025-11-03", "rates": { "2025-11-03T00:00:00Z": { "USD": 1.1 } } } ``` -------------------------------- ### GET /v1/timeframe Source: https://forexrateapi.com/documentation Requests exchange rates for a specific period of time. ```APIDOC ## GET /v1/timeframe ### Description Requests exchange rates for a specific period of time. ### Method GET ### Endpoint https://api.forexrateapi.com/v1/timeframe ### Parameters #### Query Parameters - **start_date** (string) - Required - The start date (YYYY-MM-DD). n- **end_date** (string) - Required - The end date (YYYY-MM-DD). n ### Response #### Success Response (200) - **start_date** (string) - The start date. - **end_date** (string) - The end date. - **rates** (object) - A dictionary of dates and exchange rates. #### Response Example { "success": true, "start_date": "2021-01-01", n "end_date": "2021-05-01", n "rates": { "2021-01-01": { "USD": 1.1 } } } ``` -------------------------------- ### Supported Symbols API Response Source: https://forexrateapi.com/documentation Example JSON response containing the success status and a map of supported currency codes to their descriptions. ```json { "success": true, "symbols": { "AED": "UAE Dirham", "AFN": "Afghan Afghani", "ALL": "Albanian Lek", ... } } ``` -------------------------------- ### Live Rates API Response Source: https://forexrateapi.com/documentation Example JSON response for live rates, including the base currency, timestamp, and the requested exchange rates. ```json { "success": true, "base": "USD", "timestamp": 1672259320, "rates": { "EUR": 0.94215187, "INR": 82.86, "JPY": 134.413 } } ``` -------------------------------- ### OHLC API Request Source: https://forexrateapi.com/documentation Example request to retrieve OHLC data for a currency pair on a specific date. ```http https://api.forexrateapi.com/v1/ohlc ?api_key=[API_KEY] &base=EUR ¤cy=USD &date=2025-01-28 ``` -------------------------------- ### GET /v1/YYYY-MM-DD Source: https://forexrateapi.com/documentation Retrieves historical exchange rates for a specific day. ```APIDOC ## GET /v1/YYYY-MM-DD ### Description Retrieves historical exchange rates for a specific day. ### Method GET ### Endpoint https://api.forexrateapi.com/v1/YYYY-MM-DD ### Parameters #### Path Parameters - **YYYY-MM-DD** (string) - Required - The date for which historical rates are requested. ### Response #### Success Response (200) - **base** (string) - The base currency. - **date** (string) - The date of the rates. - **rates** (object) - A dictionary of currency codes and their exchange rates. #### Response Example { "success": true, "base": "USD", "date": "2025-01-01", "rates": { "EUR": 0.85, "GBP": 0.75 } } ``` -------------------------------- ### Regional API Endpoint Usage Source: https://forexrateapi.com/documentation Examples of how to authenticate requests using the US and EU regional endpoints. ```text // US endpoint https://api.forexrateapi.com/v1/latest?api_key=API_KEY // EU endpoint https://api-eu.forexrateapi.com/v1/latest?api_key=API_KEY ``` -------------------------------- ### GET /v1/{date} Source: https://forexrateapi.com/documentation Returns historical exchange rate data for a specified date. Use format YYYY-MM-DD or 'yesterday' for the base url. Free plans can query dates within the latest 30 days. ```APIDOC ## GET /v1/{date} ### Description Returns historical exchange rate data for a specified date. Use format YYYY-MM-DD or 'yesterday' for the base url. Free plans can query dates within the latest 30 days. ### Method GET ### Endpoint https://api.forexrateapi.com/v1/{date} ### Parameters #### Path Parameters - **date** (string) - Required - The date in YYYY-MM-DD format or 'yesterday'. #### Query Parameters - **api_key** (string) - Required - Your API Key. - **base** (string) - Optional - Specify a base currency. Base Currency will default to USD if this parameter is not defined. - **currencies** (string) - Optional - Specify a comma-separated list of currency codes to limit API responses to specified currencies. If this parameter is not defined, the API will return all supported currencies. ### Request Example https://api.forexrateapi.com/v1/2021-03-24?api_key=[API_KEY]&base=USD¤cies=EUR,JPY,INR ### Response #### Success Response (200) - **success** (boolean) - Returns true or false depending if the API Request succeeded. If false, refer to API Errors. - **base** (string) - Returns base currency used for the request. - **timestamp** (integer) - Returns the UNIX timestamp the given exchange rates were collected. - **rates** (object) - Returns exchange rate data for the currencies requested. #### Response Example { "success": true, "base": "USD", "timestamp": 1616543999, "rates": { "EUR": 0.84654595, "INR": 72.62723433, "JPY": 108.78333233 } } ``` -------------------------------- ### API Response Structure Source: https://forexrateapi.com/documentation The JSON response includes the base currency, target currency, start time, step interval, and an array of exchange rate values. ```json { "success": true, "base": "USD", "currency": "EUR", "start_date": "2026-08-01", "end_date": "2026-08-01", "start": 1785542400, "step": 60, "values": [ 0.8673340817, 0.8674424437, 0.8673747004, 0.8674409389, ... ] } ``` -------------------------------- ### GET /v1/convert Source: https://forexrateapi.com/documentation Converts any amount from one currency to another. Supports optional historical date for conversion using midpoint value. ```APIDOC ## GET /v1/convert ### Description Converts any amount from one currency to another. If a date is provided, it uses the historical midpoint value for conversion; otherwise, it uses the live exchange rate with delay based on subscription plan. ### Method GET ### Endpoint https://api.forexrateapi.com/v1/convert ### Parameters #### Query Parameters - **api_key** (string) - Required - Your API Key. - **from** (string) - Optional - Specify currency you would like to convert from. Defaults to USD if not defined. - **to** (string) - Required - Specify currency you would like to convert to. - **amount** (number) - Required - The amount to convert. - **date** (string) - Optional - Specify date to use historical midpoint value for conversion. Otherwise, it will use live exchange rate date with delay specified based on your subscription plan. ### Request Example https://api.forexrateapi.com/v1/convert?api_key=[API_KEY]&from=USD&to=EUR&amount=100&date=2021-04-23 ### Response #### Success Response (200) - **success** (boolean) - Returns true or false depending if the API Request succeeded. - **query -> from** (string) - Returns currency converted from used for the request. - **query -> to** (string) - Returns currency converted to used for the request. - **query -> amount** (number) - Returns amount to convert. - **info -> quote** (number) - Returns the exchange rate used for the conversion. - **info -> timestamp** (integer) - Returns the UNIX timestamp the given exchange rates were collected. - **result** (number) - Returns conversion result. #### Response Example { "success": true, "query": { "from": "USD", "to": "EUR", "amount": 100 }, "info": { "quote": 0.82657397, "timestamp": 1619135999 }, "result": 82.65739676 } ``` -------------------------------- ### GET /v1/symbols Source: https://forexrateapi.com/documentation Retrieves the list of supported currency symbols. Requests to this endpoint do not count towards the monthly API quota. ```APIDOC ## GET /v1/symbols ### Description Retrieves the list of supported currency symbols. Requests to this endpoint do not count towards the monthly API quota. ### Method GET ### Endpoint https://api.forexrateapi.com/v1/symbols ### Parameters #### Query Parameters - **api_key** (string) - Required - Your API Key. ### Request Example https://api.forexrateapi.com/v1/symbols?api_key=[API_KEY] ### Response #### Success Response (200) - **success** (boolean) - Returns true or false depending if the API Request succeeded. If false, refer to API Errors. - **symbols** (object) - Key is supported currency, value is description of currency. #### Response Example { "success": true, "symbols": { "AED": "UAE Dirham", "AFN": "Afghan Afghani", "ALL": "Albanian Lek", ... } } ``` -------------------------------- ### OHLC API Response Source: https://forexrateapi.com/documentation Example JSON response containing OHLC rate data for the requested currency pair. ```json { "success": true, "base": "EUR", "quote": "USD", "timestamp": 1738108799, "rate": { "close": 1.0445699991, "high": 1.0455924968, "low": 1.0414713908, "open": 1.0444518717 } } ``` -------------------------------- ### GET /v1/minutely Source: https://forexrateapi.com/documentation Retrieves minute-level exchange rate data for a single currency over a specified time range. The time range can be specified using either date strings (start_date/end_date) or UNIX timestamps (start/end), but not both. ```APIDOC ## GET /v1/minutely ### Description Returns minute-level exchange rate data for a single currency over a specified time range. Provides one data point per minute for intraday charting, backtesting, reconciliation, and market analysis. ### Method GET ### Endpoint https://api.forexrateapi.com/v1/minutely ### Parameters #### Query Parameters - **api_key** (string) - Required - Your API Key. - **base** (string) - Optional - Specify a base currency. Defaults to USD. - **currency** (string) - Required - Specify a single currency code. Multiple currencies are not supported. - **start_date** (string) - Optional - Specify the inclusive start date in YYYY-MM-DD format. Defaults to today. Cannot be combined with start/end. - **end_date** (string) - Optional - Specify the inclusive end date in YYYY-MM-DD format. Defaults to start_date. Cannot be combined with start/end. - **start** (integer) - Optional - Specify the inclusive start as a UNIX timestamp in seconds. Required when using the timestamp form, and rounded down to the nearest minute. Cannot be combined with date parameters. - **end** (integer) - Optional - Specify the exclusive end as a UNIX timestamp in seconds. Defaults to the current completed minute. Cannot be combined with date parameters. ### Request Example https://api.forexrateapi.com/v1/minutely?api_key=[API_KEY]&base=USD¤cy=EUR&start_date=2026-08-01&end_date=2026-08-01 ### Response #### Success Response (200) - **success** (boolean) - Returns true or false depending if the API request succeeded. If false, refer to API Errors. - **base** (string) - Returns the base currency used for the request. - **currency** (string) - Returns the single target currency requested. - **start_date** (string) - Returns the UTC start date of the minutely query. - **end_date** (string) - Returns the UTC end date of the minutely query. - **start** (integer) - Returns the UNIX timestamp for the first position in values. - **step** (integer) - Returns the number of seconds between values. Always 60. - **values** (array) - Returns one exchange rate per minute. #### Response Example { "success": true, "base": "USD", "currency": "EUR", "start_date": "2026-08-01", "end_date": "2026-08-01", "start": 1785542400, "step": 60, "values": [ 0.8673340817, 0.8674424437, 0.8673747004, 0.8674409389 ] } ``` -------------------------------- ### Get Supported Symbols Request Source: https://forexrateapi.com/documentation Retrieves the list of supported currency symbols. This request does not count towards the monthly API quota. ```http https://api.forexrateapi.com/v1/symbols ?api_key=[API_KEY]Copy ``` -------------------------------- ### GET /v1/usage Source: https://forexrateapi.com/documentation This endpoint is used to check your API usage and quota for the current month. Requests to this endpoint do not count towards your monthly API quota. ```APIDOC ## GET /v1/usage ### Description This endpoint is used to check your API usage and quota for the current month. Requests to this endpoint do not count towards your monthly API quota. ### Method GET ### Endpoint https://api.forexrateapi.com/v1/usage ### Parameters #### Query Parameters - **api_key** (string) - Required - Your API Key. ### Request Example https://api.forexrateapi.com/v1/usage?api_key=[API_KEY] ### Response #### Success Response (200) - **success** (boolean) - Returns true or false depending if the API Request succeeded. If false, refer to API Errors. - **plan** (string) - Returns your current plan. - **used** (integer) - Returns the number of requests used for the current month. - **total** (integer) - Returns your total quota for the current month. - **remaining** (integer) - Returns your remaining quota for the current month. #### Response Example { "success": true, "result": { "plan": "Business", "used": 12, "total": 100, "remaining": 88 } } ``` -------------------------------- ### Get Historical Rates Requests Source: https://forexrateapi.com/documentation Requests for historical exchange rate data using a specific date or the 'yesterday' keyword. ```http https://api.forexrateapi.com/v1/2021-03-24 ?api_key=[API_KEY] &base=USD ¤cies=EUR,JPY,INRCopy ``` ```http https://api.forexrateapi.com/v1/yesterday ?api_key=[API_KEY] &base=USD ¤cies=EUR,JPY,INRCopy ``` -------------------------------- ### Change API Request Source: https://forexrateapi.com/documentation Example request to calculate the percentage change of currency rates relative to a base currency. The date_type parameter can be used as an alternative to start_date and end_date. ```http https://api.forexrateapi.com/v1/change ?api_key=[API_KEY] &start_date=2021-04-22 &end_date=2021-04-23 &base=USD ¤cies=EUR ``` -------------------------------- ### Hourly Rates API Response Source: https://forexrateapi.com/documentation Example JSON response structure containing success status, base currency, date range, and hourly rate data points. ```json { "success": true, "base": "USD", "start_date": "2025-11-03", "end_date": "2025-11-03", "rates": [ { "timestamp": 1762128000, "rates": { "EUR": 0.867231394 } }, { "timestamp": 1762131600, "rates": { "EUR": 0.8675899465 } }, ... ] } ``` -------------------------------- ### GET /v1/change Source: https://forexrateapi.com/documentation Requests the change (percentage) of one or more currencies relative to a base currency with a specific time-frame (optional). Returns change values for the specified start_date and end_date. ```APIDOC ## [GET] /v1/change ### Description This endpoint is used to request the change (percentage) of one or more currencies, relative to a base currency with a specific time-frame (optional). The API will return change values of the specified start_date and end_date. ### Method GET ### Endpoint https://api.forexrateapi.com/v1/change ### Parameters #### Query Parameters - **api_key** (string) - Required - Your API Key. - **start_date** (string) - Required - Specify the start date of your timeframe. - **end_date** (string) - Required - Specify the end date of your timeframe. - **base** (string) - Optional - Specify a base currency. Base Currency will default to USD if this parameter is not defined. - **currencies** (string) - Optional - Specify a comma-separated list of currency codes to limit API responses to specified currencies. If this parameter is not defined, the API will return all supported currencies. - **date_type** (string) - Optional - Specify "recent", "yesterday", "week", "month", or "year" to retrieve the rate change for the corresponding time period. If provided, this parameter overrides "start_date" and "end_date". ### Request Example https://api.forexrateapi.com/v1/change?api_key=[API_KEY]&start_date=2021-04-22&end_date=2021-04-23&base=USD¤cies=EUR ### Response #### Success Response (200) - **success** (boolean) - Returns true or false depending if the API Request succeeded. If false, refer to API Errors. - **base** (string) - Returns base currency used for the request. - **start_date** (string) - Returns start date of your timeframe for the request. - **end_date** (string) - Returns end date of your timeframe for the request. - **rates** (object) - Returns exchange rate data for the currencies requested. - **start_rate** (number) - Returns exchange rate for the start date. - **end_rate** (number) - Returns exchange rate for the end date. - **change** (number) - Returns change (decimal number) of the given currency rate between the start and end date. - **change_pct** (number) - Returns percent change of the given currency rate between your start and end date. Formula used is ((end_rate - start_rate) / start_rate) * 100. #### Response Example { "success": true, "base": "USD", "start_date": "2021-04-20", "end_date": "2021-04-21", "rates": { "EUR": { "start_rate": 0.83233837, "end_rate": 0.82657397, "change": -0.0057644, "change_pct": -0.6926 } } } ``` -------------------------------- ### API Request using UNIX timestamps Source: https://forexrateapi.com/documentation Request minutely data using start and end UNIX timestamps. Do not mix these with date string parameters. ```http https://api.forexrateapi.com/v1/minutely ?api_key=[API_KEY] &base=USD ¤cy=EUR &start=1785542400 &end=1785546000Copy ``` -------------------------------- ### Historical Rates API Response Source: https://forexrateapi.com/documentation Example JSON response for historical exchange rates, providing the base currency, timestamp, and rates for the requested date. ```json { "success": true, "base": "USD", "timestamp": 1616543999, "rates": { "EUR": 0.84654595, "INR": 72.62723433, "JPY": 108.78333233 } } ``` -------------------------------- ### GET /v1/timeframe Source: https://forexrateapi.com/documentation Retrieves historical exchange rates for a specified time period (max range: 365 days). Free plans can query dates within the latest 30 days, with a range up to 5 days and one quote currency. ```APIDOC ## [GET] /v1/timeframe ### Description This endpoint is used to get historical rates for a specified time period (max range: 365 days). Free plans can query dates within the latest 30 days, with a range up to 5 days and one quote currency. Longer ranges, older stored dates, and multiple quote currencies require a paid plan. ### Method GET ### Endpoint https://api.forexrateapi.com/v1/timeframe ### Parameters #### Query Parameters - **api_key** (string) - Required - Your API Key. - **start_date** (string) - Required - Specify the start date of your timeframe. - **end_date** (string) - Required - Specify the end date of your timeframe. - **base** (string) - Optional - Specify a base currency. Base Currency will default to USD if this parameter is not defined. - **currencies** (string) - Optional - Specify a comma-separated list of currency codes to limit API responses to specified currencies. If this parameter is not defined, the API will return all supported currencies. ### Request Example https://api.forexrateapi.com/v1/timeframe?api_key=[API_KEY]&start_date=2021-04-22&end_date=2021-04-23&base=USD¤cies=EUR,JPY,INR ### Response #### Success Response (200) - **success** (boolean) - Returns true or false depending if the API Request succeeded. If false, refer to API Errors. - **base** (string) - Returns base currency used for the request. - **start_date** (string) - Returns start date of your timeframe for the request. - **end_date** (string) - Returns end date of your timeframe for the request. - **rates** (object) - Returns exchange rate data for the currencies requested. #### Response Example { "success": true, "base": "USD", "start_date": "2021-04-22", "end_date": "2021-04-23", "rates": { "2021-04-22": { "EUR": 0.83233837, "INR": 75.09793267, "JPY": 107.97997033 }, "2021-04-23": { "EUR": 0.82657397, "INR": 75.00244667, "JPY": 107.88867591 } } } ``` -------------------------------- ### GET /v1/hourly Source: https://forexrateapi.com/documentation Returns hourly exchange rate data for a single currency over a specified date range. Supports both date strings and UNIX timestamps for specifying the time range. ```APIDOC ## GET /v1/hourly ### Description Returns hourly exchange rate data for a given currency over a specified date range. Provides 24 data points per day, one for each hour. Only one currency is allowed per request. ### Method GET ### Endpoint https://api.forexrateapi.com/v1/hourly ### Parameters #### Query Parameters - **api_key** (string) - Required - Your API Key. - **base** (string) - Optional - Specify a base currency. Defaults to USD if not defined. - **currency** (string) - Required - Specify a single currency code. Only one currency is allowed per request. - **start_date** (string) - Optional - Start date in YYYY-MM-DD format. Defaults to today. Earliest available date is 2025-06-19. Cannot be combined with start/end. - **end_date** (string) - Optional - End date in YYYY-MM-DD format. Defaults to today. Cannot be combined with start/end. - **start** (integer) - Optional - Start as a UNIX timestamp (seconds since epoch). Cannot be combined with start_date/end_date/date_type. - **end** (integer) - Optional - End as a UNIX timestamp (seconds since epoch). Defaults to the current hour. Cannot be combined with start_date/end_date/date_type. - **date_type** (string) - Optional - (Paid plan) Specify "today", "yesterday", or "week" as a shortcut. Overrides start_date and end_date. - **math** (string) - Optional - (Paid plan) Specify math operators to perform on the result. Use value to refer to the rates. Specify one or more of add, subtract, multiply, and/or divide. ### Request Example https://api.forexrateapi.com/v1/hourly?api_key=[API_KEY]&base=USD¤cy=EUR&start_date=2025-11-03&end_date=2025-11-03 ### Response #### Success Response (200) - **success** (boolean) - Returns true or false depending if the API Request succeeded. - **base** (string) - Returns base currency used for the request. - **start_date** (string) - Returns start date of the hourly query. - **end_date** (string) - Returns end date of the hourly query. - **rates** (array) - Array of hourly data points. - **timestamp** (integer) - UNIX timestamp for the hourly data point. - **rates** (object) - Exchange rate data for the requested currency. #### Response Example { "success": true, "base": "USD", "start_date": "2025-11-03", "end_date": "2025-11-03", "rates": [ { "timestamp": 1762128000, "rates": { "EUR": 0.867231394 } }, { "timestamp": 1762131600, "rates": { "EUR": 0.8675899465 } } ] } ``` -------------------------------- ### API Error Response Format Source: https://forexrateapi.com/documentation Example of the JSON structure returned when an API query fails, including a 3-digit error code and descriptive info. ```json { "success": false, "error": { "code": 104, "info": "Your monthly usage limit has been reached. Please upgrade your subscription plan." } } ``` -------------------------------- ### GET /v1/ohlc Source: https://forexrateapi.com/documentation Retrieves open, high, low, and close prices for a given currency pair for a specified date. The OHLC data uses a 00:00 to 23:59:59 GMT trading day, with the previous day's data available at 00:05 AM GMT. ```APIDOC ## GET /v1/ohlc ### Description Returns open, high, low, and close prices for a given currency pair. OHLC data uses a 00:00 to 23:59:59 GMT trading day. The open price is captured at midnight GMT (00:00), and the close price is captured at 23:59:59 GMT. The previous day's OHLC data becomes available at 00:05 AM GMT. ### Method GET ### Endpoint https://api.forexrateapi.com/v1/ohlc ### Parameters #### Query Parameters - **api_key** (string) - Required - Your API Key. - **base** (string) - Optional - Specify a base currency. Defaults to USD if not defined. - **currency** (string) - Required - Specify a currency. - **date** (string) - Required - Specify a date in the format YYYY-MM-DD to get the OHLC for specified date. - **date_type** (string) - Optional (Paid plan) - Specify "yesterday", "week", "month", or "year" to retrieve the rate change for the corresponding time period. If provided, this parameter overrides "date". ### Request Example https://api.forexrateapi.com/v1/ohlc?api_key=[API_KEY]&base=EUR¤cy=USD&date=2025-01-28 ### Response #### Success Response (200) - **success** (boolean) - Returns true or false depending if the API Request succeeded. - **base** (string) - Returns base currency used for the request. - **quote** (string) - Returns quote currency used for the request. - **timestamp** (integer) - Returns the UNIX timestamp for the OHLC data. - **rate -> close** (number) - Returns close price for the specified date. - **rate -> high** (number) - Returns high price for the specified date. - **rate -> low** (number) - Returns low price for the specified date. - **rate -> open** (number) - Returns open price for the specified date. #### Response Example { "success": true, "base": "EUR", "quote": "USD", "timestamp": 1738108799, "rate": { "close": 1.0445699991, "high": 1.0455924968, "low": 1.0414713908, "open": 1.0444518717 } } ``` -------------------------------- ### Authenticate via Request Headers Source: https://forexrateapi.com/documentation Shows how to pass the API key using the X-API-KEY header in a cURL request. ```bash curl https://api.forexrateapi.com/v1/latest \ -H 'X-API-KEY: YOUR_API_KEY' \ -H 'Content-Type: application/json' ``` -------------------------------- ### API Response for Usage Source: https://forexrateapi.com/documentation The response returns the current plan, total quota, and remaining requests for the month. ```json { "success": true, "result": { "plan": "Business", "used": 12, "total": 100, "remaining": 88 } } ``` -------------------------------- ### Authenticate via Query Parameter Source: https://forexrateapi.com/documentation Shows the structure of a request URL with the API key appended as a query parameter. ```http https://api.forexrateapi.com/v1/latest?api_key=API_KEY ```