representation

Currency Codes API

"Currency symbol is a representation of any country economy."

This API allow developers or users to get list of currency codes, currency symbols, currency names, etc. You can use this API to see which currencies we support for our currency exchange rate APIs. However, there are some commonly used currency codes that are widely supported by our exchange rate APIs. These currency codes are defined by the International Organization for Standardization (ISO) in ISO 4217.

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 currency codes and symbols list:

                                                
                                                    GET /currency_codes 
                                                
                                            

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 currency codes and symbols list

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.

Example Request URL

                                                    
                                                        https://zerosack.org/marketplace/apis/v1/currency_codes?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

Currency codes and symbol list response data in JSON format

                                                    
                                                        {
                                                            "status": 1, 
                                                            "status_message": "success", 
                                                            "body": [
                                                                {
                                                                    "country_name": "India",
                                                                    "country_code_alpha2": "IN",
                                                                    "country_code_alpha3": "IND",
                                                                    "currency_symbol": "\u20b9",
                                                                    "currency_code": "INR",
                                                                    "currency_name": "Indian rupee"
                                                                },
                                                                { ... },
                                                                { ... }
                                                            ]
                                                        } 
                                                    
                                                

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.