curl --request GET \
--url https://astreus.ai/api/v1/companies/{id}/market-events \
--header 'X-API-KEY: <api-key>'import requests
url = "https://astreus.ai/api/v1/companies/{id}/market-events"
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/companies/{id}/market-events', 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/companies/{id}/market-events",
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/companies/{id}/market-events"
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/companies/{id}/market-events")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://astreus.ai/api/v1/companies/{id}/market-events")
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{
"cik": "0001045810",
"economy": "US",
"economies": [
"AE",
"CA"
],
"events": [
{
"key": "recession-us-194503",
"parent": null,
"title": "US recession, Feb 1945 peak to Oct 1945 trough (NBER)",
"label": "US recession 1945",
"summary": "8 months of contraction as dated by the NBER Business Cycle Dating Committee (peak Feb 1945, trough Oct 1945).",
"category": "business_cycle",
"tier": 1,
"start": "1945-03-01",
"end": "1945-10-31",
"precision": "month",
"sentiment": "negative",
"sources": [
{
"url": "https://www.nber.org/research/data/us-business-cycle-expansions-and-contractions"
},
{
"url": "https://fred.stlouisfed.org/series/USREC"
}
],
"matched_kinds": [
"country"
],
"matched_kind": "country",
"matched_code": "US"
},
{
"key": "recession-us-194812",
"parent": null,
"title": "US recession, Nov 1948 peak to Oct 1949 trough (NBER)",
"label": "US recession 1948–49",
"summary": "11 months of contraction as dated by the NBER Business Cycle Dating Committee (peak Nov 1948, trough Oct 1949).",
"category": "business_cycle",
"tier": 1,
"start": "1948-12-01",
"end": "1949-10-31",
"precision": "month",
"sentiment": "negative",
"sources": [
{
"url": "https://www.nber.org/research/data/us-business-cycle-expansions-and-contractions"
},
{
"url": "https://fred.stlouisfed.org/series/USREC"
}
],
"matched_kinds": [
"country"
],
"matched_kind": "country",
"matched_code": "US"
}
],
"total": 192,
"offset": 0,
"nextOffset": 2,
"limit": 2,
"hasMore": true,
"order": "asc"
}{
"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>"
]
}Market events
Dated events to overlay on the company’s charts: global, regional, country, exchange and company events, and Ramadan for Muslim-majority markets.
curl --request GET \
--url https://astreus.ai/api/v1/companies/{id}/market-events \
--header 'X-API-KEY: <api-key>'import requests
url = "https://astreus.ai/api/v1/companies/{id}/market-events"
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/companies/{id}/market-events', 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/companies/{id}/market-events",
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/companies/{id}/market-events"
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/companies/{id}/market-events")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://astreus.ai/api/v1/companies/{id}/market-events")
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{
"cik": "0001045810",
"economy": "US",
"economies": [
"AE",
"CA"
],
"events": [
{
"key": "recession-us-194503",
"parent": null,
"title": "US recession, Feb 1945 peak to Oct 1945 trough (NBER)",
"label": "US recession 1945",
"summary": "8 months of contraction as dated by the NBER Business Cycle Dating Committee (peak Feb 1945, trough Oct 1945).",
"category": "business_cycle",
"tier": 1,
"start": "1945-03-01",
"end": "1945-10-31",
"precision": "month",
"sentiment": "negative",
"sources": [
{
"url": "https://www.nber.org/research/data/us-business-cycle-expansions-and-contractions"
},
{
"url": "https://fred.stlouisfed.org/series/USREC"
}
],
"matched_kinds": [
"country"
],
"matched_kind": "country",
"matched_code": "US"
},
{
"key": "recession-us-194812",
"parent": null,
"title": "US recession, Nov 1948 peak to Oct 1949 trough (NBER)",
"label": "US recession 1948–49",
"summary": "11 months of contraction as dated by the NBER Business Cycle Dating Committee (peak Nov 1948, trough Oct 1949).",
"category": "business_cycle",
"tier": 1,
"start": "1948-12-01",
"end": "1949-10-31",
"precision": "month",
"sentiment": "negative",
"sources": [
{
"url": "https://www.nber.org/research/data/us-business-cycle-expansions-and-contractions"
},
{
"url": "https://fred.stlouisfed.org/series/USREC"
}
],
"matched_kinds": [
"country"
],
"matched_kind": "country",
"matched_code": "US"
}
],
"total": 192,
"offset": 0,
"nextOffset": 2,
"limit": 2,
"hasMore": true,
"order": "asc"
}{
"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
Ticker symbol (e.g. NVDA), numeric SEC CIK (zero-padding optional), or the platform key of a non-SEC issuer (e.g. XSAU000001 — the cik field of the company payload). A bare ticker always resolves to the SEC registrant.
Query Parameters
Least important tier to include, 1–3, default 3; any other value is read as 3.
1 <= x <= 3ISO alpha-2 economy for economic events (recessions); default the home country, else US.
Categories, comma-separated, e.g. war_conflict,financial_crisis.
Categories to drop, e.g. calendar (Ramadan).
First day (events overlapping the window), YYYY-MM-DD.
Last day, YYYY-MM-DD.
Page size, 1–500.
1 <= x <= 500Rows to skip, default 0.
x >= 0Date order: asc oldest first (the default), desc newest first.
asc, desc