Core Pool Data Types
ComposedPoolData
The main data structure containing complete pool information:pool: Static pool configuration and token informationstate: Current pool state including active bin and reservesliquidity: Liquidity distribution across bins with analyticspricing: Real-time pricing and quote informationtimestamp: Unix timestamp when data was composed
PoolInfo
Static pool configuration that rarely changes:address: Pool’s public key as stringtokenX: Information about the first token in the pairtokenY: Information about the second token in the pairbinStep: Price step between bins (basis points)baseFactor: Base factor for bin calculations
TokenInfo
Token metadata and configuration:mint: Token mint address as stringsymbol: Token symbol (e.g., “USDC”, “SOL”)decimals: Number of decimal places for the tokenname: Full token name (optional)logoURI: URL to token logo image (optional)coingeckoId: CoinGecko API identifier (optional)
PoolState
Current pool state with calculated values:activeId: ID of the currently active bincurrentPrice: Current exchange rate (tokenY/tokenX)reserveX: Amount of tokenX in the pool (human-readable)reserveY: Amount of tokenY in the pool (human-readable)totalLiquidity: Total liquidity supply across all binsprotocolFeeX: Accumulated protocol fees in tokenX (optional)protocolFeeY: Accumulated protocol fees in tokenY (optional)lastUpdatedSlot: Solana slot when pool was last updated (optional)
Liquidity Distribution Types
LiquidityDistribution
Comprehensive liquidity analysis across all bins:distribution: Array of individual bin dataactiveBins: Number of bins with liquidity > 0concentrationRatio: Ratio of liquidity in top 20% of binstotalValueLocked: Total USD value locked in the poolliquidityRange: Price range containing liquidityutilizationRate: Percentage of total bins with liquidity
BinLiquidityData
Individual bin information with calculated metrics:binId: Unique identifier for this binprice: Price at this bin level (tokenY/tokenX)liquidityAmount: Total liquidity in this binreserveX: Amount of tokenX in this bin (human-readable)reserveY: Amount of tokenY in this bin (human-readable)feeX: Accumulated fees in tokenXfeeY: Accumulated fees in tokenYutilization: Bin utilization factor (0-1)isActive: Whether this is the currently active bin (optional)priceRange: Price boundaries for this bin (optional)
Pricing and Quote Types
PricingData
Real-time pricing information and market impact data:currentRate: Current exchange rate (tokenY/tokenX)priceImpact: Price impact for reference trade size (percentage)tradingFees: Current trading fee rate (percentage)spreadBps: Bid-ask spread in basis points (optional)lastTradePrice: Price of the last executed trade (optional)volume24h: 24-hour trading volume in USD (optional)
SwapQuoteData
Quote information for potential swaps:fromAmount: Input amount (human-readable string)toAmount: Expected output amount (human-readable string)priceImpact: Price impact of this trade (percentage)fee: Trading fee for this swap (in input token)route: Token symbols showing swap routeestimatedGas: Estimated gas cost in lamportsminAmountOut: Minimum output with slippage (human-readable string)slippage: Slippage tolerance used (percentage)
Position and User Data Types
UserPosition
Individual liquidity position data:address: Position account addressowner: Owner’s wallet addresspool: Pool address this position belongs tolowerBinId: Lower bound of position rangeupperBinId: Upper bound of position rangeliquidityX: Current liquidity in tokenXliquidityY: Current liquidity in tokenYfeeEarnedX: Accumulated fees in tokenXfeeEarnedY: Accumulated fees in tokenYcreatedAt: Position creation timestamplastUpdated: Last position update timestampisInRange: Whether position is within active trading range
PositionMetrics
Calculated performance metrics for a position:position: Base position informationvalue: Current vs original value analysisfees: Fee earnings and yield calculationsperformance: Return metrics including impermanent lossrisk: Risk assessment metrics
Utility and Helper Types
CacheEntry
Data structure for caching pool information:data: The cached data of type Ttimestamp: When the data was cached (Unix timestamp)ttl: Time-to-live in millisecondshits: Number of cache hits for this entry
ErrorResponse
Standard error response structure:code: Error code identifiermessage: Human-readable error messagecontext: Additional error context (optional)timestamp: When the error occurred
BatchOperation
Structure for batch data operations:operation: Type of operation to performtarget: Target identifier (e.g., pool address)data: Data for the operation (optional)options: Operation configuration (optional)
SDK Response Wrappers
ApiResponse
Standard wrapper for all SDK responses:success: Whether the operation succeededdata: Response data when successful (optional)error: Error information when failed (optional)metadata: Request metadata and performance info
PaginatedResponse
Response structure for paginated data:items: Array of items for current pagepagination: Pagination metadata and navigation info