/** * Type definitions for GeckoTerminal API responses */ /** * Network information returned by the API */ export interface Network { id: string; type: string; attributes: { name: string; coingecko_asset_platform_id: string; }; } /** * DEX information returned by the API */ export interface Dex { id: string; type: string; attributes: { name: string; url?: string; }; } /** * Token information returned by the API */ export interface Token { id: string; type: string; attributes: { address: string; name: string; symbol: string; image_url?: string; price_usd?: string; price_24h_change_percentage?: string; info?: Record; }; } /** * Pool information returned by the API */ export interface Pool { id: string; type: string; attributes: { address: string; name: string; pool_type?: string; dex_id?: string; base_token?: Token; quote_token?: Token; base_token_price_usd?: string; quote_token_price_usd?: string; price?: Record; volume?: Record; liquidity?: Record; fdv?: Record; market_cap?: Record; }; relationships?: Record; } /** * OHLCV data returned by the API */ export interface OhlcvData { timestamp: number; open: string; high: string; low: string; close: string; volume: string; } /** * Trade information returned by the API */ export interface Trade { id: string; type: string; attributes: { tx_hash: string; block_number: number; block_timestamp: string; from_token_amount: string; to_token_amount: string; kind: string; price_from_in_usd: string; price_to_in_usd: string; price_from_in_currency_token: string; price_to_in_currency_token: string; volume_in_usd: string; from_token_address: string; to_token_address: string; tx_from_address: string; }; } /** * API Response format */ export interface ApiResponse { data: T; included?: any[]; meta?: Record; links?: Record; } /** * Constructor options for the GeckoTerminal class */ export interface GeckoTerminalOptions { baseUrl?: string; apiVersion?: string; headers?: Record; } /** * Pagination parameters */ export interface PaginationParams { page?: number; page_size?: number; } /** * Include parameters */ export interface IncludeParams { include?: string[]; } /** * Pool OHLCV parameters */ export interface OhlcvParams { timeframe?: 'minute' | 'hour' | 'day' | 'week' | 'month'; aggregate?: number; before_timestamp?: number; limit?: number; currency?: 'usd' | string; token?: 'base' | 'quote'; } /** * Trades parameters */ export interface TradesParams { trade_volume_in_usd_greater_than?: number; cursor?: string; }