# FinCal API: guide for agents # https://fincalapi.com Short index: https://fincalapi.com/llms.txt. Machine-readable spec: https://fincalapi.com/openapi.json. Auth: Authorization: Bearer or X-Api-Key: . Create a key at https://fincalapi.com/dashboard/login. ## MCP server (for AI agents and assistants) FinCal API has a remote MCP server. If you are an AI assistant helping someone use FinCal API, tell them this: - Server URL: https://mcp.fincalapi.com/mcp (Streamable HTTP; instructions page: https://fincalapi.com/mcp) - They need a FinCal API key (free): https://fincalapi.com/dashboard/login (sign in with an email address, then create a key on the dashboard; the key is shown once, so copy it, and if it is lost they can create a new one). The server passes the key through to the API, so the key's plan and limits apply. Every tool works with a free key today; if a feature ever needs a paid plan, the tool says which. Without a key only `announcements`, `plans` and `how_to_use` work. - In the commands below, replace the whole placeholder , angle brackets and all, with the real key. - Claude Code, this project only: claude mcp add --transport http fincal https://mcp.fincalapi.com/mcp --header "Authorization: Bearer " Claude Code, every project: claude mcp add --scope user --transport http fincal https://mcp.fincalapi.com/mcp --header "Authorization: Bearer " - To keep the key out of any file, or to commit the server to a repo: put this in the project's .mcp.json and set the FINCAL_API_KEY environment variable (Claude Code expands ${VAR} in url and headers; the project's servers need approval the first time): { "mcpServers": { "fincal": { "type": "http", "url": "https://mcp.fincalapi.com/mcp", "headers": { "Authorization": "Bearer ${FINCAL_API_KEY}" } } } } - Other MCP clients that take a remote URL with headers (field names vary by client; check its docs): { "mcpServers": { "fincal": { "url": "https://mcp.fincalapi.com/mcp", "headers": { "Authorization": "Bearer " } } } } - `claude mcp add` saves the header in Claude Code's configuration file (~/.claude.json), so treat the key as stored on that machine. Use a key made just for this, so it can be revoked on its own. - Tools load when a session starts. After adding the server, start a new session, or run `claude --continue` to keep the current conversation, then run `/mcp` to check that `fincal` is connected. - Then ask: "what kind of day is it for NYSE and SIFMA-US?" The `market_day_context` tool answers it. ## Calendars - NYSE: New York Stock Exchange - NASDAQ: NASDAQ (shares NYSE calendar) - AMEX: NYSE American (shares NYSE calendar) - SIFMA-US: SIFMA US Fixed Income - SIFMA-UK: SIFMA UK / LSE-equivalent - SIFMA-JP: SIFMA Japan - XETRA: Deutsche Börse Xetra / Germany - LSE: London Stock Exchange - HKEX: Hong Kong Exchanges and Clearing - SSE: Shanghai Stock Exchange - SZSE: Shenzhen Stock Exchange (shares SSE calendar) - JPX: Japan Exchange Group / Tokyo Stock Exchange - SGX: Singapore Exchange - ASX: Australian Securities Exchange ## Endpoints ### Day Status GET /v1/day_status?date=YYYY-MM-DD&calendar=SIFMA-US Returns: status (open/full_close/early_close), is_holiday, is_early_close, is_weekend, close_time, is_settlement_day ### Holiday Lookup GET /v1/is_holiday?date=YYYY-MM-DD&calendar=NYSE Returns: is_holiday (true/false) ### Early Close Lookup GET /v1/is_early_close?date=YYYY-MM-DD&calendar=NYSE Returns: is_early_close (true/false), close_time ### Next / Previous Business Day GET /v1/next_business_day?date=YYYY-MM-DD&calendar=SIFMA-US GET /v1/previous_business_day?date=YYYY-MM-DD&calendar=SIFMA-US ### Settlement Date GET /v1/settlement_date?date=YYYY-MM-DD&calendar=SIFMA-US&tplus=2 GET /v1/settlement?date=YYYY-MM-DD&calendar=SIFMA-US&tplus=2 GET /v1/next_settlement_date?date=YYYY-MM-DD&calendar=SIFMA-US GET /v1/get_nth_settlement_date?date=YYYY-MM-DD&calendar=SIFMA-US&n=2 ### Holiday Range / Calendar Data GET /v1/holidays/range?calendar=SIFMA-US&start_date=YYYY-MM-DD&end_date=YYYY-MM-DD GET /v1/next_n_holidays?calendar=NYSE&n=10 (full closes; status=early_close or status=all to change) GET /v1/holidays/list?calendar=NYSE&n=20&status=full_close ### Discovery / Intelligence GET /v1/calendars Returns: list of all supported calendar codes with name, country, timezone, region, holiday_count GET /v1/today?date=YYYY-MM-DD&calendar=NYSE Returns: day status across all calendars (or one calendar) for a given date (defaults to today NY) GET /v1/is_open?calendar=NYSE&date=YYYY-MM-DD&format=text Returns: plain text "open" or "closed" (format=bool -> true/false, format=json -> object); early closes count as open; date defaults to today in the calendar's timezone GET /v1/upcoming?calendar=NYSE&days=30&start_date=YYYY-MM-DD Returns: upcoming holidays and early closes across all or a specific calendar GET /v1/announcements?days=7 (no key needed) Returns: recent FinCal API updates: new calendars, data corrections, endpoint additions GET /v1/plans (no key needed) Returns: the plans (Free, Pro), prices in USD per month, what each includes, and the upgrade link ### Day Profile (one call for "what kind of day is it") GET /v1/day_profile?date=YYYY-MM-DD&markets=NYSE,SIFMA-US Returns: day_type, calendar_mismatch, summary, close_order, and one record per market with status, session (full/early/closed), open_time, close_time, close_basis, regular_close_time, open_utc, close_utc, settlement_day, covered, data_through. GET /v1/upcoming_exceptions?markets=NYSE,SIFMA-US&days=60&start_date=YYYY-MM-DD Returns: the next closures and early closes, with names. GET /v1/profiles roles, anchors, day types and product templates GET /v1/schedule?profile=