import type { ClientContext } from "../../context"; import type { OrderBookId, PubkeyStr } from "../../shared"; import type { CategoriesMetrics, CategoryVolumeMetrics, DepositTokensMetrics, Leaderboard, MarketDetailMetrics, MarketsMetrics, MetricsHistory, MetricsHistoryQuery, OrderbookTickersResponse, OrderbookVolumeMetrics, PlatformMetrics, UserMetrics } from "./wire"; /** * Metrics sub-client — platform / market / orderbook / category / deposit-token * volume metrics, market leaderboard, and time-series history. * * Obtain via `client.metrics()`. */ export declare class Metrics { private readonly client; constructor(client: ClientContext); /** `GET /api/metrics/platform` */ platform(): Promise; /** `GET /api/metrics/markets` */ markets(): Promise; /** `GET /api/metrics/markets/{market_pubkey}` */ market(marketPubkey: PubkeyStr): Promise; /** * Batch BBO + midpoint per active orderbook (same shape as the WS * `Ticker` stream, delivered in one REST call). Optionally filter to * orderbooks whose base conditional-token is backed by `depositAsset`. * Prices per orderbook are scaled using that orderbook's own decimals. * * `GET /api/metrics/orderbooks/tickers[?deposit_asset=]` */ orderbookTickers(depositAsset?: string): Promise; /** `GET /api/metrics/orderbooks/{orderbook_id}` */ orderbook(orderbookId: OrderBookId): Promise; /** `GET /api/metrics/categories` */ categories(): Promise; /** `GET /api/metrics/categories/{category}` */ category(category: string): Promise; /** `GET /api/metrics/deposit-tokens` */ depositTokens(): Promise; /** `GET /api/metrics/leaderboard/markets` */ leaderboard(limit?: number): Promise; /** * `GET /api/metrics/history/{scope}/{scope_key}` * * `scope` is one of `"orderbook" | "market" | "category" | "deposit_token" | "platform"`. */ history(scope: string, scopeKey: string, query?: MetricsHistoryQuery): Promise; /** * Fetch per-wallet trading + referral aggregates for the authenticated * user: distinct outcomes traded, total USD volume across all the * wallet's trades, and the number of times the wallet's referral codes * have been redeemed. The wallet is resolved server-side from the * auth cookie. * * `GET /api/metrics/user` */ user(): Promise; /** * Same as {@link user} but uses the supplied `cookieHeader` for this call * instead of the SDK's process-wide cookie store. For server-side cookie * forwarding (SSR / route handlers). */ userWithCookies(cookieHeader: string): Promise; /** * Public variant of {@link user}. Takes the user's wallet via the URL * path (`GET /api/metrics/user/{wallet_address}`) and requires no auth. */ userByWallet(walletAddress: string): Promise; } //# sourceMappingURL=client.d.ts.map