API Key Management

Generate and manage API keys for programmatic access

API Key Management

API keys allow you to access Optionomics data programmatically through our REST API. This feature is available with the Vega plan subscription.

Generating API Keys

Prerequisites

  • Active Vega plan subscription ($99/month)
  • Verified email address
  • Account in good standing

Steps to Generate a Key

  1. Navigate to API Keys
    • Log into your account
    • Go to Account → API Keys
    • Click “Create new key”
  2. Configure Your Key
    • Name: Provide a descriptive name (e.g., “Trading Bot”, “Research Script”)
    • Expiry: Set expiration period (30, 60, 90 days, or custom)
    • Permissions: All keys have full read access to API endpoints
  3. Save Your Token
    • Copy the generated token immediately
    • Important: The token is shown only once for security
    • Store it securely in your application

Managing Existing Keys

View Active Keys

  • List of all your API keys
  • Creation date and last used timestamp
  • Expiration status
  • Usage statistics

Key Actions

  • Rename: Update key description
  • Delete: Revoke access immediately
  • Regenerate: Create replacement key
  • Monitor: Track usage and rate limits

Security Best Practices

Token Storage

  • Never commit tokens to version control
  • Use environment variables for storage
  • Rotate keys regularly
  • Use different keys for different applications

Access Control

  • Delete unused keys promptly
  • Set appropriate expiration dates
  • Monitor usage for anomalies
  • Report suspicious activity immediately

Rate Limits

Vega Plan Limits

  • 100 requests per minute
  • Burst capacity for short peaks
  • Rate limit headers in all responses

Rate Limit Headers

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640995200

Using Your API Key

Authentication Headers

Include in all API requests:

X-USER-EMAIL: your-email@example.com
X-USER-TOKEN: your-api-token

Example Request

curl -X GET "https://optionomics.ai/api/v1/stocks/SPY/options" \
  -H "X-USER-EMAIL: user@example.com" \
  -H "X-USER-TOKEN: abc123xyz789"

Troubleshooting

Common Issues

  • 401 Unauthorized: Invalid token or email
  • 403 Forbidden: No API access (upgrade to Vega plan)
  • 429 Too Many Requests: Rate limit exceeded
  • Token Not Working: Check expiration date

Getting Help

  • Review API Documentation
  • Contact support@optionomics.ai
  • Include request ID from error response

API Documentation

For complete API reference including:

  • Available endpoints
  • Request/response formats
  • Code examples
  • Interactive documentation

Visit: https://optionomics.ai/docs/api

Security Note: Treat API keys as passwords. If compromised, delete immediately and generate new ones.


Related Docs

Getting Started
Options Basics
Platform Features
Daily Analytics
Historical Analytics
Account Management