The Finance Calendar CLI searches recorded economic releases, central bank decisions and exchange holidays from your terminal. Choose the Node.js or Python client, query the same free REST API, and keep JSON or CSV for scripts and spreadsheets. No API key is required.
For a browser view, use the searchable calendar. For AI assistants, use the MCP server. Both client registries are still pending publication; the working installation path below uses the public source repository.
Install the Node.js CLI
Requires Node.js 20 or newer and Git:
git clone https://github.com/awarenessdays/financecalendar-api.git
cd financecalendar-api/clients/node
npm ci
npm link
financecalendar --help
npm link makes this checkout’s financecalendar command available on your path. You can also run node cli.js --help from the same directory without linking. The checkout includes the stdio MCP server as mcp.js.
Or install the Python client and CLI
Requires Python 3.10 or newer and Git. Choose this route for Python scripts, notebooks or the Python CLI:
git clone https://github.com/awarenessdays/financecalendar-api.git
cd financecalendar-api/clients/python
python -m venv .venv
.venv/bin/python -m pip install .
.venv/bin/financecalendar --help
On Windows, use .venv\Scripts\python and .venv\Scripts\financecalendar. If the repository is already cloned, change to its clients/python directory instead of cloning again. Node and Python expose the same command name; the explicit virtual-environment path keeps the Python examples unambiguous.
Find the next release
With the Node command linked:
financecalendar next fomc
financecalendar next uk-cpi --tz Europe/London
financecalendar today --country US --tz America/New_York
financecalendar week --next --country US,GB --impact high --tz Europe/London
The Python equivalents use the same arguments, for example:
.venv/bin/financecalendar next uk-cpi --tz Europe/London
Filter a calendar and export data
These examples select November 2026. Change the dates to your required window:
financecalendar calendar --from 2026-11-01 --to 2026-11-30 --country US,GB --impact high --tz Europe/London --limit 100
financecalendar calendar --from 2026-11-01 --to 2026-11-30 --series us-cpi,fomc --json
financecalendar calendar --from 2026-11-01 --to 2026-11-30 --country US,GB --csv > november.csv
Use --holidays to include exchange-holiday rows or --category market-holidays to select them alone. A calendar request spans at most 92 days. List responses carry count and total; use --limit and --offset to retrieve additional pages, up to 500 rows per request. A single CSV command exports that requested API page, not an unlimited database dump.
--tz changes the display of known instants. The API’s date filter uses recorded publisher dates; a converted local time may fall on another calendar day. The browser explorer groups known instants by your selected display timezone.
Discover series, history and holidays
financecalendar series --country GB
financecalendar show boe
financecalendar history us-cpi --limit 12 --json
financecalendar holidays lse 2027
financecalendar status hkex
financecalendar changes --since 2026-10-18T00:00:00Z --json
financecalendar countries
Use --help for the command list. The Python client additionally provides financecalendar health for API snapshot status.
Use the Python client in a script
Run this with the environment where you installed the source package:
from financecalendar import Client
with Client() as calendar:
response = calendar.week(
country="US,GB", impact="high", tz="Europe/London"
)
for event in response["events"]:
print(event["date"], event["time_local"], event["name"])
For a longer window, iter_calendar splits the range and pages the API for you:
from datetime import date
from financecalendar import Client
with Client() as calendar:
for event in calendar.iter_calendar(
date(2026, 1, 1), date(2026, 12, 31), country="US,GB"
):
print(event["date"], event["name"])
This retrieves recorded events in the available dataset window, not a guaranteed complete historical release archive. Python’s optional DataFrame helper can be installed from the source directory with .venv/bin/python -m pip install ".[pandas]".
Understand timing and availability
Human output includes reference periods and release stages where recorded. Unknown economic-release times are labelled “time unknown”; holidays retain “all day”. A published time range stays a range. Raw JSON preserves time_precision, nullable release_at_utc, time_window_start and time_window_end. Treasury auction-close times are bidding deadlines, not results-publication times.
Previous, consensus and actual values are included only where recorded. Null is not zero. Official schedule feeds generally do not supply market consensus, and an account does not reveal values that are missing from the dataset. Review coverage and source collection status and each record’s source before relying on it.
Optional API key
Keyless access allows 2,000 requests per day per IP; a free key raises the limit to 10,000 and returns the same data fields. Create a free account, confirm your email, then optionally create a key in your workspace. The key guide explains how to keep it and check usage.
Both clients read FC_API_KEY and send it as X-API-Key. Leave the variable unset for keyless use; do not set a placeholder key. Both use https://www.financecalendar.com/wp-json/fc/v1 by default. Use FC_API_BASE only when deliberately choosing another compatible endpoint.
API errors include a message; HTTP 429 includes a retry delay. In Python, catch FinanceCalendarError and inspect status, message and retry_after. The CLI reports failures and exits with a non-zero status.
Source and data terms
Node client source · Python client source · Calendar endpoint reference · OpenAPI.
The data is free for commercial use with a visible link to financecalendar.com. Earnings are excluded. Browser workspace accounts provide saved views and filtered CSV exports; REST, CLI, MCP and the public snapshot remain available without an account.
Complete CLI and Python reference
The Node and Python clients share a command name and most commands, but their options are not identical. This reference is generated against the shipped source, with behavior checked against the current REST implementation.
- Global options
- All commands
- Pagination and exports
- Environment and configuration
- Exit codes and errors
- Python SDK
- All Python methods
- DataFrame helper
Global options
| Option | Node CLI | Python CLI |
|---|---|---|
--json |
Raw API JSON on every command. | Raw API JSON on every command; accepted before or after the subcommand. |
--tz ZONE |
IANA zone for known human-output instants; sent to endpoints that support tz. | Same; accepted before or after the subcommand. Use an explicit IANA zone for future dates across daylight-saving changes. |
--help |
Print the shared full help text; also financecalendar help or no command. |
financecalendar --help for the command list; financecalendar calendar --help for command-specific help. -h is also supported. |
--version |
Not implemented. Do not use it to test the Node client version. | Print the Python package version when passed at top level, for example financecalendar --version. It is not a subcommand option. |
--api-key KEY |
Not implemented; use FC_API_KEY. | Override the API key from FC_API_KEY; accepted before or after the subcommand. Avoid putting secrets in shared shell history. |
--base-url URL |
Not implemented; use FC_API_BASE. | Override FC_API_BASE; accepted before or after the subcommand. |
Node accepts --flag=value or --flag value for value options. Boolean switches such as --json and --csv should be used as bare flags; the Node parser treats the string in --csv=false as truthy. Node does not reject unknown flags, so a misspelled flag may be ignored. Python argparse rejects unknown options and validates integer/choice arguments before requesting data.
All commands and command-specific options
financecalendar next
Next recorded occurrence of a series.
| Argument / option | Type | Client | Behavior |
|---|---|---|---|
series |
string | Node and Python | Required series code or alias, discoverable with series. |
--country |
string | Node and Python | Country code(s); default all unless next resolves a generic series to the US. next accepts one country. |
--asset |
string | Node and Python | Canonical asset ID(s), e.g. ethereum, comma-separated. Discover covered IDs with series –category crypto. Symbols such as ETH are not IDs. |
--category |
string | Node and Python | economic-indicators, central-banks-monetary-policy, market-holidays or crypto. |
Known times use --tz when supplied. Human output uses your local timezone otherwise; source dates without times are not shifted.
financecalendar today
Today’s releases, NYSE summary and separate exchange closures.
| Argument / option | Type | Client | Behavior |
|---|---|---|---|
--country |
string | Node and Python | Country code(s); default all unless next resolves a generic series to the US. next accepts one country. |
--asset |
string | Node and Python | Canonical asset ID(s), e.g. ethereum, comma-separated. Discover covered IDs with series –category crypto. Symbols such as ETH are not IDs. |
--category |
string | Node and Python | economic-indicators, central-banks-monetary-policy, market-holidays or crypto. |
Known times use --tz when supplied. Human output uses your local timezone otherwise; source dates without times are not shifted.
financecalendar week
This week, Monday to Sunday, or the next week.
| Argument / option | Type | Client | Behavior |
|---|---|---|---|
--next |
boolean switch | Node and Python | Boolean flag. Select next week instead of this week. |
--category |
string | Node and Python | economic-indicators, central-banks-monetary-policy, market-holidays or crypto. |
--country |
string | Node and Python | Country code(s); default all unless next resolves a generic series to the US. next accepts one country. |
--asset |
string | Node and Python | Canonical asset ID(s), e.g. ethereum, comma-separated. Discover covered IDs with series –category crypto. Symbols such as ETH are not IDs. |
--impact |
string | Node and Python | high, medium or low; comma-separated values accepted by HTTP. |
--series |
string | Node and Python | Code or alias; calendar accepts comma-separated codes, changes accepts one. |
Known times use --tz when supplied. Human output uses your local timezone otherwise; source dates without times are not shifted.
Neither CLI exposes week-specific pagination. Both accept category, asset and series filters. The API returns at most 500 rows; inspect total with –json, then use calendar with the returned from/to dates and –limit/–offset if needed.
financecalendar calendar
Filtered date-window event list; JSON, human text or one CSV page.
| Argument / option | Type | Client | Behavior |
|---|---|---|---|
--from |
string | Node and Python | YYYY-MM-DD. calendar defaults to today in America/New_York; history to the snapshot start. |
--to |
string | Node and Python | YYYY-MM-DD. calendar defaults to from + 14 days; history defaults/caps to today. |
--country |
string | Node and Python | Country code(s); default all unless next resolves a generic series to the US. next accepts one country. |
--asset |
string | Node and Python | Canonical asset ID(s), e.g. ethereum, comma-separated. Discover covered IDs with series –category crypto. Symbols such as ETH are not IDs. |
--impact |
string | Node and Python | high, medium or low; comma-separated values accepted by HTTP. |
--category |
string | Node and Python | economic-indicators, central-banks-monetary-policy, market-holidays or crypto. |
--series |
string | Node and Python | Code or alias; calendar accepts comma-separated codes, changes accepts one. |
--holidays |
boolean switch | Node and Python | Boolean flag. Include market-holiday rows with economic records. |
--status |
string | Node and Python | confirmed, estimated, released, rescheduled or cancelled; comma-separated. |
--limit |
integer | Node and Python | Integer 1–500, API default 100. |
--offset |
integer | Node and Python | Non-negative integer, default 0. calendar only. |
--csv |
boolean switch | Node and Python | Boolean flag. Print the requested calendar page as CSV, ahead of –json if both are supplied. |
financecalendar series
Discover series codes, aliases and recorded next dates.
| Argument / option | Type | Client | Behavior |
|---|---|---|---|
--country |
string | Node and Python | Country code(s); default all unless next resolves a generic series to the US. next accepts one country. |
--asset |
string | Node and Python | Canonical asset ID(s), e.g. ethereum, comma-separated. Discover covered IDs with series –category crypto. Symbols such as ETH are not IDs. |
--category |
string | Node and Python | economic-indicators, central-banks-monetary-policy, market-holidays or crypto. |
--kind |
string | Node and Python | instance or holiday. Omitted: both. Choices: instance, holiday. |
financecalendar show
One series, its source, next/last and a short upcoming preview.
| Argument / option | Type | Client | Behavior |
|---|---|---|---|
code |
string | Node and Python | Required series code or alias, discoverable with series. |
--asset |
string | Node and Python | Canonical asset ID(s), e.g. ethereum, comma-separated. Discover covered IDs with series –category crypto. Symbols such as ETH are not IDs. |
Known times use --tz when supplied. Human output uses your local timezone otherwise; source dates without times are not shifted.
Human output shows at most eight upcoming entries from the returned series detail, and does not print the full history/dataset. Use –json to inspect the complete response.
financecalendar history
Past records of one series, newest first.
| Argument / option | Type | Client | Behavior |
|---|---|---|---|
series |
string | Node and Python | Required series code or alias, discoverable with series. |
--asset |
string | Node and Python | Canonical asset ID(s), e.g. ethereum, comma-separated. Discover covered IDs with series –category crypto. Symbols such as ETH are not IDs. |
--from |
string | Node and Python | YYYY-MM-DD. calendar defaults to today in America/New_York; history to the snapshot start. |
--to |
string | Node and Python | YYYY-MM-DD. calendar defaults to from + 14 days; history defaults/caps to today. |
--limit |
integer | Node and Python | Integer 1–500, API default 100. |
Known times use --tz when supplied. Human output uses your local timezone otherwise; source dates without times are not shifted.
No offset flag. At most 500 records; use calendar with explicit smaller historical windows to retrieve additional rows.
financecalendar holidays
Exchange holidays and early closes for loaded years.
| Argument / option | Type | Client | Behavior |
|---|---|---|---|
exchange |
string | Node and Python | Optional. Default nyse; use one supported exchange or all for holidays. |
year |
integer | Node and Python | Optional four-digit year. Omitted: all years loaded by the current API, not necessarily the current year. |
--year YEAR |
string, four-digit API year | Node only | Alternative to the second positional year; positional value wins if both are present. |
financecalendar status
Exchange session/holiday status, not API health.
| Argument / option | Type | Client | Behavior |
|---|---|---|---|
exchange |
string | Node and Python | Optional. Default nyse; use one supported exchange or all for holidays. |
Choose one exchange: nyse, sifma, cme, lse, tsx, asx, hkex, euronext, jpx, six, xetra or nse. nasdaq is an API alias for nyse. all is not a market-status exchange.
financecalendar changes
Retained additions, updates and removals, newest first.
| Argument / option | Type | Client | Behavior |
|---|---|---|---|
--since |
string | Node and Python | ISO 8601 timestamp. Default 24 hours ago; retained API window at most 30 days. |
--series |
string | Node and Python | Code or alias; calendar accepts comma-separated codes, changes accepts one. |
--change |
string | Node and Python | added, updated or removed. Omitted: all. Choices: added, updated, removed. |
--limit |
integer | Node and Python | Integer 1–500, API default 100. |
financecalendar countries
Country/area counts in the current dataset.
No command-specific options. Global options still apply.
financecalendar health
Python-only API snapshot health and counts, from /status.
No command-specific options. Global options still apply.
Pagination, CSV and output
A CLI command requests one response page and exits; it does not automatically page the entire dataset. calendar defaults to 100 records and accepts at most 500. The date difference between –from and –to must be at most 92 days. Inspect count/total with –json and advance –offset, or use the Python iter_calendar helper for automatic paging across larger date ranges.
financecalendar calendar --from 2026-11-01 --to 2026-11-30 --country US,GB --limit 500 --offset 0 --json
financecalendar calendar --from 2026-11-01 --to 2026-11-30 --country US,GB --limit 500 --offset 500 --json
financecalendar calendar --from 2026-11-01 --to 2026-11-30 --country US,GB --limit 500 --csv > november.csv
CSV output is API CSV text for that requested page. Repeated CSV requests each include a header; merge deliberately instead of blindly appending files. –csv applies only to calendar. The CLIs do not expose an ICS switch: use HTTP format=ics or the REST reference. JSON preserves nulls, exact/range/date-only timing fields, source and recorded values; human output is a summary and is not a lossless export. Measured zero is retained in human output and raw JSON. For lossless crypto exports retain source_license, date-window fields, verification evidence and stale flags; a human summary is not a full export.
Environment, precedence and request behavior
| Setting | Node | Python |
|---|---|---|
FC_API_BASE |
API root, default https://www.financecalendar.com/wp-json/fc/v1. Trailing slashes are removed. |
Same. An explicit nonempty –base-url or Client(base_url=…) takes precedence. |
FC_API_KEY |
Optional real key sent as X-API-Key. Leave unset for keyless access. | Same. An explicit nonempty –api-key or Client(api_key=…) takes precedence. Passing None/empty string does not suppress a key already in the environment. |
| Timezone | Human output defaults to the runtime’s IANA local zone, or UTC if it cannot be determined. | Human output defaults to the system local tzinfo. For historical/future DST-sensitive dates, pass –tz with an IANA zone. |
| Timeout | No explicit timeout option in the current HTTP helper. | SDK default 20 seconds; configurable with Client(timeout=…). CLI does not expose a timeout flag. |
| Retries | No automatic retry or backoff loop. | No automatic retry or backoff loop. |
| Data storage | No background sync or persistent local database. | No background sync or persistent local database. |
Exit codes and errors
| Client | Exit status | Meaning |
|---|---|---|
| Node | 0 |
Command/help succeeded. |
| Node | 1 |
Unknown/missing command argument, API error, connectivity/JSON error or formatting failure; Error: details are written to stderr. |
| Python | 0 |
Command, –help or top-level –version succeeded. |
| Python | 1 |
FinanceCalendarError from HTTP 4xx/5xx, or httpx network/timeout failure; error details go to stderr. |
| Python | 2 |
Argument parsing, unknown option, invalid integer/choice, invalid local timezone or handled ValueError. |
For HTTP errors, 400 means an invalid parameter, 401 a rejected key, 404 an unknown/missing resource, 429 an exhausted daily allowance and 503 an unavailable snapshot. Retry-After is reported when supplied for 429; neither CLI sleeps and retries automatically. Check exit status before treating an output file as a successful export.
Python SDK reference
Import Client, FinanceCalendarError and to_dataframe from financecalendar. The synchronous client returns plain dictionaries/lists containing API JSON; it does not create typed event objects, run background updates or fill missing observations.
Client(base_url: str | None=None, api_key: str | None=None, timeout: float=20, transport: httpx.BaseTransport | None=None)
| Constructor argument | Type / default | Behavior |
|---|---|---|
base_url |
str | None = None |
Nonempty explicit value, else FC_API_BASE, else production API root. Trailing slashes removed. |
api_key |
str | None = None |
Nonempty explicit value, else FC_API_KEY, else keyless. Sent as X-API-Key when set. |
timeout |
float = 20 |
httpx request timeout in seconds. The SDK does not retry failed requests automatically. |
transport |
httpx.BaseTransport | None = None |
Optional httpx transport; useful for custom transport behavior or offline MockTransport tests. |
Close the client after use, preferably with a context manager:
from financecalendar import Client
with Client(timeout=30) as calendar:
response = calendar.next("uk-cpi", tz="Europe/London")
print(response["next"]["date"])
All public Client methods
close()
Close the underlying httpx client. Returns None; also called when leaving a with Client() block.
calendar(**params: Any)
GET /calendar. Returns one JSON response page. Keyword parameters: from_, to, country, impact, category, asset, series, include_holidays, status, tz, limit, offset. Defaults and limits match the calendar tool above: today to +14 days, at most a 92-day date difference, 100 rows by default and 500 maximum.
crypto_calendar(asset: str | list[str] | None=None, **params: Any)
GET /calendar with category=crypto forced. Optional asset accepts canonical ID strings or a list of IDs, e.g. ethereum. Other calendar keyword parameters pass through. Global crypto has country=null; impact may be null. Inspect network environment, source_license and date_window_start/end. Estimated windows overlap requested dates; date is only their lower-bound index.
calendar_csv(**params: Any)
GET /calendar with format=csv. Same calendar keyword parameters; returns CSV text (str), not a dictionary. One response page only.
iter_calendar(from_: str | date, to: str | date, **params: Any)
Yield individual event dictionaries across an inclusive start/end range. Splits into consecutive requests of at most the API’s 92-day date difference and pages each using limit/offset. Default page limit 500. Accepts strings or datetime.date for the bounds; reversed bounds raise ValueError. Discards a supplied offset and manages its own offsets. Deduplicates stable event IDs when estimated windows overlap adjacent request chunks. Preserves available snapshot coverage; a long range does not create missing history.
today(country: str | None=None, tz: str | None=None, *, asset: str | None=None, category: str | None=None)
GET /today. Accepts country, tz, canonical asset ID and category; returns date, market, count, events and market_holidays. Selection uses America/New_York’s date.
week(which: str='this', **params: Any)
GET /week. which defaults to this; next selects the next Monday–Sunday week. Keyword parameters pass through to HTTP, including country, impact, category, asset, series, include_holidays, tz, limit and offset. The HTTP endpoint validates but ignores limit/offset and returns at most 500 rows; page calendar using the returned dates if necessary.
next(series: str, country: str | None=None, tz: str | None=None, *, asset: str | None=None, category: str | None=None)
GET /next. Required series code/alias, optional one-country override, IANA tz, asset and category. Returns series identity and next record; 404 if no matching upcoming event is loaded.
series(**params: Any)
GET /series. Keyword parameters: country, category, asset, kind (instance or holiday). Returns the declared series directory with recorded counts and next dates.
series_detail(code: str, tz: str | None=None, *, asset: str | None=None)
GET /series/{code}. Required code/alias is URL-encoded; optional tz and asset. Returns series, next, last, upcoming, history and dataset where published. next/last/dataset can be null.
history(series: str, **params: Any)
GET /history. Required one-series code/alias; keyword parameters from_, to, limit, asset and tz. Defaults to loaded snapshot start through today, newest first. Default limit 100, maximum 500; no offset.
holidays(exchange: str='nyse', year: int | None=None)
GET /holidays. exchange defaults to nyse; year None currently returns all loaded years. Pass a four-digit integer year for one year. exchange=all is supported; an unloaded requested year returns 404.
market_status(exchange: str='nyse')
GET /market-status. One exchange, default nyse. Returns computed session/holiday status. all is not supported here.
changes(since: str | datetime | None=None, **params: Any)
GET /changes. since accepts an ISO 8601 string, datetime (serialized with isoformat) or None for 24 hours ago. Extra keyword parameters: series, change (added/updated/removed) and limit (1–500, default 100). Retention at most 30 days; no offset/cursor.
countries()
GET /countries. No parameters. Returns recorded countries/areas with series and event counts.
status()
GET /status. No parameters. API snapshot health, generation time/age and counts. This is distinct from market_status.
openapi()
GET /openapi. No parameters. Returns the current OpenAPI 3.1 dictionary.
Python keyword conversion and pagination
Extra keyword arguments are passed to HTTP; the client is a thin wrapper, not local schema validation. from_ becomes from. include_holidays=True becomes include=holidays. Lists, tuples and sets become comma-separated strings; date/datetime values become ISO strings. None, empty strings and False are omitted. Use date values or YYYY-MM-DD strings for calendar bounds; an ISO datetime is not a valid calendar date filter.
from datetime import date
from financecalendar import Client
with Client() as calendar:
for event in calendar.iter_calendar(
date(2026, 1, 1), date(2026, 12, 31),
country=["US", "GB"], impact="high", limit=500,
):
print(event["id"], event["date"], event["source_url"])
Python exceptions
HTTP 4xx/5xx responses raise FinanceCalendarError. Inspect status: int, message: str and retry_after: int | None. Numeric Retry-After seconds are preserved; an absent/non-numeric header gives None. Transport/timeouts raise httpx exceptions. Malformed JSON and local validation can raise ValueError. The SDK does not convert these into success responses.
import httpx
from financecalendar import Client, FinanceCalendarError
try:
with Client(timeout=30) as calendar:
response = calendar.calendar(country="US", limit=100)
except FinanceCalendarError as error:
print(error.status, error.message, error.retry_after)
except httpx.HTTPError as error:
print("Network request failed:", error)
Optional to_dataframe(events) helper
Install the optional dependency from the checked-out Python source with .venv/bin/python -m pip install ".[pandas]". Pass a list of event dictionaries or an entire calendar/history response dictionary. Returns a pandas DataFrame; parses date and date_window_start/end with errors=”coerce” and release_at_utc as UTC datetimes with errors=”coerce”; includes asset IDs/symbols and crypto event/network/exchange columns when supplied. Unknown/invalid timestamps become NaT. The helper does not fetch missing records, page responses or invent results.
from financecalendar import Client, to_dataframe
with Client() as calendar:
response = calendar.history("us-cpi", limit=24)
frame = to_dataframe(response)
print(frame[["date", "consensus", "actual"]])
Without pandas installed, calling the helper raises ImportError. A response with no events produces an empty DataFrame and may have no columns; check before selecting column names. The package also exports DEFAULT_BASE, MAX_RANGE_DAYS (92) and __version__.