currency

Real-Time Currency Exchange Rates API

"This API allow you to get real-time currency exchange rates."

This Currency Exchange Rate API is a web-based service that provides real-time or historical exchange rates for various currencies. Developers use this API to integrate currency exchange rate information into their applications, websites, and other software systems.

In other words, This currency exchange rate API (Application Programming Interface) is a software interface that allows developers to retrieve real-time or historical exchange rates for currencies. This API can be used to integrate currency exchange functionality into various applications, such as financial applications, e-commerce platforms, and accounting software.

API Features

A currency exchange rate API is a software tool that provides access to real-time or historical exchange rates for currencies. These exchange rates are typically sourced from various financial institutions, such as banks and currency exchanges, and are made available through a web-based interface or a programming interface. The API can be used to perform real-time currency conversions, provide financial reporting, and support other business processes that require up-to-date currency exchange rate information.
Real-Time Exchange Rates Historical Rates Data Multiple Currency Pairs API Scalability Secure and Reliable Data Accuracy Documentation and Support

Your API Authentication Key

We use API keys to authenticate all the requests. You can view and manage your API keys in the My Account -> My APIs Center page. Your API keys can be used to access our all the APIs, So be sure to keep them secure. Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

                                                    
                                                        XXXX-XXXX-XXXX-XXXX (login to see your free API Key) 
                                                    
                                                
Signup and activate free trial plan to try our APIs. See Trial Plan.

API Base URL and Endpoints

The API Base URL serves as the foundation or root of the API's endpoints. It represents the common prefix shared by all API endpoints. An Endpoint URL represents a specific operation or resource provided by the API. It is appended to the API Base URL to form a complete URL for a particular API call.


Base URL:

                                                
                                                    https://zerosack.org/marketplace/apis/v1 
                                                
                                            

Endpoint for Real-time exchange rates

                                                
                                                    GET /currency_rate 
                                                
                                            

Endpoint for exchange rates history data BETA

                                                
                                                    GET /currency_rate_history 
                                                
                                            

API Request Method GET

This API use GET HTTP method to get data from our server. All API requests must be made over HTTPS ("S" stands for secure). Calls made over plain HTTP or without authentication key will not allowed.

Request Parameters

An API endpoint is a URL (Uniform Resource Locator) that is used to access a specific resource on a web server. API endpoints are the URLs that clients use to interact with a web API, and they typically consist of a base URL followed by a path that identifies a specific resource or action.

For real-time currency exchange rates

Parameter Description
key
required
This is your authentication api key to get requested data from our servers. This is mandatory parameter otherwise data request will be failed. Go to API Key.
currency_from
required
This is your base currency code such as USD, EUR, GBP, INR etc. This is mandatory parameter otherwise data request will be failed. See the supported currencies code list.
currency_to
required
This is your target currency code such as USD, EUR, GBP, INR etc. for which you will get live exchange rate. This is mandatory parameter otherwise data request will be failed. See the supported currencies code list.

Example Request URL

                                                    
                                                        https://zerosack.org/marketplace/apis/v1/currency_rate?currency_from=USD&currency_to=INR&key=XXXX-XXXX-XXXX-XXXX (login to see your free API Key) 
                                                    
                                                

For currency exchange rates history data BETA

Parameter Description
key
required
This is your authentication api key to get requested data from our servers. This is mandatory parameter otherwise data request will be failed. Go to API Key
currency_from
required
This is your base currency code such as USD, EUR, GBP, INR etc. This is mandatory parameter otherwise data request will be failed. See the supported currencies code list.
currency_to
required
This is your target currency code such as USD, EUR, GBP, INR etc. for which you will get history rates data. This is mandatory parameter otherwise data request will be failed. See the supported currencies code list.
start_date
required
Starting date of exchange rate history data. The date should be in ISO 8601 format (eg: 2024-05-16). The date range must be from last 5 Years which starts from yesterday date (2024-06-14). This is optional parameter.
end_date
required
End date of exchange rate history data. The date should be in ISO 8601 format (eg: 2024-05-26). The date range must be from last 5 Years which starts from yesterday date (2024-06-14). This is optional parameter.

Important Note: You will get last 5 Years history rates data. Also please make sure the date parameter start_date always behind end_date, Otherwise request will be failed.

