Authentication
Every ROIC.ai API request requires an API key. Pass it as the apikey query parameter on any endpoint.
Your API Key
Sign in to see your API key.
Usage
Add your key as the apikey query parameter:
bash
curl "https://api.roic.ai/v2/stock-prices/latest/AAPL?apikey=YOUR_API_KEY"API Key Security
- Never expose your API key in client-side code or public repositories
- Store your key in environment variables or a secrets manager
- Use server-side requests to proxy API calls from your frontend
Free Tier
Apple (AAPL) data is available for all endpoints without a premium subscription. Requests for other companies without an active premium plan return a 403 Forbidden error:
{
"error": "Premium subscription required. Subscribe at https://roic.ai/pricing"
}Error Responses
| Status Code | Description |
|---|---|
200 OK | Successful request |
403 Forbidden | Invalid API key or premium subscription required |
404 Not Found | Company or resource not found |
500 Internal Server Error | Server error, contact [email protected] |
Next Steps
- View pricing plans to access all companies
- Search for tickers to find ticker symbols
- Get financial statements for any public company