Skip to main content
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.
Install the packages you need. See the Packages overview for what each one does and its peer dependencies. Every layer uses the same client from @agg-build/sdk.

1. Create the client and provider

Pick the layer that fits your app.
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.
See the Connect Button reference and Authentication & sessions for every provider.

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 until terminal is true.
Stop polling when 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:
See WebSocket Protocol.

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.