CurrencyFreaks logoCurrencyFreaksPowered by APIFreaks
API Reference ยท v2.0

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.

Rate & Requests Limits

Each plan has a monthly or yearly request quota. We send three notification emails on 80%, 90% and 100% usage, respectively. On Starter, we stop serving your requests once you reach the quota. On Growth and Professional, requests after the quota are billed as overages, up to your plan's overage limit. Other than the plan quota, 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 page for the request and overage limits of 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
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
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
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 support@currencyfreaks.com]
400Please provide API Key to use CurrencyFreaks API. To get an API key, sign up here https://currencyfreaks.com/signup.
401Provided API key is invalid. [Contact tech. support for assistance at support@currencyfreaks.com]
401Provided API key is inactive. [Contact tech. support for assistance at support@currencyfreaks.com]
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 support@currencyfreaks.com]
400You have provided invalid parameters for this endpoint. [Contact tech. support for assistance at support@currencyfreaks.com]
400Invalid format (Available formats: json, xml). [Contact tech. support for assistance at support@currencyfreaks.com]
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 support@currencyfreaks.com]",
    "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:

Open Rates Endpoint

Open Rates is an endpoint with no API key that returns daily exchange rates blended from 127 central banks and official sources. Each source is converted to a common base, values far from the consensus of the other sources are left out, and the rest are averaged into one rate per currency per day. It needs no signup, no API key and no header, and it sends open CORS headers, so it can be called from the browser. See the Open Rates API page for more details.

Available to: everyone, no account needed
Update frequency: daily

Endpoint:https://open-rates.currencyfreaks.com/rates

bash
$ curl 'https://open-rates.currencyfreaks.com/rates?base=EUR&date=2026-01-15'

{
    "date": "2026-01-15",
    "base": "EUR",
    "rates": {
        "USD": 1.164,
        "GBP": 0.86646,
        .
        .
        .
    }
}
ParameterDescription
base [optional]Three letter currency code to use as the base currency. (Default=USD)
date [optional]A past date (Format=YYYY-MM-DD). Returns the newest published day on or before this date, so a weekend date returns the previous Friday. (Default=latest day)

Rates are returned as numbers, not strings. Errors return JSON with a message field: 400 for a bad or future date or a malformed base, and 404 when no rate exists for that base or day.

Example Codes for the Open Rates Endpoint

shell
curl --location --request GET 'https://open-rates.currencyfreaks.com/rates?base=EUR'
node.js
const res = await fetch("https://open-rates.currencyfreaks.com/rates?base=EUR");
const data = await res.json();

console.log(data.date, data.rates.USD);
python
import requests

data = requests.get(
    "https://open-rates.currencyfreaks.com/rates",
    params={"base": "EUR", "date": "2026-01-15"},
).json()

print(data["date"], data["rates"]["USD"])
php
<?php

$json = file_get_contents("https://open-rates.currencyfreaks.com/rates?base=EUR");
$data = json_decode($json, true);

echo $data["rates"]["USD"];
fetch("https://open-rates.currencyfreaks.com/rates?base=EUR")
  .then((response) => response.json())
  .then((data) => console.log(data.rates.USD))
  .catch((error) => console.log("error", error));

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
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
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;

Full walkthrough with error handling, caching and a Laravel service class: PHP & Laravel currency API integration.

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

Full walkthrough with HTTParty, a service object, Rails caching and background jobs: exchange rate API integration with Ruby on Rails.

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()

Average Rates Endpoint

This endpoint returns the average, minimum and maximum daily rate of each currency between two dates, grouped by month, quarter, year or the whole range. Each day is converted to the base currency before averaging. See the Average Exchange Rates API page for use cases.

Available on: Growth plan and above

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

bash

$ curl 'https://api.currencyfreaks.com/v2.0/average?apikey=YOUR_APIKEY&startDate=2026-09-01&endDate=2026-11-28&symbols=EUR,GBP&period=month'

