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:
| Package | Use when | Framework |
|---|---|---|
@agg-build/sdk | Full control, or not using React (Node, React Native, vanilla JS) | None |
@agg-build/hooks | React app, you build your own UI, you pick your own chart library | React |
@agg-build/ui | You want drop-in components that work out of the box | React |
@agg-build/auth | You want the connect/sign-in UI with pluggable auth methods | React |
@agg-build/sdk
Framework-agnostic client for browsers, Node.js, and React Native. Zero peer dependencies.
REST client — createAggClient() handles auth headers, session persistence, and request helpers
for the public REST API. Use refreshAccessToken() when you need to renew a user session.
WebSocket client — AggWebSocket 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 aggregation — mergeCandles() 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
| Adapter | Import | Peer dependency |
|---|---|---|
| SIWE (Ethereum) | @agg-build/auth/siwe | wagmi |
| SIWS (Solana) | @agg-build/auth/siws | @solana/wallet-adapter-react, bs58 |
| Google OAuth | @agg-build/auth | None |
| Twitter/X OAuth | @agg-build/auth | None |
| Apple Sign In | @agg-build/auth | None |
| Email magic link | @agg-build/auth | None |
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.