Authentication
StatAlpha can be used through the web console or through the API.
Web Console
Section titled “Web Console”Open the web console in your browser:
https://app.statalpha.ioSign in with your StatAlpha account. After login, you can open analytics modules from the dashboard and manage your account from My account.
Your account page shows:
- current plan
- web access status
- API access status
- history access
- request limits and remaining usage
- password reset action
API Access
Section titled “API Access”Direct API access requires an API-enabled StatAlpha account. If API access is enabled for your account, sign in through Auth0 from your API client and send the returned access token as a Bearer token:
Authorization: Bearer <ACCESS_TOKEN>The standard login flow for direct API access is Auth0 Device Authorization Flow. Use the API audience and direct API client ID supplied for your account. If My account displays a placeholder instead of a usable client ID, contact StatAlpha support; do not substitute a web-login or development client. Your tool requests a device code, you confirm the login in your browser, and the client then uses the returned access token as a Bearer token.
For StatAlpha production, use AUTH0_DOMAIN=auth.statalpha.io and AUTH0_AUDIENCE=https://api.statalpha.io. Set AUTH0_DIRECT_API_CLIENT_ID to the direct API client ID supplied for your account. The domain is a hostname without https://.
- Request a device code:
curl -X POST "https://${AUTH0_DOMAIN}/oauth/device/code" \ -H "content-type: application/x-www-form-urlencoded" \ -d "client_id=${AUTH0_DIRECT_API_CLIENT_ID}" \ -d "audience=${AUTH0_AUDIENCE}"Auth0 returns a device_code, user_code, verification_uri, and verification_uri_complete. Open the verification URL in your browser, sign in, and approve the request.
- Poll for the access token:
curl -X POST "https://${AUTH0_DOMAIN}/oauth/token" \ -H "content-type: application/x-www-form-urlencoded" \ -d "grant_type=urn:ietf:params:oauth:grant-type:device_code" \ -d "device_code=<DEVICE_CODE_FROM_STEP_1>" \ -d "client_id=${AUTH0_DIRECT_API_CLIENT_ID}"While approval is still pending, Auth0 returns authorization_pending. After approval, the response includes access_token.
- Call the StatAlpha API with the Bearer token:
curl -s \ -H "Authorization: Bearer $ACCESS_TOKEN" \ "https://api.statalpha.io/stats/fvg/summary?symbol=AAPL&timeframe=15m&time_window=12M"Keep access tokens private. Do not commit them to source code repositories, publish them in frontend code, or share them in support screenshots. Access tokens expire; request a new token through your OAuth client when needed.
Check Your Account
Section titled “Check Your Account”Use /me to check the access and limits attached to your authenticated account:
curl -s \ -H "Authorization: Bearer $ACCESS_TOKEN" \ "https://api.statalpha.io/me"Use /me/usage to see current request-limit usage:
curl -s \ -H "Authorization: Bearer $ACCESS_TOKEN" \ "https://api.statalpha.io/me/usage"Common Errors
Section titled “Common Errors”| Status | Meaning |
|---|---|
401 |
Missing or invalid authentication |
403 |
Your account does not have access to this feature, API route, history range, or billing state |
429 |
Request limit exceeded |
If you receive 403 for direct API calls, your account may not have API access enabled. Check My account or contact StatAlpha support.