Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.agg.market/llms.txt

Use this file to discover all available pages before exploring further.

Packages

AGG ships four packages under @agg-build. Each builds on the one below it:
@agg-build/auth     → Auth UI + provider adapters
@agg-build/ui       → Pre-built React components (Liveline charts, orderbooks, pages)
@agg-build/hooks    → React hooks + providers (data fetching, WS, caching)
@agg-build/sdk      → Vanilla TypeScript client (REST + WebSocket + CandleBuilder)
Pick the highest layer you need. Lower layers are included as dependencies automatically.
PackageUse whenFramework
@agg-build/sdkFull control, or not using React (Node, React Native, vanilla JS)None
@agg-build/hooksReact app, you build your own UI, you pick your own chart libraryReact
@agg-build/uiYou want drop-in components that work out of the boxReact
@agg-build/authYou want the connect/sign-in UI with pluggable auth methodsReact

@agg-build/sdk

Framework-agnostic client for browsers, Node.js, and React Native. Zero peer dependencies. REST clientcreateAggClient() handles auth headers, session persistence, and request helpers for the public REST API. Use refreshAccessToken() when you need to renew a user session. WebSocket clientAggWebSocket manages connection lifecycle, subscriptions, and live orderbook state for you. CandleBuilder — Builds OHLCV candles from live orderbook and trade data so you can feed any chart library. Market aggregationmergeCandles() and mergeClosedCandles() merge per-venue candle data into a single aggregate view using volume-weighted averages. View on npm →

@agg-build/hooks

React hooks and providers on top of @agg-build/sdk. Powered by TanStack React Query for caching, deduplication, and background refetch. The hooks are chart-library-agnostic — they return generic data types (LiveCandle[], OrderbookState, etc.) that you render however you want. View on npm →

@agg-build/ui

Pre-built React components for charts, orderbooks, trading, and full page layouts. Styled with Tailwind CSS and fully themeable via CSS variables. Components must be rendered inside <AggProvider>. They call hooks internally — no manual data fetching needed. Uses grouped entry points (@agg-build/ui/pages, @agg-build/ui/events, @agg-build/ui/primitives, etc.) for tree-shaking. Browse the components docs for curated references, or open Storybook for the live component catalog and interactive states. View on npm →

@agg-build/auth

Optional auth package with a modular adapter pattern and the ConnectButton chooser UI. Auth stays separate so partners only install the wallet or OAuth dependencies they actually use, while @agg-build/ui remains focused on market data and trading surfaces. See the Connect Button reference for the live auth surface.

Built-in adapters

AdapterImportPeer dependency
SIWE (Ethereum)@agg-build/auth/siwewagmi
SIWS (Solana)@agg-build/auth/siws@solana/wallet-adapter-react, bs58
Google OAuth@agg-build/authNone
Twitter/X OAuth@agg-build/authNone
Apple Sign In@agg-build/authNone
Email magic link@agg-build/authNone
View on npm →

Versioning

All packages use linked versioning. When one changes, the rest are versioned in lockstep so compatible layers stay aligned.

Next steps

Setup Guide

Provider configuration and code examples for each integration path.

Authentication

Wallet, OAuth, and email sign-in flows on top of the package stack.

Real-Time Charts

Use CandleBuilder, hooks, or UI components for live charting.

Component References

Browse the higher-touch AGG UI surfaces and jump to Storybook.

Real-Time Orderbook

Build live orderbook views with venue attribution.

Funding & Withdrawals

Execution balances, deposit addresses, sync, and withdrawal workflows.