You’ll need: an app ID (Base URL, app IDs & API keys), your site’s
origin in the app’s allowed origins, and React 18 or later.
Result: a React app with AGG data, sign-in, and a buy that is tracked to a final state.
@agg-build/sdk.
1. Create the client and provider
Pick the layer that fits your app.- Hooks (bring your own UI)
- UI components
Hooks handle WebSocket subscriptions, caching, and cleanup.Then use hooks in any component:
2. Sign the user in
@agg-build/auth adds a connect button and sign-in methods on top of the provider. Trading calls
need a signed-in user.
3. Buy and track to a final state
The user needs a balance first. See Funding & withdrawals for deposit addresses. Then quote, fill, and poll the execution status untilterminal is true.
terminal is true. overallState then reads filled, partially_filled,
failed, cancelled, or expired. Read Order lifecycle & statuses
for what each state means.
WebSocket endpoint
The SDK and hooks manage the socket, reconnection, resnapshots, and orderbook integrity checks. If you open raw sockets yourself, connect to:Next steps
Quickstart: REST
The same flow with curl, for backends and agents.
Order lifecycle
Every order status and how to track it.
Real-Time Orderbook
Live orderbook rendering with the SDK, hooks, and UI.
Customize UI
Brand AGG components with CSS variables, labels, formatting, and slots.