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

GET /venue-market-outcomes has no dedicated method. Call it with request(). See Look up venue market outcomes by external identifier.

Market data

Trading

Portfolio

Funding

Paper trading

mode: "paper" on getSmartRoute() / executeManaged() is the user path (user JWT plus x-app-id). The methods below are the admin path. They 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(), syncManagedBalances(). syncManagedBalances() is not a public route. Do not call POST /execution/sync-balances.

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