Economic Calendar CLI and Python Client

CLI and Python client

Query economic-release schedules, consensus forecasts and published results from your terminal with the Finance Calendar CLI. Provider consensus now spans 12 selected US headline release series, alongside central bank decisions, exchange holidays and source-backed crypto events. Choose the Node.js or Python client and keep JSON or CSV for scripts and spreadsheets. Both clients use the same REST API with your account API key and the entitlement for the requested scope.

Your first terminal query
financecalendar calendar --country US,GB --impact high --limit 5

Set FC_API_KEY privately in your terminal before running a data command.

  1. Install the tested Node or Python client below.
  2. Create and verify your account, complete its activation steps, and create an API key.
  3. Set FC_API_KEY securely, then run your first query.

For a browser view, use the free public calendar. For AI assistants, use the MCP server. Tested Node 0.2.3 and Python 0.1.3 downloads are available from our GitHub release, including checksums. npm and PyPI listings are pending; use the exact download URLs below.

Install the Node.js CLI

Requires Node.js 20 or newer. Install the tested archive:

npm install -g https://github.com/awarenessdays/financecalendar-api/releases/download/clients-free-developer-2026-11-12/financecalendar-mcp-0.2.3.tgz
financecalendar --help

For a source checkout, also install Git, then run:

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. Choose this route for Python scripts, notebooks or the Python CLI:

python -m venv .venv
.venv/bin/python -m pip install https://github.com/awarenessdays/financecalendar-api/releases/download/clients-free-developer-2026-11-12/financecalendar-0.1.3-py3-none-any.whl
.venv/bin/financecalendar --help

For a source checkout, also install Git, then run:

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.

Before making data requests, create your account, verify your email and complete its activation steps, then create an API key and set it securely in your local environment:

read -r -s FC_API_KEY
export FC_API_KEY

The prompt reads your key without displaying it or placing its value in shell history. Both clients send X-API-Key; do not publish the key or put it in a URL.

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.

For crypto, run financecalendar series --category crypto to discover canonical assets, then financecalendar calendar --category crypto --asset ethereum --json for one covered asset. Omit country filters for global crypto. JSON and API CSV retain crypto, source_license, source_rights, optional discovery_url and estimated date-window bounds; nested objects are JSON cells in CSV. See crypto metadata and source rights before redistributing.

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:

import os
from financecalendar import Client

with Client(api_key=os.environ["FC_API_KEY"]) 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
import os
from financecalendar import Client

with Client(api_key=os.environ["FC_API_KEY"]) 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.

Provider consensus now covers 12 selected US headline release series: US headline CPI, nonfarm payrolls, PPI, retail sales, PCE, ISM Manufacturing, industrial production, Conference Board Consumer Confidence, JOLTS, ADP employment, ISM Services PMI and goods-and-services Trade Balance. Actual and prior values combine validated official observations with matched provider data. Use the recorded metric, reference period and source links when comparing forecasts with results. Review coverage and source evidence or query /quality; preserve null where a value has no recorded evidence.

Crypto vesting schedules do not establish transfer or sale. Governance events mark voting deadlines, not approval or execution. Issuer supply projections are estimates, not confirmed token unlocks or observed circulation. Preserve amount/date qualifications, publisher decimal strings, verification evidence and stale flags. Human output includes credits, attribution links and factual notices, while JSON and CSV retain the complete metadata.

Required API key

Authentication and account allowances

Browse the public economic calendar free. Connect apps and AI tools with paid API access from US$9.99/year. Starter includes 1,000 requests per UTC day and 25,000 per UTC calendar month. Build is US$9.99/month or US$95.90/year, with 100,000 requests per UTC day. Scale is US$29.00/month or US$278.40/year, with 1,000,000 requests per UTC day and the complete current dataset download. Free Developer provides 100 successful schedule JSON responses per UTC calendar month, up to 10 per UTC day, with one key after email verification. Use /calendar and /today for economic-release and central-bank schedules from UTC today through today+6, with country/impact filters, bounded date narrowing and up to 20 records per response. The allowance renews monthly; no card, fixed expiry or automatic paid subscription. Figures, history, wider dates/routes, CSV/ICS, hosted MCP, Data explorer and webhooks require a paid plan. Personal and customer-facing projects are allowed within these limits and applicable source terms. Annual prices are charged upfront. Paid plans renew at their selected interval until cancelled; applicable tax is included. Linked keys share one account allowance.

Inspect the recorded sample · Compare current plans. Existing subscription agreements and paid-through migration access retain their confirmed terms.

