Authentication

How to use your API key with FinCal API.

1. Get your API key

Sign in to the dashboard to create a free API key. Keys are shown once at creation — save yours somewhere safe.

Sign in to get your key →

2. Pass your key on every request

Include your key using either the Authorization header (recommended) or the X-Api-Key header.

curl

# Authorization header (recommended)
curl -H "Authorization: Bearer fincal_live_YOUR_KEY_HERE" \
  "https://fincalapi.com/v1/day_status?date=2026-06-21&calendar=NYSE"

# X-Api-Key header (alternative)
curl -H "X-Api-Key: fincal_live_YOUR_KEY_HERE" \
  "https://fincalapi.com/v1/day_status?date=2026-06-21&calendar=NYSE"

Python (requests)

import requests

API_KEY = "fincal_live_YOUR_KEY_HERE"
headers = {"Authorization": f"Bearer {API_KEY}"}

r = requests.get(
    "https://fincalapi.com/v1/day_status",
    params={"date": "2026-06-21", "calendar": "NYSE"},
    headers=headers,
)
print(r.json())

Python (httpx)

import httpx

API_KEY = "fincal_live_YOUR_KEY_HERE"

with httpx.Client(headers={"Authorization": f"Bearer {API_KEY}"}) as client:
    r = client.get(
        "https://fincalapi.com/v1/day_status",
        params={"date": "2026-06-21", "calendar": "NYSE"},
    )
    print(r.json())

Go (go-resty)

import "github.com/go-resty/resty/v2"

client := resty.New()
client.SetHeader("Authorization", "Bearer fincal_live_YOUR_KEY_HERE")

resp, err := client.R().
    SetQueryParams(map[string]string{
        "date": "2026-06-21",
        "calendar": "NYSE",
    }).
    Get("https://fincalapi.com/v1/day_status")

JavaScript (fetch)

const API_KEY = "fincal_live_YOUR_KEY_HERE";

const res = await fetch(
  "https://fincalapi.com/v1/day_status?date=2026-06-21&calendar=NYSE",
  { headers: { "Authorization": `Bearer ${API_KEY}` } }
);
const data = await res.json();
console.log(data);

PowerShell

$headers = @{ "Authorization" = "Bearer fincal_live_YOUR_KEY_HERE" }
$r = Invoke-RestMethod `
  -Uri "https://fincalapi.com/v1/day_status?date=2026-06-21&calendar=NYSE" `
  -Headers $headers
$r | ConvertTo-Json

Error reference

Status Meaning Fix
401 Missing or invalid API key Add Authorization: Bearer <key> header, or get a key if you don't have one
429 Rate limit exceeded Back off and retry after the Retry-After seconds
400 Bad request (invalid date or calendar) Check date format (YYYY-MM-DD) and calendar code — see /v1/calendars for valid codes

Key management