# Agg.market — Prediction Market Aggregator > Agg.market - white-label prediction market aggregation ## Docs - [Get analytics](https://docs.agg.market/api-reference/app-management/get-analytics.md) - [Get the per-app UI config (disabled venues + categories)](https://docs.agg.market/api-reference/app-management/get-the-per-app-ui-config-disabled-venues-+-categories.md) - [Get user](https://docs.agg.market/api-reference/app-management/get-user.md) - [List users](https://docs.agg.market/api-reference/app-management/list-users.md) - [List users affected by market resolution](https://docs.agg.market/api-reference/app-management/list-users-affected-by-market-resolution.md) - [Recompile a fingerprint to ImportedTheme + warnings](https://docs.agg.market/api-reference/app-management/recompile-a-fingerprint-to-importedtheme-+-warnings.md): Pure compute. Used by the studio after a user edits a fingerprint field, to refresh warnings/fixes/fit without re-extracting. - [Replay failed deliveries](https://docs.agg.market/api-reference/app-management/replay-failed-deliveries.md) - [Rotate webhook signing secret](https://docs.agg.market/api-reference/app-management/rotate-webhook-signing-secret.md) - [Exchange auth code for tokens](https://docs.agg.market/api-reference/authentication/exchange-auth-code-for-tokens.md): Exchanges a one-time auth code for an access + refresh token pair. Auth codes are returned by OAuth/magic-link callback redirects. - [Refresh access token](https://docs.agg.market/api-reference/authentication/refresh-access-token.md): Issues a new access + refresh token pair given a valid refresh token. - [Sign out](https://docs.agg.market/api-reference/authentication/sign-out.md): Revokes all tokens for the user by bumping their tokenVersion. - [Start authentication](https://docs.agg.market/api-reference/authentication/start-authentication.md): Initiates an auth flow. Required fields depend on the provider: - [Verify SIWE/SIWS signature](https://docs.agg.market/api-reference/authentication/verify-siwesiws-signature.md): Verifies a signed SIWE/SIWS message and returns an access + refresh token pair directly. - [Fetch Turnstile site key](https://docs.agg.market/api-reference/bot-protection/fetch-turnstile-site-key.md): Returns the Cloudflare Turnstile site key registered for the app so clients can render the Turnstile widget anywhere in their UI. `siteKey` is `null` when no widget is linked to the app. - [Verify Turnstile token](https://docs.agg.market/api-reference/bot-protection/verify-turnstile-token.md): Verifies a Cloudflare Turnstile token against the app's linked widget. Intended to be called from **your backend**, not the browser — API keys are secrets and must never ship to the client. Both `x-app-id` and `x-app-api-key` are required; the server rejects the request with `401` if `x-app-id` does… - [Get chart bars](https://docs.agg.market/api-reference/charts/get-chart-bars.md): Returns OHLCV bars for a single venue market. - [Correlated Markets status and coverage](https://docs.agg.market/api-reference/discovery/correlated-markets-status-and-coverage.md): Public app-tier Discovery endpoint that reports Correlated Markets signal, embedding, and background worker coverage. - [Find correlated markets by semantic similarity](https://docs.agg.market/api-reference/discovery/find-correlated-markets-by-semantic-similarity.md): Public app-tier Discovery endpoint. Given a natural language query, finds markets whose generated market signals overlap with the query via vector similarity. - [Find events connected via shared market signals](https://docs.agg.market/api-reference/discovery/find-events-connected-via-shared-market-signals.md): Public app-tier Discovery endpoint that returns related events connected to a source market through generated market signals. - [Get correlated market signals for a market](https://docs.agg.market/api-reference/discovery/get-correlated-market-signals-for-a-market.md): Public app-tier Discovery endpoint that returns generated Yes/No signals explaining which real-world states become more or less likely if a market resolves. - [Get live crypto reference prices](https://docs.agg.market/api-reference/discovery/get-live-crypto-reference-prices.md): Returns fresh reference prices for recurring crypto market targets. Responses are never older than 1 second; concurrent requests are deduplicated across API instances. - [Get ripple effect of a market resolving (by internal ID)](https://docs.agg.market/api-reference/discovery/get-ripple-effect-of-a-market-resolving-by-internal-id.md): Public app-tier Discovery endpoint that returns expand or hedge candidates for an already-known AGG venueMarketId. - [Get Venue Event](https://docs.agg.market/api-reference/discovery/get-venue-event.md): Returns a single venue event with nested markets and outcomes. - [List categories](https://docs.agg.market/api-reference/discovery/list-categories.md): Returns categories filtered by parentId. Omit parentId for top-level categories. - [List recurring crypto window markets](https://docs.agg.market/api-reference/discovery/list-recurring-crypto-window-markets.md): Returns deterministic crypto window markets grouped by asset, window duration, and derived window start across supported venues. Scope is limited to 5 minute, 15 minute, 1 hour, and 1 day recurring crypto markets. - [List venue events](https://docs.agg.market/api-reference/discovery/list-venue-events.md): Returns paginated venue events with optional filters for venue, status, category, and search. - [List venue markets](https://docs.agg.market/api-reference/discovery/list-venue-markets.md): Returns paginated venue markets with optional filters for venue, status, category, and date range. - [Resolve a market by venue ID, slug, or text and return cascade](https://docs.agg.market/api-reference/discovery/resolve-a-market-by-venue-id-slug-or-text-and-return-cascade.md): Public app-tier Discovery endpoint. Accepts any identifier the user has: venue+externalId, slug, conditionId, or fuzzy text search. Resolves to a market and returns cached correlated market candidates. If generation is missing, a market-intel BullMQ job is queued and the endpoint returns 202. - [Cancel a pending order](https://docs.agg.market/api-reference/execution/cancel-a-pending-order.md): Cancels a pending order. Orders already processing cannot be cancelled. - [Create a paper trading account](https://docs.agg.market/api-reference/execution/create-a-paper-trading-account.md) - [Execute quote](https://docs.agg.market/api-reference/execution/execute-quote.md): Accepts a previously quoted smart-route quote and returns pending order IDs for the submitted fill execution. - [Get a paper trading account](https://docs.agg.market/api-reference/execution/get-a-paper-trading-account.md) - [Get a paper trading portfolio](https://docs.agg.market/api-reference/execution/get-a-paper-trading-portfolio.md) - [Get withdrawal status](https://docs.agg.market/api-reference/execution/get-withdrawal-status.md): Returns the current persisted state of a withdrawal — used as a fallback when the WS lifecycle channel has missed events. - [List paper trading accounts](https://docs.agg.market/api-reference/execution/list-paper-trading-accounts.md) - [List paper trading orders](https://docs.agg.market/api-reference/execution/list-paper-trading-orders.md) - [List paper trading positions](https://docs.agg.market/api-reference/execution/list-paper-trading-positions.md) - [Place a paper trading order](https://docs.agg.market/api-reference/execution/place-a-paper-trading-order.md) - [Place limit order](https://docs.agg.market/api-reference/execution/place-limit-order.md): Places a venue-specific limit order. Funds or shares are reserved while the order is open and fills are reconciled asynchronously. - [Redeem winnings for resolved positions](https://docs.agg.market/api-reference/execution/redeem-winnings-for-resolved-positions.md): Converts a user's winning prediction-market positions to USDC. EVM venues submit gas-sponsored transactions and complete asynchronously via ws redeem_event; Kalshi via dFlow credits synchronously after Solana confirmation. - [Reset a paper trading account](https://docs.agg.market/api-reference/execution/reset-a-paper-trading-account.md) - [Set a paper trading account cash balance](https://docs.agg.market/api-reference/execution/set-a-paper-trading-account-cash-balance.md) - [Withdraw funds](https://docs.agg.market/api-reference/execution/withdraw-funds.md): Withdraws funds to an external address and returns submitted transfer details. - [Compute order route](https://docs.agg.market/api-reference/orderbook/compute-order-route.md): Computes a fill quote across available venues for a specific venue market outcome and returns the suggested fills. When a user JWT is supplied the quote is scoped to the user's wallet balances and may be executed; without a JWT the response is a preview-only quote. - [Get live midpoints for multiple markets](https://docs.agg.market/api-reference/orderbook/get-live-midpoints-for-multiple-markets.md): Returns live orderbook midpoints for the requested venue market IDs. Midpoint represents the Yes-side price (0-1). Max 200 IDs per request. Pass `bestPrice=true` to also receive top-of-book `bestBid`/`bestAsk` on every entry, per-outcome row, and matched sibling. Returns 503 if the orderbook engine… - [Get live orderbook for a single outcome](https://docs.agg.market/api-reference/orderbook/get-live-orderbook-for-a-single-outcome.md): Returns the live single-venue orderbook for a specific venue market outcome, including the sticky tick and midpoint provenance (`markSource`). - [Get live orderbooks for multiple markets](https://docs.agg.market/api-reference/orderbook/get-live-orderbooks-for-multiple-markets.md): Returns live per-venue orderbooks for the explicit venueMarketIds requested. This is the only supported public REST endpoint for current orderbook reads. - [Create a ramp widget session for checkout](https://docs.agg.market/api-reference/ramp/create-a-ramp-widget-session-for-checkout.md) - [Get crypto purchase quotes](https://docs.agg.market/api-reference/ramp/get-crypto-purchase-quotes.md) - [Search events or markets](https://docs.agg.market/api-reference/search/search-events-or-markets.md): Hybrid search (trigram + FTS + vector) across events or markets. Returns results ranked by relevance. Use listing endpoints for filtered discovery. - [Confirm account linking](https://docs.agg.market/api-reference/users/confirm-account-linking.md): Exchanges the short-lived `link_confirm_token` (handed to the partner app by the link callback redirect) for an actual Account row attached to the current user's principal. The server matches the bearer's principalId AND appId to the token's values before writing — this is the final ownership check.… - [Disconnect auth provider](https://docs.agg.market/api-reference/users/disconnect-auth-provider.md): Removes a linked auth provider from the current user's identity. Cannot disconnect the last remaining provider (would lock the user out). - [Get avatar upload URL](https://docs.agg.market/api-reference/users/get-avatar-upload-url.md): Returns a presigned S3 URL for the user to upload their avatar. Allowed types: JPEG, PNG, GIF, WebP. Max size: 5 MB. After upload, the image is automatically processed to WebP and served via CDN. - [Get balances](https://docs.agg.market/api-reference/users/get-balances.md): Returns per-chain token balances and per-venue position balances for the authenticated user. - [Get current user](https://docs.agg.market/api-reference/users/get-current-user.md): Returns the authenticated user's profile. - [Get deposit addresses](https://docs.agg.market/api-reference/users/get-deposit-addresses.md): Returns the user's deposit addresses (EVM + Solana) and supported chains/tokens. Returns 202 while addresses are being prepared -- poll until 200. - [Get user activity feed](https://docs.agg.market/api-reference/users/get-user-activity-feed.md): Returns a unified, timestamp-ordered feed of the authenticated user's trades, withdrawals, standalone bridges, deposits, and low-level wallet operations. Cursor-based pagination. - [Get user orders](https://docs.agg.market/api-reference/users/get-user-orders.md): Returns paginated orders for the authenticated user with venue market details. - [Get user positions](https://docs.agg.market/api-reference/users/get-user-positions.md): Returns open positions grouped by matched market with per-venue breakdown and current pricing. - [Initiate KYC](https://docs.agg.market/api-reference/users/initiate-kyc.md): Starts the KYC process for a venue. Returns a KYC URL to redirect the user to. After completion, the user is redirected back to the provided redirectUri. - [Link partner external user ID (HMAC-verified)](https://docs.agg.market/api-reference/users/link-partner-external-user-id-hmac-verified.md): Verifies a partner-signed external user ID assertion and stores the linked external ID on the current user. - [Start account linking](https://docs.agg.market/api-reference/users/start-account-linking.md): Initiates an account-link flow. Authenticated-only. For OAuth providers returns a provider redirect URL and sets an HttpOnly proof cookie that is required at callback time. The same-browser guarantee plus a mode discriminator on the state JWT prevents a phished link URL from attaching a victim's ide… - [Update username](https://docs.agg.market/api-reference/users/update-username.md): Updates the current user's username. Must be 3-30 characters. Letters, numbers, and `_ - .` allowed; must start and end with a letter or number. Returns 409 if the username is already taken. - [Arb](https://docs.agg.market/api-reference/websockets/arb.md): Subscribe to per-market arb-return updates. Send `{ action: "subscribe", channel: "arb", marketIds: string[] }`. The server echos subscribed marketIds in the `subscribed` reply. No initial snapshot — updates arrive as `arb_market_update` messages when the engine detects a change. - [Arb-feed](https://docs.agg.market/api-reference/websockets/arb-feed.md): Subscribe to the full arb-return broadcast feed. Send `{ action: "subscribe", channel: "arb-feed" }` (no ids required). Receives batched `arb_feed_batch` messages for all markets whenever the engine publishes arb updates. - [Auth](https://docs.agg.market/api-reference/websockets/auth.md): Authenticate mid-session to receive user-specific events. Send your JWT token (same as REST API) to upgrade from app-level to user-level auth. Supports re-authentication for token refresh or user switch. - [Orderbook](https://docs.agg.market/api-reference/websockets/orderbook.md): Subscribe to aggregated orderbook updates for canonical markets. Receive an initial snapshot, then incremental deltas with sequencing and checksums. Client maintains a local book by applying deltas. Request a resnapshot if your local state drifts. - [Trades](https://docs.agg.market/api-reference/websockets/trades.md): Subscribe to public trade feed for outcomes. No user auth required. Uses { action: "subscribe", channel: "trades", outcomeIds } message format. Shares the 500-subscription limit with orderbook subscriptions. - [User events](https://docs.agg.market/api-reference/websockets/userevents.md): User-specific events (requires user-level auth via authenticate action or token query param). Streams order confirmations, balance updates, and a venue-agnostic order lifecycle event (`order_event`) covering DAG steps and terminal fill / failure status across all venues. - [Correlated Markets](https://docs.agg.market/api/discovery/correlated-markets.md): Public Discovery API for finding markets connected by generated real-world outcome signals - [API Overview](https://docs.agg.market/api/overview.md): AGG REST API — authentication, users, markets, orderbooks, charts, and execution - [Setup Guide](https://docs.agg.market/api/setup.md): Wire up AGG for your app — client setup, provider stack, auth, and WebSocket - [WebSocket Protocol](https://docs.agg.market/api/websocket.md): Stream live orderbooks, trades, arbitrage returns, heartbeats, and user events over WebSocket - [Changelog](https://docs.agg.market/changelog.md): Release history for the @agg-build SDK, hooks, UI, and auth packages. - [Connect Button](https://docs.agg.market/components/auth/connect-button.md): Interactive preview for the @agg-build/auth ConnectButton surface - [Customize UI](https://docs.agg.market/components/customization.md): Theme AGG UI components with CSS variables, next/font, labels, formatting, and component slots - [Event List](https://docs.agg.market/components/events/event-list.md): Interactive preview for the @agg-build/ui EventList surface - [Market Details](https://docs.agg.market/components/events/market-details.md): Interactive preview for AGG market detail surfaces - [Components Overview](https://docs.agg.market/components/overview.md): Pre-built UI components for prediction market data - [Event Market Page](https://docs.agg.market/components/pages/event-market-page.md): Interactive preview for the @agg-build/ui EventMarketPage surface - [Home Page](https://docs.agg.market/components/pages/home-page.md): Interactive preview for the @agg-build/ui HomePage surface - [Place Order](https://docs.agg.market/components/trading/place-order.md): Interactive previews for the @agg-build/ui PlaceOrder trading surface - [Settlement](https://docs.agg.market/components/trading/settlement.md): Interactive preview for the @agg-build/ui Settlement surface - [Introduction](https://docs.agg.market/introduction.md): AGG unifies prediction market liquidity, funding, routing, and market data into one integration - [Packages](https://docs.agg.market/packages/overview.md): Four npm packages — pick the layer that fits your app - [Account Linking](https://docs.agg.market/recipes/account-linking.md): Link multiple auth providers to a single user account - [Canonical Market Key (aggKey)](https://docs.agg.market/recipes/agg-key.md): Identify and fetch the same market across venues with a single deterministic key - [Authentication](https://docs.agg.market/recipes/authentication.md): Sign users in with SIWE, SIWS (Solana), Google, Twitter, Apple, or Email magic link - [Avatar Upload](https://docs.agg.market/recipes/avatar-upload.md): Upload and set a user avatar with presigned S3 URLs - [Bot Protection](https://docs.agg.market/recipes/bot-protection.md): Shield any user action with Cloudflare Turnstile challenges and multi-layer rate limiting - [Building Market Views](https://docs.agg.market/recipes/building-market-views.md): How to use venue-events, venue-markets, and orderbook endpoints together to build prediction market UIs - [Comparing Venue Prices](https://docs.agg.market/recipes/comparing-venue-prices.md): Fetch matched events, walk every matched market, and pull midpoints in one batch with the SDK - [Correlated Markets SDK recipe](https://docs.agg.market/recipes/correlated-markets.md): End-to-end SDK walkthrough for resolving markets and rendering related events with @agg-build/sdk - [Funding & Withdrawals](https://docs.agg.market/recipes/deposits.md): Use the Execution API for deposit addresses, balances, sync, and withdrawals - [Partner External ID Linking](https://docs.agg.market/recipes/external-id-linking.md): Link an authenticated AGG user to your app's internal user ID with an HMAC assertion - [Live Crypto Markets](https://docs.agg.market/recipes/live-crypto-markets.md): Discover recurring crypto windows and poll fresh reference prices for partner apps - [Trusted Proxy](https://docs.agg.market/recipes/partner-trusted-proxy.md): Forward end-user IPs to AGG for accurate per-user geo enforcement when proxying through your backend - [Server API Keys](https://docs.agg.market/recipes/server-api-keys.md): Authenticate server-to-server calls with x-app-api-key and optionally lock your app to key-only access - [Token Refresh](https://docs.agg.market/recipes/token-refresh.md): Renew user sessions with refreshAccessToken() - [Webhook Event Reference](https://docs.agg.market/recipes/webhooks/event-reference.md): Full payload schemas for every webhook event type - [Managing Webhook Endpoints](https://docs.agg.market/recipes/webhooks/managing-endpoints.md): Create and manage webhook endpoints from the admin dashboard - [Webhooks](https://docs.agg.market/recipes/webhooks/overview.md): Receive real-time event notifications at your own HTTPS endpoints - [Verifying Webhook Signatures](https://docs.agg.market/recipes/webhooks/verifying-signatures.md): Verify that webhook deliveries are authentic and untampered, in any framework - [Real-Time Arbitrage](https://docs.agg.market/recipes/websocket-arb.md): Stream live cross-venue arbitrage returns with the SDK and React hooks - [Real-Time Charts](https://docs.agg.market/recipes/websocket-charts.md): Bootstrap TradingView-style bars by outcome id and keep the view live - [User Notifications](https://docs.agg.market/recipes/websocket-notifications.md): Receive authenticated order and balance events over WebSocket - [Real-Time Orderbook](https://docs.agg.market/recipes/websocket-orderbook.md): Stream a live aggregated orderbook with the SDK, hooks, or UI components ## OpenAPI Specs - [openapi](https://docs.agg.market/openapi/openapi.json) ## AsyncAPI Specs - [asyncapi](https://docs.agg.market/openapi/asyncapi.json)