Example Request URL BETA

                                                    
                                                    https://zerosack.org/marketplace/apis/v1/currency_rate_history?currency_from=USD&currency_to=INR&start_date=YYYY-MM-DD&end_date=YYYY-MM-DD&key=XXXX-XXXX-XXXX-XXXX (login to see your free API Key) 
                                                    
                                                

Response Format

API response format refers to the format in which data is returned from an API endpoint after a request is made. We use JSON format for API response data. JSON (JavaScript Object Notation): JSON is a lightweight data interchange format that is easy to read and write. It is widely used for API response data because it is easy to parse and manipulate in many programming languages.

Example Response

Real-time currency exchange rate response data in JSON format

                                                    
                                                        {
                                                            "status": 1, 
                                                            "status_message": "success", 
                                                            "body": {
                                                                "currency_from": "USD",
                                                                "currency_to": "INR",
                                                                "rate": 82.50,
                                                                "reverse": 0.0121,
                                                                "utc": "universal datetime",
                                                                "iso": "local iso datetime"
                                                            }
                                                        } 
                                                    
                                                

Currency history rates response data in JSON format BETA

                                                    
                                                        {
                                                            "status": 1, 
                                                            "status_message": "success", 
                                                            "body": {
                                                                "currency_from": "USD",
                                                                "currency_to": "INR",
                                                                "date_start": "YYYY-MM-DD",
                                                                "date_end": "YYYY-MM-DD",
                                                                "rate_history": [
                                                                    {
                                                                        "value": 71.355,
                                                                        "date": "2020-01-01"
                                                                    },
                                                                    { ... },
                                                                    { ... },
                                                                    { ... }
                                                                ],
                                                                "utc": "universal datetime",
                                                                "iso": "local iso datetime"
                                                            }
                                                        } 
                                                    
                                                

In this response "status": 1 means data request response received successfully. In this case your APIs credit call/request count as 1, Otherwise in fail condition or any other condition you will receive "status": 0, In this case API credit calls/request count as 0.

Sample Code

You can use our api with any programming language as well which can handle http GET requests. Here are some sample code snippets for making a GET request to an API endpoint in multiple programming languages:

JavaScript PHP Python C#
                                                            
                                                                
                                                                    fetch('YOUR API REQUEST URL WITH REQUIRED PARAMETERS')
                                                                    .then(response => response.json())
                                                                    .then(data => console.log(data))
                                                                    .catch(error => console.error(error));
                                                                 
                                                            
                                                        
                                                            
                                                                
                                                                    $response = file_get_contents("YOUR API REQUEST URL WITH REQUIRED PARAMETERS");
                                                                    
                                                                    if ($response !== false) {
                                                                        $data = json_decode($response, true);
                                                                        var_dump($data);
                                                                    } else {
                                                                        echo "Error: Request failed";
                                                                    }
                                                                 
                                                            
                                                        
                                                            
                                                                
                                                                    import requests

                                                                    url = 'YOUR API REQUEST URL WITH REQUIRED PARAMETERS'
                                                                    
                                                                    response = requests.get(url)
                                                                    
                                                                    if response.status_code == requests.codes.ok:
                                                                        data = response.json()
                                                                        print(data)
                                                                    else:
                                                                        print('Error: Request failed with status code ' + str(response.status_code))
                                                                 
                                                            
                                                        
                                                            
                                                                
                                                                    var client = new HttpClient();
                                                                    var request = new HttpRequestMessage(HttpMethod.Get, "YOUR API REQUEST URL WITH REQUIRED PARAMETERS");
                                                                    var response = await client.SendAsync(request);
                                                                    response.EnsureSuccessStatusCode();
                                                                    Console.WriteLine(await response.Content.ReadAsStringAsync());                                                                
                                                                 
                                                            
                                                        

Also you can use Postman platform which enables you to create mock servers to assist with API development and testing. A mock server simulates the behavior of a real API server by accepting requests and returning responses. By adding a mock server to your collection and adding examples to your requests, you can simulate the behavior of a real API.

Do you Need Help? Contact us.

Disclaimers: This APIs is provided "as is" without warranty of any kind. If you have issue / feedback / bug report regarding the same, You can reach out to us.

Currency Codes List Close

Please Note: You can use our Currency Codes API to show your users the list of currency codes with country name for currency conversion.

