Skip to main content
@agg-build/sdk is a thin client over the REST API. Each method below calls one HTTP operation. Follow the link for the full request and response schema.
createAggClient() returns an AggClient. It adds the x-app-id and Authorization headers for you and keeps the user’s session. See Base URL, app IDs & API keys for the base URL and Quickstart: REST for a full trade.

Auth

Read-only session properties: isAuthenticated, authStatus, user, address, appId.

Users

Markets

Market data

Trading

Portfolio

Funding

Paper trading

These call /apps/{appId}/paper-trading/... and need a server-side x-app-api-key. See Paper trading.

Real-time

Utilities

Not in the public API reference

These methods exist in the SDK but call routes that are not part of the public API reference. They may change without notice. Do not build on them. getOrders(), getUserHoldings(), getRpcToken(), getNewsFeedStatus(), getCorrelatedMarketsStatus(), recordDepositIntent().

Server module

@agg-build/sdk/server is for your backend only. It uses your app’s x-app-api-key, which must never reach a browser.

Webhooks and partner admin (AggAdminClient)

AggAdminClient also has request() for any other partner-admin route.

Helper functions