Both clients read FC_API_KEY and send it as X-API-Key. Missing credentials fail locally before a data request. Both use https://www.financecalendar.com/wp-json/fc/v1 by default. Use FC_API_BASE only when deliberately choosing another compatible authenticated endpoint.

HTTP 402 means the key’s account requires plan activation; open your account workspace to complete activation, then retry. 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.

Build a working dashboard

Start from the economic calendar dashboard example: a complete Node backend and responsive browser view with no runtime packages. Try the labelled demo without a key, then connect your own verified account. The key stays on the server; a shared 30-minute cache and local browser filters reduce repeated API requests. Frequent restarts or multiple server processes can increase consumption.

Copy this into your coding assistant, then configure your key in the server’s private environment settings:

Use the economic-calendar-dashboard starter from
https://github.com/awarenessdays/financecalendar-api/tree/main/integrations/examples/economic-calendar-dashboard
Read its README and run its tests. Keep FC_API_KEY server-side, preserve the
shared 30-minute cache and failure cooldown, and filter locally in the browser.
Preserve source credits, unknown times, missing values versus zero and stale
flags. Keep demo records clearly labelled. Adapt the working app to my needs.

Source and data terms

Node client source · Python client source · Calendar endpoint reference · OpenAPI.

Your active plan sets your API allowance. Free Developer provides bounded schedule JSON with a separate successful-response allowance; Starter adds recorded forecasts/results and wider dates, formats and tools. Check your account’s applicable allowance. Commercial use remains subject to applicable source terms and credits. Include a visible link to financecalendar.com, retain source_license credits, licence links, full notices and adaptation labels, and preserve source_rights factual provenance. PatternPlus records require the linked credit Data: PatternPlus, carried in source_license.attribution_url. A discovery link is separate from primary verification; factual rights metadata is not a publisher copyright licence. The clients’ MIT code licence does not license upstream data. Earnings are excluded. Browser workspace accounts provide saved views and filtered CSV/JSON exports. REST, CLI and MCP require your API key. The complete current snapshot download is included with Scale.


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.

Install the tested beta packages

Choose the Node client (CLI and local MCP server, Node.js 20+) or the Python client (SDK and CLI, Python 3.10+). Both CLIs use the command financecalendar. Beta downloads and SHA-256 checksums are available now; npm/PyPI registry publication is pending. The hosted connector uses authenticated HTTPS and requires a client with custom authentication headers.

Node:

npm install --global https://github.com/awarenessdays/financecalendar-api/releases/download/clients-free-developer-2026-11-12/financecalendar-mcp-0.2.3.tgz

Python, in your preferred virtual environment:

python -m pip install https://github.com/awarenessdays/financecalendar-api/releases/download/clients-free-developer-2026-11-12/financecalendar-0.1.3-py3-none-any.whl

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 to the latest publisher-local current date and selects only elapsed records.
--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 to the latest publisher-local current date and selects only elapsed records.
--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 date or datetime with explicit timezone. Default 24 hours ago; retained API window at most 30 days.
--cursor string Node and Python Opaque next_cursor from the preceding changes page. Retains the original snapshot, filters and page size; omit those other parameters when continuing.
--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.

financecalendar results SERIES

Node only. GET /enrichment/history for supported canonical headline series; populated evidence depends on provider qualification and server activation. Optional –from/–to release dates, –limit (1–100, API default 50), –offset (0–999999), –ledger-cursor and –publication-revision. Returns JSON by default with releases, selected_editions, next_offset and both pins. Follow next_offset with the same filters plus both first-page pins, required when offset > 0. On HTTP 409 restart at offset zero without old pins. as_of is unsupported.

financecalendar editions EVENT_ID

Node only. GET /enrichment/editions for the canonical event ID. Optional –limit (1–100, API default 50), –offset (0–999999), –ledger-cursor and –publication-revision. JSON retains exact values, reference periods, availability/receipt clocks and provider-archive labels. Follow next_offset with the same event ID and both first-page pins, required when offset > 0. On HTTP 409 restart at offset zero without old pins. Service/account gates apply; as_of and original first-print reconstruction are unsupported.

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.

For changes, follow next_cursor with –cursor until has_more is false. The token retains the original filters and page size. Advance since only after every page completes. A 409 requires restarting from the original since and filters, with deduplication; resync from a Scale full dataset export if the checkpoint is outside retention, or rebuild the required date range with filtered API queries.

Set FC_API_KEY securely before running these data requests.

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 assets, crypto, source_license including attribution_url, source_rights, discovery_url, date-window fields, verification evidence and stale flags.

Crypto metadata, exports and source rights

