Stock market data infrastructure
API authentication and request limits
Send X-API-Key securely, inspect your key status, and distinguish authentication, plan access, and rate-limit failures.
Documentation revised
Use the request header
Send X-API-Key on authenticated requests over HTTPS. Read the value from server-side secret storage or an environment variable. Do not place it in URLs, analytics events, screenshots, or client-side source code.
curl --fail-with-body -H "X-API-Key: $STOCKMARKET_API_KEY" \
https://stockmarketapi.ai/api/v1/auth/keys/me
Check current access
GET /api/v1/auth/keys/me returns information about the presented key. Quotas and dataset entitlements depend on the key's current tier. Consult pricing and the response headers instead of hard-coding a numerical quota into a client. Some dataset routes support separate payment flows; they do not make every request anonymously accessible.
Rotate and recover deliberately
POST /api/v1/auth/keys/rotate rotates the current credential; DELETE /api/v1/auth/keys revokes it. Update secret storage and running clients when rotating. A 401 calls for fixing credentials; a 403 calls for checking permission or plan access. Neither should trigger a rapid retry loop.