Authentication
Send your API key with every request. Keys start with opc_live_.
Send your key
Use the Authorization header (preferred) or X-API-Key:
Authorization: Bearer opc_live_...
# or
X-API-Key: opc_live_...Without a key, only /quote, /expirations and the site trends endpoints work, a few times a day per IP address.
Get and manage keys
- Sign up, add a card (the Free plan is never charged) and confirm your email. The key works once both are done.
- Create, name and revoke keys on your account page. All your keys share one plan and one quota.
- Revoke a key straight away if it leaks, then create a new one.
Important
Keep keys on your server. Don't put them in a web page, a mobile app or a public repository, where anyone can read them.
Restrict a key
On the account page you can lock a key to your servers:
- Allowed IP addresses or ranges: IPv4 or IPv6, e.g.
203.0.113.0/24. - Allowed user agents: the request's
User-Agentmust contain one of them.
A request that doesn't match gets HTTP 403 with error.code ip_not_allowed or user_agent_not_allowed.
MCP and AI assistants
The MCP server also accepts a key, but assistants such as Claude can sign in with your account instead. See OAuth sign-in.