Use category=crypto and canonical asset IDs from the series directory; global crypto has country=null. Coverage includes network schedules, vesting installments, governance voting deadlines and issuer supply projections, with availability varying by asset and source. Raw JSON and API CSV preserve the nested metadata below; CSV stores objects and arrays as JSON cells. Human CLI output includes source credits, required attribution links and factual notices, but remains a summary rather than a lossless export.

Field Interpretation and retention
crypto Retain event_type and source-specific fields. Unlocks may carry schedule_id, installment, beneficiaries, unlock_status, date_basis, token_amount and token_amount_basis. Governance rows carry DAO, space/proposal IDs, voting_start/end, voting_state, voting_type and choice_count. Supply projections retain projection_status and publisher decimal strings in projected_circulating_supply and projected_monthly_supply_change. Licensed schedules retain provider, provider_token, provider_basis and provider_categories as provider-supplied evidence, not independent verification.
source_license An actual upstream licence when applicable; may be null. Retain attribution, attribution_url, source link, licence URL, full notice and adaptation label. PatternPlus records require the linked credit Data: PatternPlus, carried in source_license.attribution and source_license.attribution_url, under the supplied CC BY 4.0 licence.
source_clock Raw publisher clock evidence. A null timezone means release_at_utc and time_local remain null; do not convert using release_tz, which may only identify the calendar jurisdiction. Date precision with all_day=false means unknown exact timing, not an all-day event.
source_rights Factual provenance and access-basis metadata for independently normalised facts; may be null. Preserve basis, access_basis, reviewed_at, attribution, source_url, terms_url and notice. This is not a publisher copyright licence or a claim of provider permission.
discovery_url Optional discovery-page link, which may identify an aggregator. It is separate from primary source_url and verification_url. A discovery link is not primary verification or a licence grant; internal CoinMarketCal API evaluation payloads are excluded.
date_window_start/end Inclusive estimated window bounds. date is their lower-bound index, not a confirmed occurrence date; calendar filters include overlapping windows. Retain time_precision, verification evidence, review timestamps and stale flags.

A configured network schedule is not observed activation. A vesting schedule is not proof of transfer or sale. A governance voting deadline is not approval, rejection or execution. An issuer supply projection is not a confirmed token unlock or observed circulating supply. Null is not zero; preserve exact decimal strings and all qualifications.

The public economic calendar is free to browse. Starter adds recorded forecasts, results and integration tools to your app or AI workflow. Free Developer provides bounded schedule JSON.

Plan Price Shared account allowance
Starter US$9.99/year 1,000/UTC day; 25,000/UTC calendar month
Build US$9.99/month or US$95.90/year 100,000/UTC day
Scale US$29.00/month or US$278.40/year 1,000,000/UTC day

Prices include applicable tax. Paid plans renew at the selected interval until cancelled; access continues until the paid period ends. Starter and Build include filtered exports and supported clients; Scale also includes the complete current dataset download. Existing contracts and effective allowances are preserved.

Inspect a fixed public sample or compare paid plans. The sample has up to three publisher-selected records and no arbitrary dates, filters or pagination. Programmatic data requires an account API key and the entitlement for the requested scope.

Free Developer: ongoing schedule JSON with 100 successful responses per UTC calendar month, at most 10 per UTC day, one verified account/key and no card. GET /calendar and /today cover UTC today through today+6, up to 20 records without pagination, with country (up to three codes), impact and bounded date filters. Figures, wider dates/history, other formats, hosted MCP and browser tools require paid access. Existing enrolled trials retain original clocks, budgets and scope.

Start with Starter — US$9.99/year · Free Developer schedules

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 Required account API key, sent as X-API-Key. Missing credentials fail before a network request. Same. An explicit nonempty –api-key or Client(api_key=…) takes precedence. Use private environment/secret settings; command-line credentials can enter shell history.
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 missing or rejected key, 402 required account activation, 404 an unknown/missing resource, 429 an exhausted daily or monthly allowance and 503 unavailable key validation or data. For 402, open your account workspace to complete activation before retrying. 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. A valid key is required and sent as X-API-Key; missing credentials raise FinanceCalendarError with status 401 before any request.
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:

import os
from financecalendar import Client