{
    "startDate": "2026-09-01",
    "endDate": "2026-11-28",
    "base": "USD",
    "period": "month",
    "averageRatesList": [
        {
            "period": "2026-09",
            "startDate": "2026-09-01",
            "endDate": "2026-09-30",
            "days": 30,
            "rates": {
                "EUR": { "averageRate": "0.8689279666666666", "minRate": "0.85955", "maxRate": "0.882846", "days": 30 },
                "GBP": { "averageRate": "0.7457092666666667", "minRate": "0.738007", "maxRate": "0.756974", "days": 30 }
            }
        },
        {
            "period": "2026-10",
            "startDate": "2026-10-01",
            "endDate": "2026-10-31",
            "days": 31,
            "rates": {
                "EUR": { "averageRate": "0.892225806451613", "minRate": "0.888494", "maxRate": "0.898715", "days": 31 },
                "GBP": { "averageRate": "0.7519655483870967", "minRate": "0.746074", "maxRate": "0.757719", "days": 31 }
            }
        },
        {
            "period": "2026-11",
            "startDate": "2026-11-01",
            "endDate": "2026-11-28",
            "days": 28,
            "rates": {
                "EUR": { "averageRate": "0.9045621071428568", "minRate": "0.890036", "maxRate": "0.916758", "days": 28 },
                "GBP": { "averageRate": "0.7555625714285713", "minRate": "0.742005", "maxRate": "0.767283", "days": 28 }
            }
        }
    ]
}
ParameterDescription
apikey [required]A unique key assigned to each API account used to authenticate with the API.
startDate [required]First day of the range, YYYY-MM-DD. Cannot be after today or after endDate.
endDate [optional]Last day of the range, YYYY-MM-DD. (Default= Day before Current Date)
base [optional]The currency the rates are quoted in. Case-insensitive. (Default=USD)
symbols [optional]List of comma-separated currency codes, e.g. EUR,GBP,XAU. (Default= All currencies)
period [optional]How to group the days: month, quarter, year or total. Case-insensitive. (Default=month)
format [optional]json or xml. (Default=json)

Response Fields

FieldDescription
startDate, endDate, base, periodThe request as the server understood it, with defaults filled in.
averageRatesList[].periodPeriod label: 2026-01 (month), 2026-Q1 (quarter), 2026 (year) or total.
averageRatesList[].startDate, .endDateThe part of the requested range this period covers. The first and last periods can be partial.
averageRatesList[].daysDays with data in the period, taken from its longest-covered currency.
rates.{SYMBOL}.averageRateAverage of the daily rates in the period.
rates.{SYMBOL}.minRate, .maxRateLowest and highest daily rate in the period.
rates.{SYMBOL}.daysDays this currency had a rate in the period.

Notes

  • The range can be at most 5 years: 2021-01-01 to 2025-12-31 is accepted, 2021-01-01 to 2026-01-01 is rejected.
  • The status is 206 instead of 200 when a requested symbol is missing from any returned period. The body has the same shape.
  • Precious metals (XAU, XAG, XPT, XPD) are averaged from daily closing prices, so their days can be lower than the period's.
  • Rates are returned as strings, quoted as units of each symbol per 1 unit of base.
  • One request is charged per successful call. A call that fails after the key check is refunded.

XML Response

bash

$ curl 'https://api.currencyfreaks.com/v2.0/average?apikey=YOUR_APIKEY&startDate=2026-09-01&endDate=2026-11-28&symbols=EUR&period=quarter&format=xml'

<AverageRatesResponse>
    <startDate>2026-09-01</startDate>
    <endDate>2026-11-28</endDate>
    <base>USD</base>
    <period>quarter</period>
    <averageRatesList>
        <averageRatesListElement>
            <period>2026-Q3</period>
            <startDate>2026-09-01</startDate>
            <endDate>2026-09-30</endDate>
            <days>30</days>
            <rates>
                <EUR><averageRate>0.8689279666666667</averageRate><minRate>0.85955</minRate><maxRate>0.882846</maxRate><days>30</days></EUR>
            </rates>
        </averageRatesListElement>
        <averageRatesListElement>
            <period>2026-Q4</period>
            <startDate>2026-10-01</startDate>
            <endDate>2026-11-28</endDate>
            <days>59</days>
            <rates>
                <EUR><averageRate>0.8980803220338988</averageRate><minRate>0.888494</minRate><maxRate>0.916758</maxRate><days>59</days></EUR>
            </rates>
        </averageRatesListElement>
    </averageRatesList>
