Introduction
This documentation aims to provide all the information you need to work with our API.
Authenticating requests
To authenticate requests, include an Authorization
header with the value "Bearer {YOUR_AUTH_KEY}"
.
All authenticated endpoints are marked with a requires authentication
badge in the documentation below.
You can retrieve your token by visiting your profile page https://xeiqd/profile
Endpoints
Latest rates
requires authentication
Display a listing of the latest exchange rates
To get authorization token, after creating an account go to https://xeiqd/profile page
Example request:
curl --request GET \
--get "http://xeiqd-new.test/api/v1/latest" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://xeiqd-new.test/api/v1/latest"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
{
"timestamp": 1701543444,
"date": "02/12/2023",
"lang": "ar",
"city": "أربيل",
"base_currency": "دولار أمريكي",
"amount": 100,
"rates": {
"IQD": 156300,
"EUR": 91.8998,
"GBP": 78.6916,
"USD": 100,
"TRY": 2889.2533,
"IRR": 4200274.5
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.