with Client(api_key=os.environ["FC_API_KEY"], 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. Retains network, unlock, governance and issuer-projection metadata plus source_license, source_rights and discovery_url. Estimated date_window_start/end overlap requested dates; date is only their lower-bound index. Projections are not observed releases; voting deadlines are not proposal outcomes.

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.

enrichment_history(series: str, **params: Any)

GET /enrichment/history. Required canonical series: us-jolts, us-adp, us-ism-services, us-trade-balance, us-cpi, us-nfp, us-ppi, us-retail-sales, us-pce, us-ism-manufacturing, us-industrial-production or us-consumer-confidence. Published evidence varies by series, provider qualification and server activation. Keyword parameters from_, to (release dates), limit (1–100, default 50), offset (0–999999), ledger_cursor and publication_revision. Follow next_offset with the same filters and both first-page pins, required when offset > 0. On HTTP 409 restart at offset=0 without old pins. Returns exact strings/nulls and selected edition evidence. This method does not accept as_of; use enrichment_as_of for accepted provider editions at a cutoff. Complete original first-print reconstruction is unsupported.

enrichment_editions(event_id: str, **params: Any)

GET /enrichment/editions. Required canonical event_id; keyword parameters limit (1–100, default 50), offset (0–999999), ledger_cursor and publication_revision. Follow next_offset with the same event and both first-page pins, required when offset > 0. On HTTP 409 restart at offset=0 without old pins. Preserves immutable edition IDs, metric/source reference periods, exact values, archive labels and separate availability/receipt clocks. as_of is unsupported.

enrichment_as_of(event_id: str, as_of: str | datetime, basis: str | None=None)

GET /enrichment/as-of. Required canonical event_id and as_of cutoff, an aware datetime or ISO instant with seconds and explicit Z or +00:00 offset, not later than now. Naive datetime inputs raise ValueError; aware datetimes are converted to UTC. Optional basis is engine_receipt (default, when Finance Calendar received an edition) or provider_availability (evidenced provider availability; provider-reported history without that evidence is excluded). Covers accepted provider editions in the current canonical publication, not official statistical observations. It does not prove customer availability at the cutoff or reconstruct complete original first prints. Requires a paid Starter, Build or Scale plan.

webhooks()

GET /webhooks. List the account’s webhook subscriptions with signing secrets masked. Requires a paid account-owned API key.

create_webhook(url: str, events: list[str], series: list[str] | None=None)

POST /webhooks. Required url is a public HTTPS destination; required events select result.published, schedule.cancelled, schedule.rescheduled, consensus.updated or event.added. Optional series restricts delivery to canonical series codes. The API validates the destination and permits at most five subscriptions per account. subscription.secret is returned once: store it privately. Verify X-FC-Webhook-Signature as t=<unix seconds>,v1=HMAC-SHA256(secret, t + "." + raw body). Requires a paid account-owned API key.

webhook(subscription_id: int)

GET /webhooks/{id}. Required subscription_id is converted to an integer. Return one owned subscription and its 20 most recent deliveries. Signing secrets remain masked; requires a paid account-owned API key.

delete_webhook(subscription_id: int)

DELETE /webhooks/{id}. Required subscription_id is converted to an integer. Delete the owned subscription and cancel its pending deliveries. Requires a paid account-owned API key.

rotate_webhook_secret(subscription_id: int)

POST /webhooks/{id}/rotate. Required subscription_id is converted to an integer. Return a new signing secret once and resume a paused owned subscription. Store the replacement secret privately; requires a paid account-owned API key.

test_webhook(subscription_id: int)

POST /webhooks/{id}/test. Required subscription_id is converted to an integer. Queue a webhook.test delivery to the owned subscription’s destination. Requires a paid account-owned API key.

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 date or explicitly zoned datetime string, datetime (serialized with isoformat) or None for 24 hours ago. Extra keyword parameters: series, change (added/updated/removed), limit (1–500, default 100) and cursor. Follow next_cursor until has_more is false; a cursor retains filters and limit. On 409 restart from the original since and filters with deduplication. Advance the checkpoint only after all pages complete; beyond retention, reload a Scale full dataset export or rebuild the required date range with filtered API queries.

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.

quality(**params: Any)

GET /quality. Keyword parameters pass through to the API. Returns the complete nested current-snapshot quality, provenance and supported evidence report. This is engine-observed current evidence, not historical first-print reconstruction; as_of is unsupported.

observations(**params: Any)

GET /observations. Keyword parameters include series, event_id, role, reference_period, limit, offset and snapshot_generated_at. Follow next_offset with the same filters and snapshot_generated_at; on HTTP 409 restart at offset=0. Nested source lineage and engine-observed revisions are retained. as_of and original historical first-print reconstruction are unsupported.

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”; retains nested crypto, source_license, source_rights and discovery_url, and 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__.

Build with the calendar behind the data.

Choose a plan, confirm your account and create an API key. Check the source coverage for the records your workflow needs.