</AverageRatesResponse>

Errors

StatusWhenMessage
400startDate missingPlease provide Starting Date for Average.
400period is not one of the four valuesProvided period is invalid. Supported periods: month, quarter, year, total.
400A date is not YYYY-MM-DDProvided Dates are in Invalid Format. Dates must be in a valid format YYYY-MM-DD!
400startDate after today or after endDateStarting date cannot be after current date or ending date.
400Range of 5 years or moreYou can only retrieve average rates for a maximum interval of 5 Years
402The plan does not include the average featureThis feature is available on Growth plan and onwards!
404No data for the base and symbols in the rangeRates of provided base and symbols are not found for given intervals.

Example Codes for the Average Rates Endpoint

shell
curl --location --request GET 'https://api.currencyfreaks.com/v2.0/average?startDate=2026-09-01&endDate=2026-11-28&base=usd&symbols=eur,gbp,inr,jpy&period=month&apikey=YOUR_APIKEY'
node.js
var request = require('request');
var options = {
  'method': 'GET',
  'url': 'https://api.currencyfreaks.com/v2.0/average?startDate=2026-09-01&endDate=2026-11-28&base=usd&symbols=eur,gbp,inr,jpy&period=month&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/average?startDate=2026-09-01&endDate=2026-11-28&base=usd&symbols=eur,gbp,inr,jpy&period=month&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/average?startDate=2026-09-01&endDate=2026-11-28&base=usd&symbols=eur,gbp,inr,jpy&period=month&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/average?startDate=2026-09-01&endDate=2026-11-28&base=usd&symbols=eur,gbp,inr,jpy&period=month&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/average?startDate=2026-09-01&endDate=2026-11-28&base=usd&symbols=eur,gbp,inr,jpy&period=month&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/average?startDate=2026-09-01&endDate=2026-11-28&base=usd&symbols=eur,gbp,inr,jpy&period=month&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/average?startDate=2026-09-01&endDate=2026-11-28&base=usd&symbols=eur,gbp,inr,jpy&period=month&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"
)

func main() {

  url := "https://api.currencyfreaks.com/v2.0/average?startDate=2026-09-01&endDate=2026-11-28&base=usd&symbols=eur,gbp,inr,jpy&period=month&apikey=YOUR_APIKEY"

  res, err := http.Get(url)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := io.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/average?startDate=2026-09-01&endDate=2026-11-28&base=usd&symbols=eur,gbp,inr,jpy&period=month&apikey=YOUR_APIKEY");
  curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
  curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
  res = curl_easy_perform(curl);
}
curl_easy_cleanup(curl);

OHLC Endpoint

This endpoint returns the open, high, low and close rate of each currency for one finished day. A day runs from 00:01 UTC to 00:00 UTC of the next day, so close equals the historical rate of that date. See the OHLC Exchange Rates API page for use cases.

Available on: all paid plans (Starter and above)

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

bash

$ curl 'https://api.currencyfreaks.com/v2.0/ohlc?apikey=YOUR_APIKEY&date=2026-11-27&base=USD&symbols=EUR,GBP,INR'

{
    "date": "2026-11-27",
    "base": "USD",
    "rates": {
        "EUR": { "open": "0.911577", "high": "0.914788", "low": "0.910415", "close": "0.914495" },
        "GBP": { "open": "0.762951", "high": "0.763825", "low": "0.761093", "close": "0.763446" },
        "INR": { "open": "92.505", "high": "93.0025", "low": "92.4486", "close": "92.9322" }
    }
}
ParameterDescription
apikey [required]A unique key assigned to each API account used to authenticate with the API.
date [required]The day, YYYY-MM-DD. Must be a finished day from 2020-04-19 onward: today returns 404.
base [optional]The currency the rates are quoted in. Case-insensitive. (Default=USD)
symbols [optional]List of comma-separated currency codes, e.g. EUR,GBP,XAU. (Default= All currencies, in alphabetical order)
format [optional]json or xml. (Default=json)

