CurrencyFreaks logo

CurrencyFreaks API

CurrencyFreaks API provides exchange rates of 1000+ currencies worldwide. This documentation provides complete details of the features and options available in this API.

Authorization

In order to use the API, you need to sign up. It does not require a credit card. The availability of endpoints and features depends on the subscription plan you have.

Once you've created your account successfully, you need to get your API key from our API dashboard. You can use this dashboard to upgrade or downgrade your plan and monitor your API usage. We strongly discourage the use of API key in client-side JavaScript, as it will expose your API key to the public.

JSON and XML Response Formats

All the endpoints of CurrencyFreaks API can respond in JSON and XML formats, JSON is the default response format.

Here is an example of JSON response:

bash

$ curl 'https://api.currencyfreaks.com/v2.0/rates/latest?apikey=YOUR_APIKEY'

{
  "date": "2026-08-25 12:43:00+00",
  "base": "USD",
  "rates": {
    "AGLD": "2.3263929277654998",
    "FJD": "2.21592",
    "MXN": "18.670707655673546",
    "LVL": "0.651918",
    "SCR": "13.21713243157135",
    "CDF": "2068.490771",
    "BBD": "2.0",
    "HNL": "24.57644632001569",
    .
    .
    .
  }
}
       

XML Format

You can get API response in XML format as follows:

  • Pass format=xml as a URL parameter.

Here is an example of XML response:

bash

$ curl 'https://api.currencyfreaks.com/v2.0/rates/latest?apikey=YOUR_APIKEY&format=xml'

<LatestRatesResponse>
    <date>2026-08-25 12:47:00+00</date>
    <base>USD</base>
    <rates>
        <AGLD>2.3150827642088205</AGLD>
        <FJD>2.2159199998194876</FJD>
        <MXN>18.668821666666666</MXN>
        <LVL>0.651985</LVL>
        <SCR>13.217309</SCR>
        <CDF>2068.359300493814</CDF>
        <BBD>2.0</BBD>
        <HNL>24.576748999999996</HNL>
        .
        <_1INCH>1.9102196752626552</_1INCH>
        .
        .
        .
    </rates>
</LatestRatesResponse>
       

If you don't set format in the URL parameter the API will respond in JSON format.

Note: In XML response, tags containing currency codes starting with integers will be preceded by an underscore "_"

Security / SSL

All API endpoints are served over HTTPS on every plan, including the free plan.

Rate & Requests Limits

We have hard limits on the number of requests for all paid and free plans. Once you reach the quota of the subscribed plan, we'll stop serving your requests. For free plan, we send one email notification when you reach your quota. For paid plans, we send three notification emails on 80%, 90% and 100% usage, respectively. Other than the above mentioned hard limit, we don't have any daily or hourly rate limits on any of our plans. You can consume all of your monthly/yearly quota in a single day. Please visit our pricing section for allowed requests limit in each plan.

Supported Currencies

This endpoint returns the complete information of all supported currencies by CurrencyFreaks API such as currency code, currency full name, currency icon. country code & country name. It doesn't require an apikey.
Note: If currency type is crypto and metal, its countryCode value will be "Crypto" and "Metal", respectively, and countryName value will be "Global".
Available on: all plans, including free
Endpoint:https://api.currencyfreaks.com/v2.0/supported-currencies

bash
$ curl 'https://api.currencyfreaks.com/v2.1/supported-currencies'

{
    "supportedCurrenciesMap": {
        "PKR": {
            "currencyCode": "PKR",
            "currencyName": "Pakistan Rupee",
            "countryCode": "PK",
            "countryName": "Pakistan",
            "status": "AVAILABLE",
            "availableFrom": "1985-10-02",
            "availableUntil": "2026-09-07",
            "icon": "https://currencyfreaks.com/photos/flags/pkr.png?v=0.1"
        },
        "BTC": {
            "currencyCode": "BTC",
            "currencyName": "Bitcoin",
            "countryCode": "Crypto",
            "countryName": "Global",
            "status": "AVAILABLE",
            "availableFrom": "2013-01-07",
            "availableUntil": "2026-09-07",
            "icon": "https://currencyfreaks.com/photos/flags/btc.png?v=0.1"
        },
        "XPT": {
            "currencyCode": "XPT",
            "currencyName": "Platinum",
            "countryCode": "Metal",
            "countryName": "Global",
            "status": "AVAILABLE",
            "availableFrom": "2020-09-02",
            "availableUntil": "2026-09-07",
            "icon": "https://currencyfreaks.com/photos/flags/xpt.png?v=0.1"
        },
        "GBX": {
            "currencyCode": "GBX",
            "currencyName": "Penny Sterling",
            "countryCode": "UK",
            "countryName": "United Kingdom",
            "status": "DEPRECATED",
            "availableFrom": "2021-04-05",
            "availableUntil": "2023-03-15",
            "icon": "https://currencyfreaks.com/photos/flags/gbx.png?v=0.1"
        },
        .
        .
        .
    }
}

Supported Currency Symbols

This endpoint returns the currency symbols (codes) and full names of all available currencies. It doesn't require an apikey.
Available on: all plans, including free
Endpoint:https://api.currencyfreaks.com/v2.0/currency-symbols

bash
$ curl 'https://api.currencyfreaks.com/v2.0/currency-symbols'