Country Currency Code Currency Symbol Currency Name
Afghanistan AFN ؋ Afghan afghani
Anguilla XCD $ East Caribbean dollar
Australia AUD $ Australian dollar
Bangladesh BDT Bangladeshi taka
Benin XOF Fr West African CFA franc
Brazil BRL R$ Brazilian real
Cambodia KHR Cambodian riel
Chad XAF Fr Central African CFA franc
Congo XAF Fr Central African CFA franc
Cuba CUP $ Cuban peso
Dominica XCD $ East Caribbean dollar
Finland EUR European euro
Georgia GEL Georgian lari
Grenada XCD $ East Caribbean dollar
Haiti HTG G Haitian gourde
India INR Indian rupee
Israel ILS Israeli new sheqel
Kazakhstan KZT лв Kazakhstani tenge
Kuwait KWD د.ك Kuwaiti dinar
Lesotho LSL L Lesotho loti
Luxembourg EUR European euro
Malaysia MYR RM Malaysian ringgit
Mauritius MUR Mauritian rupee
Mongolia MNT Mongolian tugrik
Myanmar MMK Ks Myanma kyat
New Caledonia XPF Fr CFP franc
Norway NOK kr Norwegian krone
Papua New Guinea PGK K Papua New Guinean kina
Portugal EUR European euro
Rwanda RWF Fr Rwandan franc
Samoa (Western) WST T Samoan tala
Serbia RSD Дин. Serbian dinar
Slovenia EUR European euro
Spain EUR European euro
Sweden SEK kr Swedish krona
Tanzania TZS TSh Tanzanian shilling
Tunisia TND ملّيم Tunisian dinar
Ukraine UAH Ukrainian hryvnia
Uzbekistan UZS лв Uzbekistani som
Yemen YER Yemeni rial
Algeria DZD د.ج Algerian dinar
Argentina ARS $ Argentine peso
Azerbaijan AZN ман Azerbaijani manat
Belarus BYN p. New Belarusian ruble
Bolivia BOB $b Bolivian boliviano
Bulgaria BGN лв Bulgarian lev
Canada CAD $ Canadian dollar
China CNY ¥ Chinese renminbi
Costa Rica CRC Costa Rican colon
Czech Republic CZK Czech koruna
Ecuador USD $ U.S. Dollar
Estonia EUR European euro
French Polynesia XPF Fr CFP franc
Ghana GHS Ghanaian cedi
Guinea GNF Fr Guinean franc
Hong Kong HKD $ Hong Kong dollar
Iran, Islamic Republic of IRR Iranian rial
Jamaica JMD J$ Jamaican dollar
Kiribati AUD $ Australian dollar
Laos LAK Lao kip
Libya LYD ل.د Libyan dinar
Macedonia (Former Yug. Rep.) MKD ден Macedonian denar
Mali XOF Fr West African CFA franc
Micronesia USD $ U.S. Dollar
Montserrat XCD $ East Caribbean dollar
Nauru AUD $ Australian dollar
Nicaragua NIO C$ Nicaraguan cordoba
Pakistan PKR Pakistani rupee
Peru PEN S/. Peruvian nuevo sol
Qatar QAR Qatari riyal
Saint Kitts and Nevis XCD $ East Caribbean dollar
Sao Tome and Principe STD Db Sao Tome and Principe dobra
Sierra Leone SLL Le Sierra Leonean leone
Somalia SOS S Somali shilling
Sudan SDG ج.س. Sudanese pound
Syria SYP £ Syrian pound
Togo XOF Fr West African CFA franc
Turkmenistan TMT m Turkmenistan manat
United Kingdom GBP £ British pound
Venezuela VEF Bs Venezuelan bolivar
Andorra EUR European euro
Armenia AMD ֏ Armenian dram
Bahamas BSD $ Bahamian dollar
Belgium EUR European euro
Bosnia-Herzegovina BAM KM Bosnia and Herzegovina konvertibilna marka
Burkina Faso XOF Fr West African CFA franc
Cayman Islands KYD $ Cayman Islands dollar
Colombia COP $ Colombian peso
Denmark DKK kr Danish krone
Egypt EGP £ Egyptian pound
Ethiopia ETB Br Ethiopian birr
Gabon XAF Fr Central African CFA franc
Gibraltar GIP £ Gibraltar pound
Guinea-Bissau XOF Fr West African CFA franc
Hungary HUF Ft Hungarian forint
Iraq IQD ع.د Iraqi dinar
Japan JPY ¥ Japanese yen
Korea North KPW North Korean won
Latvia LVL Ls Latvian lats
Liechtenstein CHF Fr. Swiss Franc
Madagascar MGA Ar Malagasy ariary
Malta EUR European Euro
Moldova MDL L Moldovan leu
Morocco MAD د.م. Moroccan dirham
Nepal NPR Nepalese rupee
Niger XOF Fr West African CFA franc
Palau USD $ U.S. Dollar
Philippines PHP Philippine peso
Romania RON lei Romanian leu
Saint Lucia XCD $ East Caribbean dollar
Saudi Arabia SAR Saudi riyal
Singapore SGD $ Singapore dollar
South Africa ZAR R South African rand
Suriname SRD $ Surinamese dollar
Taiwan TWD NT$ New Taiwan dollar
Tonga TOP T$ Paanga
Tuvalu AUD $ Australian dollar
United States of America USD $ United States dollar
Vietnam VND Vietnamese dong
Albania ALL Lek Albanian lek
Antigua and Barbuda XCD $ East Caribbean dollar
Austria EUR European euro
Barbados BBD $ Barbadian dollar
Bhutan BTN Nu. Bhutanese ngultrum
Brunei BND $ Brunei dollar
Cameroon XAF Fr Central African CFA franc
Chile CLP $ Chilean peso
Congo, Democratic Republic CDF Fr Congolese franc
Cyprus EUR European euro
Dominican Republic DOP RD$ Dominican peso
Eritrea ERN Nfk Eritrean nakfa
France EUR European euro
Germany EUR European euro
Guatemala GTQ Q Guatemalan quetzal
Honduras HNL L Honduran lempira
Indonesia IDR Rp Indonesian rupiah
Italy EUR European euro
Kenya KES KSh Kenyan shilling
Kyrgyzstan KGS лв Kyrgyzstani som
Liberia LRD $ Liberian dollar
Macau MOP P Macanese pataca
Maldives MVR Maldivian rufiyaa
Mexico MXN $ Mexican peso
Montenegro EUR European Euro
Namibia NAD $ Namibian dollar
New Zealand NZD $ New Zealand dollar
Oman OMR Omani rial
Paraguay PYG Gs Paraguayan guarani
Puerto Rico USD $ U.S. Dollar
Saint Helena SHP £ Saint Helena pound
San Marino EUR European euro
Seychelles SCR Seychellois rupee
Solomon Islands SBD $ Solomon Islands dollar
Sri Lanka LKR Sri Lankan rupee
Switzerland CHF Fr. Swiss franc
Thailand THB ฿ Thai baht
Turkey TRY Turkish new lira
United Arab Emirates AED فلس UAE dirham
Vanuatu VUV Vt Vanuatu vatu
Zambia ZMW ZK Zambian kwacha
Angola AOA Kz Angolan kwanza
Aruba AWG ƒ Aruban florin
Bahrain BHD دينار Bahraini dinar
Belize BZD BZ$ Belize dollar
Botswana BWP P Botswana pula
Burundi BIF Fr Burundi franc
Central African Republic XAF Fr Central African CFA franc
Comoros KMF Fr Comorian franc
Croatia HRK kn Croatian kuna
Djibouti DJF Fr Djiboutian franc
El Salvador USD $ U.S. Dollar
Fiji FJD $ Fijian dollar
Gambia GMD D Gambian dalasi
Greece EUR European euro
Guyana GYD $ Guyanese dollar
Iceland ISK kr Icelandic króna
Ireland EUR European euro
Jordan JOD د.ا Jordanian dinar
Korea South KRW South Korean won
Lebanon LBP £ Lebanese lira
Malawi MWK MK Malawian kwacha
Mauritania MRO UM Mauritanian ouguiya
Monaco EUR European Euro
Mozambique MZN MT Mozambican metical
Netherlands EUR European euro
Nigeria NGN Nigerian naira
Panama PAB B/. Panamanian balboa
Poland PLN Polish zloty
Russia RUB руб Russian ruble
Saint Vincent and the Grenadines XCD $ East Caribbean dollar
Senegal XOF Fr West African CFA franc
Slovakia EUR European euro
South Sudan SDG £ Sudanese pound
Swaziland SZL L Swazi lilangeni
Tajikistan TJS ЅМ Tajikistani somoni
Trinidad and Tobago TTD TT$ Trinidad and Tobago dollar
Uganda UGX USh Ugandan shilling
Uruguay UYU $U Uruguayan peso
Wallis and Futuna Islands XPF Fr CFP franc
Lithuania EUR European euro