/** * @name perps/adrena/adrena-data-api * @description REST client for the Adrena Data API (datapi.adrena.trade). * * Provides off-chain analytics: position history, pool statistics, custody * stats, trader leaderboards, mutagen points, and oracle prices. * * This is a pure REST client — no SDK runtime dependency required. * * @module perps/adrena/adrena-data-api */ /** Position history record from the Adrena Data API. */ export interface AdrenaPositionRecord { wallet: string; principalToken: string; collateralToken: string; side: string; sizeUsd: number; collateralUsd: number; leverage: number; entryPrice: number; exitPrice: number | null; pnlUsd: number | null; openTime: number; closeTime: number | null; status: string; } /** Pool statistics from the Adrena Data API. */ export interface AdrenaPoolInfo { poolName: string; tvlUsd: number; aumUsd: number; lpTokenPriceUsd: number; totalVolume24h: number; totalFees24h: number; openInterestLongUsd: number; openInterestShortUsd: number; timestamp: number; } /** Custody statistics from the Adrena Data API. */ export interface AdrenaCustodyInfo { symbol: string; custodyAddress: string; poolName: string; openInterestLongUsd: number; openInterestShortUsd: number; volume24h: number; fees24h: number; utilization: number; timestamp: number; } /** Trader info from the Adrena Data API. */ export interface AdrenaTraderInfo { wallet: string; totalVolumeUsd: number; totalPnlUsd: number; totalFeesPaid: number; positionsCount: number; winRate: number; rank: number | null; } /** Mutagen points data. */ export interface AdrenaMutagenInfo { wallet: string; totalPoints: number; rank: number | null; breakdown: Record; } /** Price data from the Adrena Data API. */ export interface AdrenaPriceInfo { adxPriceUsd: number; alpPriceUsd: number; } /** Last trading prices for all assets. */ export interface AdrenaTradingPrice { symbol: string; priceUsd: number; custodyAddress: string; provider?: string; feedId?: number; timestamp?: number; } /** * Adrena Data API client. * Wraps the REST endpoints at datapi.adrena.trade. */ export declare class AdrenaDataApiClient { private readonly baseUrl; /** * @param baseUrl — Base URL for the Adrena Data API. Defaults to datapi.adrena.trade. */ constructor(baseUrl?: string); /** * Fetch JSON from the Adrena Data API with timeout. * @param path — API path (e.g. "/positions"). * @param params — Query parameters. * @returns Parsed JSON response or null on error. */ private fetchJson; /** * Get position history for a wallet. * @param userWallet — Wallet public key. * @returns Array of position records. */ getPositions(userWallet: string): Promise; /** * Get latest pool statistics. * @param poolName — Optional pool name filter. * @returns Pool info object. */ getPoolInfo(poolName?: string): Promise; /** * Get hourly pool statistics. * @returns Array of hourly pool info. */ getHourlyPoolInfo(): Promise; /** * Get daily pool statistics. * @returns Array of daily pool info. */ getDailyPoolInfo(): Promise; /** * Get per-asset custody statistics. * @param symbol — Optional symbol filter. * @returns Array of custody info. */ getCustodyInfo(symbol?: string): Promise; /** * Get hourly custody statistics. * @returns Array of hourly custody info. */ getHourlyCustodyInfo(): Promise; /** * Get daily custody statistics. * @returns Array of daily custody info. */ getDailyCustodyInfo(): Promise; /** * Get trader info for a wallet. * @param userPubkey — Trader wallet public key. * @returns Trader info object. */ getTraderInfo(userPubkey: string): Promise; /** * Get trader leaderboard. * @param limit — Optional limit. * @returns Array of trader profiles. */ getTraderProfiles(limit?: number): Promise; /** * Get trader volume history. * @param userWallet — Trader wallet public key. * @returns Volume data. */ getTraderVolume(userWallet: string): Promise | null>; /** * Get mutagen points for a wallet. * @param userWallet — Wallet public key. * @returns Mutagen info. */ getMutagen(userWallet: string): Promise; /** * Get mutagen leaderboard. * @param limit — Optional limit. * @returns Array of mutagen entries. */ getMutagenLeaderboard(limit?: number): Promise; /** * Get ADX and ALP token prices. * @returns Price info. */ getPrice(): Promise; /** * Get latest oracle trading prices for all assets. * @returns Array of trading prices. */ getLastTradingPrices(): Promise; } /** * Default Adrena Data API client instance. */ export declare const adrenaDataApi: AdrenaDataApiClient; //# sourceMappingURL=adrena-data-api.d.ts.map