Response Fields

FieldDescription
dateThe requested day.
baseThe base currency, upper-cased.
rates.{SYMBOL}.openFirst rate of the day.
rates.{SYMBOL}.highHighest rate of the day.
rates.{SYMBOL}.lowLowest rate of the day.
rates.{SYMBOL}.closeLast rate of the day.

Notes

  • With a non-USD base, open and close are exact. high and low are the widest possible bounds (high รท base low and low รท base high), because the minute of each extreme is not known.
  • The base currency itself, if requested as a symbol, returns 1.0 for all four values.
  • OHLC data starts on 2020-04-19. An earlier date, or one of the few older days without OHLC data, returns 404.
  • The status is 206 instead of 200 when some requested symbols have no data for the day. They are left out of rates.
  • Rates are returned as strings, quoted as units of each symbol per 1 unit of base.
  • One request is charged per successful call. A call that fails after the key check is refunded.

XML Response

bash

$ curl 'https://api.currencyfreaks.com/v2.0/ohlc?apikey=YOUR_APIKEY&date=2026-11-27&symbols=EUR,GBP&format=xml'

<OhlcRatesResponse>
    <date>2026-11-27</date>
    <base>USD</base>
    <rates>
        <EUR><open>0.911577</open><high>0.914788</high><low>0.910415</low><close>0.914495</close></EUR>
        <GBP><open>0.762951</open><high>0.763825</high><low>0.761093</low><close>0.763446</close></GBP>
    </rates>
</OhlcRatesResponse>

Errors

StatusWhenMessage
400date missingDate cannot be empty. Please provide date in the format YYYY-MM-DD.
400date is not YYYY-MM-DDProvided Date {DATE} is in invalid format. It should be like YYYY-MM-DD!
402The plan does not include the ohlc featureThis feature is available on Starter plan and onwards!
404No data for the day (including today), or for none of the symbolsOHLC rates of the provided date are not available in our database.
404The base has no data for the dayOHLC rates of provided currency {BASE} are not available for {DATE} in our database!

Example Codes for the OHLC Endpoint

shell
curl --location --request GET 'https://api.currencyfreaks.com/v2.0/ohlc?date=2026-11-27&base=usd&symbols=eur,gbp,inr,jpy&apikey=YOUR_APIKEY'
node.js
var request = require('request');
var options = {
  'method': 'GET',
  'url': 'https://api.currencyfreaks.com/v2.0/ohlc?date=2026-11-27&base=usd&symbols=eur,gbp,inr,jpy&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/ohlc?date=2026-11-27&base=usd&symbols=eur,gbp,inr,jpy&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/ohlc?date=2026-11-27&base=usd&symbols=eur,gbp,inr,jpy&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/ohlc?date=2026-11-27&base=usd&symbols=eur,gbp,inr,jpy&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/ohlc?date=2026-11-27&base=usd&symbols=eur,gbp,inr,jpy&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/ohlc?date=2026-11-27&base=usd&symbols=eur,gbp,inr,jpy&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/ohlc?date=2026-11-27&base=usd&symbols=eur,gbp,inr,jpy&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"
)

func main() {

  url := "https://api.currencyfreaks.com/v2.0/ohlc?date=2026-11-27&base=usd&symbols=eur,gbp,inr,jpy&apikey=YOUR_APIKEY"

  res, err := http.Get(url)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := io.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/ohlc?date=2026-11-27&base=usd&symbols=eur,gbp,inr,jpy&apikey=YOUR_APIKEY");
  curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
  curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
  res = curl_easy_perform(curl);
}
curl_easy_cleanup(curl);

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()