curl --request GET \
--url https://astreus.ai/api/v1/fx/pairs/{pair}/prices \
--header 'X-API-KEY: <api-key>'import requests
url = "https://astreus.ai/api/v1/fx/pairs/{pair}/prices"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://astreus.ai/api/v1/fx/pairs/{pair}/prices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://astreus.ai/api/v1/fx/pairs/{pair}/prices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://astreus.ai/api/v1/fx/pairs/{pair}/prices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://astreus.ai/api/v1/fx/pairs/{pair}/prices")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://astreus.ai/api/v1/fx/pairs/{pair}/prices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"symbol": "EURUSD",
"bars": [
{
"t": 1793232000000,
"o": 1.1163081457005393,
"h": 1.1163081457005393,
"l": 1.1163081457005393,
"c": 1.1163081457005393,
"v": 0,
"adj": 1.1163081457005393
},
{
"t": 1793318400000,
"o": 1.1171936096525528,
"h": 1.1171936096525528,
"l": 1.1171936096525528,
"c": 1.1171936096525528,
"v": 0,
"adj": 1.1171936096525528
}
],
"displayFrom": 1793232000000,
"currency": "USD",
"coverageFrom": "1999-01-01",
"window": {
"from": "2026-10-01",
"to": null,
"limit": 2,
"total": 22,
"returned": 2,
"olderTo": "2026-10-28"
}
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}FX pair prices
Daily closes of one currency pair (units of the quote per 1 base; close-only, volume 0). Bars run from the first trading day of range to the latest; lookback adds earlier bars for moving averages. coverageFrom is the first day held; note says when the history starts after the range’s first day or no bar falls inside it. Bar times t are epoch ms at UTC midnight. A pair with no rates held is a 404.
curl --request GET \
--url https://astreus.ai/api/v1/fx/pairs/{pair}/prices \
--header 'X-API-KEY: <api-key>'import requests
url = "https://astreus.ai/api/v1/fx/pairs/{pair}/prices"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://astreus.ai/api/v1/fx/pairs/{pair}/prices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://astreus.ai/api/v1/fx/pairs/{pair}/prices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://astreus.ai/api/v1/fx/pairs/{pair}/prices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://astreus.ai/api/v1/fx/pairs/{pair}/prices")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://astreus.ai/api/v1/fx/pairs/{pair}/prices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"symbol": "EURUSD",
"bars": [
{
"t": 1793232000000,
"o": 1.1163081457005393,
"h": 1.1163081457005393,
"l": 1.1163081457005393,
"c": 1.1163081457005393,
"v": 0,
"adj": 1.1163081457005393
},
{
"t": 1793318400000,
"o": 1.1171936096525528,
"h": 1.1171936096525528,
"l": 1.1171936096525528,
"c": 1.1171936096525528,
"v": 0,
"adj": 1.1171936096525528
}
],
"displayFrom": 1793232000000,
"currency": "USD",
"coverageFrom": "1999-01-01",
"window": {
"from": "2026-10-01",
"to": null,
"limit": 2,
"total": 22,
"returned": 2,
"olderTo": "2026-10-28"
}
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}{
"error": "<string>",
"code": "unknown_parameter",
"param": "<string>",
"allowed": [
"<string>"
]
}Authorizations
Astreus API key (pk_live_...), created on the Developers page in the terminal. Also accepted as Authorization: Bearer pk_live_....
Path Parameters
Two ISO 4217 codes, e.g. USDCAD.
Query Parameters
Window of bars served: from the range's first day (1M = 31 days back, YTD = 1 January) to the latest bar; ALL is the whole history. rangeFrom echoes the first day; displayFrom is the epoch ms of the first bar inside the range.
1M, 3M, 6M, YTD, 1Y, 2Y, 5Y, ALL Bars to add before the range's first day, e.g. 200 to draw a 200-day moving average from the first bar. Default 0: only bars inside the range. lookbackBars says how many were added.
0 <= x <= 1000First day (default the range's first day), YYYY-MM-DD.
Last day, YYYY-MM-DD.
Latest N bars in the window, 1–100000. With from, to, limit or frequency exactly the window's bars are served, plus a window block; lookback does not apply.
1 <= x <= 100000Bar frequency: daily (the default), weekly or monthly (the last close of each week or month).
daily, weekly, monthly