Timeframe
GET
https://api.curexapi.com/timeframe
Request Parameters
Name
Type
Description
access_key
string
Your access key
source
string
Source currency code (optional) (default:USD)
currencies
string
Target currency code (optional)
start_date
string
Date format: YYYY-MM-DD
end_date
string
Date format: YYYY-MM-DD
Sample Requests
curl --location 'https://api.curexapi.com/timeframe?access_key=YOUR_ACCESS_KEY&source=USD¤cies=EUR%2CGBP&start_date=2023-01-01&end_date=2023-01-10'
const axios = require('axios');
let config = {
method: 'get',
maxBodyLength: Infinity,
url: 'https://api.curexapi.com/timeframe?access_key=YOUR_ACCESS_KEY&source=USD¤cies=EUR,GBP&start_date=2023-01-01&end_date=2023-01-10',
headers: { }
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.curexapi.com/timeframe?access_key=YOUR_ACCESS_KEY&source=USD¤cies=EUR%2CGBP&start_date=2023-01-01&end_date=2023-01-10',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://api.curexapi.com/timeframe?access_key=YOUR_ACCESS_KEY&source=USD¤cies=EUR,GBP&start_date=2023-01-01&end_date=2023-01-10"
response = requests.request("GET", url)
print(response.text)
Sample Response
{
"success": true,
"timestamp": 1672531200,
"source": "USD",
"rates": {
"2023-01-01": {
"EUR": 0.932,
"GBP": 0.827
},
"2023-01-02": {
"EUR": 0.938,
"GBP": 0.83
},
"2023-01-03": {
"EUR": 0.947,
"GBP": 0.835
},
"2023-01-04": {
"EUR": 0.943,
"GBP": 0.829
},
"2023-01-05": {
"EUR": 0.95,
"GBP": 0.84
},
"2023-01-06": {
"EUR": 0.939,
"GBP": 0.827
},
"2023-01-07": {
"EUR": 0.938,
"GBP": 0.827
},
"2023-01-08": {
"EUR": 0.938,
"GBP": 0.827
},
"2023-01-09": {
"EUR": 0.931,
"GBP": 0.821
},
"2023-01-10": {
"EUR": 0.931,
"GBP": 0.822
}
}
}
Last updated