{
    "currencySymbols": {
        "AGLD": "Adventure Gold",
        "FJD": "Fiji Dollar",
        "MXN": "Mexican Peso",
        "SCR": "Seychellois Rupee",
        "CDF": "Congolese Franc",
        "BBD": "Barbadian Dollar",
        "HNL": "Honduran Lempira",
        "UGX": "Uganda Shilling",
        "PKR": "Pakistani Rupee",
        "EUR": "Euro",
        "GBP": "Pound Sterling",
        "CAD": "Canadian Dollar",
        "USD": "US Dollar",
        "ETH": "Ethereum",
        .
        .
        .
    }
}

Historical Data Limits

This endpoint returns the information of historical forex & crypto currencies data such as the date since the currency rate is available for a particular currency in CurrencyFreaks database.
Available on: all plans, including free
No API key required.
Endpoint:https://api.currencyfreaks.com/v2.0/historical-data-limits

bash
$ curl 'https://api.currencyfreaks.com/v2.0/historical-data-limits'

{
    "availabilityPeriod": {
        "AGLD": "2022-05-16 to 2026-08-25",
        "FJD": "1989-08-18 to 2026-08-25",
        "MXN": "1993-01-05 to 2026-08-25",
        "LVL": "2022-12-09 to 2026-08-25",
        "SCR": "1998-07-31 to 2026-08-25",
        "CDF": "2009-10-27 to 2026-08-25",
        "BBD": "1989-08-18 to 2026-08-25",
        "HNL": "1989-08-18 to 2026-08-25",
        "UGX": "1989-08-18 to 2026-08-25",
        "GLM": "2022-05-16 to 2026-08-25",
        "NEAR": "2022-08-31 to 2026-08-25",
        "AIOZ": "2022-05-16 to 2026-08-25",
        "AUDIO": "2023-01-25 to 2026-08-25",
        "FARM": "2022-05-16 to 2026-08-25",
        .
        .
        .
    }
}

HTTP Error Codes

CurrencyFreaks API returns 200 HTTP status in case of a successful request.

For error scenarios, CurrencyFreaks API returns 4xx HTTP code along with the error message .

Each error code and the message it returns:

HTTP CodeError Message
206Partial Response
404Required URL is not found. [Contact tech. support for assistance at [email protected]]
400Please provide API Key to use CurrencyFreaks API. To get an apikey for free, signup here https://currencyfreaks.com/signup.
401Provided API key is invalid. [Contact tech. support for assistance at [email protected]]
401Provided API key is inactive. [Contact tech. support for assistance at [email protected]]
429You have exceeded the limit of {ALLOWED_REQUESTS} requests for your subscribed plan {PLAN_NAME}. Please upgrade your plan to continue using our API without interruption
402This feature is available on {PLAN_NAME} plan and onwards!
400Invalid URL Parameters. [Contact tech. support for assistance at [email protected]]
400You have provided invalid parameters for this endpoint. [Contact tech. support for assistance at [email protected]]
400Invalid format (Available formats: json, xml). [Contact tech. support for assistance at [email protected]]
400Invalid Amount. Please provide amount in decimal format and greater than 0!
400From Currency is invalid. It cannot be empty or null!
400Provided Date {DATE} is in invalid format. It should be like YYYY-MM-DD!
400Provided Dates are in Invalid Format. Dates must be in a valid format YYYY-MM-DD!
404Rates of provided date {DATE} are not available in our database
400Starting date cannot be after current date or ending date.
404Rates of provided base and symbols are not found for given intervals.
400Provided IP Address {IP_ADDRESS} is invalid.
404Geolocation of provided IP {IP_ADDRESS} is unknown.
404Rates of provided currency {CURRENCY} are available from {AVAILABLE_FROM} to {AVAILABLE_UNTIL} in our database!
404Rates of provided currency {CURRENCY} are not available in our database!
404Rates of provided Symbols are not available in our database!

Every error uses the same JSON envelope. Here is a 401 returned for an invalid API key:

bash
$ curl 'https://api.currencyfreaks.com/v2.0/rates/latest?apikey=INVALID_KEY'

{
    "timestamp": 1788425488646,
    "status": 401,
    "error": "Invalid Api Access Exception",
    "message": "Provided API key is invalid. [Contact tech. support for assistance at [email protected]]",
    "path": "/v2.0/rates/latest"
}

The status field repeats the HTTP status code, error names the exception type, message carries the human-readable text from the table above, and path echoes the endpoint that was called. When writing error handling, branch on the HTTP status code or the status field and surface message to your logs.

Postman Collection

The official Postman collection contains a pre-built request for every endpoint, with variables for your API key, base currency, and symbols.

Fork it into your Postman workspace to run the requests against your own key:

The collection can also be read without forking: View the full Postman documentation.

API Endpoints:

Latest Currency Exchange Rates

This endpoint returns the latest exchange rates of all available currencies with USD as default base currency.
Available on: all plans, including free
Endpoint: https://api.currencyfreaks.com/v2.0/rates/latest?apikey=YOUR_APIKEY

bash
$ curl 'https://api.currencyfreaks.com/v2.0/rates/latest?apikey=YOUR_APIKEY'

{
  "date": "2026-08-25 12:43:00+00",
  "base": "USD",
  "rates": {
    "AGLD": "2.3263929277654998",
    "FJD": "2.21592",
    "MXN": "18.670707655673546",
    "LVL": "0.651918",
    "SCR": "13.21713243157135",
    "CDF": "2068.490771",
    "BBD": "2.0",
    "HNL": "24.57644632001569",
    .
    .
    .
  }
}

Get Rates of Desired Currencies Only

You can filter the API response by specifying the currency codes for which you want to retrieve the exchange rates instead of getting the full response. This will improve the API response time, since less data is retrieved. You can pass the required currency codes as comma-separated values of the query parameter “symbols” in the request.
Available on: all plans, including free
Endpoint:https://api.currencyfreaks.com/v2.0/rates/latest?apikey=YOUR_APIKEY&symbols={CURRENCYCODE},{CURRENCYCODE},...

