New to OAuth2? Start with the Quick Start to make your first API call in minutes, then return here for implementation details.
Endpoints
| Purpose | Endpoint |
|---|---|
| Authorization | https://app.aries.com/oauth2/authorize |
| Token exchange & refresh | POST https://api.aries.com/v1/oauth2/token |
Available Scopes
Request only the scopes your application needs.| Scope | Description | Example endpoints |
|---|---|---|
user:information | View user profile and personal details | GET /v1/users/me |
account:information | View account balances, positions, and transaction history | GET /v1/users/me/accountsGET /v1/accounts/{id}/balancesGET /v1/accounts/{id}/positions |
order:execution | Place, modify, and cancel orders | POST /v1/ordersPUT /v1/ordersDELETE /v1/orders |
order:information | View order history, status, and execution reports | GET /v1/accounts/{id}/orders |
position:information | View current positions and holdings | GET /v1/accounts/{id}/positions |
market:information | Access live and historical market data | GET /v1/marketdata/searchWSS /v1/market/ws |
calendar:information | Access earnings, economic, and market schedule data | GET /v1/calendars/economicsGET /v1/calendars/earnings |
options:information | Access options chains, Greeks, and expiration data | GET /v1/options/stocks/top-volumeGET /v1/options/etfs/top-volume |
analytics:information | View analytics, ratings, and market insights | GET /v1/analytics/ratingsGET /v1/analytics/market-breadth |
market:supplemental | Comprehensive market data: news, company profiles, financials, filings, ETF data, technical analysis | GET /v1/newsGET /v1/company/profileGET /v1/financials/statements |
Specify multiple scopes as a space-separated string:
account:information order:execution market:informationChoose your flow
Authorization Code Flow
Server-side apps that can securely store
client_secret.PKCE Flow
SPAs and mobile apps that cannot store
client_secret.How it works
Both flows follow this sequence. The difference is how you authenticate when exchanging the code for tokens: the Authorization Code flow usesclient_secret, while PKCE uses a code_verifier derived from a one-time random value.
Security Best Practices
Store credentials securely
Never hardcode
client_secret or tokens in source code. Use environment variables or a secrets manager.Use HTTPS only
Always use HTTPS for redirect URIs and all API calls in production. Never transmit credentials over HTTP.
Validate the state parameter
Always generate and verify
state to prevent CSRF attacks. Generate a new random value per authorization request.Rotate tokens proactively
Refresh access tokens before they expire. Persist any newly issued
refresh_token returned in the response.Rate Limits
Rate limits vary by endpoint category:Authentication
10 requests/minute
User Management
100 requests/minute
Market Data
1,000 requests/minute
Trading
50 requests/minute
429 Too Many Requests), wait until X-RateLimit-Reset before retrying, or use exponential backoff.
Troubleshooting
invalid_grant — Authorization code expired or already used
invalid_grant — Authorization code expired or already used
invalid_client — Client authentication failed
invalid_client — Client authentication failed
Causes: Incorrect
Solution: Verify credentials in Client Center. Regenerate
client_id or client_secret, or the client was deleted or disabled.Solution: Verify credentials in Client Center. Regenerate
client_secret if lost (it is shown only once).invalid_scope — Requested scope is invalid
invalid_scope — Requested scope is invalid
Causes: Typo in scope name (case-sensitive) or scope not enabled for your client.
Solution: Check scope names against the Available Scopes table and client configuration.
Solution: Check scope names against the Available Scopes table and client configuration.
redirect_uri_mismatch
redirect_uri_mismatch
Causes: The
Solution: Register all redirect URIs in Client Center. Values must match character for character.
redirect_uri does not exactly match a registered URI (including protocol, path, and trailing slashes).Solution: Register all redirect URIs in Client Center. Values must match character for character.
access_denied — User denied authorization
access_denied — User denied authorization