A symbol page can carry the company's earnings record once you confirm the earnings label and save the keys that come back.
Dated earnings events are GET /v1/markets/calendar/earnings. The company record is module=earnings on GET https://api.mboum.com/v1/markets/stock/modules. Use a Bearer token from Get your API key. The stock modules docs describe this module as earnings information.
Put earnings on the symbol
The sample ticker is AAPL. One company per request, and symbol may replace ticker. Leave timeframe off. This module does not read that parameter.
Record the keys that come back
Print the symbol and the module label with the keys. Those strings are how you know the record belongs to AAPL and to earnings.
import requests
url = "https://api.mboum.com/v1/markets/stock/modules"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
params = {"ticker": "AAPL", "module": "earnings"}
response = requests.get(url, headers=headers, params=params)
response.raise_for_status()
payload = response.json()
if payload.get("success") is False:
raise SystemExit(payload.get("message"))
meta = payload["meta"]
if meta.get("modules") != "earnings":
raise SystemExit(meta.get("modules"))
body = payload["body"]
if isinstance(body, dict):
keys = sorted(body.keys())
elif isinstance(body, list) and body and isinstance(body[0], dict):
keys = sorted(body[0].keys())
else:
keys = []
print(meta["symbol"], meta["modules"])
print(keys)
The sample body is an empty object.
{
"meta": {
"symbol": "AAPL",
"modules": "earnings"
},
"body": {}
}