bash
$ curl 'https://api.currencyfreaks.com/v2.0/rates/latest?apikey=YOUR_APIKEY&symbols=PKR,GBP,EUR,USD'

{
    "date": "2026-08-25 13:26:00+00",
    "base": "USD",
    "rates": {
        "EUR": "0.9278605451274349",
        "GBP": "0.8172754173817152",
        "PKR": "281.6212943333344",
        "USD": "1.0"
    }
}

Get Currency Rates By Changing Base Currency

You can change the base currency of any provided endpoint by passing the value of query parameter "base". Any supported currency code. Rates in the response are then expressed relative to it.

This feature is available on all paid subscription plans only.
Endpoint:https://api.currencyfreaks.com/v2.0/rates/latest?apikey=YOUR_APIKEY&symbols={CURRENCYCODE},{CURRENCYCODE},...&base={CURRENCYCODE}

bash
$ curl 'https://api.currencyfreaks.com/v2.0/rates/latest?apikey=YOUR_APIKEY&symbols=PKR,GBP,EUR,INR&base=EUR'

{
    "date": "2026-08-25 13:29:00+00",
    "base": "EUR",
    "rates": {
        "EUR": "1.0",
        "GBP": "0.8810222794437683",
        "PKR": "303.60317616075287",
        "USD": "1.0780547579946744"
    }
}

Get latest rates of all currencies by a specific base

Returns every supported currency, with rates expressed against the base you specify rather than USD. Omit symbols to get the full list.

Endpoint:https://api.currencyfreaks.com/v2.0/rates/latest?apikey=YOUR_APIKEY&base={CURRENCYCODE}

bash
$ curl 'https://api.currencyfreaks.com/v2.0/rates/latest?apikey=YOUR_APIKEY&base=EUR'
ParameterDescription
apikey [required]A unique key assigned to each account which used to authenticate with the API.
base [optional]Currency code to be set as base currency. (Default=USD)
symbols [optional]Currency codes of the desired currencies. Leaving it blank will pull rates for all of the currencies.

Example Codes for the Latest Currency Exchange Rates endpoint

