Skip to main content

API Keys

All requests to the MarketDataset API require an API key passed via the X-API-KEY header.

Getting an API key

  1. Sign in at marketdataset.ai/dashboard
  2. In the Overview section, click Create API Key
  3. Give your key a descriptive name (e.g., “production”, “backtesting”)
  4. Copy the key immediately — it’s only shown once

Key format

API keys use the prefix sk_ followed by a 32-character random string:

Security best practices

API keys should only be used in server-side code or secure environments. Never embed them in frontend JavaScript, mobile apps, or public repositories.
Store keys in environment variables, not hardcoded in source code.
Create a new key and delete the old one from the Dashboard. Old keys are invalidated immediately upon deletion.
Create distinct keys for development, staging, and production to limit blast radius if a key is compromised.

Error responses