How do the Object table and JSON output of FastForex foreign currency exchange rate API work?

In this article, I will provide an in-depth explanation of the object table and JSON output of the FastForex foreign currency exchange rate API. The object table represents the data in a tabular format, making it easy to understand and manipulate for the developer. The JSON output, on the other hand, provides the data in a lightweight, machine-readable format that can be easily parsed and used in a wide range of programming languages. I will cover the structure of the object table and the various fields contained within it, as well as the format and structure of the JSON output.

Object and Description of API

ObjectsDescription
baseBase currency
resultsRequested currency values
updatedLast update time
msResponse time
  1. base: The base currency is the currency against which the values of other currencies are measured. For example, if the base currency is set to "USD," the API will return the exchange rates of other currencies relative to the US dollar.

  2. results: The results field contains the requested currency values. It is an object with properties that are the ISO 4217 currency codes. for each currency, it will return the value of the currency's exchange rate with respect to the base currency.

  3. updated: The updated field contains the timestamp of the last time the exchange rates were updated. This can be used to determine the freshness of the data being returned.

  4. ms: The ms field contains the response time of the API. This can be used to measure the API performance and response time in milliseconds.

The information in the table is useful for developers who are working with the FastForex foreign currency exchange rate API. It provides a clear and concise overview of the structure of the data that the API returns, which can be used to help developers access and manipulate the data in the way that they need. Understanding the format and structure of the data can make it easier to work with and can also help developers to more quickly identify and troubleshoot any issues that may arise. Additionally, the knowledge of these objects and their properties can help to make more complex use-cases that can be implemented in the development. For example, base object will give the developer the currency which is being used to compare the others, and updated can be used to track how fresh the data is and use it in the app or website, and ms can be used to measure the performance of the API which is crucial for providing better user experience.

Clarifying JSON output

This is a JSON object with several fields. The "base" field has a string value "USD" indicating that the exchange rates returned in this JSON are relative to the US dollar. The "results" field is an object that contains properties of ISO 4217 currency codes such as "AED", "AFN", "ALL" and so on. Each of these properties have numerical value of the respective currency's exchange rate with respect to the base currency, USD. This JSON output also shows that there are a lot of currencies listed. In case of the real JSON there will be more currencies and their values too, but the table is cut off for clarity.

