Skip to main content

API Overview

The AGG API is a contract-first REST API for the prediction market aggregator. It handles auth (SIWE), encrypted venue key storage, trading (validate/execute, balance, holdings, splits), and normalized markets, events, and categories.

Base URL

https://api.agg.market
(Use your deployment URL in development.)

Authentication

Authentication is tiered. Each endpoint requires a specific tier; the server enforces it.
TierHeadersTypical use
nonePublic health check (GET /hello)
adminx-admin-keyInternal admin dashboard
appx-app-idServer-side or unauthenticated client calls (e.g. markets, orderbooks)
userx-app-id + Authorization: Bearer <jwt>User-specific actions (venue keys, trading) after SIWE sign-in

API Reference

For request/response schemas, try-it-out, and full endpoint details, use the API Reference tab (OpenAPI).

Example (app-tier)

curl -H "x-app-id: YOUR_APP_ID" https://api.agg.market/hello

Example (user-tier, after sign-in)

curl -H "x-app-id: YOUR_APP_ID" -H "Authorization: Bearer YOUR_JWT" https://api.agg.market/users/me