API Overview
AGG REST API — authentication, users, markets, orderbooks, charts, and execution
API Overview
The AGG API gives partner apps access to authentication, user profile endpoints, venue events and markets, categories, live orderbooks, charts, and execution workflows.
Base URL
https://api.agg.market
(Use your deployment URL in development.)
Authentication
Authentication is tiered. Each documented endpoint uses one of these partner-facing tiers:
| Tier | Headers | Typical use |
|---|---|---|
| app | x-app-id | Public partner reads: venue events, venue markets, orderbooks, charts, and auth start/exchange flows |
| user | x-app-id + Authorization: Bearer <jwt> | User profile, avatar upload, KYC, balances, positions, orders, deposit addresses, withdrawals |
API Reference
For request/response schemas, try-it-out, and full endpoint details, use the API Reference tab (OpenAPI).
Current orderbook reads
GET /orderbooks is the only supported public REST endpoint for live current-book reads.
Pass one or more venueMarketIds query parameters for the exact markets you want:
curl \
-H "x-app-id: YOUR_APP_ID" \
"https://api.agg.market/orderbooks?venueMarketIds=market-1&venueMarketIds=market-2"
The response returns one item per requested venueMarketId in request order. Inspect each item’s
status and error fields to distinguish:
okmarket_not_foundmarket_resolvedmarket_closedmarket_pausedmarket_unopenedbook_not_loaded
Legacy public REST current-book endpoints return 410 Gone and should be migrated to /orderbooks.
Example (app-tier)
curl \
-H "x-app-id: YOUR_APP_ID" \
"https://api.agg.market/venue-events?limit=10"
Example (user-tier, after sign-in)
curl \
-H "x-app-id: YOUR_APP_ID" \
-H "Authorization: Bearer YOUR_JWT" \
"https://api.agg.market/execution/balances"
Route families
- Authentication: start a provider flow, verify wallet signatures, exchange redirect codes, refresh access tokens, sign out.
- Users: fetch the current user, update profile data, upload avatars, disconnect linked providers, initiate KYC, and access balances, positions, orders, and deposit addresses.
- Venue Events / Venue Markets / Categories: browse normalized market data for lists and detail views.
- News Feed / Correlated Markets: show market-aware articles, resolve related markets, inspect generated signals, and find expand or hedge candidates through the public Discovery API.
- Orderbook / Charts: fetch live per-venue books through
/orderbooks, route previews, historical candles, and chart-ready data. - Execution: execute quotes and withdrawals.