# Agg.market — Prediction Market Aggregator > Agg.market - White lable perdeiction market agrigation ## 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) - [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. - [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 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. - [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. - [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 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. - [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. - [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. Returns 503 if the orderbook engine is unavailable. - [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, alphanumeric and underscores only. Returns 409 if the username is already taken. - [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. - [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, heartbeats, and user events over WebSocket - [Connect Button](https://docs.agg.market/components/auth/connect-button.md): Interactive preview for the @agg-build/auth ConnectButton surface - [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 - [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 - [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 - [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 - [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)