shell
curl --location --request GET 'https://api.currencyfreaks.com/v2.0/rates/latest?apikey=YOUR_APIKEY&symbols=pkr,usd,cad,eur&base=gbp'
node.js
var unirest = require('unirest');
var request = require('request');
var options = {
  'method': 'GET',
  'url': 'https://api.currencyfreaks.com/v2.0/rates/latest?base=gbp&symbols=pkr,usd,cad,eur&apikey=YOUR_APIKEY',
  'headers': {
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
java
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://api.currencyfreaks.com/v2.0/rates/latest?base=gbp&symbols=pkr,usd,cad,eur&apikey=YOUR_APIKEY")
  .get()
  .build();
Response response = client.newCall(request).execute();
python
import http.client

conn = http.client.HTTPSConnection("api.currencyfreaks.com")
payload = ''
headers = {}
conn.request("GET", "/v2.0/rates/latest?base=gbp&symbols=pkr,usd,cad,eur&apikey=YOUR_APIKEY", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.currencyfreaks.com/v2.0/rates/latest?base=gbp&symbols=pkr,usd,cad,eur&apikey=YOUR_APIKEY',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
ruby
require "uri"
require "net/http"

url = URI("https://api.currencyfreaks.com/v2.0/rates/latest?base=gbp&symbols=pkr,usd,cad,eur&apikey=YOUR_APIKEY")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)

response = https.request(request)
puts response.read_body
var requestOptions = {
  method: 'GET',
  redirect: 'follow'
};

fetch("https://api.currencyfreaks.com/v2.0/rates/latest?base=gbp&symbols=pkr,usd,cad,eur&apikey=YOUR_APIKEY", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
var client = new RestClient("https://api.currencyfreaks.com/v2.0/rates/latest?base=gbp&symbols=pkr,usd,cad,eur&apikey=YOUR_APIKEY");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api.currencyfreaks.com/v2.0/rates/latest?base=gbp&symbols=pkr,usd,cad,eur&apikey=YOUR_APIKEY"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
    return
  }
  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
  curl_easy_setopt(curl, CURLOPT_URL, "https://api.currencyfreaks.com/v2.0/rates/latest?base=gbp&symbols=pkr,usd,cad,eur&apikey=YOUR_APIKEY");
  curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
  curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
  struct curl_slist *headers = NULL;
  curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
  res = curl_easy_perform(curl);
}
curl_easy_cleanup(curl);
swift
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif

var semaphore = DispatchSemaphore (value: 0)

var request = URLRequest(url: URL(string: "https://api.currencyfreaks.com/v2.0/rates/latest?base=gbp&symbols=pkr,usd,cad,eur&apikey=YOUR_APIKEY")!,timeoutInterval: Double.infinity)
request.httpMethod = "GET"

let task = URLSession.shared.dataTask(with: request) { data, response, error in
  guard let data = data else {
    print(String(describing: error))
    semaphore.signal()
    return
  }
  print(String(data: data, encoding: .utf8)!)
  semaphore.signal()
}

task.resume()
semaphore.wait()

Latest Rates Conversion Endpoint

This endpoint can convert any amount from one currency to another. To use this endpoint, provide the “from” and “to” currencies as query parameters.

Available on: paid plans only

Endpoint:https://api.currencyfreaks.com/v2.0/convert/latest?apikey=YOUR_APIKEY&from={CURRENCYCODE}&to={CURRENCYCODE}&amount={AMOUNT}

bash
$ curl 'https://api.currencyfreaks.com/v2.0/convert/latest?apikey=YOUR_APIKEY&from=USD&to=PKR&amount=500'

{
    "date": "2026-08-25 15:22:00+00",
    "from": "USD",
    "to": "PKR",
    "rate": "281.683",
    "givenAmount": "500.0",
    "convertedAmount": "140841.475"
}
ParameterDescription
apikey [required]A unique key assigned to each account used to authenticate with the API.
from [required]Currency code of the currency you would like to convert from.
to [required]Currency code of the currency you would like to convert to
amount [optional]The amount to be converted. (Default = 1.0)

Calling currency conversion endpoint

shell
curl --location --request GET 'https://api.currencyfreaks.com/v2.0/convert/latest?from=usd&to=pkr&amount=500&apikey=YOUR_APIKEY'
node.js
var request = require('request');
var options = {
  'method': 'GET',
  'url': 'https://api.currencyfreaks.com/v2.0/convert/latest?from=usd&to=pkr&amount=500&apikey=YOUR_APIKEY',
  'headers': {
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
java
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://api.currencyfreaks.com/v2.0/convert/latest?from=usd&to=pkr&amount=500&apikey=YOUR_APIKEY")
  .get()
  .build();
Response response = client.newCall(request).execute();
python
import http.client

conn = http.client.HTTPSConnection("api.currencyfreaks.com")
payload = ''
headers = {}
conn.request("GET", "/v2.0/convert/latest?from=usd&to=pkr&amount=500&apikey=YOUR_APIKEY", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.currencyfreaks.com/v2.0/convert/latest?from=usd&to=pkr&amount=500&apikey=YOUR_APIKEY',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
ruby
require "uri"
require "net/http"

url = URI("https://api.currencyfreaks.com/v2.0/convert/latest?from=usd&to=pkr&amount=500&apikey=YOUR_APIKEY")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)

response = https.request(request)
puts response.read_body
var requestOptions = {
  method: 'GET',
  redirect: 'follow'
};

fetch("https://api.currencyfreaks.com/v2.0/convert/latest?from=usd&to=pkr&amount=500&apikey=YOUR_APIKEY", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
var client = new RestClient("https://api.currencyfreaks.com/v2.0/convert/latest?from=usd&to=pkr&amount=500&apikey=YOUR_APIKEY");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api.currencyfreaks.com/v2.0/convert/latest?from=usd&to=pkr&amount=500&apikey=YOUR_APIKEY"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
    return
  }
  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
  curl_easy_setopt(curl, CURLOPT_URL, "https://api.currencyfreaks.com/v2.0/convert/latest?from=usd&to=pkr&amount=500&apikey=YOUR_APIKEY");
  curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
  curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
  struct curl_slist *headers = NULL;
  curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
  res = curl_easy_perform(curl);
}
curl_easy_cleanup(curl);

swift
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif

var semaphore = DispatchSemaphore (value: 0)

var request = URLRequest(url: URL(string: "https://api.currencyfreaks.com/v2.0/convert/latest?from=usd&to=pkr&amount=500&apikey=YOUR_APIKEY")!,timeoutInterval: Double.infinity)
request.httpMethod = "GET"

let task = URLSession.shared.dataTask(with: request) { data, response, error in
  guard let data = data else {
    print(String(describing: error))
    semaphore.signal()
    return
  }
  print(String(data: data, encoding: .utf8)!)
  semaphore.signal()
}

task.resume()
semaphore.wait()

Historical Exchange Rates Endpoint

Historical rates go back to 1984-11-28 for major fiat currencies. Coverage for newer currencies and crypto starts from each one’s own listing date, which the historical-data-limits endpoint returns per currency. You can query the CurrencyFreaks API for historical rates by passing a date (format YYYY-MM-DD) as a URL Parameter.

Available on: paid plans only

Endpoint:https://api.currencyfreaks.com/v2.0/rates/historical?apikey=YOUR_APIKEY&date={DATE}

bash

$ curl 'https://api.currencyfreaks.com/v2.0/rates/historical?apikey=YOUR_APIKEY&date=2026-08-20'

{
    "date": "2026-08-20",
    "base": "USD",
    "rates": {
        "FJD": "2.1176",
        "MATIC": "0.6832001093120175",
        "MXN": "20.385892",
        "STD": "21382.190504",
        "SCR": "14.408136",
        "CDF": "2005.74861",
        "BBD": "2.0",
        "HNL": "24.411536",
        "UGX": "3583.338449",
        "ZAR": "14.9602",
        "STN": "22.425165",
        .
        .
        .
    }
}
           
ParameterDescription
apikey [required]A unique key assigned to each account used to authenticate with the API.
date [required]A date in the past for which historical rates are required. (Format=YYYY-MM-DD)
base [optional]The Currency code of the base currency.
symbols [optional]List of comma-separated currency codes.

Example Codes for the Historical Currency Exchange Rates

shell
curl --location --request GET 'https://api.currencyfreaks.com/v2.0/rates/historical?date=2026-08-20&base=gbp&symbols=usd,eur,pkr,cad&apikey=YOUR_APIKEY'
node.js
var request = require('request');
var options = {
  'method': 'GET',
  'url': 'https://api.currencyfreaks.com/v2.0/rates/historical?date=2026-08-20&base=gbp&symbols=usd,eur,pkr,cad&apikey=YOUR_APIKEY',
  'headers': {
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

java
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://api.currencyfreaks.com/v2.0/rates/historical?date=2026-08-20&base=gbp&symbols=usd,eur,pkr,cad&apikey=YOUR_APIKEY")
  .get()
  .build();
Response response = client.newCall(request).execute();
python
import http.client

conn = http.client.HTTPSConnection("api.currencyfreaks.com")
payload = ''
headers = {}
conn.request("GET", "/v2.0/rates/historical?date=2026-08-20&base=gbp&symbols=usd,eur,pkr,cad&apikey=YOUR_APIKEY", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.currencyfreaks.com/v2.0/rates/historical?date=2026-08-20&base=gbp&symbols=usd,eur,pkr,cad&apikey=YOUR_APIKEY',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
ruby
require "uri"
require "net/http"

url = URI("https://api.currencyfreaks.com/v2.0/rates/historical?date=2026-08-20&base=gbp&symbols=usd,eur,pkr,cad&apikey=YOUR_APIKEY")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)

response = https.request(request)
puts response.read_body
var requestOptions = {
  method: 'GET',
  redirect: 'follow'
};

fetch("https://api.currencyfreaks.com/v2.0/rates/historical?date=2026-08-20&base=gbp&symbols=usd,eur,pkr,cad&apikey=YOUR_APIKEY", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
var client = new RestClient("https://api.currencyfreaks.com/v2.0/rates/historical?date=2026-08-20&base=gbp&symbols=usd,eur,pkr,cad&apikey=YOUR_APIKEY");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api.currencyfreaks.com/v2.0/rates/historical?date=2026-08-20&base=gbp&symbols=usd,eur,pkr,cad&apikey=YOUR_APIKEY"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
    return
  }
  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
  curl_easy_setopt(curl, CURLOPT_URL, "https://api.currencyfreaks.com/v2.0/rates/historical?date=2026-08-20&base=gbp&symbols=usd,eur,pkr,cad&apikey=YOUR_APIKEY");
  curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
  curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
  struct curl_slist *headers = NULL;
  curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
  res = curl_easy_perform(curl);
}
curl_easy_cleanup(curl);
swift
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif

var semaphore = DispatchSemaphore (value: 0)

var request = URLRequest(url: URL(string: "https://api.currencyfreaks.com/v2.0/rates/historical?date=2026-08-20&base=gbp&symbols=usd,eur,pkr,cad&apikey=YOUR_APIKEY")!,timeoutInterval: Double.infinity)
request.httpMethod = "GET"

let task = URLSession.shared.dataTask(with: request) { data, response, error in
  guard let data = data else {
    print(String(describing: error))
    semaphore.signal()
    return
  }
  print(String(data: data, encoding: .utf8)!)
  semaphore.signal()
}

task.resume()
semaphore.wait()

Time Series Endpoint

CurrencyFreaks API's time series endpoint lets you query the API for daily historical rates between two dates of your choice.

Available on: Professional plan and above

Endpoint:https://api.currencyfreaks.com/v2.0/timeseries?apikey=YOUR_APIKEY&startDate={DATE}&endDate={DATE}&base={CURRENCYCODE}&symbols={CURRENCYCODE},{CURRENCYCODE}

bash

$ curl 'https://api.currencyfreaks.com/v2.0/timeseries?apikey=YOUR_APIKEY&startDate=2026-07-01&endDate=2026-07-07&base=eur&symbols=pkr,usd'

{
    "startDate": "2026-07-01",
    "endDate": "2026-07-07",
    "base": "EUR",
    "historicalRatesList": [
        {
            "date": "2026-07-01",
            "rates": {
                "PKR": "210.58073648790247",
                "USD": "1.0651300000000001"
            }
        },
        {
            "date": "2026-07-02",
            "rates": {
                "PKR": "212.41441993262268",
                "USD": "1.07504"
            }
        },
        {
            "date": "2026-07-03",
            "rates": {
                "PKR": "211.80743999999882",
                "USD": "1.0719"
            }
        },
        {
            "date": "2026-07-04",
            "rates": {
                "PKR": "212.3705498572507",
                "USD": "1.0719"
            }
        },
        {
            "date": "2026-07-05",
            "rates": {
                "PKR": "212.49419555477172",
                "USD": "1.0725240781655547"
            }
        },
        {
            "date": "2026-07-06",
            "rates": {
                "PKR": "213.19503849443953",
                "USD": "1.06928999144568"
            }
        },
        {
            "date": "2026-07-07",
            "rates": {
                "PKR": "215.71624763798502",
                "USD": "1.0696700000000001"
            }
        }
    ]
}
           
ParameterDescription
apikey [required]A unique key assigned to each API account used to authenticate with the API.
startDate [required]The start date of your preferred time frame.
endDate [optional]The end date of your preferred time frame. (Default= Day before Current Date)
base [optional]the currency code which can set as base currency. (Default=USD)
symbols [optional]List of comma-separated currency codes.

Example Codes for the Time Series Currency Exchange Rates

shell
curl --location --request GET 'https://api.currencyfreaks.com/v2.0/timeseries?startDate=2026-07-01&endDate=2026-07-07&base=eur&symbols=pkr,usd,gbp,cad&apikey=YOUR_APIKEY'
node.js
var request = require('request');
var options = {
  'method': 'GET',
  'url': 'https://api.currencyfreaks.com/v2.0/timeseries?startDate=2026-07-01&endDate=2026-07-07&base=eur&symbols=pkr,usd,gbp,cad&apikey=YOUR_APIKEY',
  'headers': {
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
java
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://api.currencyfreaks.com/v2.0/timeseries?startDate=2026-07-01&endDate=2026-07-07&base=eur&symbols=pkr,usd,gbp,cad&apikey=YOUR_APIKEY")
  .get()
  .build();
Response response = client.newCall(request).execute();
python
import http.client

conn = http.client.HTTPSConnection("api.currencyfreaks.com")
payload = ''
headers = {}
conn.request("GET", "/v2.0/timeseries?startDate=2026-07-01&endDate=2026-07-07&base=eur&symbols=pkr,usd,gbp,cad&apikey=YOUR_APIKEY", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.currencyfreaks.com/v2.0/timeseries?startDate=2026-07-01&endDate=2026-07-07&base=eur&symbols=pkr,usd,gbp,cad&apikey=YOUR_APIKEY',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
ruby
require "uri"
require "net/http"

url = URI("https://api.currencyfreaks.com/v2.0/timeseries?startDate=2026-07-01&endDate=2026-07-07&base=eur&symbols=pkr,usd,gbp,cad&apikey=YOUR_APIKEY")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)

response = https.request(request)
puts response.read_body
var requestOptions = {
  method: 'GET',
  redirect: 'follow'
};

fetch("https://api.currencyfreaks.com/v2.0/timeseries?startDate=2026-07-01&endDate=2026-07-07&base=eur&symbols=pkr,usd,gbp,cad&apikey=YOUR_APIKEY", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
var client = new RestClient("https://api.currencyfreaks.com/v2.0/timeseries?startDate=2026-07-01&endDate=2026-07-07&base=eur&symbols=pkr,usd,gbp,cad&apikey=YOUR_APIKEY");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api.currencyfreaks.com/v2.0/timeseries?startDate=2026-07-01&endDate=2026-07-07&base=eur&symbols=pkr,usd,gbp,cad&apikey=YOUR_APIKEY"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
    return
  }
  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
  curl_easy_setopt(curl, CURLOPT_URL, "https://api.currencyfreaks.com/v2.0/timeseries?startDate=2026-07-01&endDate=2026-07-07&base=eur&symbols=pkr,usd,gbp,cad&apikey=YOUR_APIKEY");
  curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
  curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
  struct curl_slist *headers = NULL;
  curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
  res = curl_easy_perform(curl);
}
curl_easy_cleanup(curl);
swift
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif

var semaphore = DispatchSemaphore (value: 0)

var request = URLRequest(url: URL(string: "https://api.currencyfreaks.com/v2.0/timeseries?startDate=2026-07-01&endDate=2026-07-07&base=eur&symbols=pkr,usd,gbp,cad&apikey=YOUR_APIKEY")!,timeoutInterval: Double.infinity)
request.httpMethod = "GET"

let task = URLSession.shared.dataTask(with: request) { data, response, error in
  guard let data = data else {
    print(String(describing: error))
    semaphore.signal()
    return
  }
  print(String(data: data, encoding: .utf8)!)
  semaphore.signal()
}

task.resume()
semaphore.wait()

Fluctuation Endpoint

This endpoint provides information about how currencies fluctuate on a day-to-day basis. To use this feature, provide a “startDate” and “endDate” as the query parameter and choose which currencies (symbols) you would like to query.

Available on: Professional plan and above

Endpoint:https://api.currencyfreaks.com/v2.0/fluctuation?apikey=YOUR_APIKEY&startDate={DATE}&endDate={DATE}&symbols={CURRENCYCODE}&base={CURRENCYCODE}

bash

$ curl 'https://api.currencyfreaks.com/v2.0/fluctuation?apikey=YOUR_APIKEY&startDate=2026-06-01&endDate=2026-06-15&symbols=PKR&base=GBP'

{
    "startDate": "2026-06-01",
    "endDate": "2026-06-15",
    "base": "GBP",
    "rateFluctuations": {
        "PKR": {
            "startRate": "254.331",
            "endRate": "243.874",
            "change": "10.457",
            "percentChange": "4.11"
        }
    }
}
       
ParameterDescription
apikey [required]A unique key assigned to each API account used to authenticate with the API.
startDate [required]The start date of your preferred time frame.
endDate [optional]The end date of your preferred time frame. (Default= Day before Current Date)
base [optional]the currency code which can set as base currency. (Default=USD)
symbols [optional]List of comma-separated currency codes.

Example Codes for the Fluctuation Endpoint

shell
curl --location --request GET 'https://api.currencyfreaks.com/v2.0/fluctuation?startDate=2026-06-01&endDate=2026-06-15&symbols=pkr,eur,gbp,cad&base=usd&apikey=YOUR_APIKEY'
node.js
var request = require('request');
var options = {
  'method': 'GET',
  'url': 'https://api.currencyfreaks.com/v2.0/fluctuation?startDate=2026-06-01&endDate=2026-06-15&symbols=pkr,eur,gbp,cad&base=usd&apikey=YOUR_APIKEY',
  'headers': {
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
java
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://api.currencyfreaks.com/v2.0/fluctuation?startDate=2026-06-01&endDate=2026-06-15&symbols=pkr,eur,gbp,cad&base=usd&apikey=YOUR_APIKEY")
  .get()
  .build();
Response response = client.newCall(request).execute();
python
import http.client

conn = http.client.HTTPSConnection("api.currencyfreaks.com")
payload = ''
headers = {}
conn.request("GET", "/v2.0/fluctuation?startDate=2026-06-01&endDate=2026-06-15&symbols=pkr,eur,gbp,cad&base=usd&apikey=YOUR_APIKEY", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.currencyfreaks.com/v2.0/fluctuation?startDate=2026-06-01&endDate=2026-06-15&symbols=pkr,eur,gbp,cad&base=usd&apikey=YOUR_APIKEY',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
ruby
require "uri"
require "net/http"

url = URI("https://api.currencyfreaks.com/v2.0/fluctuation?startDate=2026-06-01&endDate=2026-06-15&symbols=pkr,eur,gbp,cad&base=usd&apikey=YOUR_APIKEY")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)

response = https.request(request)
puts response.read_body
var requestOptions = {
  method: 'GET',
  redirect: 'follow'
};

fetch("https://api.currencyfreaks.com/v2.0/fluctuation?startDate=2026-06-01&endDate=2026-06-15&symbols=pkr,eur,gbp,cad&base=usd&apikey=YOUR_APIKEY", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
var client = new RestClient("https://api.currencyfreaks.com/v2.0/fluctuation?startDate=2026-06-01&endDate=2026-06-15&symbols=pkr,eur,gbp,cad&base=usd&apikey=YOUR_APIKEY");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api.currencyfreaks.com/v2.0/fluctuation?startDate=2026-06-01&endDate=2026-06-15&symbols=pkr,eur,gbp,cad&base=usd&apikey=YOUR_APIKEY"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
    return
  }
  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
  curl_easy_setopt(curl, CURLOPT_URL, "https://api.currencyfreaks.com/v2.0/fluctuation?startDate=2026-06-01&endDate=2026-06-15&symbols=pkr,eur,gbp,cad&base=usd&apikey=YOUR_APIKEY");
  curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
  curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
  struct curl_slist *headers = NULL;
  curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
  res = curl_easy_perform(curl);
}
curl_easy_cleanup(curl);
swift
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif

var semaphore = DispatchSemaphore (value: 0)

var request = URLRequest(url: URL(string: "https://api.currencyfreaks.com/v2.0/fluctuation?startDate=2026-06-01&endDate=2026-06-15&symbols=pkr,eur,gbp,cad&base=usd&apikey=YOUR_APIKEY")!,timeoutInterval: Double.infinity)
request.httpMethod = "GET"

let task = URLSession.shared.dataTask(with: request) { data, response, error in
  guard let data = data else {
    print(String(describing: error))
    semaphore.signal()
    return
  }
  print(String(data: data, encoding: .utf8)!)
  semaphore.signal()
}

task.resume()
semaphore.wait()

Historical Currency Rates Conversion

This endpoint converts an amount using past currency rates. Pass the date, from and to currency codes as query parameters.

Available on: paid plans

Endpoint:https://api.currencyfreaks.com/v2.0/convert/historical?apikey=YOUR_APIKEY&date={DATE}&from={CURRENCYCODE}&to={CURRENCYCODE}&amount={AMOUNT}

bash
$ curl 'https://api.currencyfreaks.com/v2.0/convert/historical?apikey=YOUR_APIKEY&date=2026-08-15&from=USD&to=PKR&amount=500'

{
    "date": "2026-08-15",
    "from": "USD",
    "to": "PKR",
    "rate": "176.750",
    "givenAmount": "500.0",
    "convertedAmount": "88375.000"
}
ParameterDescription
apikey [required]A unique key assigned to each API account used to authenticate with the API.
date [required]A date in the past for which historical rates are requested. (Format=YYYY-MM-DD)
from [required]The Currency code of the currency you would like to convert from.
to [required]The Currency code of the currency you would like to convert to
amount [optional]The amount to be converted. (Default=1.0)

Example Codes for the Historical Currency Conversion

shell
curl --location --request GET 'https://api.currencyfreaks.com/v2.0/convert/historical?from=usd&to=pkr&amount=500&date=2026-08-15&apikey=YOUR_APIKEY'
node.js
var request = require('request');
var options = {
  'method': 'GET',
  'url': 'https://api.currencyfreaks.com/v2.0/convert/historical?from=usd&to=pkr&amount=500&date=2026-08-15&apikey=YOUR_APIKEY',
  'headers': {
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
java
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://api.currencyfreaks.com/v2.0/convert/historical?from=usd&to=pkr&amount=500&date=2026-08-15&apikey=YOUR_APIKEY")
  .get()
  .build();
Response response = client.newCall(request).execute();
python
import http.client

conn = http.client.HTTPSConnection("api.currencyfreaks.com")
payload = ''
headers = {}
conn.request("GET", "/v2.0/convert/historical?from=usd&to=pkr&amount=500&date=2026-08-15&apikey=YOUR_APIKEY", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.currencyfreaks.com/v2.0/convert/historical?from=usd&to=pkr&amount=500&date=2026-08-15&apikey=YOUR_APIKEY',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
ruby
require "uri"
require "net/http"

url = URI("https://api.currencyfreaks.com/v2.0/convert/historical?from=usd&to=pkr&amount=500&date=2026-08-15&apikey=YOUR_APIKEY")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)

response = https.request(request)
puts response.read_body
var requestOptions = {
  method: 'GET',
  redirect: 'follow'
};

fetch("https://api.currencyfreaks.com/v2.0/convert/historical?from=usd&to=pkr&amount=500&date=2026-08-15&apikey=YOUR_APIKEY", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
var client = new RestClient("https://api.currencyfreaks.com/v2.0/convert/historical?from=usd&to=pkr&amount=500&date=2026-08-15&apikey=YOUR_APIKEY");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api.currencyfreaks.com/v2.0/convert/historical?from=usd&to=pkr&amount=500&date=2026-08-15&apikey=YOUR_APIKEY"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
    return
  }
  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
  curl_easy_setopt(curl, CURLOPT_URL, "https://api.currencyfreaks.com/v2.0/convert/historical?from=usd&to=pkr&amount=500&date=2026-08-15&apikey=YOUR_APIKEY");
  curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
  curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
  struct curl_slist *headers = NULL;
  curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
  res = curl_easy_perform(curl);
}
curl_easy_cleanup(curl);
swift
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif

var semaphore = DispatchSemaphore (value: 0)

var request = URLRequest(url: URL(string: "https://api.currencyfreaks.com/v2.0/convert/historical?from=usd&to=pkr&amount=500&date=2026-08-15&apikey=YOUR_APIKEY")!,timeoutInterval: Double.infinity)
request.httpMethod = "GET"

let task = URLSession.shared.dataTask(with: request) { data, response, error in
  guard let data = data else {
    print(String(describing: error))
    semaphore.signal()
    return
  }
  print(String(data: data, encoding: .utf8)!)
  semaphore.signal()
}

task.resume()
semaphore.wait()

IP To Currency Conversion Endpoint

This endpoint provides the local currency exchange rates by the visitor’s IP address. The target currency is resolved from the IP address. Use this endpoint to display localized currency rates to website visitors without asking for their location. Both IPv4 and IPv6 addresses are supported.

Available on: Growth plan and above

Endpoint:https://api.currencyfreaks.com/v2.0/iptocurrency?apikey=YOUR_APIKEY&from={CURRENCYCODE}&ip={IPV4}&amount={AMOUNT}

bash

$ curl 'https://api.currencyfreaks.com/v2.0/iptocurrency?apikey=YOUR_APIKEY&from=GBP&ip=182.186.18.91&amount=500'

{
    "date": "2026-08-25 08:03:00+00",
    "from": "GBP",
    "to": "PKR",
    "rate": "346.232",
    "ipAddress": "182.186.18.9",
    "givenAmount": "500.0",
    "convertedAmount": "173115.892"
}
ParameterDescription
apikey [required]A unique key assigned to each API account used to authenticate with the API.
from [required]The currency code of the currency you would like to convert from.
ip [optional]An IPv4 or IPv6 IP address, conversion will be according to country location of provided IP address. If IP is not provided, the client IP address will be used.
amount [optional]The amount to be converted. (Default=1.0)
to (response field, not a parameter)There is no to parameter on this endpoint. The API resolves the target currency from the geolocation of the ip value and returns it as the to field in the response. In the example above the IP geolocates to Pakistan, so to is returned as PKR.

Example Codes for the IP To Currency Endpoint

shell
curl --location --request GET 'https://api.currencyfreaks.com/v2.0/iptocurrency?from=gbp&amount=500&ip=182.186.18.9&apikey=YOUR_APIKEY'
node.js
var request = require('request');
var options = {
  'method': 'GET',
  'url': 'https://api.currencyfreaks.com/v2.0/iptocurrency?from=gbp&amount=500&ip=182.186.18.9&apikey=YOUR_APIKEY',
  'headers': {
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
java
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://api.currencyfreaks.com/v2.0/iptocurrency?from=gbp&amount=500&ip=182.186.18.9&apikey=YOUR_APIKEY")
  .get()
  .build();
Response response = client.newCall(request).execute();
python
import http.client

conn = http.client.HTTPSConnection("api.currencyfreaks.com")
payload = ''
headers = {}
conn.request("GET", "/v2.0/iptocurrency?from=gbp&amount=500&ip=182.186.18.9&apikey=YOUR_APIKEY", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.currencyfreaks.com/v2.0/iptocurrency?from=gbp&amount=500&ip=182.186.18.9&apikey=YOUR_APIKEY',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

ruby
require "uri"
require "net/http"

url = URI("https://api.currencyfreaks.com/v2.0/iptocurrency?from=gbp&amount=500&ip=182.186.18.9&apikey=YOUR_APIKEY")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)

response = https.request(request)
puts response.read_body
var requestOptions = {
  method: 'GET',
  redirect: 'follow'
};

fetch("https://api.currencyfreaks.com/v2.0/iptocurrency?from=gbp&amount=500&ip=182.186.18.9&apikey=YOUR_APIKEY", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
var client = new RestClient("https://api.currencyfreaks.com/v2.0/iptocurrency?from=gbp&amount=500&ip=182.186.18.9&apikey=YOUR_APIKEY");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api.currencyfreaks.com/v2.0/iptocurrency?from=gbp&amount=500&ip=182.186.18.9&apikey=YOUR_APIKEY"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
    return
  }
  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
  curl_easy_setopt(curl, CURLOPT_URL, "https://api.currencyfreaks.com/v2.0/iptocurrency?from=gbp&amount=500&ip=182.186.18.9&apikey=YOUR_APIKEY");
  curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
  curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
  struct curl_slist *headers = NULL;
  curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
  res = curl_easy_perform(curl);
}
curl_easy_cleanup(curl);
swift
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif

var semaphore = DispatchSemaphore (value: 0)

var request = URLRequest(url: URL(string: "https://api.currencyfreaks.com/v2.0/iptocurrency?from=gbp&amount=500&ip=182.186.18.9&apikey=YOUR_APIKEY")!,timeoutInterval: Double.infinity)
request.httpMethod = "GET"

let task = URLSession.shared.dataTask(with: request) { data, response, error in
  guard let data = data else {
    print(String(describing: error))
    semaphore.signal()
    return
  }
  print(String(data: data, encoding: .utf8)!)
  semaphore.signal()
}

task.resume()
semaphore.wait()