You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Official Python SDK for the QuantGist macro economic event API. Get real-time and historical central bank decisions, employment reports, inflation releases, and more — with a single line of Python.
Filtered, cursor-paginated list of earnings events.
get_earnings_upcoming(*, limit)
EarningsResponse
Next N upcoming earnings reports ordered by date.
get_earnings_for_ticker(ticker, *, cursor, limit)
EarningsResponse
Earnings history for a single ticker.
get_earnings_summary(ticker)
EarningsSummary
Beat/miss/in-line counts for a ticker.
get_earnings_history(ticker, *, cursor, limit)
EarningsResponse
Paginated earnings history (Pro+ plan required).
get_earnings_surprises(*, limit)
list[EarningsSurprise]
Largest cross-market EPS surprises.
get_earnings_movers(*, limit)
list[EarningsMover]
Earnings events ranked by price/volume impact.
get_earnings_week_calendar()
EarningsWeekCalendar
Week-ahead earnings calendar grouped by day.
get_earnings_season_summary()
EarningsSeasonSummary
Index-level aggregate for the current earnings season.
Methods — markets
Method
Returns
Description
get_markets_overview()
MarketsOverviewResponse
Major indices and instruments (EOD Stooq data).
get_markets_sectors()
MarketsOverviewResponse
Major sector ETF quotes.
get_markets_currencies()
MarketsOverviewResponse
Major currency pair quotes.
get_markets_commodities()
MarketsOverviewResponse
Major commodity quotes.
get_market_quote(symbol)
MarketQuote
Latest EOD quote for a single symbol.
Methods — changelog
Method
Returns
Description
get_changelog()
ChangelogResponse
Public API changelog — no elevated plan required.
AsyncQuantGistClient
Drop-in async replacement. Identical constructor and method signatures; all methods are async. Additionally supports a page: int parameter on get_events for explicit pagination.
SEC accession number, e.g. "0000320193-26-000001".
sec_filed_at
date | None
Date filed with the SEC.
field_sources
dict[str, str]
Provenance map per field, e.g. {"eps_actual": "fmp", "sec_filing_url": "sec_edgar"}.
EarningsSummary
Field
Type
Description
ticker
str
Ticker symbol.
company_name
str | None
Company display name.
beat
int
Number of quarters where EPS beat estimates.
miss
int
Number of quarters where EPS missed estimates.
in_line
int
Number of in-line quarters.
total
int
Total quarters in the history.
beat_rate
float | None
Beat rate as a percentage (0–100).
MarketQuote
Field
Type
Description
symbol
str
Instrument symbol.
name
str | None
Display name.
close
float
Latest close price.
open
float | None
Open price.
high
float | None
Day high.
low
float | None
Day low.
volume
float | None
Volume.
change_pct
float | None
Day change percentage.
as_of
date | None
Quote date.
ChangelogEntry
Field
Type
Description
version
str
Semantic version string.
date
date
Release date.
summary
str
Short description of the release.
breaking
bool
Whether this version contains breaking changes.
changes
list[str]
Bullet-point change list.
Error handling
All exceptions inherit from QuantGistError and expose a .status_code attribute.
fromquantgistimport (
QuantGistClient,
QuantGistError,
AuthenticationError,
RateLimitError,
NotFoundError,
PlanUpgradeRequired,
)
client=QuantGistClient(api_key="qg_live_...")
try:
event=client.get_event("evt_does_not_exist")
exceptAuthenticationErrorase:
# 401 — invalid or missing API keyprint(f"Auth failed: {e}")
exceptRateLimitErrorase:
# 429 — too many requests; upgrade plan or back offprint(f"Rate limited (status {e.status_code}): {e}")
exceptNotFoundErrorase:
# 404 — event ID does not existprint(f"Not found: {e}")
exceptPlanUpgradeRequiredase:
# 402 — feature requires a higher subscription tierprint(f"Upgrade required: {e}")
exceptQuantGistErrorase:
# catch-all for any other API errorsprint(f"API error {e.status_code}: {e}")
Exception
HTTP status
Cause
AuthenticationError
401
Invalid or missing API key.
RateLimitError
429
Request quota exceeded for the current plan.
NotFoundError
404
The requested resource does not exist.
PlanUpgradeRequired
402
Feature is not available on the current plan tier.
QuantGistError
any
Base class; wraps all other unexpected errors.
Examples
See the examples/ directory for runnable scripts covering: