API Documentation
ExConvert provides a fast, simple & easy-to-integrate API for foreign currency exchange rate data, plus real-time pricing for 300+ cryptocurrencies.
We deliver lightning-quick JSON replies over HTTPS. Use any HTTP client or browser to call APIs.
Getting Started
API Access Key & Authentication
After creating a exconvert account, the account dashboard will reveal the unique API access key you can use to authenticate with the API. To do so, simply attach the access_key
parameter to the APIs base URL and set it to your API access key.
https://api.exconvert.com/currencies ? access_key = YOUR_ACCESS_KEY
Secure your key: To prevent unauthorized access to your exconvert account, please make sure to store your API access key in a secure location and never include it in any public scripts or files.
256-bit HTTPS Encryption
Customers subscribed to the Basic Plan or higher may connect to the exconvert API using industry-standard 256-bit HTTPS (SSL) encryption by appending an s
to the HTTP protocol. Please find an illustration below.
Example API Request:
https://api.exconvert.com/currencies
Physical & Crypto
GET/fetchOne
Fetch a single currency exchange rate, from and to any supported physical or digital currency. Below you will find an example request used to fetch from GBP
to USD
.
Example API Request:
https://api.exconvert.com/fetchOne ? access_key = YOUR_ACCESS_KEY & from = GBP & to = USD
Request Parameters:
Object | Description |
---|---|
access_key |
[Required] Specify your unique API access key to authenticate with the API. Your API access key can be found in your account dashboard. |
from |
[Required] Base currency symbol (physical or digital). |
to |
[Required] Target currency symbol (physical or digital). |
GET/fetchMulti
Fetch multi currency exchange rate, from and to any supported physical or digital currency. Below you will find an example request used to fetch from GBP
to USD, EUR
and AUD
.
Example API Request:
https://api.exconvert.com/fetchMulti ? access_key = YOUR_ACCESS_KEY & from = GBP & to = USD,EUR,AUD
Request Parameters:
Object | Description |
---|---|
access_key |
[Required] Specify your unique API access key to authenticate with the API. Your API access key can be found in your account dashboard. |
from |
[Required] Base currency symbol (physical or digital). |
to |
[Required] Target multi currencies symbol (physical or digital or mix). |
GET/convert
Convert an amount of one currency into another currency (supports physical and digital currencies). Below you will find an example request used to convert 10 GBP
to AUD
.
Example API Request:
https://api.exconvert.com/convert ? access_key = YOUR_ACCESS_KEY & from = GBP & to = AUD & amount = 10
Request Parameters:
Object | Description |
---|---|
access_key |
[Required] Specify your unique API access key to authenticate with the API. Your API access key can be found in your account dashboard. |
from |
[Required] Base currency symbol (physical or digital). |
to |
[Required] Target multi currencies symbol (physical or digital). |
amount |
[Required] Amount of source currency to convert. |
Physical Currencies
GET/fetchAll
Fetch all available currency rates. Below you will find an example request used from GBP
to all available currencies.
Example API Request:
https://api.exconvert.com/fetchAll ? access_key = YOUR_ACCESS_KEY & from = GBP
Request Parameters:
Object | Description |
---|---|
access_key |
[Required] Specify your unique API access key to authenticate with the API. Your API access key can be found in your account dashboard. |
from |
[Required] Base currency symbol (physical or digital). |
GET/currencies
Fetch a list of supported physical currencies.
Example API Request:
https://api.exconvert.com/currencies ? access_key = YOUR_ACCESS_KEY
Request Parameters:
Object | Description |
---|---|
access_key |
[Required] Specify your unique API access key to authenticate with the API. Your API access key can be found in your account dashboard. |
Crypto Currencies
GET/crypto/fetchAll
Fetch all available crypto currency rates. Below you will find an example request used from GBP
to all available currencies.
Example API Request:
https://api.exconvert.com/crypto/fetchAll ? access_key = YOUR_ACCESS_KEY & from = BTC
Request Parameters:
Object | Description |
---|---|
access_key |
[Required] Specify your unique API access key to authenticate with the API. Your API access key can be found in your account dashboard. |
from |
[Required] Base currency symbol (physical or digital). |
GET/crypto/currencies
Fetch a list of supported crypto currencies.
Example API Request:
https://api.exconvert.com/crypto/currencies ? access_key = YOUR_ACCESS_KEY
Request Parameters:
Object | Description |
---|---|
access_key |
[Required] Specify your unique API access key to authenticate with the API. Your API access key can be found in your account dashboard. |
Code Examples
Below you will find sample currency convert requests in the following programming languages: PHP, Python, Nodejs, jQuery, Go and Ruby.
Code Example - PHP
<?php $queryString = http_build_query([ 'access_key' => 'YOUR_ACCESS_KEY', 'from' => 'GBP', 'to' => 'AUD', 'amount' => 10.5 ]); $ch = curl_init(sprintf('%s?%s', 'http://api.exconvert.com/convert', $queryString)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $website_content = curl_exec($ch); curl_close($ch); echo $website_content;
Code Example - Python
import requests params = { 'access_key': 'YOUR_ACCESS_KEY', 'from': 'GBP', 'to': 'AUD', 'amount': '10.5' } api_result = requests.get('http://api.exconvert.com/convert', params) website_content = api_result.content print(website_content)
Code Example - Nodejs
const axios = require('axios'); const params = { access_key: 'YOUR_ACCESS_KEY', from: 'GBP', to: 'AUD', amount: '10.5' } axios.get('http://api.exconvert.com/convert', {params}) .then(response => { const websiteContent = response.data; console.log(websiteContent); }).catch(error => { console.log(error); });
Code Example - jQuery
$.get('https://api.exconvert.com/convert', { access_key: 'YOUR_ACCESS_KEY', from: 'GBP', to: 'AUD', amount: '10.5' }, function(websiteContent) { console.log(websiteContent); } );
Code Example - Go
package main import ( "fmt" "io/ioutil" "net/http" ) func main() { httpClient := http.Client{} req, err := http.NewRequest("GET", "http://api.exconvert.com/convert", nil) if err != nil { panic(err) } q := req.URL.Query() q.Add("access_key", "YOUR_ACCESS_KEY") q.Add("from", "GBP") q.Add("to", "AUD") q.Add("amount", "10.5") req.URL.RawQuery = q.Encode() res, err := httpClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode == http.StatusOK { bodyBytes, err := ioutil.ReadAll(res.Body) if err != nil { panic(err) } websiteContent := string(bodyBytes) fmt.Println(websiteContent) } }
Code Example - Ruby
require 'net/http' require 'json' params = { :access_key => "YOUR_ACCESS_KEY", :from => "GBP", :to => "AUD", :amount => "10.5" } uri = URI('http://api.exconvert.com/convert') uri.query = URI.encode_www_form(params) website_content = Net::HTTP.get(uri) print(website_content)