{
"base": "USD",
"results": {
"AED": 3.67066,
"AFN": 87.05407,
"ALL": 114.11316,
"AMD": 399.2853,
"ANG": 1.77063,
"AOA": 444.65316,
"ARS": 154.94536,
"AUD": 1.54712,
"AWG": 1.78313,
"AZN": 1.68503,
"BAM": 1.95822,
"BBD": 1.99865,
"BDT": 104.12467,
"BGN": 1.96506,
"BHD": 0.37257,
"BIF": 2033.0354,
"BMD": 0.99875,
"BND": 1.40735,
"BOB": 6.86206,
"BRL": 5.32148,
"BSD": 0.99252,
"BTN": 82.22535,
"BWP": 13.41568,
"BZD": 1.99618,
"CAD": 1.35612,
"CDF": 1981.50087,
"CHF": 0.99158,
"CLF": 0.02734,
"CLP": 960.20697,
"CNH": 7.21462,
"CNY": 7.17613,
"COP": 4963.58146,
"CUP": 23.99548,
"CVE": 110.69887,
"CZK": 24.49837,
"DJF": 177.86075,
"DKK": 7.43136,
"DOP": 53.4611,
"DZD": 140.79153,
"EGP": 19.70071,
"ERN": 14.99589,
"ETB": 52.96055,
"EUR": 0.99927,
"FJD": 2.2862,
"FKP": 0.86525,
"GBP": 0.86525,
"GEL": 2.74459,
"GHS": 13.33166,
"GIP": 0.86525,
"GMD": 59.88077,
"GNF": 8606.24021,
"GTQ": 7.76644,
"GYD": 207.34081,
"HKD": 7.84502,
"HNL": 24.47613,
"HRK": 7.48777,
"HTG": 126.05453,
"HUF": 408.70013,
"IDR": 15557.87251,
"ILS": 3.51994,
"INR": 82.02945,
"IQD": 1444.47232,
"IRR": 41652.46208,
"ISK": 142.13787,
"JMD": 151.69114,
"JOD": 0.70129,
"JPY": 147.18057,
"KES": 120.8682,
"KGS": 82.74597,
"KHR": 4124.62253,
"KMF": 493.05893,
"KPW": 899.92472,
"KRW": 1417.71867,
"KWD": 0.30734,
"KYD": 0.81887,
"KZT": 467.97868,
"LAK": 17081.06565,
"LBP": 1509.88553,
"LKR": 360.08756,
"LRD": 152.10473,
"LSL": 18.05664,
"LYD": 4.96509,
"MAD": 10.86075,
"MDL": 19.32579,
"MGA": 4212.46312,
"MKD": 61.61664,
"MMK": 2076.47115,
"MNT": 3388.87976,
"MOP": 8.0603,
"MRU": 37.68008,
"MUR": 44.19466,
"MVR": 15.65867,
"MWK": 1026.52003,
"MXN": 19.83327,
"MYR": 4.71359,
"MZN": 63.11465,
"NAD": 18.00118,
"NGN": 433.26729,
"NOK": 10.32386,
"NPR": 129.36326,
"NZD": 1.72597,
"OMR": 0.38063,
"PAB": 0.99875,
"PEN": 3.94006,
"PGK": 3.42841,
"PHP": 58.38146,
"PKR": 217.31287,
"PLN": 4.74961,
"PYG": 7187.58707,
"QAR": 3.60681,
"RON": 4.879,
"RSD": 116.7219,
"RUB": 61.24519,
"RWF": 1036.35797,
"SAR": 3.75446,
"SCR": 14.36607,
"SDG": 560.23639,
"SEK": 10.92902,
"SGD": 1.40889,
"SHP": 0.86525,
"SLL": 16750.7982,
"SOS": 568.4589,
"SRD": 28.76675,
"SYP": 2489.32709,
"SZL": 18.05439,
"THB": 37.78616,
"TJS": 10.12122,
"TMT": 3.49475,
"TND": 3.20587,
"TOP": 2.34394,
"TRY": 18.61135,
"TTD": 6.68277,
"TWD": 32.20622,
"TZS": 2309.68306,
"UAH": 36.67284,
"UGX": 3780.6235,
"USD": 1,
"UYU": 40.87391,
"UZS": 11172.33264,
"VND": 24845.68195,
"VUV": 122.24655,
"WST": 2.75911,
"XAF": 655.58651,
"XCD": 2.6984,
"XDR": 0.77648,
"XOF": 655.58651,
"XPF": 119.1922,
"YER": 247.56388,
"ZAR": 18.04323,
"ZMW": 16.10212
},
"updated": "2022-10-26 12:53:22",
"ms": 2
}

In summary

In conclusion, the FastForex foreign currency exchange rate API returns data in a structured format that includes an object table and JSON output. The object table provides a tabular representation of the data, making it easy to understand and manipulate for the developer, while the JSON output provides the data in a lightweight, machine-readable format that can be easily parsed and used in a wide range of programming languages. The API provides information such as base currency, exchange rate values for multiple currencies, last update time and API's response time. This information can be useful for developers who are working with the API to access and manipulate the data and also to measure API performance and data freshness.

Endnote

FastForex foreign currency exchange rate API can be accessed through a third-party data marketplace called Worldindata. This marketplace provides easy access to different APIs, including the FastForex API, by allowing developers to sign up for an account and request access to the APIs that they need. The process of requesting access typically involves providing information about the developer's use case and how they plan to use the data, as well as agreeing to terms and conditions of use. Once you have access, you will be provided with an API key which is used for authentication when making requests to the API.