# Cambrian API Documentation This is a comprehensive API for blockchain and DeFi data, providing real-time and historical information across multiple chains including Solana, Base, and other EVM networks. ## OpenAPI Specifications Machine-readable API specs for client generation, AI tooling, and integration: - **DeFi Data API**: https://opabinia.cambrian.network/openapi.json Prices, pools, tokens, portfolios for Solana & EVM chains - **Risk Analysis API**: https://risk.cambrian.network/openapi.json Protocol risk metrics and security assessments Interactive spec browser: https://docs.cambrian.org/specs ## Documentation Access **For LLMs**: All documentation links below end with `/llms.txt` - this provides machine-readable markdown format. **For Humans**: Remove the `/llms.txt` suffix from any link below to view the interactive documentation with a user-friendly interface and ability to test endpoints without providing an API key, which is otherwise required for making requests. **Example**: - LLM format: https://docs.cambrian.org/api/v1/solana/pool-transactions/llms.txt - Human format: https://docs.cambrian.org/api/v1/solana/pool-transactions ## API Key Required **IMPORTANT**: You need a Cambrian API key to use this API. Please obtain your API key from the Cambrian team before making requests to any endpoints. Signup for an API key here: https://form.typeform.com/to/FlAoEzva?typeform-source=www.docs.cambrian.org/llms.txt ## Available Endpoints ### Solana #### Ohlcv ##### Base quote - GET /api/v1/solana/ohlcv/base-quote - Retrieve granular OHLCV data with separate base and quote token volumes for detailed trading analysis between any two SPL tokens. Provides the most detailed view of trading relationships with individual token flow tracking for advanced analytics. - Docs: https://docs.cambrian.org/api/v1/solana/ohlcv/base-quote/llms.txt ##### Pool - GET /api/v1/solana/ohlcv/pool - Retrieve OHLCV data for individual pool contracts enabling pair-specific price analysis and liquidity venue performance tracking. Essential for liquidity providers analyzing their specific pool performance and traders focusing on particular trading venues. - Docs: https://docs.cambrian.org/api/v1/solana/ohlcv/pool/llms.txt ##### Token - GET /api/v1/solana/ohlcv/token - Retrieve Open, High, Low, Close, and Volume data for any SPL token. - Docs: https://docs.cambrian.org/api/v1/solana/ohlcv/token/llms.txt #### Orca ##### Pools - GET /api/v1/solana/orca/pools - Retrieves a list of all Orca pools registered in the backend database (orca_pool_registry_target). It provides essential static information about each pool. - Docs: https://docs.cambrian.org/api/v1/solana/orca/pools/llms.txt ###### Fee metrics - GET /api/v1/solana/orca/pools/fee-metrics - Retrieves core metrics like fees (total, token0, token1, USD), volume (token0, token1, USD), Total Value Locked (TVL) in USD, and calculated Fee APR for a specific Orca Whirlpool over a given timeframe. - Docs: https://docs.cambrian.org/api/v1/solana/orca/pools/fee-metrics/llms.txt ###### Fee ranges - GET /api/v1/solana/orca/pools/fee-ranges - Retrieves fee APR and swap utilization data categorized by price ranges relative to the current price for a specific Orca Whirlpool. - Docs: https://docs.cambrian.org/api/v1/solana/orca/pools/fee-ranges/llms.txt ###### Historical data - GET /api/v1/solana/orca/pools/historical-data - Retrieves historical daily fee and volume data (in USD) for a specific Orca Whirlpool over a specified timeframe. - Docs: https://docs.cambrian.org/api/v1/solana/orca/pools/historical-data/llms.txt ###### Liquidity map - GET /api/v1/solana/orca/pools/liquidity-map - Retrieves the distribution of net liquidity across price ticks for a specific Orca Whirlpool. Returns liquidity values at representative tick intervals based on the specified resolution. Pool Must be created after 2025-02-27 - Docs: https://docs.cambrian.org/api/v1/solana/orca/pools/liquidity-map/llms.txt ##### Pool - GET /api/v1/solana/orca/pool - Retrieves detailed metrics and information for a specific Solana pool (identified by its program ID/address) using the pre-calculated orca_pool_details_view. - Docs: https://docs.cambrian.org/api/v1/solana/orca/pool/llms.txt ##### Pool multi - GET /api/v1/solana/orca/pool-multi - Get comprehensive overview metrics for multiple pools/pairs simultaneously within the same DEX. Returns pool details including price, volume, trades, and token information. - Docs: https://docs.cambrian.org/api/v1/solana/orca/pool-multi/llms.txt #### Meteora dlmm ##### Pool - GET /api/v1/solana/meteora-dlmm/pool - This endpoint returns basic pool information for a meteora pool. - Docs: https://docs.cambrian.org/api/v1/solana/meteora-dlmm/pool/llms.txt ##### Pool multi - GET /api/v1/solana/meteora-dlmm/pool-multi - Get comprehensive overview metrics for multiple pools/pairs simultaneously within the same DEX. Returns pool details including price, volume, trades, and token information. - Docs: https://docs.cambrian.org/api/v1/solana/meteora-dlmm/pool-multi/llms.txt ##### Pools - GET /api/v1/solana/meteora-dlmm/pools - This endpoint lists meteora pools - Docs: https://docs.cambrian.org/api/v1/solana/meteora-dlmm/pools/llms.txt #### Raydium clmm ##### Pool - GET /api/v1/solana/raydium-clmm/pool - This endpoint returns pool info for a specific raydium clmm pool. Among metrics returned are, tvl, apr24h, volume24h - Docs: https://docs.cambrian.org/api/v1/solana/raydium-clmm/pool/llms.txt ##### Pool multi - GET /api/v1/solana/raydium-clmm/pool-multi - Get comprehensive overview metrics for multiple pools/pairs simultaneously within the same DEX. Returns pool details including price, volume, trades, and token information. - Docs: https://docs.cambrian.org/api/v1/solana/raydium-clmm/pool-multi/llms.txt ##### Pools - GET /api/v1/solana/raydium-clmm/pools - This endpoint lists basic pool information for Raydium CLMM - Docs: https://docs.cambrian.org/api/v1/solana/raydium-clmm/pools/llms.txt #### Tokens - GET /api/v1/solana/tokens - Returns a paginated list of known tokens for the Solana chain. - Docs: https://docs.cambrian.org/api/v1/solana/tokens/llms.txt ##### Holder distribution over time - GET /api/v1/solana/tokens/holder-distribution-over-time - This endpoint returns the distribution of token holders over a certain block range, at a certain interval, grouped by USD value tiers. - Docs: https://docs.cambrian.org/api/v1/solana/tokens/holder-distribution-over-time/llms.txt ##### Holders - GET /api/v1/solana/tokens/holders - Returns a list of accounts currently holding a specific Solana token (identified by its program ID/mint address), sorted by their current balance (descending). This endpoint leverages pre-aggregated data for performance. - Docs: https://docs.cambrian.org/api/v1/solana/tokens/holders/llms.txt ##### Holders over time - GET /api/v1/solana/tokens/holders-over-time - Returns a list of accounts holding a specific token (identified by its program ID/mint address) on Solana, providing snapshots at specified block intervals within a given range. First block gives full list of holders while subsequent blocks only provide holders that had balance changes in that interval. Results are sorted by block number (ascending) and then balance (descending) within each block. - Docs: https://docs.cambrian.org/api/v1/solana/tokens/holders-over-time/llms.txt ##### Security - GET /api/v1/solana/tokens/security - Provides comprehensive security analysis for a token on Solana, including ownership concentration, holder distribution, and transaction metrics. - Docs: https://docs.cambrian.org/api/v1/solana/tokens/security/llms.txt #### Price volume ##### Multi - GET /api/v1/solana/price-volume/multi - Retrieve current USD price, timeframe volume, and percentage changes for any SPL token. Combines price and volume data in a single request to reduce API calls and improve application performance. Data aggregated across major Solana DEXs. - Docs: https://docs.cambrian.org/api/v1/solana/price-volume/multi/llms.txt ##### Single - GET /api/v1/solana/price-volume/single - Retrieve current USD price, timeframe volume, and percentage changes for any SPL token. Combines price and volume data in a single request to reduce API calls and improve application performance. Data aggregated across major Solana DEXs. - Docs: https://docs.cambrian.org/api/v1/solana/price-volume/single/llms.txt #### Traders ##### Leaderboard - GET /api/v1/solana/traders/leaderboard - Leaderboard of the top traders by trade count, buy/sell/total volume for any SPL token across major Solana DEXs, for a specified recent interval. Supports front-end sorting of columns. Available columns for sorting are: total_volume, buy_volume, sell_volume, trade_count. - Docs: https://docs.cambrian.org/api/v1/solana/traders/leaderboard/llms.txt #### Holder token balances - GET /api/v1/solana/holder-token-balances - This endpoint returns token balances in usd for a specific user wallet, sorted by balance descending - Docs: https://docs.cambrian.org/api/v1/solana/holder-token-balances/llms.txt #### Latest block - GET /api/v1/solana/latest-block - This endpoint returns latest block and block time - Docs: https://docs.cambrian.org/api/v1/solana/latest-block/llms.txt #### Pool transactions - GET /api/v1/solana/pool-transactions - Retrieve a paginated list of trades/transactions for a specified Solana pool address including swaps, add liquidity, and remove liquidity events - Docs: https://docs.cambrian.org/api/v1/solana/pool-transactions/llms.txt #### Pool transactions time bounded - GET /api/v1/solana/pool-transactions-time-bounded - Get detailed transaction data for any SPL token across major Solana DEXs with precise Unix timestamp filtering for historical analysis and event-driven research. - Docs: https://docs.cambrian.org/api/v1/solana/pool-transactions-time-bounded/llms.txt #### Price current - GET /api/v1/solana/price-current - Retrieves the latest available USD price for a given Solana token program address - Docs: https://docs.cambrian.org/api/v1/solana/price-current/llms.txt #### Price hour - GET /api/v1/solana/price-hour - Aggregated USD price of a Solana token by program address, grouped by the specified interval (e.g., 1H, 1D, 1W, etc). Returns the average price for each interval. - Docs: https://docs.cambrian.org/api/v1/solana/price-hour/llms.txt #### Price multi - GET /api/v1/solana/price-multi - Retrieves the latest available USD prices for multiple Solana token program addresses (comma-separated) - Docs: https://docs.cambrian.org/api/v1/solana/price-multi/llms.txt #### Price unix - GET /api/v1/solana/price-unix - Retrieve historical price data for a specified Solana token at the nearest hour to a specific Unix timestamp. Returns the price, actual update time, and 24-hour price change. Essential for time-specific price analysis, backtesting, and historical data queries. - Docs: https://docs.cambrian.org/api/v1/solana/price-unix/llms.txt #### Token details - GET /api/v1/solana/token-details - Retrieves comprehensive details about a Solana token, including price history, trade statistics, holder information, and other key metrics - Docs: https://docs.cambrian.org/api/v1/solana/token-details/llms.txt #### Token details multi - GET /api/v1/solana/token-details-multi - Retrieve comprehensive details for multiple Solana tokens simultaneously. Returns the same data structure as the single token_details endpoint but for multiple tokens in a single API call. Maximum 50 tokens per request. - Docs: https://docs.cambrian.org/api/v1/solana/token-details-multi/llms.txt #### Token mint burn transactions - GET /api/v1/solana/token-mint-burn-transactions - Returns paginated list of mint and burn transactions for a specified Solana token, providing complete supply change audit trail with transaction details, amounts, and timing information. Essential for tracking token supply dynamics and compliance monitoring. - Docs: https://docs.cambrian.org/api/v1/solana/token-mint-burn-transactions/llms.txt #### Token pool search - GET /api/v1/solana/token-pool-search - Find pools containing a specific token and retrieve comprehensive trading statistics including 24h volume, trade counts, and buy/sell ratios. Essential for token analysis, liquidity discovery, and identifying the most active trading venues for any token. - Docs: https://docs.cambrian.org/api/v1/solana/token-pool-search/llms.txt #### Token transactions - GET /api/v1/solana/token-transactions - Retrieve a paginated list of trades/transactions for a specified Solana token address across all DEXes - Docs: https://docs.cambrian.org/api/v1/solana/token-transactions/llms.txt #### Token transactions time bounded - GET /api/v1/solana/token-transactions-time-bounded - Get detailed transaction data for any SPL token with precise Unix timestamp filtering for historical analysis and event-driven research. - Docs: https://docs.cambrian.org/api/v1/solana/token-transactions-time-bounded/llms.txt #### Trade statistics - GET /api/v1/solana/trade-statistics - Get instant trade analytics and performance metrics for any SPL tokens. View buy/sell volume breakdowns, trade counts, and USD values across customizable timeframes (1h to 30d). Perfect for portfolio tracking, performance dashboards, and quick market analysis. Query single tokens or multiple tokens at once using comma-separated addresses. Includes buy-to-sell ratios for comprehensive market insights. - Docs: https://docs.cambrian.org/api/v1/solana/trade-statistics/llms.txt #### Trending tokens - GET /api/v1/solana/trending-tokens - Retrieves a list of trending Solana tokens, ordered by price change in 24hs, trade volume in 24hs or current price. - Docs: https://docs.cambrian.org/api/v1/solana/trending-tokens/llms.txt #### Wallet balance history - GET /api/v1/solana/wallet-balance-history - Returns paginated list of balance changes for a specified wallet address, providing complete audit trail of portfolio changes with transaction details, pre/post balances, and timing information. Essential for portfolio tracking and compliance monitoring. - Docs: https://docs.cambrian.org/api/v1/solana/wallet-balance-history/llms.txt ### Evm #### Aero ##### V2 ###### Fee metrics - GET /api/v1/evm/aero/v2/fee-metrics - Shows daily historical data to understand the fees over time on a pool. - Docs: https://docs.cambrian.org/api/v1/evm/aero/v2/fee-metrics/llms.txt ###### Pool - GET /api/v1/evm/aero/v2/pool - Get information for a specific Aerodorme V2 pool address - Docs: https://docs.cambrian.org/api/v1/evm/aero/v2/pool/llms.txt ###### Pool volume - GET /api/v1/evm/aero/v2/pool-volume - Helpful for aggregate statistics over a particular timeframe, with hourly data to understand distribution of recent activity. - Docs: https://docs.cambrian.org/api/v1/evm/aero/v2/pool-volume/llms.txt ###### Pools - GET /api/v1/evm/aero/v2/pools - This endpoint returns a paginated list of liquidity pools with summary metrics. - Docs: https://docs.cambrian.org/api/v1/evm/aero/v2/pools/llms.txt ###### Provider summary - GET /api/v1/evm/aero/v2/provider-summary - Provides a comprehensive overview of a liquidity provider's activity on a specific DEX and chain. Includes current summary statistics, portfolio diversity analysis (top pools, token exposure, concentration), position size distribution, historical performance metrics (fees, APR, IL over various periods), and a breakdown of fees and APR per pool. - Docs: https://docs.cambrian.org/api/v1/evm/aero/v2/provider-summary/llms.txt ##### V3 ###### Pool - GET /api/v1/evm/aero/v3/pool - Returns current pool TVL(Total Value Locked), Swap Volume, Fees APR (Annual Percentage Rate), Price Tick Utilization, Number of Swaps and Unique users for recent time range (5 minutes, 1 hour, 1 day, 1 week, 1 month and 1 year). - Docs: https://docs.cambrian.org/api/v1/evm/aero/v3/pool/llms.txt ###### Pools - GET /api/v1/evm/aero/v3/pools - Returns a list of all liquidity pools, including token pairs, fee tiers, and creation timestamps. - Docs: https://docs.cambrian.org/api/v1/evm/aero/v3/pools/llms.txt #### Alien ##### V3 ###### Pool - GET /api/v1/evm/alien/v3/pool - Returns current pool TVL (Total Value Locked), Swap Volume, Fees APR (Annual Percentage Rate), Price Tick Utilization, Number of Swaps and Unique users for recent time range (5 minutes, 1 hour, 1 day, 1 week, 1 month and 1 year). - Docs: https://docs.cambrian.org/api/v1/evm/alien/v3/pool/llms.txt ###### Pools - GET /api/v1/evm/alien/v3/pools - Returns a list of all liquidity pools, including token pairs, fee tiers, and creation timestamps. - Docs: https://docs.cambrian.org/api/v1/evm/alien/v3/pools/llms.txt #### Clones ##### V3 ###### Pool - GET /api/v1/evm/clones/v3/pool - Returns current pool TVL (Total Value Locked), Swap Volume, Fees APR (Annual Percentage Rate), Price Tick Utilization, Number of Swaps and Unique users for recent time range (5 minutes, 1 hour, 1 day, 1 week, 1 month and 1 year). - Docs: https://docs.cambrian.org/api/v1/evm/clones/v3/pool/llms.txt ###### Pools - GET /api/v1/evm/clones/v3/pools - Returns a list of all liquidity pools, including token pairs, fee tiers, and creation timestamps. - Docs: https://docs.cambrian.org/api/v1/evm/clones/v3/pools/llms.txt #### Pancake ##### V3 ###### Pool - GET /api/v1/evm/pancake/v3/pool - Returns current pool TVL (Total Value Locked), Swap Volume, Fees APR (Annual Percentage Rate), Price Tick Utilization, Number of Swaps and Unique users for recent time range (5 minutes, 1 hour, 1 day, 1 week, 1 month and 1 year). - Docs: https://docs.cambrian.org/api/v1/evm/pancake/v3/pool/llms.txt ###### Pools - GET /api/v1/evm/pancake/v3/pools - Returns a list of all liquidity pools, including token pairs, fee tiers, and creation timestamps. - Docs: https://docs.cambrian.org/api/v1/evm/pancake/v3/pools/llms.txt #### Sushi ##### V3 ###### Pool - GET /api/v1/evm/sushi/v3/pool - Returns current pool TVL (Total Value Locked), Swap Volume, Fees APR (Annual Percentage Rate), Price Tick Utilization, Number of Swaps and Unique users for recent time range (5 minutes, 1 hour, 1 day, 1 week, 1 month and 1 year). - Docs: https://docs.cambrian.org/api/v1/evm/sushi/v3/pool/llms.txt ###### Pools - GET /api/v1/evm/sushi/v3/pools - Returns a list of all liquidity pools, including token pairs, fee tiers, and creation timestamps. - Docs: https://docs.cambrian.org/api/v1/evm/sushi/v3/pools/llms.txt #### Tvl ##### Status - GET /api/v1/evm/tvl/status - Retuns the tokens hold by an address - Docs: https://docs.cambrian.org/api/v1/evm/tvl/status/llms.txt ##### Top owners - GET /api/v1/evm/tvl/top-owners - Returns top token holders for a given token address. - Docs: https://docs.cambrian.org/api/v1/evm/tvl/top-owners/llms.txt #### Uniswap ##### V3 ###### Pool - GET /api/v1/evm/uniswap/v3/pool - Returns current pool TVL (Total Value Locked), Swap Volume, Fees APR (Annual Percentage Rate), Price Tick Utilization, Number of Swaps and Unique users for recent time range (5 minutes, 1 hour, 1 day, 1 week, 1 month and 1 year). - Docs: https://docs.cambrian.org/api/v1/evm/uniswap/v3/pool/llms.txt ###### Pools - GET /api/v1/evm/uniswap/v3/pools - Returns a list of all liquidity pools, including token pairs, fee tiers, and creation timestamps. - Docs: https://docs.cambrian.org/api/v1/evm/uniswap/v3/pools/llms.txt #### Dexes - GET /api/v1/evm/dexes - List of DEXes on EVM compatible chains - Docs: https://docs.cambrian.org/api/v1/evm/dexes/llms.txt #### Price current - GET /api/v1/evm/price-current - Returns current price of a token calculated based on uniswap v3 and clones liquidity pools. - Docs: https://docs.cambrian.org/api/v1/evm/price-current/llms.txt #### Price hour - GET /api/v1/evm/price-hour - Returns historical hourly price data for a specified EVM token. Limitations: Maximum 1000 hours of historical data, timestamps are in UTC format. Use /evm/tokens endpoint to get list of valid token addresses. - Docs: https://docs.cambrian.org/api/v1/evm/price-hour/llms.txt #### Tokens - GET /api/v1/evm/tokens - Returns a list of all whitelisted tokens for the specified EVM chain, including their contract addresses, symbols, names, and decimal places. - Docs: https://docs.cambrian.org/api/v1/evm/tokens/llms.txt ### Deep42 #### Social data ##### Alpha tweet detection - GET /api/v1/deep42/social-data/alpha-tweet-detection - Feed of tweets detected as having high alpha potential for cryptocurrency investments. Each tweet is scored across four dimensions: sentiment (bullish/bearish direction), alpha (investment insight quality), legitimacy (source reliability), and technical accuracy (correctness of crypto/DeFi claims). AI-generated reasoning explains each score. Version 2 (default) includes author track records with directional prediction accuracy measured at hourly price resolution - Docs: https://docs.cambrian.org/api/v1/deep42/social-data/alpha-tweet-detection/llms.txt ##### Influencer credibility - GET /api/v1/deep42/social-data/influencer-credibility - Returns cryptocurrency influencers ranked by credibility score, track record, accuracy, and engagement metrics. Analyzes high-quality tweets to identify the most reliable voices in crypto. Track record accuracy is measured using directional price predictions at hourly resolution: a bullish signal is correct if the token price increased, bearish if it decreased - Docs: https://docs.cambrian.org/api/v1/deep42/social-data/influencer-credibility/llms.txt ##### Sentiment shifts - GET /api/v1/deep42/social-data/sentiment-shifts - Identifies tokens with significant sentiment changes that could signal market movements and trading opportunities. Compares average AI-assigned sentiment scores (0-10 per tweet) between a current period and a previous period of equal length. Only includes tokens with sufficient tweet volume in both periods for statistical relevance - Docs: https://docs.cambrian.org/api/v1/deep42/social-data/sentiment-shifts/llms.txt ### Perp risk engine - GET /api/v1/perp-risk-engine - Calculates liquidation risk probability for leveraged cryptocurrency positions using Monte Carlo simulations with historical price data. Supports both long and short positions with configurable risk horizons (1h, 1d, 1w, 1mo). Lookback period and simulation parameters are automatically determined based on risk horizon. Returns detailed risk metrics including liquidation price, volatility analysis, and visualization data for the probability assessment. - Docs: https://docs.cambrian.org/api/v1/perp-risk-engine/llms.txt ## Key Resources - Full API documentation: https://docs.cambrian.org - OpenAPI specifications: https://docs.cambrian.org/specs - LLMs.txt (this file): https://docs.cambrian.org/llms.txt ## Contact For questions or support, visit: https://discord.com/channels/1375182661202481172/1376641098516271155 --- # Full Endpoint Documentation ## Cambrian API: Detect high-alpha tweets **Endpoint:** /api/v1/deep42/social-data/alpha-tweet-detection # Alpha Tweet Detection ## Overview This endpoint detects high-alpha tweets related to cryptocurrency investments using AI-powered analysis. Each tweet is scored using a combination of sentiment, legitimacy, and technical accuracy metrics, providing investors with curated high-potential trading signals from social media. ## Business Value - **Alpha Discovery**: Identify high-alpha cryptocurrency tweets before they trend broadly - **Sentiment Analysis**: Access AI-powered scoring of sentiment, alpha potential, legitimacy, and technical accuracy - **Historical Performance**: Track record analysis of Twitter users provides credibility assessment - **Risk Assessment**: Legitimacy and technical accuracy scores help filter out noise and misinformation - **Real-time Intelligence**: Get fresh alpha signals as they emerge on social media platforms ## Endpoint Details **URL**: ``` https://deep42.cambrian.network/api/v1/deep42/social-data/alpha-tweet-detection ``` **Method**: GET **Authentication**: Required via `X-API-KEY` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | limit | integer | No | 20 | Number of tweets to analyze (maximum: 100) | | token_filter | string | No | - | Filter tweets by specific token symbol for focused alpha analysis | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | twitterHandle | String | Twitter username of the author | | tokenSymbol | String | Cryptocurrency token symbol mentioned in the tweet | | text | String | Full text content of the tweet | | createdAtTimestamp | Number | Unix timestamp when the tweet was created | | scoredAtTimestamp | Number | Unix timestamp when the tweet was analyzed | | retweetCountAtCollection | Number | Number of retweets at time of collection | | favoriteCountAtCollection | Number | Number of likes/favorites at time of collection | | replyCountAtCollection | Number | Number of replies at time of collection | | quoteCountAtCollection | Number | Number of quote tweets at time of collection | | sentiment | Number | Sentiment score (1-10, where 10 is most bullish) | | alpha | Number | Alpha potential score (1-10, where 10 is highest alpha) | | legitimacy | Number | Legitimacy score (1-10, where 10 is most legitimate) | | technicalAccuracy | Number | Technical accuracy score (1-10, where 10 is most accurate) | | isRecent | Boolean | Whether the tweet is recent enough to be actionable | | isVerifiable | Boolean | Whether the tweet claims can be verified | | scoresReasoning | String | AI-generated explanation for the assigned scores | | tweetUrl | String | Direct URL to the tweet | | userTrackRecordSignals | Number | Total number of signals from this user | | userTrackRecordUniqueTokens | Number | Number of unique tokens this user has signaled | | userTrackRecordActiveDays | Number | Number of days this user has been active | | userTrackRecordFirstSignalDate | String | Date of user's first signal (YYYY-MM-DD format) | | userTrackRecordLastSignalDate | String | Date of user's most recent signal (YYYY-MM-DD format) | | userTrackRecordAccuracy24h | Number | User's prediction accuracy over 24 hours (percentage) | | userTrackRecordAccuracy7d | Number | User's prediction accuracy over 7 days (percentage) | | userTrackRecordAccuracy30d | Number | User's prediction accuracy over 30 days (percentage) | | userTrackRecordAvgReturn24h | Number | Average return percentage for user's 24-hour predictions | | userTrackRecordAvgReturn7d | Number | Average return percentage for user's 7-day predictions | | userTrackRecordAvgReturn30d | Number | Average return percentage for user's 30-day predictions | | userTrackRecordBullishSignals | Number | Number of bullish signals from this user | | userTrackRecordBearishSignals | Number | Number of bearish signals from this user | | userTrackRecordAvgSentiment | Number | User's average sentiment score across all signals | | userTrackRecordAvgAlpha | Number | User's average alpha score across all signals | | userTrackRecordPerformanceTier | String | Performance tier classification (e.g., "unproven", "proven", "top_performer") | ## Examples ### 1. Get Latest Alpha Tweets Retrieve the most recent high-alpha cryptocurrency tweets with default parameters. ```bash curl -X GET "https://x402.cambrian.network/api/v1/deep42/social-data/alpha-tweet-detection?limit=5" \ -H "X-API-KEY: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [ { "twitterHandle": "bitcoinlfgo", "tokenSymbol": "BTC", "text": "πŸ’₯ BREAKING \n\n$BTC BREAKS $90,000\n\nBULLS ARE BACKKKKK https://t.co/QDzTSL3JPh", "createdAtTimestamp": 1766980898, "scoredAtTimestamp": 1767026969, "retweetCountAtCollection": 79, "favoriteCountAtCollection": 629, "replyCountAtCollection": 77, "quoteCountAtCollection": 1, "sentiment": 10, "alpha": 10, "legitimacy": 10, "technicalAccuracy": 10, "isRecent": true, "isVerifiable": true, "scoresReasoning": "The tweet uses strong positive language ('BREAKS', 'BULLS ARE BACKKKKK') and emoji ('πŸ’₯') following a significant price milestone ($90,000), indicating extreme bullish sentiment and high relevance for BTC.", "tweetUrl": "https://x.com/bitcoinlfgo/status/2005489361002090645", "userTrackRecordSignals": 62, "userTrackRecordUniqueTokens": 14, "userTrackRecordActiveDays": 38, "userTrackRecordFirstSignalDate": "2025-03-05", "userTrackRecordLastSignalDate": "2025-12-29", "userTrackRecordAccuracy24h": 46.7, "userTrackRecordAccuracy7d": 57.7, "userTrackRecordAccuracy30d": 71.0, "userTrackRecordAvgReturn24h": 0.13, "userTrackRecordAvgReturn7d": 1.88, "userTrackRecordAvgReturn30d": 11.87, "userTrackRecordBullishSignals": 55, "userTrackRecordBearishSignals": 7, "userTrackRecordAvgSentiment": 7.65, "userTrackRecordAvgAlpha": 6.15, "userTrackRecordPerformanceTier": "unproven" }, { "twitterHandle": "CryptoTice_", "tokenSymbol": "BTC", "text": "🚨 BREAKING: U.S. MOVES TOWARD A STRATEGIC $BTC RESERVE πŸ‡ΊπŸ‡Έ\n\nCongress just introduced a bill that:\nβ€’ Lets Americans pay taxes in Bitcoin\nβ€’ Removes capital gains tax on those payments\n\nThis isn't small change.\nIt's structural adoption.\n\nβ€’ Bitcoin becomes a sovereign-backed asset\nβ€’ Scarcity tightens as demand hits the national level\nβ€’ Policy flips from selling to stacking\n\nThis changes everything.\n$BTC is no longer optional it's infrastructure.", "createdAtTimestamp": 1766916002, "scoredAtTimestamp": 1767026969, "retweetCountAtCollection": 62, "favoriteCountAtCollection": 372, "replyCountAtCollection": 36, "quoteCountAtCollection": 3, "sentiment": 10, "alpha": 10, "legitimacy": 10, "technicalAccuracy": 10, "isRecent": true, "isVerifiable": true, "scoresReasoning": "The tweet is overwhelmingly positive, using strong bullish language ('BREAKING', 'structural adoption', 'sovereign-backed asset', 'changes everything', 'infrastructure') regarding proposed US legislation that benefits BTC (tax payments in BTC, removal of capital gains). This suggests a very strong positive signal for the token's future adoption and valuation.", "tweetUrl": "https://x.com/CryptoTice_/status/2005217165994266725", "userTrackRecordSignals": 45, "userTrackRecordUniqueTokens": 5, "userTrackRecordActiveDays": 19, "userTrackRecordFirstSignalDate": "2025-06-29", "userTrackRecordLastSignalDate": "2025-12-29", "userTrackRecordAccuracy24h": 61.5, "userTrackRecordAccuracy7d": 32.4, "userTrackRecordAccuracy30d": 100.0, "userTrackRecordAvgReturn24h": 0.11, "userTrackRecordAvgReturn7d": -2.07, "userTrackRecordAvgReturn30d": 55.36, "userTrackRecordBullishSignals": 40, "userTrackRecordBearishSignals": 5, "userTrackRecordAvgSentiment": 7.76, "userTrackRecordAvgAlpha": 8.36, "userTrackRecordPerformanceTier": "proven" }, { "twitterHandle": "ArdiNSC", "tokenSymbol": "ZEC", "text": "Another banger on $ZEC. 🎯\n\n+1300% for the month of December on my Zcash trades alone.\n\nHappy Saturday πŸ’° https://t.co/wGm8MO6lsw", "createdAtTimestamp": 1766850870, "scoredAtTimestamp": 1767026969, "retweetCountAtCollection": 22, "favoriteCountAtCollection": 188, "replyCountAtCollection": 78, "quoteCountAtCollection": 0, "sentiment": 10, "alpha": 10, "legitimacy": 10, "technicalAccuracy": 10, "isRecent": true, "isVerifiable": true, "scoresReasoning": "Extremely positive sentiment indicated by 'banger' and massive reported gains (+1300%). The specific, large gain suggests high confidence and strong trading value for those interested in ZEC.", "tweetUrl": "https://x.com/ArdiNSC/status/2004943984242938021", "userTrackRecordSignals": 78, "userTrackRecordUniqueTokens": 9, "userTrackRecordActiveDays": 19, "userTrackRecordFirstSignalDate": "2025-12-07", "userTrackRecordLastSignalDate": "2025-12-28", "userTrackRecordAccuracy24h": 73.5, "userTrackRecordAccuracy7d": 62.1, "userTrackRecordAccuracy30d": null, "userTrackRecordAvgReturn24h": 2.62, "userTrackRecordAvgReturn7d": 2.28, "userTrackRecordAvgReturn30d": null, "userTrackRecordBullishSignals": 24, "userTrackRecordBearishSignals": 54, "userTrackRecordAvgSentiment": 3.99, "userTrackRecordAvgAlpha": 7.5, "userTrackRecordPerformanceTier": "top_performer" }, { "twitterHandle": "gustloureiro", "tokenSymbol": "AVICI", "text": "Only things I'm holding into 2026 and why and in decrescent order:\n\n$AVICI -> Study ownership coins + highest drive founder (@RamXBT) I've ever seen + hottest roadmap + neobank is a trillion dollar size narrative + I freakin' use the product and love it. Can see 10-30x here even if 2026 is a bear.\n\n$UMBRA -> Again, ownership coins + think privacy will still rise in 2026 + will fill a hole in the Solana eco as soon as it launches. Can see 10x from here, but think it's more risky than avici because competition is fiercer\n\n$SOL -> Only chain that matters. ETH, I've been saying it for the last 2 years, is dying from a thousand cuts + Lots of adoption going on for SOL, feels like anything that happens in crypto eventually finds a way to happen in SOL. No-brainer 10x from here.\n\n$BTC -> OG, obligatory hold.\n\n$JLP -> Been holding it for 2.5 years now, and even though it has some (very) light exposure to ETH, I really like its model. Has unironically been my best performance this entire year while having the lowest volatility. I treat it almost as a stable-park-my-profits type of token", "createdAtTimestamp": 1766756445, "scoredAtTimestamp": 1767026969, "retweetCountAtCollection": 1, "favoriteCountAtCollection": 27, "replyCountAtCollection": 2, "quoteCountAtCollection": 0, "sentiment": 10, "alpha": 10, "legitimacy": 10, "technicalAccuracy": 10, "isRecent": true, "isVerifiable": true, "scoresReasoning": "The tweet expresses extremely high conviction and enthusiasm for $AVICI, citing multiple strong positive factors (high founder drive, strong roadmap, relevant narrative, personal product usage) and predicting a significant 10-30x return even in a bear market. This represents an excellent alpha signal.", "tweetUrl": "https://x.com/gustloureiro/status/2004547937020289427", "userTrackRecordSignals": 3, "userTrackRecordUniqueTokens": 3, "userTrackRecordActiveDays": 1, "userTrackRecordFirstSignalDate": "2025-12-26", "userTrackRecordLastSignalDate": "2025-12-26", "userTrackRecordAccuracy24h": 50.0, "userTrackRecordAccuracy7d": null, "userTrackRecordAccuracy30d": null, "userTrackRecordAvgReturn24h": -2.43, "userTrackRecordAvgReturn7d": null, "userTrackRecordAvgReturn30d": null, "userTrackRecordBullishSignals": 3, "userTrackRecordBearishSignals": 0, "userTrackRecordAvgSentiment": 9.0, "userTrackRecordAvgAlpha": 8.33, "userTrackRecordPerformanceTier": "unproven" }, { "twitterHandle": "rkmtimes", "tokenSymbol": "GOLD", "text": "JUST INπŸͺ™πŸ‡ΊπŸ‡ΈπŸ”₯Goldman Sachs says, $GOLD is unstoppable, it will reach $5000 per ounce by the beginning of Q1 in 2026.\n\nπŸ”₯#Gold just hit a record-high of $4500 after Goldman Sachs, Bank of America, and JP Morgan forecast prices rising to $5100 per ounce by December 2026.", "createdAtTimestamp": 1766726453, "scoredAtTimestamp": 1767026969, "retweetCountAtCollection": 3, "favoriteCountAtCollection": 17, "replyCountAtCollection": 0, "quoteCountAtCollection": 1, "sentiment": 10, "alpha": 10, "legitimacy": 10, "technicalAccuracy": 10, "isRecent": true, "isVerifiable": true, "scoresReasoning": "The tweet contains extremely positive language ('unstoppable', 'record-high') and high price targets ($5000, $5100) from major financial institutions regarding the token/asset 'GOLD'. This is a very strong bullish signal.", "tweetUrl": "https://x.com/rkmtimes/status/2004422141467676782", "userTrackRecordSignals": 3, "userTrackRecordUniqueTokens": 1, "userTrackRecordActiveDays": 3, "userTrackRecordFirstSignalDate": "2025-12-16", "userTrackRecordLastSignalDate": "2025-12-29", "userTrackRecordAccuracy24h": 100.0, "userTrackRecordAccuracy7d": 100.0, "userTrackRecordAccuracy30d": null, "userTrackRecordAvgReturn24h": 0.2, "userTrackRecordAvgReturn7d": 3.45, "userTrackRecordAvgReturn30d": null, "userTrackRecordBullishSignals": 2, "userTrackRecordBearishSignals": 1, "userTrackRecordAvgSentiment": 6.0, "userTrackRecordAvgAlpha": 7.0, "userTrackRecordPerformanceTier": "top_performer" } ] ``` This response returns 5 high-alpha cryptocurrency tweets with comprehensive scoring and user track record analysis. Note how each tweet receives perfect scores (10/10) across all metrics, indicating they've been identified as highly promising alpha signals. ### 2. Filter by Specific Token Filter alpha tweets to focus on a specific cryptocurrency token. ```bash curl -X GET "https://x402.cambrian.network/api/v1/deep42/social-data/alpha-tweet-detection?limit=10&token_filter=BTC" \ -H "X-API-KEY: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [ { "twitterHandle": "bitcoinlfgo", "tokenSymbol": "BTC", "text": "πŸ’₯ BREAKING \n\n$BTC BREAKS $90,000\n\nBULLS ARE BACKKKKK https://t.co/QDzTSL3JPh", "sentiment": 10, "alpha": 10, "legitimacy": 10, "technicalAccuracy": 10, "scoresReasoning": "The tweet uses strong positive language ('BREAKS', 'BULLS ARE BACKKKKK') and emoji ('πŸ’₯') following a significant price milestone ($90,000), indicating extreme bullish sentiment and high relevance for BTC.", "userTrackRecordAccuracy30d": 71.0, "userTrackRecordPerformanceTier": "unproven" } ] ``` When filtering by token, you receive only tweets relevant to that specific cryptocurrency, allowing for focused alpha discovery and analysis. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) - pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start ```typescript import { Wallet } from 'ethers'; const wallet = new Wallet('YOUR_PRIVATE_KEY'); const response = await fetch('https://x402.cambrian.network/process', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ message: { role: 'user', parts: [{ kind: 'text', text: 'Get data' }], metadata: { target_endpoint: 'https://x402.cambrian.network/api/v1/deep42/social-data/alpha-tweet-detection' // Optional: add query_params for filtering // query_params: { limit: 100, token_filter: "BTC" } } } }) }); ``` ### Payment Flow 1. Send request to gateway (no API key needed) 2. Gateway returns `402 Payment Required` with payment details 3. Sign EIP-712 payment authorization with your wallet 4. Resubmit request with signed payment 5. Gateway verifies payment and returns API response **Network**: Base (Ethereum L2) | **Price**: $0.05 USDC per request --- ## API Versioning This endpoint supports multiple API versions. Use the `Accept` header to request a specific version. ### Available Versions | Version | State | Default | Accept Header | |---------|-------|---------|---------------| | 2.0.0 | Current | Yes | `application/vnd.cambrian.deep42.social-data.alpha-tweet-detection.v2+json` | | 1.0.0 | Supported | No | `application/vnd.cambrian.deep42.social-data.alpha-tweet-detection.v1+json` | ### How to Request a Specific Version ```bash curl -X GET "https://x402.cambrian.network/api/v1/deep42/social-data/alpha-tweet-detection" \ -H "X-API-KEY: YOUR_API_KEY" \ -H "Accept: application/vnd.cambrian.deep42.social-data.alpha-tweet-detection.v2+json" ``` ### Version Lifecycle - **Current**: Actively maintained and recommended for new integrations - **Deprecated**: Still functional but scheduled for removal (check `deprecated_at`) - **Sunset**: No longer available (returns `410 Gone`) **Note**: If no `Accept` header is specified, the default version (2.0.0) is returned. --- ## Cambrian API: Detect high-alpha tweets **Endpoint:** /api/v1/deep42/social-data/alpha-tweet-detection # Alpha Tweet Detection ## Overview The Alpha Tweet Detection endpoint identifies high-potential cryptocurrency investment tweets by analyzing content across four key dimensions: sentiment (bullish/bearish direction), alpha (investment insight quality), legitimacy (source reliability), and technical accuracy (correctness of crypto/DeFi claims). Version 2 includes comprehensive author track records with directional prediction accuracy measured at hourly price resolution. ## Business Value - **Investment Signal Discovery**: Identify high-quality tweets with actionable cryptocurrency insights before they become mainstream - **Risk Assessment**: Evaluate the credibility and technical accuracy of crypto claims through AI-powered analysis - **Author Performance Tracking**: Access comprehensive track records showing prediction accuracy and returns across multiple timeframes - **Market Intelligence**: Discover emerging narratives and sentiment shifts from verified sources in real-time - **Alpha Generation**: Filter noise to focus on tweets with genuine DeFi alpha and investment potential ## Endpoint Details **URL**: ``` https://deep42.cambrian.network/api/v1/deep42/social-data/alpha-tweet-detection ``` **Method**: GET **Authentication**: Required via `X-API-KEY` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | limit | integer | false | 20 | Number of tweets to analyze (maximum: 100) | | token_filter | string | false | - | Filter tweets by specific token symbol for focused alpha analysis | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | twitterHandle | string | Twitter username of the tweet author | | tokenSymbol | string | Cryptocurrency token symbol mentioned in the tweet (e.g., BTC, ETH, SOL) | | text | string | Full tweet text content | | createdAtTimestamp | integer | Unix timestamp (seconds) when the tweet was originally posted on Twitter. Used as the reference time for price tracking | | scoredAtTimestamp | integer | Unix timestamp (seconds) when the tweet was collected and scored by our AI pipeline | | retweetCountAtCollection | integer | Retweets at time of collection (point-in-time snapshot, not live-updating) | | favoriteCountAtCollection | integer | Likes at time of collection (point-in-time snapshot, not live-updating) | | replyCountAtCollection | integer | Replies at time of collection (point-in-time snapshot, not live-updating) | | quoteCountAtCollection | integer | Quote tweets at time of collection (point-in-time snapshot, not live-updating) | | sentiment | number | AI-scored sentiment direction. Range 0-10. >=7 = bullish signal, <=3 = bearish signal, 4-6 = neutral | | alpha | number | DeFi alpha investment insight quality. Range 0-10. Measures actionability of the information for investment decisions | | legitimacy | number | Source and claim legitimacy. Range 0-10. Assesses whether claims come from verified sources and contain factual references | | technicalAccuracy | number | Technical correctness of crypto/DeFi claims. Range 0-10. Evaluates protocol mechanics and smart contract references | | isRecent | boolean | Whether the tweet content discusses recent events at the time of scoring | | isVerifiable | boolean | Whether the tweet's claims can be independently verified via on-chain data or official sources | | scoresReasoning | string | AI-generated explanation of all score assignments, including specific evidence cited and risk factors | | tweetUrl | string | Direct URL to the original tweet on X/Twitter | | userTrackRecordSignals | integer | Total bullish/bearish signals made by this author across all tokens | | userTrackRecordUniqueTokens | integer | Number of distinct token symbols this author has made signals about | | userTrackRecordActiveDays | integer | Number of distinct calendar days this author has made at least one signal | | userTrackRecordFirstSignalDate | string | ISO date (YYYY-MM-DD) of this author's earliest tracked signal | | userTrackRecordLastSignalDate | string | ISO date (YYYY-MM-DD) of this author's most recent tracked signal | | userTrackRecordAccuracy24h | number | 24-hour directional prediction accuracy as a percentage (0-100) | | userTrackRecordAccuracy7d | number | 7-day directional prediction accuracy as a percentage (0-100) | | userTrackRecordAccuracy30d | number | 30-day directional prediction accuracy as a percentage (0-100) | | userTrackRecordAvgReturn24h | number | Average directional return percentage over 24 hours | | userTrackRecordAvgReturn7d | number | Average directional return percentage over 7 days | | userTrackRecordAvgReturn30d | number | Average directional return percentage over 30 days | | userTrackRecordBullishSignals | integer | Number of bullish signals (sentiment >=7) made by this author | | userTrackRecordBearishSignals | integer | Number of bearish signals (sentiment <=3) made by this author | | userTrackRecordAvgSentiment | number | Author's average sentiment score across all signals. Range 0-10 | | userTrackRecordAvgAlpha | number | Author's average alpha score across all signals. Range 0-10 | | userTrackRecordPerformanceTier | string | Performance classification: 'topPerformer' = >=70% accuracy, 'proven' = >=60%, 'unproven' = <60% | ## Examples ### 1. Get Latest Alpha Tweets Retrieve the most recent high-alpha cryptocurrency tweets with detailed scoring and track record analysis. ```bash curl -X GET "https://x402.cambrian.network/api/v1/deep42/social-data/alpha-tweet-detection?limit=5" \ -H "X-API-KEY: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [ { "twitterHandle": "injective", "tokenSymbol": "INJ", "text": "The Real-Time USDC Mainnet Upgrade proposal is officially live. $INJ is becoming the settlement layer for real-time stablecoin infrastructure and programmable payments at scale. 99.7% of governance participants have already voted YES.\n\nRead about the top developments that happened on Injective this past week πŸ‘‡οΈ \n\nπŸŸͺ Injective officially released the upgrade proposal to position $INJ at the center of programmable payments and stablecoin infrastructure at scale.\nhttps://t.co/nqn6PmEZIz\n\nπŸŸͺ The Injective AI Toolkit now ships with MCP servers, seven modular agent skills, and full compatibility with Claude Code, Cursor, and Codex. Open source and ready to build.\nhttps://t.co/TCIJ0IJekd\n\nπŸŸͺ Native $USDC is now live on Injective testnet through @circle's Cross-Chain Transfer Protocol. One canonical USDC that works across both Wasm and EVM environments.\nhttps://t.co/8QNKb3W6wu\n\nπŸŸͺ The Injective MCP Server stores private keys locally with AES-256-GCM encryption. AI models only see wallet addresses and transaction hashes. Keys never leave your machine.\nhttps://t.co/WV37fc1cwE\n\nπŸ“Š Key Stats\n\nπŸŸͺ Over 99.7% of governance participants have voted YES on the USDC upgrade with 3 days remaining until Injective's biggest mainnet upgrade yet.\nhttps://t.co/yOzjo5t70G\n\nπŸŸͺ @HelixMarkets recorded $76.2B in cumulative all-time volume.\nhttps://t.co/Tp5d0JYgT5\n\n🌐 Ecosystem News\n\nπŸŸͺ @NinjaLabsHQ introduced City Zero, an onchain builder hub where builders and AI agents on Injective collaborate and build lasting ownership.\nhttps://t.co/sfFlc6KcPf\n\nπŸŸͺ @chuhanVcrypto represented Injective at the @Bybit_Official Predicts stage, making the case that where AI agents trade matters more than how.\nhttps://t.co/ROOnQX9yGs\n\nMainnet upgrade looks imminent. Lock in. πŸ₯·", "createdAtTimestamp": 1775398940, "scoredAtTimestamp": 1775664014, "retweetCountAtCollection": 45, "favoriteCountAtCollection": 220, "replyCountAtCollection": 18, "quoteCountAtCollection": 4, "sentiment": 9, "alpha": 9, "legitimacy": 7, "technicalAccuracy": 8, "isRecent": true, "isVerifiable": true, "scoresReasoning": "The tweet contains legitimate protocol announcements with verifiable elements: governance voting data (99.7% approval) can be checked on-chain, USDC integration via Circle's CCTP is a documented partnership, the AI toolkit with MCP servers (Model Context Protocol) is a real standard, and AES-256-GCM encryption is a legitimate security mechanism. HelixMarkets $76.2B volume is publicly trackable. Links to official sources are provided. Technical claims about Wasm/EVM dual compatibility are consistent with Injective's architecture. However, no independent verification of specific numbers was performed, and the promotional tone suggests this is ecosystem marketing content. The alpha is informational rather than strategic - it describes infrastructure developments rather than actionable yield strategies or risk opportunities. Overall legitimate information presented optimistically.", "tweetUrl": "https://x.com/injective/status/2040797189929111799", "userTrackRecordSignals": 165, "userTrackRecordUniqueTokens": 6, "userTrackRecordActiveDays": 87, "userTrackRecordFirstSignalDate": "2025-03-02", "userTrackRecordLastSignalDate": "2026-03-05", "userTrackRecordAccuracy24h": 34.6, "userTrackRecordAccuracy7d": 26.8, "userTrackRecordAccuracy30d": 70.0, "userTrackRecordAvgReturn24h": -1.07, "userTrackRecordAvgReturn7d": -4.35, "userTrackRecordAvgReturn30d": 7.71, "userTrackRecordBullishSignals": 165, "userTrackRecordBearishSignals": 0, "userTrackRecordAvgSentiment": 8.21, "userTrackRecordAvgAlpha": 6.54, "userTrackRecordPerformanceTier": "unproven" } // ... additional rows omitted for brevity ] ``` This returns the latest high-alpha tweets with comprehensive scoring across sentiment, alpha quality, legitimacy, and technical accuracy dimensions, plus detailed author performance metrics. ### 2. Filter by Specific Token Focus on alpha tweets for a specific cryptocurrency to identify token-specific investment signals and sentiment. ```bash curl -X GET "https://x402.cambrian.network/api/v1/deep42/social-data/alpha-tweet-detection?token_filter=BTC&limit=10" \ -H "X-API-KEY: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [ { "twitterHandle": "example_trader", "tokenSymbol": "BTC", "text": "Example BTC analysis tweet...", "sentiment": 8, "alpha": 7, "legitimacy": 6, "technicalAccuracy": 8, "userTrackRecordAccuracy24h": 72.5, "userTrackRecordPerformanceTier": "topPerformer" } ] ``` Returns only tweets mentioning the specified token, enabling focused analysis of token-specific alpha and market sentiment from tracked influencers. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/deep42/social-data/alpha-tweet-detection" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/deep42/social-data/alpha-tweet-detection") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## API Versioning This endpoint supports multiple API versions. Use the `Accept` header to request a specific version. ### Available Versions | Version | State | Default | Accept Header | |---------|-------|---------|---------------| | 2.0.0 | Current | Yes | `application/vnd.cambrian.deep42.social-data.alpha-tweet-detection.v2+json` | | 1.0.0 | Current | No | `application/vnd.cambrian.deep42.social-data.alpha-tweet-detection.v1+json` | ### How to Request a Specific Version ```bash curl -X GET "https://x402.cambrian.network/api/v1/deep42/social-data/alpha-tweet-detection" \ -H "X-API-KEY: YOUR_API_KEY" \ -H "Accept: application/vnd.cambrian.deep42.social-data.alpha-tweet-detection.v2+json" ``` ### Version Lifecycle - **Current**: Actively maintained and recommended for new integrations - **Deprecated**: Still functional but scheduled for removal (check `deprecated_at`) - **Sunset**: No longer available (returns `410 Gone`) **Note**: If no `Accept` header is specified, the default version (2.0.0) is returned. --- ## Related Endpoints - `/api/v1/deep42/social-data/influencer-credibility` - Returns cryptocurrency influencers ranked by credibility score, track record, accuracy, and engagement metrics - `/api/v1/deep42/social-data/sentiment-shifts` - Identifies tokens with significant sentiment changes that could signal market movements and trading opportunities --- ## Cambrian API: Crypto Influencer Credibility Rankings **Endpoint:** /api/v1/deep42/social-data/influencer-credibility # Influencer Credibility ## Overview Returns cryptocurrency influencers ranked by credibility score, track record, accuracy, and engagement metrics. Analyzes high-quality tweets to identify the most reliable voices in crypto. Track record accuracy is measured using directional price predictions at hourly resolution: a bullish signal is correct if the token price increased, bearish if it decreased. ## Business Value - **Identify Reliable Voices**: Find the most credible cryptocurrency influencers based on comprehensive metrics including engagement, reach, and track record accuracy - **Track Record Analysis**: Analyze historical performance with directional price predictions measured at 24h, 7d, and 30d timeframes - **Performance-Based Filtering**: Filter influencers by activity level, token focus, and proven track records to find relevant voices for specific use cases - **Risk Assessment**: Evaluate influencer performance tiers (topPerformer >=70% accuracy, proven >=60%, unproven <60%) for informed decision making - **Social Intelligence**: Access detailed engagement metrics, reach data, and sentiment analysis to understand influencer impact and reliability ## Endpoint Details **URL**: ``` https://deep42.cambrian.network/api/v1/deep42/social-data/influencer-credibility ``` **Method**: GET **Authentication**: Required via `X-API-KEY` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | min_tweets | integer | No | 5 | Minimum number of high-quality tweets required for inclusion (not follower count). Filters out influencers with insufficient track record. Range: 1-100 | | limit | integer | No | 25 | Maximum number of influencers to return. Range: 1-100 | | token_focus | string | No | - | Filter by specific token symbol (e.g., 'BTC', 'ETH', 'SOL'). Returns influencers who have tweeted about this token. Pattern: ^[A-Z0-9]{1,10}$ | | sort_by | string | No | credibility | Sort results by specified metric. Options: credibility, tweets, engagement, reach, alpha, accuracy | | order | string | No | desc | Sort direction. Options: asc, desc (highest first) | | time_window | string | No | - | Filter influencers by recent activity. Returns only influencers who posted within specified time window (e.g., '24h', '48h', '7d', '30d'). Pattern: ^[0-9]+[hd]$ | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | twitterHandle | string | Twitter username of the influencer | | influenceScore | number | Influence score measuring reach-weighted engagement. Calculated as: (total_views / 1M) * engagement_rate_percent, where engagement_rate = (likes + retweets) / views * 100. The 1M normalization baseline means an influencer with 1 million total views and 1% engagement rate scores 1.0. Unbounded, typically 0-50. >5 = significant, >20 = major influencer | | avgViewsPerTweet | number | Average views per high-quality tweet in the analysis window | | avgEngagementPerTweet | number | Average engagement actions (likes + retweets + replies) per tweet in the analysis window | | credibilityScore | number | Composite credibility score. Formula: (avg_views/50K)*10 + (avg_alpha/10)*5 + (avg_sentiment/10)*2 + log(tweet_count+1)*2. The 50K normalization baseline means an influencer averaging 50K views per tweet scores 10 points from reach alone. Remaining components weight alpha quality (up to 5 pts), sentiment consistency (up to 2 pts), and publishing activity (logarithmic, ~4.6 pts at 100 tweets). Unbounded, typically 5-300. >10 = credible, >50 = highly credible, >200 = top-tier | | tokensCovered | integer | Number of distinct cryptocurrency tokens discussed in high-quality tweets during the analysis window | | totalReach | integer | Sum of views across all analyzed tweets in the time window | | trackRecordSignals | integer | Total bullish/bearish signals made by this influencer. Only counts tweets with sentiment >=7 (bullish) or <=3 (bearish) that have token price data available (nullable) | | trackRecordUniqueTokens | integer | Number of distinct tokens this influencer has made directional signals about (nullable) | | trackRecordActiveDays | integer | Number of distinct calendar days with at least one signal (nullable) | | trackRecordFirstSignalDate | string | ISO date (YYYY-MM-DD) of earliest tracked signal (nullable) | | trackRecordLastSignalDate | string | ISO date (YYYY-MM-DD) of most recent tracked signal (nullable) | | trackRecordAccuracy24h | number | 24-hour directional prediction accuracy (0-100%). A bullish signal is correct if the token price increased within 24h; bearish if it decreased. Prices compared at hourly resolution, rounded to nearest hour from signal timestamp. Calculated only over signals with available 24h price data (nullable) | | trackRecordAccuracy7d | number | 7-day directional prediction accuracy (0-100%). Same methodology as 24h but comparing price 7 days after the signal (nullable) | | trackRecordAccuracy30d | number | 30-day directional prediction accuracy (0-100%). Same methodology as 24h but comparing price 30 days after the signal. Sample size may be smaller than total signals for recently active influencers (nullable) | | trackRecordAvgReturn24h | number | Average directional return % over 24h. For bullish: (price_24h - price_at_signal) / price_at_signal * 100. For bearish: inverted. Positive = directionally profitable on average (nullable) | | trackRecordAvgReturn7d | number | Average directional return % over 7 days (nullable) | | trackRecordAvgReturn30d | number | Average directional return % over 30 days (nullable) | | trackRecordBullishSignals | integer | Count of bullish signals (sentiment >=7) (nullable) | | trackRecordBearishSignals | integer | Count of bearish signals (sentiment <=3) (nullable) | | trackRecordAvgSentiment | number | Average sentiment score across all signals. Range 0-10 (nullable) | | trackRecordAvgAlpha | number | Average alpha score across all signals. Range 0-10 (nullable) | | trackRecordPerformanceTier | string | Performance tier based on 24h accuracy. 'topPerformer' = >=70%, 'proven' = >=60%, 'unproven' = <60%. Null if no accuracy data (nullable) | ## Examples ### 1. Top Crypto Influencers by Credibility Get the top 5 most credible cryptocurrency influencers based on overall credibility score. ```bash curl -X GET "https://deep42.cambrian.network/api/v1/deep42/social-data/influencer-credibility?limit=5" \ -H "X-API-KEY: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [ { "twitterHandle": "cobie", "avgViewsPerTweet": 851444.6, "avgEngagementPerTweet": 9399.4, "credibilityScore": 175.57, "influenceScore": 3.96, "totalReach": 4257223, "tokensCovered": 1, "trackRecordSignals": null, "trackRecordUniqueTokens": null, "trackRecordActiveDays": null, "trackRecordFirstSignalDate": null, "trackRecordLastSignalDate": null, "trackRecordAccuracy24h": null, "trackRecordAccuracy7d": null, "trackRecordAccuracy30d": null, "trackRecordAvgReturn24h": null, "trackRecordAvgReturn7d": null, "trackRecordAvgReturn30d": null, "trackRecordBullishSignals": null, "trackRecordBearishSignals": null, "trackRecordAvgSentiment": null, "trackRecordAvgAlpha": null, "trackRecordPerformanceTier": null }, { "twitterHandle": "watcherguru", "avgViewsPerTweet": 294180.56, "avgEngagementPerTweet": 4518.88, "credibilityScore": 68.83, "influenceScore": 6.73, "totalReach": 4706889, "tokensCovered": 3, "trackRecordSignals": 59, "trackRecordUniqueTokens": 21, "trackRecordActiveDays": 48, "trackRecordFirstSignalDate": "2025-03-03", "trackRecordLastSignalDate": "2026-03-06", "trackRecordAccuracy24h": 58.1, "trackRecordAccuracy7d": 53.4, "trackRecordAccuracy30d": 57.1, "trackRecordAvgReturn24h": 1.28, "trackRecordAvgReturn7d": 12.61, "trackRecordAvgReturn30d": 2.31, "trackRecordBullishSignals": 52, "trackRecordBearishSignals": 7, "trackRecordAvgSentiment": 7.03, "trackRecordAvgAlpha": 6.93, "trackRecordPerformanceTier": "unproven" }, { "twitterHandle": "aster_dex", "avgViewsPerTweet": 136948.13, "avgEngagementPerTweet": 687.13, "credibilityScore": 34.02, "influenceScore": 0.51, "totalReach": 1095585, "tokensCovered": 2, "trackRecordSignals": 134, "trackRecordUniqueTokens": 67, "trackRecordActiveDays": 63, "trackRecordFirstSignalDate": "2025-12-07", "trackRecordLastSignalDate": "2026-03-06", "trackRecordAccuracy24h": 44.4, "trackRecordAccuracy7d": 31.8, "trackRecordAccuracy30d": 25.0, "trackRecordAvgReturn24h": -4.42, "trackRecordAvgReturn7d": -3.25, "trackRecordAvgReturn30d": -6.6, "trackRecordBullishSignals": 128, "trackRecordBearishSignals": 6, "trackRecordAvgSentiment": 7.49, "trackRecordAvgAlpha": 7.19, "trackRecordPerformanceTier": "unproven" }, { "twitterHandle": "vitalikbuterin", "avgViewsPerTweet": 115580.09, "avgEngagementPerTweet": 1194.82, "credibilityScore": 31.49, "influenceScore": 1.11, "totalReach": 1271381, "tokensCovered": 2, "trackRecordSignals": 1, "trackRecordUniqueTokens": 1, "trackRecordActiveDays": 1, "trackRecordFirstSignalDate": "2026-02-18", "trackRecordLastSignalDate": "2026-02-18", "trackRecordAccuracy24h": null, "trackRecordAccuracy7d": 100.0, "trackRecordAccuracy30d": null, "trackRecordAvgReturn24h": null, "trackRecordAvgReturn7d": 0.07, "trackRecordAvgReturn30d": null, "trackRecordBullishSignals": 1, "trackRecordBearishSignals": 0, "trackRecordAvgSentiment": 9.0, "trackRecordAvgAlpha": 7.0, "trackRecordPerformanceTier": null }, { "twitterHandle": "worldlibertyfi", "avgViewsPerTweet": 132681.5, "avgEngagementPerTweet": 665.67, "credibilityScore": 31.48, "influenceScore": 0.33, "totalReach": 796089, "tokensCovered": 2, "trackRecordSignals": 11, "trackRecordUniqueTokens": 4, "trackRecordActiveDays": 11, "trackRecordFirstSignalDate": "2025-06-02", "trackRecordLastSignalDate": "2026-03-06", "trackRecordAccuracy24h": 71.4, "trackRecordAccuracy7d": 63.6, "trackRecordAccuracy30d": 0.0, "trackRecordAvgReturn24h": 25.89, "trackRecordAvgReturn7d": 66.38, "trackRecordAvgReturn30d": -8.66, "trackRecordBullishSignals": 11, "trackRecordBearishSignals": 0, "trackRecordAvgSentiment": 7.64, "trackRecordAvgAlpha": 6.73, "trackRecordPerformanceTier": "topPerformer" } ] ``` This returns the top 5 crypto influencers ranked by credibility score. The response includes cobie with the highest credibility score (175.57) and significant reach (851K avg views per tweet), watcherguru with strong engagement metrics and track record data, and worldlibertyfi showing "topPerformer" tier with 71.4% 24h accuracy. ### 2. Bitcoin-Focused Influencers Find influencers who specifically discuss Bitcoin, sorted by credibility. ```bash curl -X GET "https://deep42.cambrian.network/api/v1/deep42/social-data/influencer-credibility?token_focus=BTC&limit=10" \ -H "X-API-KEY: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [Similar structure but filtered for Bitcoin-focused influencers] ``` This filters for influencers who have tweeted about Bitcoin specifically, providing targeted insights for Bitcoin-related investment decisions and market analysis. ## API Versioning This endpoint supports multiple API versions. Use the `Accept` header to request a specific version. ### Available Versions | Version | State | Default | Accept Header | |---------|-------|---------|---------------| | 2.0.0 | Current | Yes | `application/vnd.cambrian.deep42.social-data.influencer-credibility.v2+json` | | 1.0.0 | Current | No | `application/vnd.cambrian.deep42.social-data.influencer-credibility.v1+json` | ### How to Request a Specific Version ```bash curl -X GET "https://deep42.cambrian.network/api/v1/deep42/social-data/influencer-credibility" \ -H "X-API-KEY: YOUR_API_KEY" \ -H "Accept: application/vnd.cambrian.deep42.social-data.influencer-credibility.v2+json" ``` ### Version Lifecycle - **Current**: Actively maintained and recommended for new integrations - **Deprecated**: Still functional but scheduled for removal (check `deprecated_at`) - **Sunset**: No longer available (returns `410 Gone`) **Note**: If no `Accept` header is specified, the default version (2.0.0) is returned. --- ## Related Endpoints - `/api/v1/deep42/social-data/alpha-tweet-detection` - Identify high-alpha cryptocurrency tweets from verified influencers pi/v1/deep42/social-data/trending-momentum` - Track trending cryptocurrencies and momentum shifts/d pi/v1/deep42/social-data/token-analysis` - Analyze specific token sentiment and social metrics/d - `/api/v1/deep42/social-data/sentiment-shifts` - Track sentiment changes across cryptocurrency communities pi/v1/deep42/social-data/trending-momentum` - Track trending cryptocurrencies and momentum shifts/d pi/v1/deep42/social-data/token-analysis` - Analyze specific token sentiment and social metrics/d - `/api/v1/deep42/social-data/token-analysis` - Analyze specific token sentiment and social metrics pi/v1/deep42/social-data/trending-momentum` - Track trending cryptocurrencies and momentum shifts/d pi/v1/deep42/social-data/token-analysis` - Analyze specific token sentiment and social metrics/d - `/api/v1/deep42/social-data/trending-momentum` - Track trending cryptocurrencies and momentum shifts pi/v1/deep42/social-data/trending-momentum` - Track trending cryptocurrencies and momentum shifts/d pi/v1/deep42/social-data/token-analysis` - Analyze specific token sentiment and social metrics/d --- ## Cambrian API: Crypto Influencer Credibility Rankings **Endpoint:** /api/v1/deep42/social-data/influencer-credibility # Influencer Credibility ## Overview Returns cryptocurrency influencers ranked by credibility score, track record, accuracy, and engagement metrics. Analyzes high-quality tweets to identify the most reliable voices in crypto. ## Business Value - **Credible Voice Discovery**: Identify the most reliable cryptocurrency influencers based on comprehensive credibility scoring that considers track record, accuracy, and engagement metrics - **Risk Mitigation**: Filter out unreliable sources by setting minimum quality thresholds (min_tweets) to ensure sufficient track record before inclusion - **Token-Specific Expertise**: Focus on influencers who specialize in specific cryptocurrencies using the token_focus parameter for targeted analysis - **Performance Analytics**: Access detailed track records including accuracy percentages, return metrics, and sentiment analysis to make informed decisions - **Flexible Sorting**: Customize rankings by different metrics (credibility, engagement, reach, alpha generation) to match your specific research or investment strategy ## Endpoint Details **URL**: ``` https://deep42.cambrian.network/api/v1/deep42/social-data/influencer-credibility ``` **Method**: GET **Authentication**: Required via `X-API-KEY` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | min_tweets | integer | false | 5 | Minimum number of high-quality tweets required for inclusion (not follower count). Filters out influencers with insufficient track record. Range: 1-100 | | limit | integer | false | 25 | Maximum number of influencers to return. Range: 1-100 | | token_focus | string | false | - | Filter by specific token symbol (e.g., 'BTC', 'ETH', 'SOL'). Returns influencers who have tweeted about this token. Pattern: ^[A-Z0-9]{1,10}$ | | sort_by | string | false | credibility | Sort results by specified metric. Options: credibility, tweets, engagement, reach, alpha, accuracy | | order | string | false | desc | Sort direction. Options: asc, desc | | time_window | string | false | - | Filter influencers by recent activity. Returns only influencers who posted within the specified time window (e.g., '24h', '48h', '7d', '30d'). Pattern: ^[0-9]+[hd]$ | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | twitterHandle | string | Twitter username/handle of the influencer | | avgViewsPerTweet | number | Average number of views per tweet | | avgEngagementPerTweet | number | Average engagement (likes, retweets, replies) per tweet | | credibilityScore | number | Overall credibility score combining multiple factors | | influenceScore | number | Numerical score representing overall influence | | totalReach | number | Total reach across all tweets | | tokensCovered | integer | Number of different tokens the influencer has discussed | | trackRecordSignals | integer | Total number of trading signals/predictions made (null if insufficient data) | | trackRecordUniqueTokens | integer | Number of unique tokens in track record (null if insufficient data) | | trackRecordActiveDays | integer | Number of active days with signals (null if insufficient data) | | trackRecordFirstSignalDate | string | Date of first recorded signal (YYYY-MM-DD format, null if insufficient data) | | trackRecordLastSignalDate | string | Date of most recent signal (YYYY-MM-DD format, null if insufficient data) | | trackRecordAccuracy24h | number | Prediction accuracy over 24 hours (percentage, null if insufficient data) | | trackRecordAccuracy7d | number | Prediction accuracy over 7 days (percentage, null if insufficient data) | | trackRecordAccuracy30d | number | Prediction accuracy over 30 days (percentage, null if insufficient data) | | trackRecordAvgReturn24h | number | Average return of predictions over 24 hours (percentage, null if insufficient data) | | trackRecordAvgReturn7d | number | Average return of predictions over 7 days (percentage, null if insufficient data) | | trackRecordAvgReturn30d | number | Average return of predictions over 30 days (percentage, null if insufficient data) | | trackRecordBullishSignals | integer | Number of bullish signals given (null if insufficient data) | | trackRecordBearishSignals | integer | Number of bearish signals given (null if insufficient data) | | trackRecordAvgSentiment | number | Average sentiment score of signals (scale 1-10, null if insufficient data) | | trackRecordAvgAlpha | number | Average alpha generation score (scale 1-10, null if insufficient data) | | trackRecordPerformanceTier | string | Performance tier classification (null if insufficient data) | ## Examples ### 1. Top Credible Crypto Influencers This example demonstrates getting the most credible cryptocurrency influencers with a minimum track record threshold. ```bash curl -X GET "https://deep42.cambrian.network/api/v1/deep42/social-data/influencer-credibility?limit=3&min_tweets=5" \ -H "X-API-KEY: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [ { "twitterHandle": "cobie", "avgViewsPerTweet": 1102953.43, "avgEngagementPerTweet": 11280.0, "credibilityScore": 226.39, "influenceScore": 7.0, "totalReach": 7720674, "tokensCovered": 1, "trackRecordSignals": null, "trackRecordUniqueTokens": null, "trackRecordActiveDays": null, "trackRecordFirstSignalDate": null, "trackRecordLastSignalDate": null, "trackRecordAccuracy24h": null, "trackRecordAccuracy7d": null, "trackRecordAccuracy30d": null, "trackRecordAvgReturn24h": null, "trackRecordAvgReturn7d": null, "trackRecordAvgReturn30d": null, "trackRecordBullishSignals": null, "trackRecordBearishSignals": null, "trackRecordAvgSentiment": null, "trackRecordAvgAlpha": null, "trackRecordPerformanceTier": null }, { "twitterHandle": "watcherguru", "avgViewsPerTweet": 394270.55, "avgEngagementPerTweet": 6012.91, "credibilityScore": 87.93, "influenceScore": 6.17, "totalReach": 4336976, "tokensCovered": 3, "trackRecordSignals": 59, "trackRecordUniqueTokens": 21, "trackRecordActiveDays": 48, "trackRecordFirstSignalDate": "2025-03-03", "trackRecordLastSignalDate": "2026-03-06", "trackRecordAccuracy24h": 58.1, "trackRecordAccuracy7d": 53.4, "trackRecordAccuracy30d": 55.9, "trackRecordAvgReturn24h": 1.28, "trackRecordAvgReturn7d": 12.61, "trackRecordAvgReturn30d": 2.11, "trackRecordBullishSignals": 52, "trackRecordBearishSignals": 7, "trackRecordAvgSentiment": 7.03, "trackRecordAvgAlpha": 6.93, "trackRecordPerformanceTier": "unproven" }, { "twitterHandle": "vitalikbuterin", "avgViewsPerTweet": 141308.21, "avgEngagementPerTweet": 1316.07, "credibilityScore": 37.25, "influenceScore": 1.56, "totalReach": 1978315, "tokensCovered": 3, "trackRecordSignals": 1, "trackRecordUniqueTokens": 1, "trackRecordActiveDays": 1, "trackRecordFirstSignalDate": "2026-02-18", "trackRecordLastSignalDate": "2026-02-18", "trackRecordAccuracy24h": null, "trackRecordAccuracy7d": 100.0, "trackRecordAccuracy30d": null, "trackRecordAvgReturn24h": null, "trackRecordAvgReturn7d": 0.07, "trackRecordAvgReturn30d": null, "trackRecordBullishSignals": 1, "trackRecordBearishSignals": 0, "trackRecordAvgSentiment": 9.0, "trackRecordAvgAlpha": 7.0, "trackRecordPerformanceTier": null } ] ``` The response shows three top-credible crypto influencers. "cobie" leads with the highest credibility score (226.39) and massive reach (over 1.1M average views per tweet). "watcherguru" has a substantial track record with 59 signals and detailed performance metrics. "vitalikbuterin" shows high-quality engagement despite lower volume, with perfect 7-day accuracy (100%). ### 2. Bitcoin-Focused Influencer Analysis This example demonstrates filtering for influencers who specifically discuss Bitcoin, sorted by engagement metrics. ```bash curl -X GET "https://deep42.cambrian.network/api/v1/deep42/social-data/influencer-credibility?token_focus=BTC&sort_by=engagement&limit=5&min_tweets=10" \ -H "X-API-KEY: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [ { "twitterHandle": "cobie", "avgViewsPerTweet": 1102953.43, "avgEngagementPerTweet": 11280.0, "credibilityScore": 226.39, "influenceScore": 7.0, "totalReach": 7720674, "tokensCovered": 1, "trackRecordSignals": null, "trackRecordUniqueTokens": null, "trackRecordActiveDays": null, "trackRecordFirstSignalDate": null, "trackRecordLastSignalDate": null, "trackRecordAccuracy24h": null, "trackRecordAccuracy7d": null, "trackRecordAccuracy30d": null, "trackRecordAvgReturn24h": null, "trackRecordAvgReturn7d": null, "trackRecordAvgReturn30d": null, "trackRecordBullishSignals": null, "trackRecordBearishSignals": null, "trackRecordAvgSentiment": null, "trackRecordAvgAlpha": null, "trackRecordPerformanceTier": null }, { "twitterHandle": "watcherguru", "avgViewsPerTweet": 394270.55, "avgEngagementPerTweet": 6012.91, "credibilityScore": 87.93, "influenceScore": 6.17, "totalReach": 4336976, "tokensCovered": 3, "trackRecordSignals": 59, "trackRecordUniqueTokens": 21, "trackRecordActiveDays": 48, "trackRecordFirstSignalDate": "2025-03-03", "trackRecordLastSignalDate": "2026-03-06", "trackRecordAccuracy24h": 58.1, "trackRecordAccuracy7d": 53.4, "trackRecordAccuracy30d": 55.9, "trackRecordAvgReturn24h": 1.28, "trackRecordAvgReturn7d": 12.61, "trackRecordAvgReturn30d": 2.11, "trackRecordBullishSignals": 52, "trackRecordBearishSignals": 7, "trackRecordAvgSentiment": 7.03, "trackRecordAvgAlpha": 6.93, "trackRecordPerformanceTier": "unproven" }, { "twitterHandle": "vitalikbuterin", "avgViewsPerTweet": 141308.21, "avgEngagementPerTweet": 1316.07, "credibilityScore": 37.25, "influenceScore": 1.56, "totalReach": 1978315, "tokensCovered": 3, "trackRecordSignals": 1, "trackRecordUniqueTokens": 1, "trackRecordActiveDays": 1, "trackRecordFirstSignalDate": "2026-02-18", "trackRecordLastSignalDate": "2026-02-18", "trackRecordAccuracy24h": null, "trackRecordAccuracy7d": 100.0, "trackRecordAccuracy30d": null, "trackRecordAvgReturn24h": null, "trackRecordAvgReturn7d": 0.07, "trackRecordAvgReturn30d": null, "trackRecordBullishSignals": 1, "trackRecordBearishSignals": 0, "trackRecordAvgSentiment": 9.0, "trackRecordAvgAlpha": 7.0, "trackRecordPerformanceTier": null } ] ``` This query filters for Bitcoin-focused influencers with established track records (minimum 10 tweets) and ranks them by engagement metrics. The results would show influencers who have specifically discussed Bitcoin, sorted by their average engagement per tweet, helping identify the most engaging voices in the Bitcoin community.## API Versioning This endpoint supports multiple API versions. Use the `Accept` header to request a specific version. ### Available Versions | Version | State | Default | Accept Header | |---------|-------|---------|---------------| | 2.0.0 | Current | Yes | `application/vnd.cambrian.deep42.social-data.influencer-credibility.v2+json` | | 1.0.0 | Current | No | `application/vnd.cambrian.deep42.social-data.influencer-credibility.v1+json` | ### How to Request a Specific Version ```bash curl -X GET "https://deep42.cambrian.network/api/v1/deep42/social-data/influencer-credibility" \ -H "X-API-KEY: YOUR_API_KEY" \ -H "Accept: application/vnd.cambrian.deep42.social-data.influencer-credibility.v2+json" ``` ### Version Lifecycle - **Current**: Actively maintained and recommended for new integrations - **Deprecated**: Still functional but scheduled for removal (check `deprecated_at`) - **Sunset**: No longer available (returns `410 Gone`) **Note**: If no `Accept` header is specified, the default version (2.0.0) is returned. --- ## Cambrian API: Detect major sentiment shifts in crypto tokens **Endpoint:** /api/v1/deep42/social-data/sentiment-shifts # Sentiment Shifts ## Overview Identifies tokens with significant sentiment changes that could signal market movements and trading opportunities. Compares average AI-assigned sentiment scores (0-10 per tweet) between a current period and a previous period of equal length. ## Business Value - **Early Market Signal Detection**: Catch sentiment shifts before they translate to price movements, giving traders a potential timing advantage - **Risk Management**: Identify tokens experiencing bearish sentiment shifts that may warrant position adjustments or increased monitoring - **Portfolio Opportunity Discovery**: Find tokens with improving sentiment that could represent new investment opportunities - **Data-Driven Decision Making**: Replace gut feelings about market sentiment with quantified, statistical analysis of social media conversations - **Statistical Validation**: Only includes tokens with sufficient tweet volume in both periods for statistically relevant sentiment comparisons ## Endpoint Details **URL**: ``` https://deep42.cambrian.network/api/v1/deep42/social-data/sentiment-shifts ``` **Method**: GET **Authentication**: Required via `X-API-KEY` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | comparison_period | string | No | 3d | Period to compare against (24h, 3d, 7d) | | limit | integer | No | 20 | Number of tokens to return (max 50) | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | tokenSymbol | string | Cryptocurrency token symbol (e.g., BTC, ETH, SOL) | | sentimentShift | number | Change in average sentiment between current and previous period. Range: -10 to +10. Positive = bullish shift, negative = bearish shift. >2 = notable, >5 = major shift | | currentSentiment | number | Average AI-assigned sentiment score across all tweets about this token in the current period (last 24 hours). Range 0-10. Each tweet is independently scored: 0 = very bearish, 5 = neutral, 10 = very bullish | | previousSentiment | number | Average AI-assigned sentiment score across all tweets in the previous period. Range 0-10 | | currentPeriodTweets | integer | Number of tweets about this token in the current period (last 24 hours). Higher counts indicate more active discussion and more reliable sentiment averages | | previousPeriodTweets | integer | Number of tweets about this token in the previous period. Used as denominator for volumeChange calculation | | currentPeriodAuthors | integer | Number of distinct authors discussing this token in the current period. Higher counts indicate broader market attention | | bullishRatio | number | Percentage of current-period tweets with bullish sentiment (score >=6). Range 0-100. >60 = bullish majority, <40 = bearish majority | | volumeChange | number | Ratio of current period tweet count to previous period. 1.0 = unchanged, 2.0 = doubled, 0.5 = halved | | qualityScore | number | Sum of average sentiment + average alpha for current period tweets. Range 0-20. Indicates both directional conviction and content quality | | volatility | number | Standard deviation of sentiment scores within the current period. Range 0-5. <1 = strong consensus among authors, >2 = highly divided opinions | | confidenceScore | number | Confidence in the detected shift. Calculated as log(tweet_count + 1) * abs(sentiment_shift). Higher = more reliable signal. >3 = moderate confidence, >5 = high confidence | | signalMagnitude | number | Shift magnitude normalized by volatility. >1 = shift exceeds normal variance, >2 = shift is 2x normal variance | ## Examples ### 1. Recent Sentiment Changes (24h period) Find tokens with sentiment shifts over the last 24 hours compared to the previous 24-hour period. ```bash curl -X GET "https://x402.cambrian.network/api/v1/deep42/social-data/sentiment-shifts?comparison_period=24h&limit=5" \ -H "X-API-KEY: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [ { "tokenSymbol": "HYPE", "sentimentShift": 2.5, "currentSentiment": 8.0, "previousSentiment": 5.5, "currentPeriodTweets": 3, "previousPeriodTweets": 2, "currentPeriodAuthors": 2, "bullishRatio": 100.0, "volumeChange": 1.5, "qualityScore": 15.0, "volatility": 1.0, "confidenceScore": 3.47, "signalMagnitude": 2.5 }, { "tokenSymbol": "DOT", "sentimentShift": -1.25, "currentSentiment": 7.75, "previousSentiment": 9.0, "currentPeriodTweets": 4, "previousPeriodTweets": 2, "currentPeriodAuthors": 4, "bullishRatio": 100.0, "volumeChange": 2.0, "qualityScore": 14.75, "volatility": 0.5, "confidenceScore": 2.01, "signalMagnitude": 1.25 }, { "tokenSymbol": "SOL", "sentimentShift": -1.07, "currentSentiment": 6.18, "previousSentiment": 7.26, "currentPeriodTweets": 33, "previousPeriodTweets": 43, "currentPeriodAuthors": 19, "bullishRatio": 74.0, "volumeChange": 0.77, "qualityScore": 13.03, "volatility": 2.65, "confidenceScore": 3.79, "signalMagnitude": 0.41 }, { "tokenSymbol": "BURNIE", "sentimentShift": -0.83, "currentSentiment": 7.67, "previousSentiment": 8.5, "currentPeriodTweets": 3, "previousPeriodTweets": 2, "currentPeriodAuthors": 1, "bullishRatio": 100.0, "volumeChange": 1.5, "qualityScore": 14.0, "volatility": 1.15, "confidenceScore": 1.16, "signalMagnitude": 0.72 }, { "tokenSymbol": "MSTR", "sentimentShift": 0.67, "currentSentiment": 8.0, "previousSentiment": 7.33, "currentPeriodTweets": 3, "previousPeriodTweets": 3, "currentPeriodAuthors": 2, "bullishRatio": 100.0, "volumeChange": 1.0, "qualityScore": 14.67, "volatility": 0.0, "confidenceScore": 0.92, "signalMagnitude": 0.67 } ] ``` The response shows HYPE with the strongest positive sentiment shift (+2.5), indicating increasing bullish sentiment, while SOL shows a moderate bearish shift (-1.07) with high discussion volume (33 tweets) making it a more statistically reliable signal. ### 2. Weekly Sentiment Analysis Analyze sentiment changes over a 7-day comparison period to identify longer-term trend shifts. ```bash curl -X GET "https://x402.cambrian.network/api/v1/deep42/social-data/sentiment-shifts?comparison_period=7d&limit=10" \ -H "X-API-KEY: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [ { "tokenSymbol": "HYPE", "sentimentShift": 2.5, "currentSentiment": 8.0, "previousSentiment": 5.5, "currentPeriodTweets": 3, "previousPeriodTweets": 2, "currentPeriodAuthors": 2, "bullishRatio": 100.0, "volumeChange": 1.5, "qualityScore": 15.0, "volatility": 1.0, "confidenceScore": 3.47, "signalMagnitude": 2.5 } ] ``` This 7-day comparison captures more substantial sentiment trends, filtering out short-term noise and identifying tokens with sustained directional sentiment changes. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/deep42/social-data/sentiment-shifts" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/deep42/social-data/sentiment-shifts") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/deep42/social-data/alpha-tweet-detection` - Feed of tweets detected as having high alpha potential for cryptocurrency investments - `/api/v1/deep42/social-data/influencer-credibility` - Returns cryptocurrency influencers ranked by credibility score and track record --- ## Cambrian API: V2 - Fee Metrics **Endpoint:** /api/v1/evm/aero/v2/fee-metrics # Aerodrome V2 Fee Metrics Shows daily historical data to understand the fees over time on a pool. This endpoint provides comprehensive fee analytics including APR calculations, volume ratios, and historical fee data for Aerodrome V2 pools. ## Business Value - **Pool Performance Analysis**: Track fee generation efficiency and profitability of liquidity pools over time - **Yield Optimization**: Monitor fee APR to make informed decisions about liquidity provision strategies - **Historical Insights**: Access detailed historical fee data to understand trends and patterns in pool activity - **Risk Assessment**: Evaluate pool stability and fee consistency for investment decision making - **Competitive Analysis**: Compare fee metrics across different pools to identify the most profitable opportunities ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/evm/aero/v2/fee-metrics ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | pool_address | String | Yes | - | Pool address with 0x prefix | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | poolId | String | The pool contract address | | feeTier | UInt256 | The fee tier of the pool (e.g., 30 for 0.30%) | | timeframeAt | String | The timeframe period for the metrics (e.g., "7d" for 7 days) | | feeMetrics | Map(String,Nullable(String)) | Current fee metrics including APR, volume ratio, and fees in USD and tokens | | historicalFees | Array(Map(String,Nullable(Float64))) | Array of historical fee data with timestamps, volumes, and fee amounts | | updatedAt | UInt32 | Unix timestamp when the data was last updated | ## Examples ### 1. Get Fee Metrics for Pool Retrieve comprehensive fee metrics for a specific Aerodrome V2 pool to analyze its performance and fee generation. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/aero/v2/fee-metrics?pool_address=0x6cdcb1c4a4d1c3c6d054b27ac5b77e89eafb971d" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "poolId", "type": "String" }, { "name": "feeTier", "type": "UInt256" }, { "name": "timeframeAt", "type": "String" }, { "name": "feeMetrics", "type": "Map(String,Nullable(String))" }, { "name": "historicalFees", "type": "Array(Map(String,Nullable(Float64)))" }, { "name": "updatedAt", "type": "UInt32" } ], "data": [ [ "0x6cdcb1c4a4d1c3c6d054b27ac5b77e89eafb971d", "30", "7d", { "'feeAPR'": "8.76", "'feeVolumeRatio'": "0.002948", "'feesToken0'": "28256.515241748002", "'feesToken1'": "58213.47455947733", "'feesUSD'": "26866.8" }, [ { "'feeVolumeRatio'": 0.003005, "'feesUSD'": 14157.43, "'timestamp'": 1768953600.0, "'volume'": 4711961.95 }, { "'feeVolumeRatio'": 0.003006, "'feesUSD'": 9980.77, "'timestamp'": 1769040000.0, "'volume'": 3320067.72 }, { "'feeVolumeRatio'": 0.003004, "'feesUSD'": 8781.31, "'timestamp'": 1769126400.0, "'volume'": 2923591.93 }, { "'feeVolumeRatio'": 0.003014, "'feesUSD'": 1674.37, "'timestamp'": 1769212800.0, "'volume'": 555566.58 }, { "'feeVolumeRatio'": 0.00301, "'feesUSD'": 6582.55, "'timestamp'": 1769299200.0, "'volume'": 2187157.68 }, { "'feeVolumeRatio'": 0.003004, "'feesUSD'": 7171.06, "'timestamp'": 1769385600.0, "'volume'": 2387234.6 }, { "'feeVolumeRatio'": 0.003006, "'feesUSD'": 7476.36, "'timestamp'": 1769472000.0, "'volume'": 2486914.01 } ], 1769608775 ] ], "rows": 1 } ``` The response shows the pool has a 0.30% fee tier with an 8.76% APR over the past 7 days. It includes daily fee breakdowns with volume and USD values, providing insights into the pool's fee generation consistency and performance trends. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/evm/aero/v2/fee-metrics" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/evm/aero/v2/fee-metrics") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/evm/aero/v2/pools` - List all Aerodrome V2 pools with basic information --- ## Cambrian API: V2 - Pool Info **Endpoint:** /api/v1/evm/aero/v2/pool # Aerodrome V2 Pool Information This endpoint retrieves comprehensive information about a specific Aerodrome V2 pool, including token details, reserves, TVL, and APR calculations. It provides real-time pool data essential for liquidity providers and traders analyzing pool performance on the Aerodrome DEX. ## Business Value - **Pool Analytics**: Access detailed metrics including TVL, reserves, and APR to analyze pool performance and profitability - **Risk Assessment**: Evaluate pool composition with token balances, prices, and reserve ratios for informed investment decisions - **Yield Optimization**: Compare APR breakdowns (swap fees, rewards, bribes) to identify highest-yielding liquidity opportunities - **Portfolio Management**: Monitor pool positions with real-time pricing and reserve data for active liquidity management - **Trading Intelligence**: Understand pool depth and composition to optimize trade execution and slippage management ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/evm/aero/v2/pool ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | pool_address | String | Yes | - | Pool address with 0x prefix (e.g., 0x6cdcb1c4a4d1c3c6d054b27ac5b77e89eafb971d) | | apr_days_annualized | Integer | Yes | - | Number of previous days to calculate APR from (1-30). 7 means APR is annualized from the past 7 days of activity | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | poolAddress | String | The pool contract address | | token0Address | FixedString(42) | Contract address of the first token in the pool | | token0Symbol | FixedString(50) | Symbol of the first token (e.g., USDC) | | token0Name | String | Full name of the first token | | token0Decimals | UInt8 | Number of decimal places for the first token | | token1Address | FixedString(42) | Contract address of the second token in the pool | | token1Symbol | FixedString(50) | Symbol of the second token (e.g., AERO) | | token1Name | String | Full name of the second token | | token1Decimals | UInt8 | Number of decimal places for the second token | | reserve0 | UInt256 | Raw reserve amount of token0 in the pool | | reserve1 | UInt256 | Raw reserve amount of token1 in the pool | | tvlToken0 | Float64 | Total value locked in token0 (normalized) | | tvlToken1 | Float64 | Total value locked in token1 (normalized) | | token0PriceUSD | Float64 | Current USD price of token0 | | token1PriceUSD | Float64 | Current USD price of token1 | | tvlUSD | Float64 | Total value locked in USD | | feesXdUSD | Float64 | Fees generated over the specified period in USD | | aeroRewardsXdUSD | Float64 | AERO rewards distributed over the specified period in USD | | bribesXdUSD | Float64 | Bribe rewards over the specified period in USD | | swapFeeAPR | Float64 | Annualized percentage return from swap fees | | aeroRewardAPR | Float64 | Annualized percentage return from AERO rewards | | bribeFeeAPR | Float64 | Annualized percentage return from bribes | | totalAPR | Float64 | Combined annualized percentage return from all sources | | calculationTimestampAt | UInt32 | Unix timestamp when the APR calculation was performed | | baseCurrency | String | Base currency for price calculations (e.g., USD) | | createdAt | DateTime('UTC') | Timestamp when the pool was created | ## Examples ### 1. Get USDC/AERO Pool Information This example retrieves comprehensive pool data for the USDC/AERO pool with a 7-day APR calculation window. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/aero/v2/pool?pool_address=0x6cdcb1c4a4d1c3c6d054b27ac5b77e89eafb971d&apr_days_annualized=7" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "poolAddress", "type": "String" }, { "name": "token0Address", "type": "FixedString(42)" }, { "name": "token0Symbol", "type": "FixedString(50)" }, { "name": "token0Name", "type": "String" }, { "name": "token0Decimals", "type": "UInt8" }, { "name": "token1Address", "type": "FixedString(42)" }, { "name": "token1Symbol", "type": "FixedString(50)" }, { "name": "token1Name", "type": "String" }, { "name": "token1Decimals", "type": "UInt8" }, { "name": "reserve0", "type": "UInt256" }, { "name": "reserve1", "type": "UInt256" }, { "name": "tvlToken0", "type": "Float64" }, { "name": "tvlToken1", "type": "Float64" }, { "name": "token0PriceUSD", "type": "Float64" }, { "name": "token1PriceUSD", "type": "Float64" }, { "name": "tvlUSD", "type": "Float64" }, { "name": "feesXdUSD", "type": "Float64" }, { "name": "aeroRewardsXdUSD", "type": "Float64" }, { "name": "bribesXdUSD", "type": "Float64" }, { "name": "swapFeeAPR", "type": "Float64" }, { "name": "aeroRewardAPR", "type": "Float64" }, { "name": "bribeFeeAPR", "type": "Float64" }, { "name": "totalAPR", "type": "Float64" }, { "name": "calculationTimestampAt", "type": "UInt32" }, { "name": "baseCurrency", "type": "String" }, { "name": "createdAt", "type": "DateTime('UTC')" } ], "data": [ [ "0x6cdcb1c4a4d1c3c6d054b27ac5b77e89eafb971d", "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "USDC", "USD Coin", 6, "0x940181a94a35a4569e4529a3cdfb74e38fd98631", "AERO", "Aerodrome", 18, "16544268286970", "34647667581027436398736393", 16544268.28697, 34647667.581027, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1769608808, "USD", "2023-09-07T22:50:45+00:00" ] ], "rows": 1 } ``` This response shows a USDC/AERO pool with approximately 16.5M USDC and 34.6M AERO tokens in reserves. The pool was created in September 2023 and currently has zero APR from all sources, indicating either minimal recent trading activity or the pool being in its early stages. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/evm/aero/v2/pool" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/evm/aero/v2/pool") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/evm/aero/v2/fee-metrics` - Shows daily historical data to understand the fees over time on a pool - `/api/v1/evm/aero/v2/pool-volume` - Helpful for aggregate statistics over a particular timeframe, with hourly data to understand distribution of recent activity --- ## Cambrian API: V2 - List Pools **Endpoint:** /api/v1/evm/aero/v2/pools # Aerodrome V2 Pools This endpoint provides comprehensive data on all Aerodrome V2 liquidity pools on Base chain, including token information, TVL metrics, trading volumes, and yield calculations. The response includes detailed pool analytics with current pricing, fee structures, and APR calculations. ## Business Value - **Pool Discovery**: Browse all available Aerodrome V2 pools with complete token pair information and symbols - **TVL Analysis**: Access real-time total value locked data for both tokens in each pool with USD valuations - **Yield Optimization**: Compare APR across pools including swap fees, AERO rewards, and bribe incentives - **Volume Tracking**: Monitor trading activity with 24h and 7-day volume metrics for investment decisions - **Risk Assessment**: Evaluate pool health through TVL, volume, and fee generation metrics ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/evm/aero/v2/pools ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | limit | integer | No | 100 | Limit the number of results (1-1000) | | offset | integer | No | 0 | Offset the results, skip number of rows (0-100000) | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | poolId | FixedString(42) | Unique pool contract address identifier | | token0 | FixedString(42) | First token contract address in the pool | | token0Symbol | FixedString(50) | Trading symbol for the first token | | token0Decimals | UInt8 | Decimal places for the first token | | token1 | FixedString(42) | Second token contract address in the pool | | token1Symbol | FixedString(50) | Trading symbol for the second token | | token1Decimals | UInt8 | Decimal places for the second token | | tvlToken0 | Float64 | Total value locked amount for token0 | | tvlToken1 | Float64 | Total value locked amount for token1 | | priceUSDToken0 | Float64 | USD price per unit of token0 | | priceUSDToken1 | Float64 | USD price per unit of token1 | | poolTvlUSD | Float64 | Total pool value in USD | | volume24hUSD | Float64 | Trading volume over last 24 hours in USD | | volume7dUSD | Float64 | Trading volume over last 7 days in USD | | fees7dUSD | Float64 | Total fees collected over last 7 days in USD | | aeroRewards7dUSD | Float64 | AERO token rewards distributed over last 7 days in USD | | bribes7dUSD | Float64 | Bribe rewards paid over last 7 days in USD | | swapFeeApr7d | Float64 | Annualized percentage rate from swap fees over 7 days | | aeroRewardApr7d | Float64 | Annualized percentage rate from AERO rewards over 7 days | | bribeFeeApr7d | Float64 | Annualized percentage rate from bribes over 7 days | | totalApr7d | Float64 | Total combined APR from all yield sources over 7 days | | createdAt | DateTime('UTC') | Pool creation timestamp in UTC | ## Examples ### 1. Default Pool Listing Retrieve the top 100 Aerodrome V2 pools ordered by TVL. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/aero/v2/pools" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [{"columns":[{"name":"poolId","type":"FixedString(42)"},{"name":"token0","type":"FixedString(42)"},{"name":"token0Symbol","type":"FixedString(50)"},{"name":"token0Decimals","type":"UInt8"},{"name":"token1","type":"FixedString(42)"},{"name":"token1Symbol","type":"FixedString(50)"},{"name":"token1Decimals","type":"UInt8"},{"name":"tvlToken0","type":"Float64"},{"name":"tvlToken1","type":"Float64"},{"name":"priceUSDToken0","type":"Float64"},{"name":"priceUSDToken1","type":"Float64"},{"name":"poolTvlUSD","type":"Float64"},{"name":"volume24hUSD","type":"Float64"},{"name":"volume7dUSD","type":"Float64"},{"name":"fees7dUSD","type":"Float64"},{"name":"aeroRewards7dUSD","type":"Float64"},{"name":"bribes7dUSD","type":"Float64"},{"name":"swapFeeApr7d","type":"Float64"},{"name":"aeroRewardApr7d","type":"Float64"},{"name":"bribeFeeApr7d","type":"Float64"},{"name":"totalApr7d","type":"Float64"},{"name":"createdAt","type":"DateTime('UTC')"}],"data":[["0xde4fb30ccc2f1210fce2c8ad66410c586c8d1f9a","0x4200000000000000000000000000000000000006","WETH",18,"0x7ba6f01772924a82d9626c126347a28299e98c98","msETH",18,2386.977371,3158.261473,3091.43271554,3074.84733939,17090351.82,33976.54,527315.86,0.0,24051.47,0.0,0.0,7.34,0.0,7.34,"2024-06-05T21:56:33+00:00"],["0xd9edc75a3a797ec92ca370f19051babebfb2edee","0x4200000000000000000000000000000000000006","WETH",18,"0xc0634090f2fe6c6d75e61be2b949464abb498973","KTA",18,1319.67048,18130195.192776,3091.43271554,0.226105,8179000.22,196328.42,4034548.35,0.0,135.32,0.0,0.0,0.09,0.0,0.09,"2025-03-05T18:32:33+00:00"],["0x01784ef301d79e4b2df3a21ad9a536d4cf09a5ce","0x4200000000000000000000000000000000000006","WETH",18,"0xacfe6019ed1a7dc6f7b508c02d1b04ec88cc21bf","VVV",18,1111.420443,1482594.653994,3091.43271554,2.33944417,6904328.93,927273.06,5558699.15,0.0,34953.85,18136.03,0.0,26.4,13.7,40.1,"2025-01-27T16:44:43+00:00"],["0x7f670f78b17dec44d5ef68a48740b6f8849cc2e6","0x4200000000000000000000000000000000000006","WETH",18,"0x940181a94a35a4569e4529a3cdfb74e38fd98631","AERO",18,657.209933,3704832.771062,3091.43271554,0.55173901,4075821.05,103856.4,1213841.05,12138.41,6070.7,0.06,15.53,7.77,0.0,23.3,"2023-08-28T05:07:43+00:00"],["0x2578365b3dfa7ffe60108e181efb79feddec2319","0x4200000000000000000000000000000000000006","WETH",18,"0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf","cbBTC",8,652.821624,22.324397,3091.43271554,90422.81231414,4036788.9,29074.91,286753.93,0.0,739.28,15.73,0.0,0.95,0.02,0.97,"2024-09-15T06:40:49+00:00"]],"rows":100}] ``` The response returns the top pools by TVL, with the WETH/msETH pool having the highest TVL at $17.09M and offering a 7.34% total APR from AERO rewards. ### 2. Limited Results with Offset Retrieve 10 pools starting from the 5th position to paginate through results. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/aero/v2/pools?limit=10&offset=5" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [{"columns":[{"name":"poolId","type":"FixedString(42)"},{"name":"token0","type":"FixedString(42)"},{"name":"token0Symbol","type":"FixedString(50)"},{"name":"token0Decimals","type":"UInt8"},{"name":"token1","type":"FixedString(42)"},{"name":"token1Symbol","type":"FixedString(50)"},{"name":"token1Decimals","type":"UInt8"},{"name":"tvlToken0","type":"Float64"},{"name":"tvlToken1","type":"Float64"},{"name":"priceUSDToken0","type":"Float64"},{"name":"priceUSDToken1","type":"Float64"},{"name":"poolTvlUSD","type":"Float64"},{"name":"volume24hUSD","type":"Float64"},{"name":"volume7dUSD","type":"Float64"},{"name":"fees7dUSD","type":"Float64"},{"name":"aeroRewards7dUSD","type":"Float64"},{"name":"bribes7dUSD","type":"Float64"},{"name":"swapFeeApr7d","type":"Float64"},{"name":"aeroRewardApr7d","type":"Float64"},{"name":"bribeFeeApr7d","type":"Float64"},{"name":"totalApr7d","type":"Float64"},{"name":"createdAt","type":"DateTime('UTC')"}],"data":[["0x21594b992f68495dd28d605834b58889d0a727c7","0x0b3e328455c4059eeb9e3f84b5543f74e24e7e1b","VIRTUAL",18,"0x4200000000000000000000000000000000000006","WETH",18,1806821.435709,614.951712,1.05089842,3091.43271554,3799867.64,556710.32,3876445.37,38764.45,8509.15,0.15,53.19,11.68,0.0,64.87,"2024-03-31T15:39:19+00:00"],["0x89d0f320ac73dd7d9513ffc5bc58d1161452a657","0x4200000000000000000000000000000000000006","WETH",18,"0xa88594d404727625a9437c3f886c7643872296ae","WELL",18,599.445924,232352961.927186,3091.43271554,0.00799074,3709818.83,9086.56,314317.15,3143.17,1988.08,0.0,4.42,2.79,0.0,7.21,"2024-03-26T01:57:57+00:00"],["0x594b83709464a83f37ac77e69ddd447a8a33c0ee","0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf","cbBTC",8,"0xed6e000def95780fb89734c07ee2ce9f6dcaf110","EDGE",18,17.602676,11953906.041934,90422.81231414,0.13301789,3181766.85,84147.09,3728040.95,26096.29,211.06,0.0,42.77,0.35,0.0,43.12,"2025-04-02T13:00:43+00:00"],["0x5447f7fe76894d98753a0a6d69b9cb840037c13d","0x4200000000000000000000000000000000000006","WETH",18,"0xb33ff54b9f7242ef1593d2c9bcd8f9df46c77935","FAI",18,450.041897,563582304.438123,3091.43271554,0.00248174,2789939.62,19985.87,223066.32,2230.66,5.4,0.0,4.17,0.01,0.0,4.18,"2024-11-23T09:02:39+00:00"],["0x91f0f34916ca4e2cce120116774b0e4fa0cdcaa8","0x04c0599ae5a44757c0af6f9ec3b93da8976c150a","weETH.base",18,"0x4200000000000000000000000000000000000006","WETH",18,351.659391,381.511292,3355.22918057,3091.43271554,2359314.34,275.11,1437.71,0.72,781.41,0.0,0.0,1.73,0.0,1.73,"2024-04-25T03:56:03+00:00"]],"rows":100}] ``` This paginated response shows pools 6-10, including the high-yield VIRTUAL/WETH pool offering 64.87% total APR and the cbBTC/EDGE pool with 43.12% APR from swap fees and rewards. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/evm/aero/v2/pools" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/evm/aero/v2/pools") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/evm/aero/v2/pool` - Get information for a specific Aerodrome V2 pool address - `/api/v1/evm/aero/v2/fee-metrics` - Shows daily historical data to understand the fees over time on a pool - `/api/v1/evm/aero/v2/pool-volume` - Helpful for aggregate statistics over a particular timeframe, with hourly data to understand distribution of recent activity - `/api/v1/evm/aero/v2/provider-summary` - Provides a comprehensive overview of a liquidity provider's activity on a specific DEX and chain - `/api/v1/evm/aero/v3/pool` - Returns current pool TVL, Swap Volume, Fees APR, Price Tick Utilization, Number of Swaps and Unique users for Aerodrome V3 pools --- ## Cambrian API: V2 - Pool Volume **Endpoint:** /api/v1/evm/aero/v2/pool-volume # Aerodrome Pool Volume Retrieves comprehensive trading volume metrics for a specific Aerodrome V2 pool, including 24-hour volume data, hourly breakdown, swap statistics, and detailed transaction information. ## Business Value - **Real-time Trading Analytics**: Monitor pool activity and trading patterns in real-time for informed decision making - **Volume Trend Analysis**: Track hourly volume patterns to identify peak trading times and market activity cycles - **Liquidity Pool Performance**: Assess pool health through swap counts, average transaction sizes, and volume changes - **Large Transaction Monitoring**: Identify significant trades and their impact on pool dynamics - **Cross-Token Volume Insights**: Understand directional trading flows between token pairs within the pool ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/evm/aero/v2/pool-volume ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | pool_address | String | Yes | - | Pool address with 0x prefix (pattern: ^0x[a-fA-F0-9]{40}$) | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | poolId | String | The pool contract address identifier | | timeframeAt | String | Time period for the volume calculation (e.g., "24h") | | volumeUSD | Float64 | Total trading volume in USD over the timeframe | | volumeToken0 | String | Trading volume for the first token in the pair | | volumeToken1 | String | Trading volume for the second token in the pair | | volumeChange | Float64 | Percentage change in volume compared to previous period | | swapCount | UInt64 | Total number of swaps/trades executed in the timeframe | | averageSwapSize | Float64 | Average transaction size in USD | | volumeByHour | Array | Hourly breakdown of volume and swap counts with timestamps | | volumeByToken | Map | Volume distribution by trading direction (token0 to token1 vs token1 to token0) | | largestSwaps | Array | Details of the largest transactions including amounts and transaction hashes | | updatedAt | UInt32 | Unix timestamp of when the data was last updated | ## Examples ### 1. Get Aerodrome Pool Volume Metrics Retrieve comprehensive volume data for a specific Aerodrome V2 pool including trading activity and swap statistics. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/aero/v2/pool-volume?pool_address=0x6cdcb1c4a4d1c3c6d054b27ac5b77e89eafb971d" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [ { "columns": [ {"name": "poolId", "type": "String"}, {"name": "timeframeAt", "type": "String"}, {"name": "volumeUSD", "type": "Float64"}, {"name": "volumeToken0", "type": "String"}, {"name": "volumeToken1", "type": "String"}, {"name": "volumeChange", "type": "Nullable(Float64)"}, {"name": "swapCount", "type": "UInt64"}, {"name": "averageSwapSize", "type": "Float64"}, {"name": "volumeByHour", "type": "Array(Map(String,String))"}, {"name": "volumeByToken", "type": "Map(String,String)"}, {"name": "largestSwaps", "type": "Array(Map(String,String))"}, {"name": "updatedAt", "type": "UInt32"} ], "data": [ [ "0x6cdcb1c4a4d1c3c6d054b27ac5b77e89eafb971d", "24h", 1240702.5463123259, "1856192.314127", "2688284.381664269", 19.45, 4459, 278.25, [ {"'swapCount'": "241", "'timestamp'": "1769522400", "'volumeUSD'": "86848.69268581805"}, {"'swapCount'": "158", "'timestamp'": "1769526000", "'volumeUSD'": "51189.32608759285"}, {"'swapCount'": "283", "'timestamp'": "1769529600", "'volumeUSD'": "72085.8799191756"} ], {"'token0Percentage'": "0", "'token0ToToken1'": "0", "'token1Percentage'": "100", "'token1ToToken0'": "1240702.5463123259"}, [ {"'amountToken0'": "0", "'amountToken1'": "52911.52598719457", "'amountUSD'": "24419.836483572435", "'timestamp'": "1769533929", "'txHash'": "0x663fad7cf103b64e451e070196be13a73013daba546fb70da0a568f8f2d1321c", "'type'": "token1ToToken0"}, {"'amountToken0'": "0", "'amountToken1'": "45013.35126704318", "'amountUSD'": "20774.654614664316", "'timestamp'": "1769563287", "'txHash'": "0x9afdde5b71d556359ad3b1e24bda9c87a501f34c76d36dfcc3994be3b30cea40", "'type'": "token1ToToken0"} ], 1769608778 ] ], "rows": 1 } ] ``` The response shows comprehensive volume metrics for the specified Aerodrome pool, including $1.24M in 24-hour USD volume across 4,459 swaps, with detailed hourly breakdowns and information about the largest transactions. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/evm/aero/v2/pool-volume" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/evm/aero/v2/pool-volume") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Cambrian API: V2 - Provider Summary **Endpoint:** /api/v1/evm/aero/v2/provider-summary # Provider Summary Provides a comprehensive overview of a liquidity provider's activity on Aerodrome V2 DEX. Returns detailed analytics including portfolio diversity, position distribution, and historical performance metrics for a specific wallet address. ## Business Value - **Portfolio Analysis**: Understand concentration risk and token exposure across multiple liquidity pools - **Performance Tracking**: Monitor historical fees earned and APR performance over 7-day and 30-day periods - **Position Management**: Analyze position sizes and distribution to optimize capital allocation - **Risk Assessment**: Calculate HHI concentration index to measure portfolio diversification - **Strategic Planning**: Identify top performing pools and fee opportunities for future positions ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/evm/aero/v2/provider-summary ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | wallet_address | string | true | - | Liquidity provider address with 0x prefix | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | providerId | String | The wallet address of the liquidity provider | | totalValueLockedUSD | Float64 | Total USD value currently locked in liquidity positions | | activePositionCount | UInt64 | Number of currently active liquidity positions | | totalFeesEarned7d | Float64 | Total fees earned in USD over the last 7 days | | averageAPR7dWeighted | Float64 | Weighted average APR over the last 7 days | | firstPositionTimestamp | DateTime | Timestamp of the provider's first liquidity position | | lastActiveTimestamp | DateTime | Timestamp of the provider's most recent activity | | poolCount | UInt64 | Total number of unique pools the provider has positions in | | topPoolsData | Array | Array of top pools with pool address, token names, TVL and percentage | | tokenExposure | Array | Array of token exposures with address, symbol, amounts and percentages | | averagePositionSizeUSD | Float64 | Average size of positions in USD | | medianPositionSizeUSD | Float64 | Median size of positions in USD | | minPositionSizeUSD | Float64 | Smallest position size in USD | | maxPositionSizeUSD | Float64 | Largest position size in USD | | hhiConcentrationIndex | Float64 | Herfindahl-Hirschman Index measuring portfolio concentration | | totalFeesEarned30d | Float64 | Total fees earned in USD over the last 30 days | | averageAPR30dWeighted | Float64 | Weighted average APR over the last 30 days | | feeAprByPool30d | Array | Array of fee and APR breakdown by pool over 30 days | ## Examples ### 1. Provider Portfolio Analysis Get comprehensive analytics for a liquidity provider's portfolio across all Aerodrome V2 positions. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/aero/v2/provider-summary?wallet_address=0x8115afd8dffce5579381ad27524b6feeae917bef" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "providerId", "type": "String" }, { "name": "totalValueLockedUSD", "type": "Float64" }, { "name": "activePositionCount", "type": "UInt64" }, { "name": "totalFeesEarned7d", "type": "Float64" }, { "name": "averageAPR7dWeighted", "type": "Float64" }, { "name": "firstPositionTimestamp", "type": "Nullable(DateTime('UTC'))" }, { "name": "lastActiveTimestamp", "type": "Nullable(DateTime('UTC'))" }, { "name": "poolCount", "type": "UInt64" }, { "name": "topPoolsData", "type": "Array(Tuple(FixedString(42),String,String,Float64,Float64))" }, { "name": "tokenExposure", "type": "Array(Tuple(FixedString(42),String,Float64,Float64,Float64))" }, { "name": "averagePositionSizeUSD", "type": "Float64" }, { "name": "medianPositionSizeUSD", "type": "Float64" }, { "name": "minPositionSizeUSD", "type": "Float64" }, { "name": "maxPositionSizeUSD", "type": "Float64" }, { "name": "hhiConcentrationIndex", "type": "Float64" }, { "name": "totalFeesEarned30d", "type": "Float64" }, { "name": "averageAPR30dWeighted", "type": "Float64" }, { "name": "feeAprByPool30d", "type": "Array(Tuple(FixedString(42),String,String,Float64,Float64))" } ], "data": [ [ "0x8115afd8dffce5579381ad27524b6feeae917bef", 7.854955398502442, 3, 0.009708973795141934, 6.445022382945004, "2025-04-29T09:25:07+00:00", "2025-05-06T23:09:49+00:00", 3, [ [ "0xcdac0d6c6c59727a65f871236188350531885c43", "WETH", "USDC", 5.154243972270719, 65.6177369670792 ], [ "0x6cdcb1c4a4d1c3c6d054b27ac5b77e89eafb971d", "USDC", "AERO", 2.7007114262317233, 34.38226303292082 ], [ "0x55b27dbddf95a55bd46d0284348dc8231cd72a2c", "", "", 0.0, 0.0 ] ], [ [ "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "USDC", 3.9394537517070516, 3.9394537517070516, 50.1524649326222 ], [ "0x4200000000000000000000000000000000000006", "WETH", 0.0008497869397204132, 2.5772689537760294, 32.810739501683095 ], [ "0x940181a94a35a4569e4529a3cdfb74e38fd98631", "AERO", 2.8533573676888873, 1.3382326930193615, 17.036795565694714 ], [ "0x04e4dfbdbd7c9416a96e144ac51d95d78f83fb19", "", 1.6109845441127068E+22, 0.0, 0.0 ], [ "0xd88707f590528b4a1e316eeebe7bb6ac8b0ea461", "", 3.6274473281608105E+21, 0.0, 0.0 ] ], 2.6183184661674805, 2.7007114262317233, 0.0, 5.154243972270719, 0.5487827415945744, 0.041989907799619225, 6.503884307980072, [ [ "0x6cdcb1c4a4d1c3c6d054b27ac5b77e89eafb971d", "USDC", "AERO", 0.02477830033782618, 11.16258915516651 ], [ "0xcdac0d6c6c59727a65f871236188350531885c43", "WETH", "USDC", 0.01721160746179305, 4.062824575471025 ], [ "0x55b27dbddf95a55bd46d0284348dc8231cd72a2c", "", "", 0.0, 0.0 ] ] ] ], "rows": 1 } ``` The response shows a provider with $7.85 TVL across 3 active positions in 3 pools, earning $0.0097 in fees over the last 7 days with a 6.44% weighted APR. The portfolio is moderately concentrated (HHI: 0.55) with primary exposure to WETH/USDC (65.6%) and USDC/AERO (34.4%) pools. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/evm/aero/v2/provider-summary" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/evm/aero/v2/provider-summary") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/evm/aero/v2/fee-metrics` - Shows daily historical data to understand the fees over time on a pool - `/api/v1/evm/aero/v2/pool` - Get information for a specific Aerodorme V2 pool address - `/api/v1/evm/aero/v2/pool-volume` - Helpful for aggregate statistics over a particular timeframe, with hourly data to understand distribution of recent activity - `/api/v1/evm/aero/v2/pools` - Returns a paginated list of liquidity pools with summary metrics --- ## Cambrian API: V3 - Pool Info **Endpoint:** /api/v1/evm/aero/v3/pool # Aerodrome V3 Pool Metrics This endpoint returns comprehensive pool metrics for Aerodrome V3 pools including TVL, swap volume, fees APR, tick utilization, swap counts, and unique user counts across multiple time ranges (5 minutes to 1 year). ## Business Value - **Real-time Pool Analytics**: Get current pool health metrics including TVL and liquidity for informed trading decisions - **Volume Analysis**: Track swap volume patterns across different time periods to identify trading activity trends - **Fee Income Assessment**: Monitor APR rates to evaluate fee generation potential and yield opportunities - **Market Activity Insights**: Analyze swap counts and unique user metrics to understand pool adoption and usage - **Risk Management**: Assess tick utilization to understand price range efficiency and concentration risk ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/evm/aero/v3/pool ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | pool_address | string | Yes | - | Pool address with 0x prefix (must match pattern ^0x[a-fA-F0-9]{40}$) | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | createdAt | DateTime | Timestamp when the pool data was created/updated | | token0Address | string | Contract address of the first token in the pool | | token0Symbol | string | Symbol of the first token (e.g., WETH) | | token0Decimals | integer | Decimal places for token0 | | token1Address | string | Contract address of the second token in the pool | | token1Symbol | string | Symbol of the second token (e.g., cbBTC) | | token1Decimals | integer | Decimal places for token1 | | feeTier | integer | Fee tier for the pool (in basis points) | | tickSpacing | integer | Tick spacing configuration for the pool | | currentLiquidity | integer | Current active liquidity in the pool | | currentSqrtPriceX96 | string | Current price in sqrt(price) * 2^96 format | | currentTick | integer | Current active tick in the pool | | currentPoolPrice | number | Current exchange rate between token0 and token1 | | poolTvlUSD | number | Total Value Locked in USD | | swapVolumeUSD | object | Swap volume in USD across different time periods | | feeApr | object | Annual Percentage Rate for fees across different time periods | | tickUtilization | object | Percentage of tick range utilization across different time periods | | swapCount | object | Number of swaps across different time periods | | uniqueUserCount | object | Number of unique users across different time periods | ## Examples ### 1. Get Pool Metrics for WETH/cbBTC Pool Retrieve comprehensive metrics for a specific Aerodrome V3 pool to analyze trading activity and fee generation. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/aero/v3/pool?pool_address=0xffa192f04b1e5f9f5124fb40a96407564492ed20" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "createdAt", "type": "DateTime('UTC')" }, { "name": "token0Address", "type": "LowCardinality(FixedString(42))" }, { "name": "token0Symbol", "type": "String" }, { "name": "token0Decimals", "type": "UInt8" }, { "name": "token1Address", "type": "LowCardinality(FixedString(42))" }, { "name": "token1Symbol", "type": "String" }, { "name": "token1Decimals", "type": "UInt8" }, { "name": "feeTier", "type": "UInt32" }, { "name": "tickSpacing", "type": "Int32" }, { "name": "currentLiquidity", "type": "UInt128" }, { "name": "currentSqrtPriceX96", "type": "UInt256" }, { "name": "currentTick", "type": "Int32" }, { "name": "currentPoolPrice", "type": "Float64" }, { "name": "poolTvlUSD", "type": "Float64" }, { "name": "swapVolumeUSD", "type": "Map(String,Float64)" }, { "name": "feeApr", "type": "Map(String,Float64)" }, { "name": "tickUtilization", "type": "Map(String,Float64)" }, { "name": "swapCount", "type": "Map(String,UInt64)" }, { "name": "uniqueUserCount", "type": "Map(String,UInt64)" } ], "data": [ [ "2025-02-13T22:12:07+00:00", "0x4200000000000000000000000000000000000006", "WETH", 18, "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "cbBTC", 8, 0, 10, 347944853560, "141739497698037594805371", -264691, 3.2005352238335866E-12, 0.4959493022940939, { "'1 day'": 0.0, "'1 hour'": 0.0, "'1 month'": 0.0, "'1 week'": 0.0, "'1 year'": 28335.19197830496, "'5 minute'": 0.0 }, { "'1 day'": 0.0, "'1 hour'": 0.0, "'1 month'": 0.0, "'1 week'": 0.0, "'1 year'": 0.0, "'5 minute'": 0.0 }, { "'1 day'": 0.0, "'1 hour'": 0.0, "'1 month'": 0.0, "'1 week'": 0.0, "'1 year'": 1.1901826484018265, "'5 minute'": 0.0 }, { "'1 day'": 0, "'1 hour'": 0, "'1 month'": 0, "'1 week'": 0, "'1 year'": 3116, "'5 minute'": 0 }, { "'1 day'": 0, "'1 hour'": 0, "'1 month'": 0, "'1 week'": 0, "'1 year'": 817, "'5 minute'": 0 } ] ], "rows": 1 } ``` This response shows the WETH/cbBTC pool with $0.50 TVL, yearly swap volume of $28,335, and 817 unique users over the past year. The pool has generated minimal fees recently but shows historical trading activity. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/evm/aero/v3/pool" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/evm/aero/v3/pool") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/evm/aero/v2/pool` - V2 pool information and metrics --- ## Cambrian API: V3 - List Pools **Endpoint:** /api/v1/evm/aero/v3/pools # Aerodrome V3 Pools Returns a list of all Aerodrome liquidity pools on Base (EVM), including token pairs, fee tiers, and creation timestamps. This endpoint provides comprehensive pool data for DeFi analytics and trading applications. ## Business Value - **Pool Discovery**: Find all available liquidity pools for specific tokens or trading pairs - **Fee Analysis**: Compare fee structures across different pools to optimize trading costs - **Market Research**: Analyze pool creation patterns and token pair popularity over time - **DEX Integration**: Build applications that require comprehensive pool data from Aerodrome - **Risk Assessment**: Evaluate pool characteristics before providing liquidity or executing trades ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/evm/aero/v3/pools ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | token_address | string | No | - | Pool token address. See tokens for valid addresses. | | limit | integer | No | 100 | Limit the number of results. | | offset | integer | No | 0 | Offset the results, allows you to skip a number of rows before starting to return rows. | | order_asc | array | No | - | List of column names to order by in ascending order divided by comma. Leave empty items to combine with descending order | | order_desc | array | No | - | List of column names to order by in descending order divided by comma. Leave empty items to combine with ascending order | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | dexAddress | String | Address of the DEX protocol contract | | dexName | String | Name of the DEX protocol (e.g., "Aerodrome") | | poolAddress | String | Unique address of the liquidity pool | | token0Address | String | Contract address of the first token in the pair | | token0Symbol | String | Symbol of the first token (e.g., "WETH", "USDC") | | token0Decimals | Integer | Number of decimal places for the first token | | token1Address | String | Contract address of the second token in the pair | | token1Symbol | String | Symbol of the second token | | token1Decimals | Integer | Number of decimal places for the second token | | createdAt | DateTime | Timestamp when the pool was created | | fee | Integer | Pool fee tier (e.g., 0 for stable pools, 200 for 0.02%) | | tickSpacing | Integer | Tick spacing for the pool (determines price granularity) | ## Examples ### 1. Get All Pools Retrieve a list of all Aerodrome pools with default pagination. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/aero/v3/pools" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "dexAddress", "type": "LowCardinality(FixedString(42))" }, { "name": "dexName", "type": "String" }, { "name": "poolAddress", "type": "FixedString(42)" }, { "name": "token0Address", "type": "LowCardinality(FixedString(42))" }, { "name": "token0Symbol", "type": "String" }, { "name": "token0Decimals", "type": "UInt32" }, { "name": "token1Address", "type": "LowCardinality(FixedString(42))" }, { "name": "token1Symbol", "type": "String" }, { "name": "token1Decimals", "type": "UInt32" }, { "name": "createdAt", "type": "DateTime('UTC')" }, { "name": "fee", "type": "UInt32" }, { "name": "tickSpacing", "type": "Int32" } ], "data": [ [ "0x5e7bb104d84c7cb9b682aac2f3d509f5f406809a", "Aerodrome", "0xda6e12d715775d61c91da9d0ddc36a1f6a2fb536", "0x4200000000000000000000000000000000000006", "WETH", 18, "0xebb89d47d74f03453666d8264cd77f62252c90dd", "", 0, "2026-01-09T11:39:05+00:00", 0, 2000 ], [ "0x5e7bb104d84c7cb9b682aac2f3d509f5f406809a", "Aerodrome", "0x5bd4c86ab1e0a3661f5e1c718781bc60216a368b", "0x1b4617734c43f6159f3a70b7e06d883647512778", "AWE", 18, "0x307113aa1cf45f5905045b476d322871ada009eb", "", 0, "2026-01-09T06:15:33+00:00", 0, 200 ], [ "0x5e7bb104d84c7cb9b682aac2f3d509f5f406809a", "Aerodrome", "0xe668a3d99c702032679537cad3396e5aa62aceb8", "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "USDC", 6, "0xc6473bb46a84e74386b6371197e2851ca98edf3b", "", 0, "2026-01-09T06:03:29+00:00", 0, 200 ], [ "0x5e7bb104d84c7cb9b682aac2f3d509f5f406809a", "Aerodrome", "0x3f459b326a3a615f720b97f4e3d2b921dd6ae4d8", "0x1b4617734c43f6159f3a70b7e06d883647512778", "AWE", 18, "0x3e607bd2379821e8434afc0c88dddc90506552fd", "", 0, "2026-01-07T14:07:53+00:00", 0, 200 ], [ "0x5e7bb104d84c7cb9b682aac2f3d509f5f406809a", "Aerodrome", "0xd3085d773a2ec08cb72dbb435c9b815d5880dc0e", "0x132db528053bc61068df29c405d3fad1071c8af8", "", 0, "0x151ccc74972a6f85690afe997d0fdd69efdc71fe", "", 0, "2026-01-07T01:22:39+00:00", 0, 2000 ] ], "rows": 5 // ... additional rows omitted for brevity } ``` Returns all liquidity pools from Aerodrome with metadata including DEX information, pool addresses, token pair details, fees, and creation timestamps. ### 2. Get Pools with Limit Retrieve a specific number of pools with pagination. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/aero/v3/pools?limit=10" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "dexAddress", "type": "LowCardinality(FixedString(42))" }, { "name": "dexName", "type": "String" }, { "name": "poolAddress", "type": "FixedString(42)" }, { "name": "token0Address", "type": "LowCardinality(FixedString(42))" }, { "name": "token0Symbol", "type": "String" }, { "name": "token0Decimals", "type": "UInt32" }, { "name": "token1Address", "type": "LowCardinality(FixedString(42))" }, { "name": "token1Symbol", "type": "String" }, { "name": "token1Decimals", "type": "UInt32" }, { "name": "createdAt", "type": "DateTime('UTC')" }, { "name": "fee", "type": "UInt32" }, { "name": "tickSpacing", "type": "Int32" } ], "data": [ [ "0x5e7bb104d84c7cb9b682aac2f3d509f5f406809a", "Aerodrome", "0xda6e12d715775d61c91da9d0ddc36a1f6a2fb536", "0x4200000000000000000000000000000000000006", "WETH", 18, "0xebb89d47d74f03453666d8264cd77f62252c90dd", "", 0, "2026-01-09T11:39:05+00:00", 0, 2000 ], [ "0x5e7bb104d84c7cb9b682aac2f3d509f5f406809a", "Aerodrome", "0x5bd4c86ab1e0a3661f5e1c718781bc60216a368b", "0x1b4617734c43f6159f3a70b7e06d883647512778", "AWE", 18, "0x307113aa1cf45f5905045b476d322871ada009eb", "", 0, "2026-01-09T06:15:33+00:00", 0, 200 ], [ "0x5e7bb104d84c7cb9b682aac2f3d509f5f406809a", "Aerodrome", "0xe668a3d99c702032679537cad3396e5aa62aceb8", "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "USDC", 6, "0xc6473bb46a84e74386b6371197e2851ca98edf3b", "", 0, "2026-01-09T06:03:29+00:00", 0, 200 ], [ "0x5e7bb104d84c7cb9b682aac2f3d509f5f406809a", "Aerodrome", "0x3f459b326a3a615f720b97f4e3d2b921dd6ae4d8", "0x1b4617734c43f6159f3a70b7e06d883647512778", "AWE", 18, "0x3e607bd2379821e8434afc0c88dddc90506552fd", "", 0, "2026-01-07T14:07:53+00:00", 0, 200 ], [ "0x5e7bb104d84c7cb9b682aac2f3d509f5f406809a", "Aerodrome", "0xd3085d773a2ec08cb72dbb435c9b815d5880dc0e", "0x132db528053bc61068df29c405d3fad1071c8af8", "", 0, "0x151ccc74972a6f85690afe997d0fdd69efdc71fe", "", 0, "2026-01-07T01:22:39+00:00", 0, 2000 ] ], "rows": 5 // ... additional rows omitted for brevity } ``` Returns the first 10 pools with the same structure but limited results for faster response times and pagination control. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/evm/aero/v3/pools" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/evm/aero/v3/pools") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/evm/aero/v3/pool` - Returns current pool TVL, swap volume, fees APR, and other metrics for a specific pool - `/api/v1/evm/aero/v2/pools` - Returns a paginated list of liquidity pools with summary metrics (V2) - `/api/v1/evm/aero/v2/pool` - Get information for a specific Aerodrome V2 pool address - `/api/v1/evm/aero/v2/fee-metrics` - Shows daily historical data to understand fees over time on a pool - `/api/v1/evm/aero/v2/pool-volume` - Aggregate statistics over time with hourly activity data --- ## Cambrian API: V3 - Pool Info **Endpoint:** /api/v1/evm/alien/v3/pool # V3 Pool Information This endpoint returns comprehensive pool metrics for Uniswap V3 style pools on Base blockchain, including Total Value Locked (TVL), swap volume, fees APR, price tick utilization, number of swaps, and unique users across multiple time ranges (5 minutes, 1 hour, 1 day, 1 week, 1 month, and 1 year). ## Business Value - **Real-time Pool Analytics**: Get up-to-date metrics for liquidity pools to assess performance and activity levels - **Multi-timeframe Analysis**: Access data across different time horizons for comprehensive trend analysis and market timing - **Liquidity Provider Insights**: Monitor TVL, fees, and utilization metrics to optimize liquidity provision strategies - **Trading Intelligence**: Track swap volumes and user activity to identify high-volume and active pools for trading opportunities - **Risk Assessment**: Evaluate pool health through tick utilization and liquidity distribution metrics ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/evm/alien/v3/pool ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | pool_address | String | Yes | - | Pool address with 0x prefix (e.g., 0x63170b42585b86e3c439820ade18fbd07a8933cd) | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | createdAt | DateTime | Timestamp when the pool data was created/updated | | token0Address | String | Contract address of the first token in the pool | | token0Symbol | String | Symbol of the first token (e.g., EURC) | | token0Decimals | Number | Decimal places for the first token | | token1Address | String | Contract address of the second token in the pool | | token1Symbol | String | Symbol of the second token (e.g., USDC) | | token1Decimals | Number | Decimal places for the second token | | feeTier | Number | Fee tier of the pool in basis points | | tickSpacing | Number | Tick spacing for the pool | | currentLiquidity | Number | Current liquidity in the pool | | currentSqrtPriceX96 | String | Current sqrt price encoded as X96 | | currentTick | Number | Current price tick | | currentPoolPrice | Number | Current price of token0 in terms of token1 | | poolTvlUSD | Number | Total Value Locked in USD | | swapVolumeUSD | Map | Swap volume in USD across different time periods | | feeApr | Map | Annualized fee APR across different time periods | | tickUtilization | Map | Tick utilization percentage across different time periods | | swapCount | Map | Number of swaps across different time periods | | uniqueUserCount | Map | Number of unique users across different time periods | ## Examples ### 1. Get EURC/USDC Pool Metrics This example demonstrates retrieving comprehensive pool metrics for a EURC/USDC pool on Base blockchain. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/alien/v3/pool?pool_address=0x63170b42585b86e3c439820ade18fbd07a8933cd" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "createdAt", "type": "DateTime('UTC')" }, { "name": "token0Address", "type": "LowCardinality(FixedString(42))" }, { "name": "token0Symbol", "type": "String" }, { "name": "token0Decimals", "type": "UInt8" }, { "name": "token1Address", "type": "LowCardinality(FixedString(42))" }, { "name": "token1Symbol", "type": "String" }, { "name": "token1Decimals", "type": "UInt8" }, { "name": "feeTier", "type": "UInt32" }, { "name": "tickSpacing", "type": "Int32" }, { "name": "currentLiquidity", "type": "UInt128" }, { "name": "currentSqrtPriceX96", "type": "UInt256" }, { "name": "currentTick", "type": "Int32" }, { "name": "currentPoolPrice", "type": "Float64" }, { "name": "poolTvlUSD", "type": "Float64" }, { "name": "swapVolumeUSD", "type": "Map(String,Float64)" }, { "name": "feeApr", "type": "Map(String,Float64)" }, { "name": "tickUtilization", "type": "Map(String,Float64)" }, { "name": "swapCount", "type": "Map(String,UInt64)" }, { "name": "uniqueUserCount", "type": "Map(String,UInt64)" } ], "data": [ [ "2024-09-11T18:27:29+00:00", "0x60a3e35cc302bfa44cb288bc5a4f316fdb1adb42", "EURC", 6, "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "USDC", 6, 200, 4, 10472813, "86541506335930935475856538193", 1765, 1.193135404620077, 25.708212667615285, { "'1 day'": 0.028585510046678364, "'1 hour'": 0.0, "'1 month'": 0.6735855584534924, "'1 week'": 0.11241240459408124, "'1 year'": 99881.4210769317, "'5 minute'": 0.0 }, { "'1 day'": 0.008117025716207009, "'1 hour'": 0.0, "'1 month'": 0.0062882836749083865, "'1 week'": 0.004547531261288927, "'1 year'": 77.70390137059402, "'5 minute'": 0.0 }, { "'1 day'": 0.4, "'1 hour'": 0.0, "'1 month'": 0.3211111111111111, "'1 week'": 0.22380952380952382, "'1 year'": 0.5201826484018265, "'5 minute'": 0.0 }, { "'1 day'": 1, "'1 hour'": 0, "'1 month'": 13, "'1 week'": 5, "'1 year'": 3335, "'5 minute'": 0 }, { "'1 day'": 1, "'1 hour'": 0, "'1 month'": 11, "'1 week'": 4, "'1 year'": 1075, "'5 minute'": 0 } ] ], "rows": 1 } ``` This response shows a EURC/USDC pool with $25.71 TVL, current price of 1.193 EURC per USDC, and fee APR ranging from 0% (short-term) to 77.7% (annual). The pool has seen 3,335 swaps and 1,075 unique users over the past year, with 40% tick utilization over the past day. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/evm/alien/v3/pool" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/evm/alien/v3/pool") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/ohlcv/pool` - Retrieve OHLCV data for individual pool contracts on Solana - `/api/v1/solana/orca/pools` - Get list of all Orca pools with static information - `/api/v1/solana/orca/pools/fee-metrics` - Get fee metrics and volume data for Orca Whirlpools - `/api/v1/solana/pool-transactions` - Access pool transaction history and details --- ## Cambrian API: V3 - List Pools **Endpoint:** /api/v1/evm/alien/v3/pools # Alien V3 Liquidity Pools This endpoint returns a comprehensive list of all Alien V3 liquidity pools on Base, including detailed information about token pairs, fee structures, pool addresses, and creation timestamps. It provides essential data for analyzing DEX activity and liquidity distribution across the AlienBase DEX ecosystem. ## Business Value - **Pool Discovery**: Identify all available liquidity pools with complete metadata including token symbols, decimals, and addresses - **DEX Analytics**: Analyze fee structures, tick spacing configurations, and pool creation patterns across different time periods - **Portfolio Management**: Track and monitor specific pools by filtering on token addresses or sorting by various metrics - **Market Research**: Understand the AlienBase ecosystem structure through comprehensive pool data including creation timestamps and fee tiers - **Integration Support**: Access standardized pool data for building applications, trading interfaces, or analytical tools ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/evm/alien/v3/pools ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | token_address | string | No | - | Pool token address. Must be a valid EVM address (0x followed by 40 hex characters) | | limit | integer | No | 100 | Limit the number of results (1-1000) | | offset | integer | No | 0 | Offset the results for pagination (0-100000) | | order_asc | array | No | - | List of column names to order by in ascending order | | order_desc | array | No | - | List of column names to order by in descending order | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | chainId | UInt32 | Blockchain chain ID (8453 for Base) | | dexAddress | String | AlienBase DEX contract address | | dexName | String | Name of the DEX (AlienBase) | | poolAddress | String | Unique pool contract address | | token0Address | String | Address of the first token in the pair | | token0Symbol | String | Symbol of the first token | | token0Decimals | UInt8 | Number of decimals for the first token | | token1Address | String | Address of the second token in the pair | | token1Symbol | String | Symbol of the second token | | token1Decimals | UInt8 | Number of decimals for the second token | | createdAt | DateTime | Timestamp when the pool was created (UTC) | | fee | UInt32 | Pool fee in basis points (e.g., 3000 = 0.30%) | | tickSpacing | Int32 | Tick spacing for the pool's price range | ## Examples ### 1. Basic Pool List This example demonstrates how to retrieve the default list of Alien V3 pools with standard pagination. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/alien/v3/pools" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [ { "columns": [ {"name": "chainId", "type": "UInt32"}, {"name": "dexAddress", "type": "LowCardinality(FixedString(42))"}, {"name": "dexName", "type": "String"}, {"name": "poolAddress", "type": "FixedString(42)"}, {"name": "token0Address", "type": "LowCardinality(FixedString(42))"}, {"name": "token0Symbol", "type": "String"}, {"name": "token0Decimals", "type": "UInt8"}, {"name": "token1Address", "type": "LowCardinality(FixedString(42))"}, {"name": "token1Symbol", "type": "String"}, {"name": "token1Decimals", "type": "UInt8"}, {"name": "createdAt", "type": "DateTime('UTC')"}, {"name": "fee", "type": "UInt32"}, {"name": "tickSpacing", "type": "Int32"} ], "data": [ [8453, "0x0fd83557b2be93617c9c1c1b6fd549401c74558c", "AlienBase", "0xcbd28a9d7ed558a1c4a16bb6b0dfd093b0fbbf8d", "0x1d3be1cc80ca89ddbabe5b5c254af63200e708f7", "MONSTRO", 18, "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "USDC", 6, "2026-01-27T17:14:43+00:00", 3000, 60], [8453, "0x0fd83557b2be93617c9c1c1b6fd549401c74558c", "AlienBase", "0x986efbfbd9c307ec6a3c8cac819bcb3009aa3261", "0x1d3be1cc80ca89ddbabe5b5c254af63200e708f7", "MONSTRO", 18, "0x4200000000000000000000000000000000000006", "WETH", 18, "2026-01-27T16:56:17+00:00", 750, 15], [8453, "0x0fd83557b2be93617c9c1c1b6fd549401c74558c", "AlienBase", "0x3611eb2f746ce8474f6de3e587f7cfdc43211de4", "0x1d3be1cc80ca89ddbabe5b5c254af63200e708f7", "MONSTRO", 18, "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "USDC", 6, "2026-01-27T15:11:13+00:00", 10000, 200], [8453, "0x0fd83557b2be93617c9c1c1b6fd549401c74558c", "AlienBase", "0x25c9bdb0885722bcd1033a844f409f2d22555d7c", "0x1dd2d631c92b1acdfcdd51a0f7145a50130050c4", "ALB", 18, "0xac1bd2486aaf3b5c0fc3fd868558b082a531b2b4", "TOSHI", 18, "2026-01-26T16:00:55+00:00", 10000, 200], [8453, "0x0fd83557b2be93617c9c1c1b6fd549401c74558c", "AlienBase", "0x8b5c02f704ef3128e799f3b0085a6c966b628e8b", "0x1dd2d631c92b1acdfcdd51a0f7145a50130050c4", "ALB", 18, "0x4200000000000000000000000000000000000006", "WETH", 18, "2026-01-16T16:50:25+00:00", 750, 15] ], "rows": 100 // ... additional rows omitted for brevity } ] ``` This returns the first 100 pools with complete metadata including chain information, token details, fee structures, and creation timestamps for all AlienBase V3 liquidity pools. ### 2. Filtered Pool Search This example demonstrates filtering pools by a specific token address to find all pools containing a particular token. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/alien/v3/pools?token_address=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913&limit=50" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [ { "columns": [ {"name": "chainId", "type": "UInt32"}, {"name": "dexAddress", "type": "LowCardinality(FixedString(42))"}, {"name": "dexName", "type": "String"}, {"name": "poolAddress", "type": "FixedString(42)"}, {"name": "token0Address", "type": "LowCardinality(FixedString(42))"}, {"name": "token0Symbol", "type": "String"}, {"name": "token0Decimals", "type": "UInt8"}, {"name": "token1Address", "type": "LowCardinality(FixedString(42))"}, {"name": "token1Symbol", "type": "String"}, {"name": "token1Decimals", "type": "UInt8"}, {"name": "createdAt", "type": "DateTime('UTC')"}, {"name": "fee", "type": "UInt32"}, {"name": "tickSpacing", "type": "Int32"} ], "data": [ [8453, "0x0fd83557b2be93617c9c1c1b6fd549401c74558c", "AlienBase", "0xcbd28a9d7ed558a1c4a16bb6b0dfd093b0fbbf8d", "0x1d3be1cc80ca89ddbabe5b5c254af63200e708f7", "MONSTRO", 18, "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "USDC", 6, "2026-01-27T17:14:43+00:00", 3000, 60], [8453, "0x0fd83557b2be93617c9c1c1b6fd549401c74558c", "AlienBase", "0x3611eb2f746ce8474f6de3e587f7cfdc43211de4", "0x1d3be1cc80ca89ddbabe5b5c254af63200e708f7", "MONSTRO", 18, "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "USDC", 6, "2026-01-27T15:11:13+00:00", 10000, 200], [8453, "0x0fd83557b2be93617c9c1c1b6fd549401c74558c", "AlienBase", "0x624ece2dbf07b0166fe74fd255b52d4cf5c839e5", "0x50c5725949a6f0c72e6c4a641f24049a917db0cb", "DAI", 18, "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "USDC", 6, "2025-12-10T00:40:11+00:00", 200, 4] ], "rows": 100 // ... additional rows omitted for brevity } ] ``` This returns all pools containing USDC (0x833589fcd6edb6e08f4c7c32d4f71b54bda02913) as either token0 or token1, limited to 50 results, showing various token pairs with USDC and their respective fee structures. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/evm/alien/v3/pools" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/evm/alien/v3/pools") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/evm/alien/v3/pool` - Returns current pool TVL, swap volume, fees APR, and other metrics for a specific AlienBase V3 pool - `/api/v1/evm/aero/v2/pools` - Returns a paginated list of Aerodrome V2 liquidity pools with summary metrics - `/api/v1/evm/aero/v3/pool` - Returns current pool TVL, swap volume, fees APR, and metrics for Aerodrome V3 pools - `/api/v1/evm/aero/v2/pool` - Get information for a specific Aerodrome V2 pool address --- ## Cambrian API: V3 - Pool Info **Endpoint:** /api/v1/evm/clones/v3/pool # EVM Clones V3 Pool Information Retrieves detailed information about a specific EVM V3 pool, including token information, liquidity metrics, price data, and historical performance statistics. ## Business Value - **Pool Analytics**: Access comprehensive liquidity pool data for DeFi analysis and monitoring - **Trading Intelligence**: Get real-time price, liquidity, and trading volume metrics for informed decision making - **Performance Tracking**: Monitor fee APRs, tick utilization, and swap activity across different time periods - **Token Information**: Retrieve detailed token pair data including addresses, symbols, and decimals - **Risk Assessment**: Analyze pool TVL, liquidity distribution, and trading patterns for risk management ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/evm/clones/v3/pool ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | pool_address | string | Yes | - | Pool address with 0x prefix | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | createdAt | DateTime | Timestamp when the pool data was recorded | | dexName | String | Name of the decentralized exchange | | token0Address | String | Contract address of the first token in the pair | | token0Symbol | String | Symbol of the first token | | token0Decimals | UInt8 | Number of decimal places for the first token | | token1Address | String | Contract address of the second token in the pair | | token1Symbol | String | Symbol of the second token | | token1Decimals | UInt8 | Number of decimal places for the second token | | feeTier | UInt32 | Fee tier in basis points for the pool | | tickSpacing | Int32 | Spacing between usable ticks | | currentLiquidity | UInt128 | Current liquidity in the pool | | currentSqrtPriceX96 | UInt256 | Current price as sqrt(price) * 2^96 | | currentTick | Int32 | Current tick index | | currentPoolPrice | Float64 | Current pool price ratio | | poolTvlUSD | Float64 | Total value locked in the pool in USD | | swapVolumeUSD | Map | Swap volume in USD across different time periods | | feeApr | Map | Fee annual percentage rate across different time periods | | tickUtilization | Map | Tick utilization percentage across different time periods | | swapCount | Map | Number of swaps across different time periods | | uniqueUserCount | Map | Number of unique users across different time periods | ## Examples ### 1. WBTC/cbBTC Pool Information Gets current pool information for the WBTC/cbBTC trading pair on 9mm DEX. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/clones/v3/pool?pool_address=0x5fdb371f38e2713139446a22b6472705c2cd3c9e" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "createdAt", "type": "DateTime('UTC')" }, { "name": "dexName", "type": "String" }, { "name": "token0Address", "type": "LowCardinality(FixedString(42))" }, { "name": "token0Symbol", "type": "String" }, { "name": "token0Decimals", "type": "UInt8" }, { "name": "token1Address", "type": "LowCardinality(FixedString(42))" }, { "name": "token1Symbol", "type": "String" }, { "name": "token1Decimals", "type": "UInt8" }, { "name": "feeTier", "type": "UInt32" }, { "name": "tickSpacing", "type": "Int32" }, { "name": "currentLiquidity", "type": "UInt128" }, { "name": "currentSqrtPriceX96", "type": "UInt256" }, { "name": "currentTick", "type": "Int32" }, { "name": "currentPoolPrice", "type": "Float64" }, { "name": "poolTvlUSD", "type": "Float64" }, { "name": "swapVolumeUSD", "type": "Map(String,Float64)" }, { "name": "feeApr", "type": "Map(String,Float64)" }, { "name": "tickUtilization", "type": "Map(String,Float64)" }, { "name": "swapCount", "type": "Map(String,UInt64)" }, { "name": "uniqueUserCount", "type": "Map(String,UInt64)" } ], "data": [ [ "2025-05-19T12:40:57+00:00", "9mm", "0x0555e30da8f98308edb960aa94c0db47230d2b9c", "WBTC", 8, "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "cbBTC", 8, 500, 10, 1450597, "79131732056626544985620801809", -25, 0.9975672344102923, 16.365303353687764, { "'1 day'": 0.0, "'1 hour'": 0.0, "'1 month'": 10.406261047339086, "'1 week'": 0.0, "'1 year'": 81202.79440403447, "'5 minute'": 0.0 }, { "'1 day'": 0.0, "'1 hour'": 0.0, "'1 month'": 0.38152403859941164, "'1 week'": 0.0, "'1 year'": 100.0, "'5 minute'": 0.0 }, { "'1 day'": 0.0, "'1 hour'": 0.0, "'1 month'": 0.030555555555555555, "'1 week'": 0.0, "'1 year'": 81.06187214611872, "'5 minute'": 0.0 }, { "'1 day'": 0, "'1 hour'": 0, "'1 month'": 13, "'1 week'": 0, "'1 year'": 1296, "'5 minute'": 0 }, { "'1 day'": 0, "'1 hour'": 0, "'1 month'": 11, "'1 week'": 0, "'1 year'": 363, "'5 minute'": 0 } ], [ "2025-05-19T12:40:57+00:00", "9mm", "0x0555e30da8f98308edb960aa94c0db47230d2b9c", "WBTC", 8, "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "cbBTC", 8, 500, 10, 0, "0", 0, 0.0, 16.365303353687764, { "'1 day'": 0.0, "'1 hour'": 0.0, "'1 month'": 0.0, "'1 week'": 0.0, "'1 year'": 0.0, "'5 minute'": 0.0 }, { "'1 day'": 0.0, "'1 hour'": 0.0, "'1 month'": 0.0, "'1 week'": 0.0, "'1 year'": 0.0, "'5 minute'": 0.0 }, { "'1 day'": 0.0, "'1 hour'": 0.0, "'1 month'": 0.0, "'1 week'": 0.0, "'1 year'": 0.0, "'5 minute'": 0.0 }, { "'1 day'": 0, "'1 hour'": 0, "'1 month'": 0, "'1 week'": 0, "'1 year'": 0, "'5 minute'": 0 }, { "'1 day'": 0, "'1 hour'": 0, "'1 month'": 0, "'1 week'": 0, "'1 year'": 0, "'5 minute'": 0 } ] ], "rows": 2 } ``` This response shows detailed metrics for a WBTC/cbBTC pool including current liquidity of 1,450,597, a TVL of $16.37, and various performance metrics across different time periods. The data includes two entries showing different states of the same pool. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/evm/clones/v3/pool" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/evm/clones/v3/pool") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Cambrian API: V3 - List Pools **Endpoint:** /api/v1/evm/clones/v3/pools # EVM Clones V3 Pools Returns a comprehensive list of all liquidity pools across Uniswap V3 clones, including token pairs, fee tiers, creation timestamps, and DEX information. This endpoint provides essential pool discovery and metadata for tracking liquidity across multiple EVM-compatible decentralized exchanges. ## Business Value - **Pool Discovery**: Find liquidity pools across multiple Uniswap V3 clone DEXs in a single query, enabling comprehensive market analysis - **Token Pair Analysis**: Identify available trading pairs and their associated fee structures for optimal trading route planning - **Liquidity Monitoring**: Track pool creation patterns and growth across different decentralized exchanges - **Cross-DEX Comparison**: Compare fee tiers and pool availability across different Uniswap V3 clone implementations - **Integration Support**: Provide essential pool metadata for DEX aggregators, portfolio trackers, and analytics platforms ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/evm/clones/v3/pools ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | token_address | string | No | - | Pool token address (must match pattern: ^0x[a-fA-F0-9]{40}$) | | limit | integer | No | 100 | Limit the number of results (min: 1, max: 1000) | | offset | integer | No | 0 | Skip a number of rows before returning results (min: 0, max: 100000) | | order_asc | array | No | - | Column names to order by in ascending order (comma-separated) | | order_desc | array | No | - | Column names to order by in descending order (comma-separated) | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | chainId | UInt32 | Blockchain network ID (e.g., 8453 for Base) | | dexAddress | String | DEX contract address | | dexName | String | Name of the DEX (e.g., 9mm, BaseSwap, DackieSwap) | | poolAddress | String | Unique liquidity pool contract address | | token0Address | String | Contract address of the first token in the pair | | token0Symbol | String | Symbol of the first token (e.g., WETH, USDC) | | token0Decimals | UInt8 | Number of decimal places for the first token | | token1Address | String | Contract address of the second token in the pair | | token1Symbol | String | Symbol of the second token | | token1Decimals | UInt8 | Number of decimal places for the second token | | createdAt | DateTime | Timestamp when the pool was created (UTC) | | fee | UInt32 | Pool fee in basis points (e.g., 2500 = 0.25%) | | tickSpacing | Int32 | Tick spacing for the pool's price range | ## Examples ### 1. Get All Pools Retrieve a list of all available liquidity pools across Uniswap V3 clones. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/clones/v3/pools" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [{ "columns": [ {"name": "chainId", "type": "UInt32"}, {"name": "dexAddress", "type": "LowCardinality(FixedString(42))"}, {"name": "dexName", "type": "String"}, {"name": "poolAddress", "type": "FixedString(42)"}, {"name": "token0Address", "type": "LowCardinality(FixedString(42))"}, {"name": "token0Symbol", "type": "String"}, {"name": "token0Decimals", "type": "UInt8"}, {"name": "token1Address", "type": "LowCardinality(FixedString(42))"}, {"name": "token1Symbol", "type": "String"}, {"name": "token1Decimals", "type": "UInt8"}, {"name": "createdAt", "type": "DateTime('UTC')"}, {"name": "fee", "type": "UInt32"}, {"name": "tickSpacing", "type": "Int32"} ], "data": [ [8453, "0x7b72c4002ea7c276dd717b96b20f4956c5c904e7", "9mm", "0xec72c68a746dc7552bec13bf56245ea8c39d7b63", "0x4200000000000000000000000000000000000006", "WETH", 18, "0xb2b6249e1b8eaa81c18cc9ac8f320e4c85617b07", "CLAWDSTRATEGY", 18, "2026-01-28T10:33:45+00:00", 2500, 50], [8453, "0x38015d05f4fec8afe15d7cc0386a126574e8077b", "BaseSwap", "0xeaba2c3e02bd4c935d4aa8784ad83b419d2be08f", "0x4ed4e862860bed51a9570b96d89af5e1b0efefed", "DEGEN", 18, "0xd17b3f2efd965dbafec0af3bc0838b704009a69e", "SH", 18, "2026-01-23T21:01:33+00:00", 50, 1], [8453, "0x3d237ac6d2f425d2e890cc99198818cc1fa48870", "DackieSwap", "0x3456ae2a89b04d25f1742494bd312c87ab601c14", "0x4200000000000000000000000000000000000006", "WETH", 18, "0x5685bab29c459a06c46cfa4360158abb1aaf441d", "USOR", 18, "2026-01-21T11:47:17+00:00", 500, 10], [8453, "0x7b72c4002ea7c276dd717b96b20f4956c5c904e7", "9mm", "0xcf92b0b4caa015c6d7a4de281ad89e3f7bccab08", "0x39916e508e389fbb4ddc3d1a38a5801f4ee253c7", "πŸ§™β€β™€οΈπŸΈΈ", 18, "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "cbBTC", 8, "2026-01-19T23:57:35+00:00", 2500, 50], [8453, "0x7b72c4002ea7c276dd717b96b20f4956c5c904e7", "9mm", "0x0adc33f2a51390f844fc396cc0c51f8e40c6207e", "0x16b13a47b0c535efae58675e0657d3c22471cda8", "wBYC", 18, "0x39916e508e389fbb4ddc3d1a38a5801f4ee253c7", "πŸ§™β€β™€οΈπŸΈΈ", 18, "2026-01-19T23:49:49+00:00", 500, 10] ], "rows": 100 }] ``` This response shows the first 5 pools from a total of 100 pools available, including various token pairs like WETH/CLAWDSTRATEGY, DEGEN/SH, and others across different DEXs on the Base network (chainId: 8453). ### 2. Filter by Specific Token Get pools containing a specific token address. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/clones/v3/pools?token_address=0x4200000000000000000000000000000000000006&limit=5" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [{ "columns": [ {"name": "chainId", "type": "UInt32"}, {"name": "dexAddress", "type": "LowCardinality(FixedString(42))"}, {"name": "dexName", "type": "String"}, {"name": "poolAddress", "type": "FixedString(42)"}, {"name": "token0Address", "type": "LowCardinality(FixedString(42))"}, {"name": "token0Symbol", "type": "String"}, {"name": "token0Decimals", "type": "UInt8"}, {"name": "token1Address", "type": "LowCardinality(FixedString(42))"}, {"name": "token1Symbol", "type": "String"}, {"name": "token1Decimals", "type": "UInt8"}, {"name": "createdAt", "type": "DateTime('UTC')"}, {"name": "fee", "type": "UInt32"}, {"name": "tickSpacing", "type": "Int32"} ], "data": [ [8453, "0x7b72c4002ea7c276dd717b96b20f4956c5c904e7", "9mm", "0xec72c68a746dc7552bec13bf56245ea8c39d7b63", "0x4200000000000000000000000000000000000006", "WETH", 18, "0xb2b6249e1b8eaa81c18cc9ac8f320e4c85617b07", "CLAWDSTRATEGY", 18, "2026-01-28T10:33:45+00:00", 2500, 50], [8453, "0x3d237ac6d2f425d2e890cc99198818cc1fa48870", "DackieSwap", "0x3456ae2a89b04d25f1742494bd312c87ab601c14", "0x4200000000000000000000000000000000000006", "WETH", 18, "0x5685bab29c459a06c46cfa4360158abb1aaf441d", "USOR", 18, "2026-01-21T11:47:17+00:00", 500, 10] ], "rows": 100 // ... additional rows omitted for brevity }] ``` This filtered response shows pools specifically containing WETH token (0x4200000000000000000000000000000000000006) as either token0 or token1, useful for finding trading pairs with a specific base token. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/evm/clones/v3/pools" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/evm/clones/v3/pools") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/evm/clones/v3/pool` - Returns current pool TVL, swap volume, fees APR, and other metrics for a specific pool - `/api/v1/evm/aero/v2/pool` - Get information for a specific Aerodrome V2 pool address - `/api/v1/evm/price-current` - Returns current price of a token calculated based on Uniswap V3 and clones liquidity pools --- ## Cambrian API: List DEXes **Endpoint:** /api/v1/evm/dexes # EVM DEXes This endpoint returns a list of all decentralized exchanges (DEXes) available on EVM-compatible chains. It provides essential information about each DEX including its chain ID, contract address, name, and underlying algorithm. ## Business Value - **DEX Discovery**: Easily discover all DEXes operating across different EVM chains in one request - **Integration Planning**: Get comprehensive DEX information needed for multi-chain DeFi integrations - **Algorithm Analysis**: Understand the distribution of different AMM algorithms (Uniswap V3, Algebra, etc.) across chains - **Chain Coverage**: See which DEXes operate on specific chains like Base (chainId: 8453) - **Contract Verification**: Access verified DEX contract addresses for secure integrations ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/evm/dexes ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | - | - | - | - | No query parameters required | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | chainId | UInt32 | The blockchain network identifier (e.g., 8453 for Base) | | address | FixedString(42) | The contract address of the DEX | | name | String | The name of the DEX (e.g., Uniswap, Aerodrome, PancakeSwap) | | algorithm | LowCardinality(FixedString(10)) | The AMM algorithm used (e.g., univ3, algb, na) | ## Examples ### 1. Get All EVM DEXes Retrieve the complete list of DEXes across all supported EVM chains. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/dexes" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "chainId", "type": "UInt32" }, { "name": "address", "type": "FixedString(42)" }, { "name": "name", "type": "String" }, { "name": "algorithm", "type": "LowCardinality(FixedString(10))" } ], "data": [ [ 8453, "0x7b72c4002ea7c276dd717b96b20f4956c5c904e7", "9mm", "univ3" ], [ 8453, "0x420dd381b31aef6683db6b902084cb0ffece40da", "Aerodrome", "na" ], [ 8453, "0x5e7bb104d84c7cb9b682aac2f3d509f5f406809a", "Aerodrome", "univ3" ], [ 8453, "0x9592cd9b267748cbfbde90ac9f7df3c437a6d51b", "Aerodrome", "univ3" ], [ 8453, "0x0fd83557b2be93617c9c1b6fd549401c74558c", "AlienBase", "univ3" ] ], "rows": 38 // ... additional rows omitted for brevity } ``` The response shows 38 DEXes currently available, with the majority operating on Base chain (chainId: 8453). Most DEXes use the Uniswap V3 algorithm (univ3), with some using Algebra (algb) or marked as not applicable (na). ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/evm/dexes" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/evm/dexes") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/evm/aero/v2/pools` - Returns a paginated list of Aerodrome liquidity pools with summary metrics - `/api/v1/evm/aero/v2/pool` - Get detailed information for a specific Aerodrome V2 pool address - `/api/v1/evm/aero/v2/pool-volume` - Get hourly volume data for Aerodrome pools over specific timeframes - `/api/v1/evm/aero/v2/fee-metrics` - Shows daily historical fee data for Aerodrome pools over time --- ## Cambrian API: V3 - Pool Info **Endpoint:** /api/v1/evm/pancake/v3/pool # PancakeSwap V3 Pool Info This endpoint returns comprehensive pool information for PancakeSwap V3 liquidity pools, including current TVL (Total Value Locked), swap volume, fees APR (Annual Percentage Rate), price tick utilization, number of swaps and unique users across multiple time ranges (5 minutes, 1 hour, 1 day, 1 week, 1 month and 1 year). ## Business Value - **Pool Performance Monitoring**: Track key metrics like TVL, volume, and fees to assess pool health and profitability - **Liquidity Analysis**: Monitor price tick utilization to understand how efficiently liquidity is being used - **User Activity Insights**: Analyze swap counts and unique user metrics across different time periods for activity trends - **APR Calculations**: Access fees APR data for yield farming and liquidity provision decision making - **Historical Context**: Compare performance across multiple time ranges from 5 minutes to 1 year for trend analysis ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/evm/pancake/v3/pool ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | pool_address | string | true | - | Pool address with 0x prefix (pattern: ^0x[a-fA-F0-9]{40}$) | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | createdAt | DateTime | Pool creation timestamp in UTC | | token0Address | string | Contract address of the first token in the pair | | token0Symbol | string | Symbol of the first token | | token0Decimals | number | Number of decimals for token0 | | token1Address | string | Contract address of the second token in the pair | | token1Symbol | string | Symbol of the second token | | token1Decimals | number | Number of decimals for token1 | | feeTier | number | Fee tier of the pool (in hundredths of basis points) | | tickSpacing | number | Tick spacing for the pool | | currentLiquidity | string | Current total liquidity in the pool | | currentSqrtPriceX96 | string | Current sqrt price multiplied by 2^96 | | currentTick | number | Current tick of the pool | | currentPoolPrice | number | Current price of token1 in terms of token0 | | poolTvlUSD | number | Total Value Locked in USD | | swapVolumeUSD | object | Map of swap volume in USD across different time periods | | feeApr | object | Map of fee APR percentages across different time periods | | tickUtilization | object | Map of tick utilization percentages across different time periods | | swapCount | object | Map of swap counts across different time periods | | uniqueUserCount | object | Map of unique user counts across different time periods | ## Examples ### 1. Get Pool Information for WETH/cbBTC Pool This example retrieves comprehensive pool data for a PancakeSwap V3 WETH/cbBTC pool, showing metrics across multiple timeframes. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/pancake/v3/pool?pool_address=0xC211e1f853A898Bd1302385CCdE55f33a8C4B3f3" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "createdAt", "type": "DateTime('UTC')" }, { "name": "token0Address", "type": "LowCardinality(FixedString(42))" }, { "name": "token0Symbol", "type": "String" }, { "name": "token0Decimals", "type": "UInt8" }, { "name": "token1Address", "type": "LowCardinality(FixedString(42))" }, { "name": "token1Symbol", "type": "String" }, { "name": "token1Decimals", "type": "UInt8" }, { "name": "feeTier", "type": "UInt32" }, { "name": "tickSpacing", "type": "Int32" }, { "name": "currentLiquidity", "type": "UInt128" }, { "name": "currentSqrtPriceX96", "type": "UInt256" }, { "name": "currentTick", "type": "Int32" }, { "name": "currentPoolPrice", "type": "Float64" }, { "name": "poolTvlUSD", "type": "Float64" }, { "name": "swapVolumeUSD", "type": "Map(String,Float64)" }, { "name": "feeApr", "type": "Map(String,Float64)" }, { "name": "tickUtilization", "type": "Map(String,Float64)" }, { "name": "swapCount", "type": "Map(String,UInt64)" }, { "name": "uniqueUserCount", "type": "Map(String,UInt64)" } ], "data": [ [ "2024-09-13T06:45:47+00:00", "0x4200000000000000000000000000000000000006", "WETH", 18, "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "cbBTC", 8, 100, 1, 107212895607954956, "145626920347568717213247", -264150, 3.3785018666119674E-12, 10203249.179796051, { "'1 day'": 53295029.62580393, "'1 hour'": 1353107.9274884984, "'1 month'": 1784013607.2371073, "'1 week'": 423699314.55249476, "'1 year'": 15967482203.790384, "'5 minute'": 0.0 }, { "'1 day'": 19.06518744238614, "'1 hour'": 11.617108664042423, "'1 month'": 20.98171171712304, "'1 week'": 21.59347867379058, "'1 year'": 15.649409244467313, "'5 minute'": 0.0 }, { "'1 day'": 45.983333333333334, "'1 hour'": 27.200000000000003, "'1 month'": 48.590555555555554, "'1 week'": 53.9702380952381, "'1 year'": 100.0, "'5 minute'": 0.0 }, { "'1 day'": 21365, "'1 hour'": 593, "'1 month'": 612298, "'1 week'": 142752, "'1 year'": 10504673, "'5 minute'": 0 }, { "'1 day'": 21365, "'1 hour'": 207, "'1 month'": 32285, "'1 week'": 9371, "'1 year'": 388236, "'5 minute'": 0 } ] ], "rows": 1 } ``` The response shows detailed metrics for the WETH/cbBTC pool created on September 13, 2024. The pool has a TVL of ~$10.2M and shows strong activity with over 21K swaps in the past day. The fee APR ranges from 11.6% (1 hour) to 21.6% (1 week), indicating good returns for liquidity providers. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/evm/pancake/v3/pool" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/evm/pancake/v3/pool") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/evm/pancake/v3/pools` - Returns a list of all liquidity pools, including token pairs, fee tiers, and creation timestamps - `/api/v1/evm/aero/v3/pool` - Returns current pool TVL(Total Value Locked), Swap Volume, Fees APR (Annual Percentage Rate), Price Tick Utilization, Number of Swaps and Unique users for recent time range (5 minutes, 1 hour, 1 day, 1 week, 1 month and 1 year) - `/api/v1/evm/alien/v3/pool` - Returns current pool TVL (Total Value Locked), Swap Volume, Fees APR (Annual Percentage Rate), Price Tick Utilization, Number of Swaps and Unique users for recent time range (5 minutes, 1 hour, 1 day, 1 week, 1 month and 1 year) --- ## Cambrian API: V3 - List Pools **Endpoint:** /api/v1/evm/pancake/v3/pools # PancakeSwap V3 Pools List This endpoint returns a comprehensive list of all PancakeSwap V3 liquidity pools across supported EVM chains, providing detailed information about token pairs, fee tiers, creation timestamps, and pool characteristics. ## Business Value - **Pool Discovery**: Identify all available liquidity pools for trading and liquidity provision strategies - **Market Analysis**: Analyze pool distribution, fee structures, and token pair availability across chains - **Portfolio Management**: Track and monitor multiple pools for yield farming and LP position management - **DeFi Integration**: Build applications that require comprehensive pool data for routing and analytics - **Risk Assessment**: Evaluate pool diversity and concentration for informed investment decisions ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/evm/pancake/v3/pools ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | token_address | string | No | - | Pool token address. Must be a valid EVM address (0x followed by 40 hex characters) | | limit | integer | No | 100 | Limit the number of results (1-1000) | | offset | integer | No | 0 | Offset the results to skip a number of rows (0-100000) | | order_asc | array | No | - | Column names to order by in ascending order (chainId, dexAddress, dexName, poolAddress, token0Address, token0Symbol, token0Decimals, token1Address, token1Symbol, token1Decimals, createdAt, fee, tickSpacing) | | order_desc | array | No | - | Column names to order by in descending order (same options as order_asc) | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | chainId | UInt32 | The blockchain network ID (e.g., 8453 for Base) | | dexAddress | FixedString(42) | The DEX contract address | | dexName | String | The name of the decentralized exchange (PancakeV3) | | poolAddress | FixedString(42) | The unique pool contract address | | token0Address | FixedString(42) | The contract address of the first token in the pair | | token0Symbol | String | The symbol of the first token (e.g., USDC, WETH) | | token0Decimals | UInt8 | The decimal precision of the first token | | token1Address | FixedString(42) | The contract address of the second token in the pair | | token1Symbol | String | The symbol of the second token | | token1Decimals | UInt8 | The decimal precision of the second token | | createdAt | DateTime | The timestamp when the pool was created (UTC) | | fee | UInt32 | The pool fee tier in basis points (e.g., 2500 = 0.25%) | | tickSpacing | Int32 | The tick spacing for the pool's price range | ## Examples ### 1. List All Pools (Default) Get the first 100 PancakeSwap V3 pools with default ordering. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/pancake/v3/pools" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "chainId", "type": "UInt32" }, { "name": "dexAddress", "type": "LowCardinality(FixedString(42))" }, { "name": "dexName", "type": "String" }, { "name": "poolAddress", "type": "FixedString(42)" }, { "name": "token0Address", "type": "LowCardinality(FixedString(42))" }, { "name": "token0Symbol", "type": "String" }, { "name": "token0Decimals", "type": "UInt8" }, { "name": "token1Address", "type": "LowCardinality(FixedString(42))" }, { "name": "token1Symbol", "type": "String" }, { "name": "token1Decimals", "type": "UInt8" }, { "name": "createdAt", "type": "DateTime('UTC')" }, { "name": "fee", "type": "UInt32" }, { "name": "tickSpacing", "type": "Int32" } ], "data": [ [ 8453, "0x0bfbcf9fa4f9c56b0f40a671ad40e0805a091865", "PancakeV3", "0x6513faae3c52e258e2ca3128010d6e8a79b3c650", "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "USDC", 6, "0x9f86db9fc6f7c9408e8fda3ff8ce4e78ac7a6b07", "CLAWD", 18, "2026-01-28T03:32:07+00:00", 2500, 50 ], [ 8453, "0x0bfbcf9fa4f9c56b0f40a671ad40e0805a091865", "PancakeV3", "0x73e4bd5d0dcb74ec490f87c7fd28dd4d0f63ceed", "0x4200000000000000000000000000000000000006", "WETH", 18, "0x9f86db9fc6f7c9408e8fda3ff8ce4e78ac7a6b07", "CLAWD", 18, "2026-01-28T03:31:29+00:00", 2500, 50 ], [ 8453, "0x0bfbcf9fa4f9c56b0f40a671ad40e0805a091865", "PancakeV3", "0x7958461b3305b7b10c09be7634e142f0c29ca20a", "0x4200000000000000000000000000000000000006", "WETH", 18, "0x9e4134ee06420dadec409603cbb74eeaf40bfd83", "CHOG", 18, "2026-01-27T20:12:15+00:00", 100, 1 ], [ 8453, "0x0bfbcf9fa4f9c56b0f40a671ad40e0805a091865", "PancakeV3", "0x767c89c3b18d7ea151cb5cc8ffcd474464bf9b50", "0x2e5ea37df7373a6ac801c47b7adae2c2febba76a", "tCHIP", 18, "0x4200000000000000000000000000000000000006", "WETH", 18, "2026-01-27T15:55:49+00:00", 100, 1 ], [ 8453, "0x0bfbcf9fa4f9c56b0f40a671ad40e0805a091865", "PancakeV3", "0xa118e86670d4c2d0daa99c8f3da182713ac0ae0b", "0x39f71b60f10194584aafab0186bf28d4cdb62cdc", "TOXS", 18, "0x4200000000000000000000000000000000000006", "WETH", 18, "2026-01-27T01:52:23+00:00", 100, 1 ] ], "rows": 5 // ... additional rows omitted for brevity } ``` This response shows the most recent PancakeSwap V3 pools, including various token pairs like USDC/CLAWD, WETH/CLAWD, WETH/CHOG, tCHIP/WETH, and TOXS/WETH, all on the Base network (chainId: 8453) with different fee tiers. ### 2. Filter Pools by Token Address Find all pools containing a specific token address. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/pancake/v3/pools?token_address=0x4200000000000000000000000000000000000006&limit=10" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "chainId", "type": "UInt32" }, { "name": "dexAddress", "type": "LowCardinality(FixedString(42))" }, { "name": "dexName", "type": "String" }, { "name": "poolAddress", "type": "FixedString(42)" }, { "name": "token0Address", "type": "LowCardinality(FixedString(42))" }, { "name": "token0Symbol", "type": "String" }, { "name": "token0Decimals", "type": "UInt8" }, { "name": "token1Address", "type": "LowCardinality(FixedString(42))" }, { "name": "token1Symbol", "type": "String" }, { "name": "token1Decimals", "type": "UInt8" }, { "name": "createdAt", "type": "DateTime('UTC')" }, { "name": "fee", "type": "UInt32" }, { "name": "tickSpacing", "type": "Int32" } ], "data": [ [ 8453, "0x0bfbcf9fa4f9c56b0f40a671ad40e0805a091865", "PancakeV3", "0x73e4bd5d0dcb74ec490f87c7fd28dd4d0f63ceed", "0x4200000000000000000000000000000000000006", "WETH", 18, "0x9f86db9fc6f7c9408e8fda3ff8ce4e78ac7a6b07", "CLAWD", 18, "2026-01-28T03:31:29+00:00", 2500, 50 ] ], "rows": 1 } ``` This filtered response returns all pools that include WETH (Wrapped Ethereum) as either token0 or token1, helping identify trading pairs and liquidity opportunities for this specific token. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/evm/pancake/v3/pools" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/evm/pancake/v3/pools") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/evm/pancake/v3/pool` - Returns current pool TVL, Swap Volume, Fees APR, Price Tick Utilization, Number of Swaps and Unique users for recent time range - `/api/v1/evm/aero/v2/pools` - This endpoint returns a paginated list of liquidity pools with summary metrics - `/api/v1/evm/aero/v2/pool` - Get information for a specific Aerodrome V2 pool address - `/api/v1/evm/aero/v2/fee-metrics` - Shows daily historical data to understand the fees over time on a pool - `/api/v1/evm/aero/v2/pool-volume` - Helpful for aggregate statistics over a particular timeframe, with hourly data to understand distribution of recent activity --- ## Cambrian API: Token Price (Current) **Endpoint:** /api/v1/evm/price-current # Token Price (Current) ## Overview Returns the current USD price of an EVM token calculated based on Uniswap V3 and compatible liquidity pools. The price is derived from on-chain liquidity pool data, providing accurate real-time pricing for any whitelisted EVM token. Results include the chain ID, token address, symbol, price in USD, and the timestamp of the last update. ## Business Value - **Real-Time Token Pricing**: Instantly retrieve the latest USD price for any supported EVM token without needing to interact directly with smart contracts or maintain your own price feeds. - **Multi-Chain Support**: Query token prices across multiple EVM-compatible chains by specifying the token address, enabling cross-chain portfolio and DeFi analytics. - **DEX-Aggregated Accuracy**: Prices are calculated from Uniswap V3 and clone liquidity pools, ensuring accurate market-reflective valuations based on actual on-chain liquidity. - **DeFi Application Integration**: Ideal for wallets, dashboards, and DeFi protocols that need up-to-date token valuations to display portfolio values or compute trade sizes. - **Lightweight & Fast**: A simple single-parameter GET request returns structured pricing data with timestamps, making it easy to integrate into any application or automated workflow. ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/evm/price-current ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | token_address | string | No | `0x833589fcd6edb6e08f4c7c32d4f71b54bda02913` | Address of the token prefixed with 0x. See whitelisted tokens | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | chainId | UInt32 | The chain ID of the blockchain where the token resides (e.g., 8453 for Base) | | tokenAddress | String | The contract address of the token prefixed with 0x | | symbol | String | The ticker symbol of the token (e.g., USDC) | | priceUSD | Float64 | The current price of the token in USD | | updatedAt | DateTime('UTC') | The UTC timestamp when the price was last updated | ## Examples ### 1. Get Current Price of USDC on Base Retrieve the current USD price for USDC (token address `0x833589fcd6edb6e08f4c7c32d4f71b54bda02913`) on the Base chain. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/price-current?token_address=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "chainId", "type": "UInt32" }, { "name": "tokenAddress", "type": "String" }, { "name": "symbol", "type": "String" }, { "name": "priceUSD", "type": "Float64" }, { "name": "updatedAt", "type": "DateTime('UTC')" } ], "data": [ [ 8453, "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "USDC", 1.0, "2026-03-24T13:00:00+00:00" ] ], "rows": 1 } ``` This response shows USDC on Base (chain ID 8453) trading at exactly $1.00 USD as expected for a stablecoin, with the price last updated at 2026-03-24T13:00:00 UTC. ### 2. Query a Different Whitelisted EVM Token Use the `/api/v1/evm/tokens` endpoint to discover whitelisted token addresses, then query the current price for any of them. Below is an example with a different token address format. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/price-current?token_address=0x4200000000000000000000000000000000000006" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "chainId", "type": "UInt32" }, { "name": "tokenAddress", "type": "String" }, { "name": "symbol", "type": "String" }, { "name": "priceUSD", "type": "Float64" }, { "name": "updatedAt", "type": "DateTime('UTC')" } ], "data": [ [ 8453, "0x4200000000000000000000000000000000000006", "WETH", 2000.0, "2026-03-24T13:00:00+00:00" ] ], "rows": 1 } ``` Returns the current USD price for WETH on Base, sourced from Uniswap V3 and compatible liquidity pools. Use `/api/v1/evm/tokens` to get the full list of supported token addresses. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/evm/price-current" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/evm/price-current") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/evm/price-hour` - Returns historical hourly price data for a specified EVM token - `/api/v1/evm/tokens` - Returns a list of all whitelisted tokens for the specified EVM chain - `/api/v1/evm/dexes` - List of DEXes on EVM compatible chains - `/api/v1/evm/uniswap/v3/pool` - Returns current pool TVL, volume, fees APR, and other metrics for a Uniswap V3 pool - `/api/v1/evm/aero/v3/pool` - Returns current pool TVL, volume, fees APR, and other metrics for an Aerodrome V3 pool --- ## Cambrian API: Token Price (Hourly) **Endpoint:** /api/v1/evm/price-hour # EVM Token Price (Hourly) Returns historical hourly price data for a specified EVM token with timestamps in UTC format. This endpoint provides up to 1000 hours of historical pricing data for any valid token address. ## Business Value - **Historical Price Analysis**: Track price movements and trends over specific hourly intervals for investment research - **Trading Strategy Development**: Access precise historical data points for backtesting and algorithm development - **Market Research**: Analyze price volatility patterns and market behavior during specific time periods - **Portfolio Performance**: Monitor historical value changes of token holdings with granular hour-by-hour precision - **Risk Management**: Identify price patterns and volatility metrics for better risk assessment ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/evm/price-hour ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | token_address | string | true | - | Token address (must match pattern: ^0x[a-fA-F0-9]{40}$). See tokens for valid address for a chain | | hours | integer | true | - | Maximum number of hours to return (minimum: 1, maximum: 1000) | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | chainId | UInt32 | The blockchain network ID (e.g., 8453 for Base) | | tokenAddress | FixedString(42) | The contract address of the token | | symbol | FixedString(50) | The token symbol/ticker (e.g., cbBTC) | | blockHour | DateTime('UTC') | The hour timestamp in UTC format | | priceUSD | Float64 | The token price in USD for that hour | ## Examples ### 1. Get Recent 5 Hours of cbBTC Price Data This example demonstrates retrieving the last 5 hours of price data for cbBTC token on Base network. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/price-hour?token_address=0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf&hours=5" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "chainId", "type": "UInt32" }, { "name": "tokenAddress", "type": "FixedString(42)" }, { "name": "symbol", "type": "FixedString(50)" }, { "name": "blockHour", "type": "DateTime('UTC')" }, { "name": "priceUSD", "type": "Float64" } ], "data": [ [ 8453, "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "cbBTC", "2026-01-28T12:00:00+00:00", 89747.61787540544 ], [ 8453, "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "cbBTC", "2026-01-28T11:00:00+00:00", 89979.74280452367 ], [ 8453, "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "cbBTC", "2026-01-28T10:00:00+00:00", 89334.17573609052 ], [ 8453, "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "cbBTC", "2026-01-28T09:00:00+00:00", 89401.73236642826 ], [ 8453, "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "cbBTC", "2026-01-28T08:00:00+00:00", 88819.26929983658 ] ], "rows": 5 } ``` The response shows cbBTC price data on Base network (chainId: 8453) for the most recent 5 hours, with prices ranging from approximately $88,819 to $89,979 USD, demonstrating the hourly price fluctuations. ### 2. Extended Historical Analysis This example shows how to request more extensive historical data for deeper analysis. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/price-hour?token_address=0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf&hours=100" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "chainId", "type": "UInt32" }, { "name": "tokenAddress", "type": "FixedString(42)" }, { "name": "symbol", "type": "FixedString(50)" }, { "name": "blockHour", "type": "DateTime('UTC')" }, { "name": "priceUSD", "type": "Float64" } ], "data": [ [ 8453, "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "cbBTC", "2026-01-28T12:00:00+00:00", 89747.61787540544 ], [ 8453, "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "cbBTC", "2026-01-28T11:00:00+00:00", 89979.74280452367 ], [ 8453, "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "cbBTC", "2026-01-28T10:00:00+00:00", 89334.17573609052 ], [ 8453, "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "cbBTC", "2026-01-28T09:00:00+00:00", 89401.73236642826 ], [ 8453, "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "cbBTC", "2026-01-28T08:00:00+00:00", 88819.26929983658 ] ], "rows": 5 // ... additional rows omitted for brevity } ``` This request would return up to 100 hours of historical data, providing a broader view of price trends for comprehensive market analysis and trading strategy development. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/evm/price-hour" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/evm/price-hour") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/evm/price-current` - Returns current price of a token calculated based on uniswap v3 and clones liquidity pools - `/api/v1/evm/tokens` - Returns a list of all whitelisted tokens for the specified EVM chain, including their contract addresses, symbols, names, and decimal places - `/api/v1/evm/dexes` - List of DEXes on EVM compatible chains - `/api/v1/evm/tvl/top-owners` - Returns top token holders for a given token address - `/api/v1/evm/tvl/status` - Returns the tokens held by an address --- ## Cambrian API: V3 - Pool Info **Endpoint:** /api/v1/evm/sushi/v3/pool # Sushi V3 Pool Metrics This endpoint returns comprehensive pool metrics for a specific Sushi V3 liquidity pool. It provides current pool TVL (Total Value Locked), swap volume, fees APR (Annual Percentage Rate), price tick utilization, number of swaps, and unique users across multiple time ranges including 5 minutes, 1 hour, 1 day, 1 week, 1 month, and 1 year. ## Business Value - **Pool Performance Analysis**: Track key metrics like TVL, volume, and fees APR to evaluate individual pool performance across different timeframes - **Liquidity Provider Insights**: Monitor tick utilization and fee generation to optimize liquidity provision strategies and assess pool efficiency - **Trading Activity Monitoring**: Analyze swap counts and unique user metrics to understand pool usage patterns and market activity levels - **Risk Assessment**: Compare metrics across different time periods to identify trends, volatility patterns, and potential risks in specific pools - **Portfolio Management**: Make informed decisions about liquidity allocation by comparing performance metrics across different Sushi V3 pools ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/evm/sushi/v3/pool ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | pool_address | String | Yes | - | Pool address with 0x prefix (e.g., 0x57713f7716e0b0f65ec116912f834e49805480d2) | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | createdAt | DateTime | Timestamp when the pool data was recorded in UTC format | | token0Address | String | Contract address of the first token in the pool pair | | token0Symbol | String | Symbol of the first token (e.g., WETH) | | token0Decimals | Integer | Number of decimal places for the first token | | token1Address | String | Contract address of the second token in the pool pair | | token1Symbol | String | Symbol of the second token (e.g., USDC) | | token1Decimals | Integer | Number of decimal places for the second token | | feeTier | Integer | Fee tier of the pool in basis points (e.g., 500 = 0.05%) | | tickSpacing | Integer | Spacing between initialized ticks in the pool | | currentLiquidity | Integer | Current active liquidity in the pool | | currentSqrtPriceX96 | String | Current sqrt price of the pool scaled by 2^96 | | currentTick | Integer | Current tick of the pool price | | currentPoolPrice | Float | Current price ratio between token1 and token0 | | poolTvlUSD | Float | Total Value Locked in the pool denominated in USD | | swapVolumeUSD | Map | Swap volume in USD across different time periods ('5 minute', '1 hour', '1 day', '1 week', '1 month', '1 year') | | feeApr | Map | Annual Percentage Rate of fees earned across different time periods | | tickUtilization | Map | Percentage of tick range utilized across different time periods | | swapCount | Map | Total number of swaps executed across different time periods | | uniqueUserCount | Map | Number of unique users who performed swaps across different time periods | ## Examples ### 1. WETH/USDC Pool Analysis Get comprehensive metrics for a popular WETH/USDC pool on Sushi V3 to analyze its performance and activity patterns. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/sushi/v3/pool?pool_address=0x57713f7716e0b0f65ec116912f834e49805480d2" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "createdAt", "type": "DateTime('UTC')" }, { "name": "token0Address", "type": "LowCardinality(FixedString(42))" }, { "name": "token0Symbol", "type": "String" }, { "name": "token0Decimals", "type": "UInt8" }, { "name": "token1Address", "type": "LowCardinality(FixedString(42))" }, { "name": "token1Symbol", "type": "String" }, { "name": "token1Decimals", "type": "UInt8" }, { "name": "feeTier", "type": "UInt32" }, { "name": "tickSpacing", "type": "Int32" }, { "name": "currentLiquidity", "type": "UInt128" }, { "name": "currentSqrtPriceX96", "type": "UInt256" }, { "name": "currentTick", "type": "Int32" }, { "name": "currentPoolPrice", "type": "Float64" }, { "name": "poolTvlUSD", "type": "Float64" }, { "name": "swapVolumeUSD", "type": "Map(String,Float64)" }, { "name": "feeApr", "type": "Map(String,Float64)" }, { "name": "tickUtilization", "type": "Map(String,Float64)" }, { "name": "swapCount", "type": "Map(String,UInt64)" }, { "name": "uniqueUserCount", "type": "Map(String,UInt64)" } ], "data": [ [ "2023-12-23T13:09:57+00:00", "0x4200000000000000000000000000000000000006", "WETH", 18, "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "USDC", 6, 500, 10, 12929171813327985, "4347795851377197008814080", -196219, 3.011474014940159E-9, 128621.41719008452, { "'1 day'": 237773.8845935263, "'1 hour'": 5383.49677947101, "'1 month'": 7040203.795595099, "'1 week'": 1476686.5813771365, "'1 year'": 1664813268.9015336, "'5 minute'": 0.0 }, { "'1 day'": 33.737564774448614, "'1 hour'": 18.332651287176763, "'1 month'": 32.84151558612044, "'1 week'": 29.850278401974677, "'1 year'": 100.0, "'5 minute'": 0.0 }, { "'1 day'": 0.08333333333333334, "'1 hour'": 0.0, "'1 month'": 1.3805555555555555, "'1 week'": 1.6547619047619047, "'1 year'": 5.882876712328767, "'5 minute'": 0.0 }, { "'1 day'": 9699, "'1 hour'": 322, "'1 month'": 209956, "'1 week'": 55029, "'1 year'": 3266294, "'5 minute'": 0 }, { "'1 day'": 9699, "'1 hour'": 139, "'1 month'": 13686, "'1 week'": 3748, "'1 year'": 180871, "'5 minute'": 0 } ] ], "rows": 1 } ``` This response shows a WETH/USDC pool with 0.05% fees that has $128,621 in TVL and generated $237,773 in swap volume over the past day. The pool shows strong activity with 9,699 swaps from 139 unique users in the past hour, and demonstrates excellent long-term performance with 100% fee APR over the year. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/evm/sushi/v3/pool" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/evm/sushi/v3/pool") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/evm/sushi/v3/pools` - Returns a list of all Sushi V3 liquidity pools with token pairs, fee tiers, and creation timestamps - `/api/v1/evm/uniswap/v3/pool` - Returns current pool metrics for Uniswap V3 pools with the same data structure and time ranges - `/api/v1/evm/pancake/v3/pool` - Returns current pool metrics for PancakeSwap V3 pools with comprehensive performance data - `/api/v1/evm/aero/v3/pool` - Returns current pool metrics for Aerodrome V3 pools including TVL, volume, and fee data - `/api/v1/evm/clones/v3/pool` - Returns current pool metrics for various Uniswap V3 clone protocols with detailed analytics --- ## Cambrian API: V3 - List Pools **Endpoint:** /api/v1/evm/sushi/v3/pools # Sushi V3 Pools This endpoint retrieves Sushi V3 liquidity pools from EVM-compatible blockchains. It returns detailed information about pool addresses, token pairs, fees, and creation timestamps for all Sushi V3 pools. ## Business Value - **DEX Analytics**: Access comprehensive pool data for Sushi V3 across multiple EVM chains for trading analysis and liquidity monitoring - **Token Research**: Identify all pools containing specific tokens to understand trading venues and liquidity distribution - **Pool Discovery**: Find new and existing pools with detailed metadata including fees, tick spacing, and creation dates - **Cross-Chain Visibility**: Monitor Sushi V3 pools across different EVM networks from a single API endpoint - **Historical Tracking**: Track pool creation patterns and growth over time with timestamp data ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/evm/sushi/v3/pools ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | token_address | string | No | - | Pool token address. See tokens for valid addresses. | | limit | integer | No | 100 | Limit the number of results. | | offset | integer | No | 0 | Offset the results, allows you to skip a number of rows before starting to return rows. | | order_asc | array | No | - | List of column names to order by in ascending order divided by comma. Leave empty items to combine with descending order | | order_desc | array | No | - | List of column names to order by in descending order divided by comma. Leave empty items to combine with ascending order | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | chainId | UInt32 | The blockchain network ID | | dexAddress | String | Address of the DEX contract | | dexName | String | Name of the DEX (Sushi) | | poolAddress | String | Unique address of the liquidity pool | | token0Address | String | Contract address of the first token in the pair | | token0Symbol | String | Symbol of the first token | | token0Decimals | UInt8 | Number of decimal places for token0 | | token1Address | String | Contract address of the second token in the pair | | token1Symbol | String | Symbol of the second token | | token1Decimals | UInt8 | Number of decimal places for token1 | | createdAt | DateTime | Timestamp when the pool was created | | fee | UInt32 | Pool fee in basis points | | tickSpacing | Int32 | Tick spacing for the pool | ## Examples ### 1. Get cbBTC Pools on Base This example demonstrates how to retrieve all Sushi V3 pools containing cbBTC token on Base network. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/sushi/v3/pools?token_address=0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf&limit=10" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "chainId", "type": "UInt32" }, { "name": "dexAddress", "type": "LowCardinality(FixedString(42))" }, { "name": "dexName", "type": "String" }, { "name": "poolAddress", "type": "FixedString(42)" }, { "name": "token0Address", "type": "LowCardinality(FixedString(42))" }, { "name": "token0Symbol", "type": "String" }, { "name": "token0Decimals", "type": "UInt8" }, { "name": "token1Address", "type": "LowCardinality(FixedString(42))" }, { "name": "token1Symbol", "type": "String" }, { "name": "token1Decimals", "type": "UInt8" }, { "name": "createdAt", "type": "DateTime('UTC')" }, { "name": "fee", "type": "UInt32" }, { "name": "tickSpacing", "type": "Int32" } ], "data": [ [ 8453, "0xc35dadb65012ec5796536bd9864ed8773abc74c4", "Sushi", "0x99dc44b6b406491cad1dd60aaf8992c498d4d5ba", "0x4200000000000000000000000000000000000006", "WETH", 18, "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "cbBTC", 8, "2026-01-13T00:04:17+00:00", 3000, 60 ], [ 8453, "0xc35dadb65012ec5796536bd9864ed8773abc74c4", "Sushi", "0x0269014ddb6bfaaf5fd9c8a4acc5250dd68350d9", "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "USDC", 6, "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "cbBTC", 8, "2025-10-30T06:23:05+00:00", 100, 1 ], [ 8453, "0xc35dadb65012ec5796536bd9864ed8773abc74c4", "Sushi", "0x9bfe613e161976475027def7e9dcf33357628052", "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "cbBTC", 8, "0xdd2027fca129005b6255295ceb7e281365e50b0e", "PTTO", 18, "2025-10-16T12:37:53+00:00", 10000, 200 ], [ 8453, "0xc35dadb65012ec5796536bd9864ed8773abc74c4", "Sushi", "0x31bae2ee3a75874c7d6cdda7222c233ea9c33cb4", "0x73e56eb14581f64fea13e069539dc0eeca7a979f", "GUD", 18, "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "cbBTC", 8, "2025-08-23T03:27:25+00:00", 10000, 200 ], [ 8453, "0xc35dadb65012ec5796536bd9864ed8773abc74c4", "Sushi", "0x72267137dd760f872e256582e0609e405f05854b", "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "cbBTC", 8, "0xebbf4c3a447dbcc1e1f59076aed36b0b0c10efaf", "VDT", 18, "2025-07-14T01:31:21+00:00", 3000, 60 ] ], "rows": 5 // ... additional rows omitted for brevity } ``` The response shows 5 Sushi V3 pools on Base (chain ID 8453) that contain cbBTC, including popular pairs like cbBTC/WETH and cbBTC/USDC with different fee tiers and tick spacings. ### 2. Get All Pools with Pagination This example demonstrates how to retrieve all Sushi V3 pools with pagination control. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/sushi/v3/pools?limit=5&offset=0" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "chainId", "type": "UInt32" }, { "name": "dexAddress", "type": "LowCardinality(FixedString(42))" }, { "name": "dexName", "type": "String" }, { "name": "poolAddress", "type": "FixedString(42)" }, { "name": "token0Address", "type": "LowCardinality(FixedString(42))" }, { "name": "token0Symbol", "type": "String" }, { "name": "token0Decimals", "type": "UInt8" }, { "name": "token1Address", "type": "LowCardinality(FixedString(42))" }, { "name": "token1Symbol", "type": "String" }, { "name": "token1Decimals", "type": "UInt8" }, { "name": "createdAt", "type": "DateTime('UTC')" }, { "name": "fee", "type": "UInt32" }, { "name": "tickSpacing", "type": "Int32" } ], "data": [ [ 8453, "0xc35dadb65012ec5796536bd9864ed8773abc74c4", "Sushi", "0x99dc44b6b406491cad1dd60aaf8992c498d4d5ba", "0x4200000000000000000000000000000000000006", "WETH", 18, "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "cbBTC", 8, "2026-01-13T00:04:17+00:00", 3000, 60 ], [ 8453, "0xc35dadb65012ec5796536bd9864ed8773abc74c4", "Sushi", "0x0269014ddb6bfaaf5fd9c8a4acc5250dd68350d9", "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "USDC", 6, "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "cbBTC", 8, "2025-10-30T06:23:05+00:00", 100, 1 ], [ 8453, "0xc35dadb65012ec5796536bd9864ed8773abc74c4", "Sushi", "0x9bfe613e161976475027def7e9dcf33357628052", "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "cbBTC", 8, "0xdd2027fca129005b6255295ceb7e281365e50b0e", "PTTO", 18, "2025-10-16T12:37:53+00:00", 10000, 200 ], [ 8453, "0xc35dadb65012ec5796536bd9864ed8773abc74c4", "Sushi", "0x31bae2ee3a75874c7d6cdda7222c233ea9c33cb4", "0x73e56eb14581f64fea13e069539dc0eeca7a979f", "GUD", 18, "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "cbBTC", 8, "2025-08-23T03:27:25+00:00", 10000, 200 ], [ 8453, "0xc35dadb65012ec5796536bd9864ed8773abc74c4", "Sushi", "0x72267137dd760f872e256582e0609e405f05854b", "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "cbBTC", 8, "0xebbf4c3a447dbcc1e1f59076aed36b0b0c10efaf", "VDT", 18, "2025-07-14T01:31:21+00:00", 3000, 60 ] ], "rows": 5 // ... additional rows omitted for brevity } ``` This returns the first 5 Sushi V3 pools with complete pool information including token addresses, symbols, decimals, fees, and creation timestamps. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/evm/sushi/v3/pools" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/evm/sushi/v3/pools") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/evm/uniswap/v3/pools` - Uniswap V3 pool data for comparison - `/api/v1/evm/tokens` - Token information for pool token addresses --- ## Cambrian API: Whitelisted Tokens **Endpoint:** /api/v1/evm/tokens # EVM Whitelisted Tokens Returns a list of all whitelisted tokens for EVM-compatible chains, including their contract addresses, symbols, names, and decimal places. This endpoint provides essential token metadata for building decentralized applications and integrating with EVM ecosystems. ## Business Value - **Token Discovery**: Access a comprehensive catalog of verified tokens across EVM chains for integration purposes - **Contract Verification**: Get validated contract addresses to avoid interaction with malicious or fake tokens - **Metadata Standardization**: Retrieve standardized token information including symbols, names, and decimal precision - **Chain Compatibility**: Support for multiple EVM-compatible networks through a single endpoint - **Application Development**: Essential data for wallets, DEXs, and portfolio tracking applications ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/evm/tokens ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | - | - | - | - | No query parameters required | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | chainId | UInt32 | The blockchain network identifier (e.g., 1 for Ethereum, 8453 for Base) | | address | FixedString(42) | The contract address of the token in hexadecimal format | | symbol | FixedString(50) | The trading symbol or ticker of the token | | name | String | The full name of the token | | decimals | UInt8 | The number of decimal places the token uses for precision | | stable | UInt8 | Flag indicating if the token is a stablecoin (0 = false, 1 = true) | ## Examples ### 1. Retrieve All Whitelisted Tokens Get the complete list of whitelisted tokens across all supported EVM chains. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/tokens" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "chainId", "type": "UInt32" }, { "name": "address", "type": "FixedString(42)" }, { "name": "symbol", "type": "FixedString(50)" }, { "name": "name", "type": "String" }, { "name": "decimals", "type": "UInt8" }, { "name": "stable", "type": "UInt8" } ], "data": [ [ 8453, "0xb3c2c8b4ed137c098609932787686483f30d846d", "$2025", "2025", 18, 0 ], [ 8453, "0xcfd6a9461e6ed2dcc8f7e39476353d1b7a4865af", "$8BT", "8-Brett", 18, 0 ], [ 8453, "0xfd59354c577e07ce83170d5e1d01a1671ede8b7f", "$ASE", "ASE", 18, 0 ], [ 8453, "0x24f7c4be57a1d2b36b6be2eb4bd415803703855b", "$BCD", "BankrClankerDRB", 18, 0 ], [ 8453, "0x64b220c4fec8c94d6ca1d04d9f85916db655afbf", "$BEBASED", "The Year We Built Base - A 2024 Retrospective Featuring Jesse Pollak", 18, 0 ] ], "rows": 1667 // ... additional rows omitted for brevity } ``` Returns a columnar data format with 1667 whitelisted tokens, primarily from Base chain (chainId: 8453). Each token includes complete metadata for integration and verification purposes. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/evm/tokens" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/evm/tokens") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/evm/price-current` - Returns current price of a token calculated based on uniswap v3 and clones liquidity pools - `/api/v1/evm/price-hour` - Returns historical hourly price data for a specified EVM token - `/api/v1/evm/dexes` - List of DEXes on EVM compatible chains - `/api/v1/evm/tvl/status` - Returns the tokens held by an address - `/api/v1/evm/tvl/top-owners` - Returns top token holders for a given token address --- ## Cambrian API: Total Value Locked **Endpoint:** /api/v1/evm/tvl/status # EVM Total Value Locked Status Returns the tokens held by a specific EVM wallet address, showing portfolio balance information for tokens currently owned by that address. This endpoint provides comprehensive token holdings data including raw and UI-formatted amounts with USD valuations. ## Business Value - **Portfolio Analytics**: Track complete token holdings across EVM wallets for investment monitoring - **Risk Assessment**: Analyze wallet token diversification and concentration risks for due diligence - **Balance Verification**: Confirm token holdings for audit, compliance, and verification purposes - **Value Tracking**: Monitor USD values of all token positions in real-time - **Token Discovery**: Identify all tokens held by a wallet including lesser-known or new tokens ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/evm/tvl/status ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | wallet_address | string | Yes | - | Address that holds tokens prefixed with 0x | | whitelisted | boolean | No | false | If true, only whitelisted tokens will be returned | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | ownerAddress | FixedString(42) | The wallet address that owns the tokens | | tokenAddress | FixedString(42) | The contract address of the token | | tokenSymbol | String | The symbol/ticker of the token | | tokenDecimals | UInt8 | Number of decimal places for the token | | tokenAmountRaw | Int256 | Raw token amount in smallest unit (wei equivalent) | | tokenAmountUI | Float64 | Human-readable token amount adjusted for decimals | | valueUSD | Float64 | USD value of the token holding | ## Examples ### 1. Get All Token Holdings for Wallet This example demonstrates retrieving all token holdings for a specific EVM wallet address. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/tvl/status?wallet_address=0xfBB6Eed8e7aa03B138556eeDaF5D271A5E1e43ef" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [{ "columns": [ {"name": "ownerAddress", "type": "FixedString(42)"}, {"name": "tokenAddress", "type": "FixedString(42)"}, {"name": "tokenSymbol", "type": "String"}, {"name": "tokenDecimals", "type": "UInt8"}, {"name": "tokenAmountRaw", "type": "Int256"}, {"name": "tokenAmountUI", "type": "Float64"}, {"name": "valueUSD", "type": "Float64"} ], "data": [ ["0xfbb6eed8e7aa03b138556eedaf5d271a5e1e43ef", "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "cbBTC", 8, "4811805792", 48.11805792, 4341844.026892705], ["0xfbb6eed8e7aa03b138556eedaf5d271a5e1e43ef", "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "USDC", 6, "3119811016458", 3119811.016458, 3119811.016458], ["0xfbb6eed8e7aa03b138556eedaf5d271a5e1e43ef", "0x3d63825b0d8669307366e6c8202f656b9e91d368", "WGC", 6, "200010000", 200.01, 0.012028710676836933], ["0xfbb6eed8e7aa03b138556eedaf5d271a5e1e43ef", "0x4b6104755afb5da4581b81c552da3a25608c73b8", "SKITTEN", 18, "16802760000000000000", 16.80276, 0.0116606483051986], ["0xfbb6eed8e7aa03b138556eedaf5d271a5e1e43ef", "0xc438b0c0e80a8fa1b36898d1b36a3fc2ec371c54", "BLEP", 18, "100000000000000000000", 100.0, 0.003914016905260998] ], "rows": 298 // ... additional rows omitted for brevity }] ``` This response shows the wallet holds 298 different tokens, with major holdings including 48.12 cbBTC worth $4.34M and 3.12M USDC. The data includes both high-value and small-value token positions. ### 2. Get Whitelisted Token Holdings Only This example demonstrates filtering to show only whitelisted tokens to focus on major/verified tokens. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/tvl/status?wallet_address=0xfBB6Eed8e7aa03B138556eeDaF5D271A5E1e43ef&whitelisted=true" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [{ "columns": [ {"name": "ownerAddress", "type": "FixedString(42)"}, {"name": "tokenAddress", "type": "FixedString(42)"}, {"name": "tokenSymbol", "type": "String"}, {"name": "tokenDecimals", "type": "UInt8"}, {"name": "tokenAmountRaw", "type": "Int256"}, {"name": "tokenAmountUI", "type": "Float64"}, {"name": "valueUSD", "type": "Float64"} ], "data": [ ["0xfbb6eed8e7aa03b138556eedaf5d271a5e1e43ef", "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", "cbBTC", 8, "4811805792", 48.11805792, 4341844.026892705], ["0xfbb6eed8e7aa03b138556eedaf5d271a5e1e43ef", "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "USDC", 6, "3119811016458", 3119811.016458, 3119811.016458], ["0xfbb6eed8e7aa03b138556eedaf5d271a5e1e43ef", "0x3d63825b0d8669307366e6c8202f656b9e91d368", "WGC", 6, "200010000", 200.01, 0.012028710676836933], ["0xfbb6eed8e7aa03b138556eedaf5d271a5e1e43ef", "0x4b6104755afb5da4581b81c552da3a25608c73b8", "SKITTEN", 18, "16802760000000000000", 16.80276, 0.0116606483051986], ["0xfbb6eed8e7aa03b138556eedaf5d271a5e1e43ef", "0xc438b0c0e80a8fa1b36898d1b36a3fc2ec371c54", "BLEP", 18, "100000000000000000000", 100.0, 0.003914016905260998] ], "rows": 298 // ... additional rows omitted for brevity }] ``` The whitelisted filter helps focus on established tokens while filtering out potential spam or low-value tokens from the complete holdings list. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/evm/tvl/status" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/evm/tvl/status") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Cambrian API: Top token holders **Endpoint:** /api/v1/evm/tvl/top-owners # Top Token Holders This endpoint returns the top token holders for a given EVM token address, providing comprehensive holder information including balance amounts, USD values, and token details. ## Business Value - **Portfolio Analysis**: Identify whale wallets and major token holders for investment research and risk assessment - **Token Distribution**: Analyze token concentration and decentralization metrics for due diligence - **Market Intelligence**: Track large holder movements to anticipate potential market impacts - **Risk Management**: Monitor concentration risk by identifying addresses holding significant portions of token supply - **Competitive Analysis**: Research major stakeholders and institutional holders across different tokens ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/evm/tvl/top-owners ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | token_address | string | Yes | - | The contract address of the token to analyze | | limit | integer | No | 20 | Maximum number of results to return (1-1000) | | offset | integer | No | 0 | Number of results to skip for pagination (0-100000) | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | ownerAddress | String | The wallet address of the token holder | | tokenAddress | String | The contract address of the token being analyzed | | tokenSymbol | String | The symbol of the token (e.g., ODOS) | | tokenDecimals | Integer | Number of decimal places for the token | | tokenAmountRaw | String | Raw token balance (without decimal adjustment) | | tokenAmountUI | Float | Human-readable token balance (adjusted for decimals) | | valueUSD | Float | USD value of the token holdings | ## Examples ### 1. Get Top ODOS Token Holders This example demonstrates how to retrieve the top 20 holders of the ODOS token on the Ethereum network. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/tvl/top-owners?token_address=0xca73ed1815e5915489570014e024b7ebe65de679" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "ownerAddress", "type": "FixedString(42)" }, { "name": "tokenAddress", "type": "FixedString(42)" }, { "name": "tokenSymbol", "type": "String" }, { "name": "tokenDecimals", "type": "UInt8" }, { "name": "tokenAmountRaw", "type": "Int256" }, { "name": "tokenAmountUI", "type": "Float64" }, { "name": "valueUSD", "type": "Float64" } ], "data": [ [ "0xae82febe00a21257ee813cfe2f913dcaa973d33b", "0xca73ed1815e5915489570014e024b7ebe65de679", "ODOS", 18, "4372541660419060000000000025", 4372541660.41906, 8090772.497011255 ], [ "0x9d1e93bbc148fe7b19eb9ec22a5be4b75b57239f", "0xca73ed1815e5915489570014e024b7ebe65de679", "ODOS", 18, "2666692701388850000000000011", 2666692701.38885, 4934339.256657825 ], [ "0x32235fe0b39849ddff11bce74d93bf981c9fe5ea", "0xca73ed1815e5915489570014e024b7ebe65de679", "ODOS", 18, "624198753440077822809615472", 624198753.4400778, 1154991.8786863382 ], [ "0x7ec74ce1ff4c7c2b0bc2bc2f64ac8481db616b34", "0xca73ed1815e5915489570014e024b7ebe65de679", "ODOS", 18, "458314999999999999999999992", 458315000.0, 848047.3566516759 ], [ "0xc3681709ee476308b45812eabe0eb22f3b816880", "0xca73ed1815e5915489570014e024b7ebe65de679", "ODOS", 18, "366912550616272296679812715", 366912550.6162723, 678919.997539801 ] ], "rows": 20 // ... additional rows omitted for brevity } ``` The response shows the top 5 ODOS token holders (truncated from 20 total results). The largest holder owns over 4.3 billion ODOS tokens worth approximately $8.09 million USD, while the fifth-largest holder owns about 366 million tokens worth $678,920 USD. ### 2. Get Top 5 Token Holders with Pagination This example demonstrates how to limit results and use pagination to get only the top 5 holders. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/tvl/top-owners?token_address=0xca73ed1815e5915489570014e024b7ebe65de679&limit=5&offset=0" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "ownerAddress", "type": "FixedString(42)" }, { "name": "tokenAddress", "type": "FixedString(42)" }, { "name": "tokenSymbol", "type": "String" }, { "name": "tokenDecimals", "type": "UInt8" }, { "name": "tokenAmountRaw", "type": "Int256" }, { "name": "tokenAmountUI", "type": "Float64" }, { "name": "valueUSD", "type": "Float64" } ], "data": [ [ "0xae82febe00a21257ee813cfe2f913dcaa973d33b", "0xca73ed1815e5915489570014e024b7ebe65de679", "ODOS", 18, "4372541660419060000000000025", 4372541660.41906, 8090772.497011255 ], [ "0x9d1e93bbc148fe7b19eb9ec22a5be4b75b57239f", "0xca73ed1815e5915489570014e024b7ebe65de679", "ODOS", 18, "2666692701388850000000000011", 2666692701.38885, 4934339.256657825 ], [ "0x32235fe0b39849ddff11bce74d93bf981c9fe5ea", "0xca73ed1815e5915489570014e024b7ebe65de679", "ODOS", 18, "624198753440077822809615472", 624198753.4400778, 1154991.8786863382 ], [ "0x7ec74ce1ff4c7c2b0bc2bc2f64ac8481db616b34", "0xca73ed1815e5915489570014e024b7ebe65de679", "ODOS", 18, "458314999999999999999999992", 458315000.0, 848047.3566516759 ], [ "0xc3681709ee476308b45812eabe0eb22f3b816880", "0xca73ed1815e5915489570014e024b7ebe65de679", "ODOS", 18, "366912550616272296679812715", 366912550.6162723, 678919.997539801 ] ], "rows": 20 } ``` This response shows exactly 5 token holders as requested, providing focused data on the largest holders without overwhelming detail. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/evm/tvl/top-owners" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/evm/tvl/top-owners") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/evm/tvl/status` - Returns the tokens held by a specific address - `/api/v1/evm/tokens` - Returns list of all whitelisted EVM tokens with contract addresses - `/api/v1/evm/price-current` - Returns current price of an EVM token - `/api/v1/evm/price-hour` - Returns historical hourly price data for EVM tokens - `/api/v1/evm/dexes` - List of supported DEXes on EVM compatible chains --- ## Cambrian API: V3 - Pool Info **Endpoint:** /api/v1/evm/uniswap/v3/pool # Uniswap V3 Pool Information Retrieves comprehensive information about a specific Uniswap V3 pool, including token details, liquidity metrics, trading volume, and fee statistics across multiple time periods. ## Business Value - **Real-time Pool Analytics**: Access live pool data including current price, liquidity, and tick information for trading decisions - **Historical Performance Metrics**: Track swap volume, fee APR, and utilization across multiple timeframes (5min to 1 year) - **Risk Assessment**: Monitor pool TVL and tick utilization to evaluate investment opportunities and market conditions - **Trading Optimization**: Use current tick and price data to optimize position management and entry/exit strategies - **Portfolio Management**: Track pool performance metrics to make informed liquidity provision decisions ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/evm/uniswap/v3/pool ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | pool_address | String | Yes | - | Pool address with 0x prefix (e.g., 0xd0b53D9277642d899DF5C87A3966A349A798F224) | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | createdAt | DateTime | Pool creation timestamp in UTC | | token0Address | String | Address of the first token in the pool | | token0Symbol | String | Symbol of the first token (e.g., WETH) | | token0Decimals | Integer | Number of decimal places for token0 | | token1Address | String | Address of the second token in the pool | | token1Symbol | String | Symbol of the second token (e.g., USDC) | | token1Decimals | Integer | Number of decimal places for token1 | | feeTier | Integer | Pool fee tier in basis points (e.g., 500 = 0.05%) | | tickSpacing | Integer | Spacing between usable ticks in the pool | | currentLiquidity | String | Current available liquidity in the pool | | currentSqrtPriceX96 | String | Current sqrt price in X96 format | | currentTick | Integer | Current active tick in the pool | | currentPoolPrice | Float | Current pool price as a decimal number | | poolTvlUSD | Float | Total value locked in the pool in USD | | swapVolumeUSD | Object | Swap volume in USD across different time periods | | feeApr | Object | Fee APR percentages across different time periods | | tickUtilization | Object | Tick utilization percentages across different time periods | | swapCount | Object | Number of swaps across different time periods | | uniqueUserCount | Object | Number of unique users across different time periods | ## Examples ### 1. Get WETH/USDC Pool Information This example retrieves comprehensive data for the popular WETH/USDC pool on Base, including current liquidity, pricing, and historical metrics. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/uniswap/v3/pool?pool_address=0xd0b53D9277642d899DF5C87A3966A349A798F224" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ {"name": "createdAt", "type": "DateTime('UTC')"}, {"name": "token0Address", "type": "LowCardinality(FixedString(42))"}, {"name": "token0Symbol", "type": "String"}, {"name": "token0Decimals", "type": "UInt8"}, {"name": "token1Address", "type": "LowCardinality(FixedString(42))"}, {"name": "token1Symbol", "type": "String"}, {"name": "token1Decimals", "type": "UInt8"}, {"name": "feeTier", "type": "UInt32"}, {"name": "tickSpacing", "type": "Int32"}, {"name": "currentLiquidity", "type": "UInt128"}, {"name": "currentSqrtPriceX96", "type": "UInt256"}, {"name": "currentTick", "type": "Int32"}, {"name": "currentPoolPrice", "type": "Float64"}, {"name": "poolTvlUSD", "type": "Float64"}, {"name": "swapVolumeUSD", "type": "Map(String,Float64)"}, {"name": "feeApr", "type": "Map(String,Float64)"}, {"name": "tickUtilization", "type": "Map(String,Float64)"}, {"name": "swapCount", "type": "Map(String,UInt64)"}, {"name": "uniqueUserCount", "type": "Map(String,UInt64)"} ], "data": [ [ "2023-09-06T19:56:01+00:00", "0x4200000000000000000000000000000000000006", "WETH", 18, "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "USDC", 6, 500, 10, 2288097067329611632, "4347881336294143023152793", -196218, 3.0115924373066446e-9, 24560981.330167037, {"'1 day'": 43331955.69863482, "'1 hour'": 1185339.7780282698, "'1 month'": 1099001415.5495903, "'1 week'": 255841732.68311626, "'1 year'": 24680493165.88985, "'5 minute'": 0.0}, {"'1 day'": 32.19774409130692, "'1 hour'": 21.138358268230128, "'1 month'": 26.84749605341888, "'1 week'": 27.08314036943972, "'1 year'": 50.2432961332372, "'5 minute'": 0.0}, {"'1 day'": 0.33333333333333337, "'1 hour'": 0.0, "'1 month'": 2.8555555555555556, "'1 week'": 6.869047619047619, "'1 year'": 11.39132420091324, "'5 minute'": 0.0}, {"'1 day'": 65032, "'1 hour'": 1538, "'1 month'": 1438036, "'1 week'": 553897, "'1 year'": 18592377, "'5 minute'": 0}, {"'1 day'": 65032, "'1 hour'": 370, "'1 month'": 54527, "'1 week'": 16866, "'1 year'": 674245, "'5 minute'": 0} ] ], "rows": 1 } ``` This response shows detailed information for the WETH/USDC pool with a 0.05% fee tier. The pool has significant liquidity (~$24.5M TVL) and shows healthy trading activity with over 65k daily swaps. The fee APR ranges from 21-32% across different timeframes, indicating attractive yield opportunities for liquidity providers. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/evm/uniswap/v3/pool" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/evm/uniswap/v3/pool") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/evm/uniswap/v3/pools` - Returns a list of all Uniswap V3 liquidity pools, including token pairs, fee tiers, and creation timestamps - `/api/v1/evm/price-current` - Returns current price of a token calculated based on Uniswap V3 and clones liquidity pools - `/api/v1/evm/aero/v3/pool` - Returns pool information for Aerodrome V3 pools with similar metrics to Uniswap V3 - `/api/v1/evm/sushi/v3/pool` - Returns pool information for SushiSwap V3 pools with comparable data structure - `/api/v1/evm/pancake/v3/pool` - Returns pool information for PancakeSwap V3 pools with identical metrics structure --- ## Cambrian API: V3 - List Pools **Endpoint:** /api/v1/evm/uniswap/v3/pools # Uniswap V3 Pools Returns a comprehensive list of all Uniswap V3 liquidity pools, including token pairs, fee tiers, and creation timestamps. This endpoint provides access to pool data across different EVM chains. ## Business Value - **Pool Discovery**: Find available liquidity pools for specific token pairs on Uniswap V3 - **Market Analysis**: Analyze liquidity distribution and fee structures across different pools - **DeFi Integration**: Access pool addresses and metadata for smart contract interactions - **Token Research**: Discover new token pairs and their associated liquidity pools - **Historical Tracking**: Monitor pool creation patterns and market evolution over time ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/evm/uniswap/v3/pools ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | token_address | string | No | - | Pool token address. See tokens for valid addresses. Must match pattern: ^0x[a-fA-F0-9]{40}$ | | limit | integer | No | 100 | Limit the number of results. Range: 1-1000 | | offset | integer | No | 0 | Offset the results, allows you to skip a number of rows before starting to return rows. Range: 0-100000 | | order_asc | array | No | - | List of column names to order by in ascending order divided by comma. Available columns: chainId, dexAddress, dexName, poolAddress, token0Address, token0Symbol, token0Decimals, token1Address, token1Symbol, token1Decimals, createdAt, fee, tickSpacing | | order_desc | array | No | - | List of column names to order by in descending order divided by comma. Available columns: chainId, dexAddress, dexName, poolAddress, token0Address, token0Symbol, token0Decimals, token1Address, token1Symbol, token1Decimals, createdAt, fee, tickSpacing | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | chainId | UInt32 | The blockchain network identifier (e.g., 8453 for Base) | | dexAddress | FixedString(42) | The address of the Uniswap V3 DEX contract | | dexName | String | The name of the decentralized exchange (UniswapV3) | | poolAddress | FixedString(42) | The unique address of the liquidity pool contract | | token0Address | FixedString(42) | The contract address of the first token in the pair | | token0Symbol | String | The symbol/ticker of the first token | | token0Decimals | UInt8 | The number of decimal places for the first token | | token1Address | FixedString(42) | The contract address of the second token in the pair | | token1Symbol | String | The symbol/ticker of the second token | | token1Decimals | UInt8 | The number of decimal places for the second token | | createdAt | DateTime('UTC') | The timestamp when the pool was created | | fee | UInt32 | The fee tier for the pool (e.g., 300 = 0.03%, 3000 = 0.3%, 10000 = 1.0%) | | tickSpacing | Int32 | The spacing between initializable ticks in the pool | ## Examples ### 1. Get All Pools (Default Query) Retrieves the most recent Uniswap V3 pools with default pagination settings. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/uniswap/v3/pools" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "chainId", "type": "UInt32" }, { "name": "dexAddress", "type": "LowCardinality(FixedString(42))" }, { "name": "dexName", "type": "String" }, { "name": "poolAddress", "type": "FixedString(42)" }, { "name": "token0Address", "type": "LowCardinality(FixedString(42))" }, { "name": "token0Symbol", "type": "String" }, { "name": "token0Decimals", "type": "UInt8" }, { "name": "token1Address", "type": "LowCardinality(FixedString(42))" }, { "name": "token1Symbol", "type": "String" }, { "name": "token1Decimals", "type": "UInt8" }, { "name": "createdAt", "type": "DateTime('UTC')" }, { "name": "fee", "type": "UInt32" }, { "name": "tickSpacing", "type": "Int32" } ], "data": [ [ 8453, "0x33128a8fc17869897dce68ed026d694621f6fdfd", "UniswapV3", "0x9fb68dff35bcc31ff1c1a30c7c0d5f6a3b873bd2", "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "USDC", 6, "0xab6363da0c80cef3ae105bd6241e30872355d021", "ROLL", 18, "2026-01-28T12:03:49+00:00", 300, 6 ], [ 8453, "0x33128a8fc17869897dce68ed026d694621f6fdfd", "UniswapV3", "0x1e3799a69d2604e619799e5a3152561fd6f49cdc", "0x121d60c4b32cff9b464cba68cb3c5def8319e0d0", "Pow", 18, "0x4200000000000000000000000000000000000006", "WETH", 18, "2026-01-28T11:42:47+00:00", 10000, 200 ], [ 8453, "0x33128a8fc17869897dce68ed026d694621f6fdfd", "UniswapV3", "0x66038115e71f188496bca81d773ede248b66440f", "0x36e7fa3db5be6b23ee03fc5fbb33a32a5356f34b", "GoldClawd", 18, "0x4200000000000000000000000000000000000006", "WETH", 18, "2026-01-28T11:28:53+00:00", 10000, 200 ], [ 8453, "0x33128a8fc17869897dce68ed026d694621f6fdfd", "UniswapV3", "0xdfb75da0fb4b7c377e6b9827c8e6757b7f5ab387", "0x4200000000000000000000000000000000000006", "WETH", 18, "0xf77b5b6dc79140f4b1a157be63e68b38b52d5b07", "Krydbz1ne", 18, "2026-01-28T11:24:23+00:00", 100, 1 ], [ 8453, "0x33128a8fc17869897dce68ed026d694621f6fdfd", "UniswapV3", "0x340b596f452f338a21efc060322d83e42c0d38a2", "0x4200000000000000000000000000000000000006", "WETH", 18, "0xdd9362cc633cd227531007ec7ce21ed0980b96c3", "FACESS", 18, "2026-01-28T11:23:17+00:00", 3000, 60 ] ], "rows": 5 // ... additional rows omitted for brevity } ``` This shows the 5 most recent Uniswap V3 pools on the Base network (chainId 8453), including various token pairs like USDC/ROLL, Pow/WETH, and others with their respective fee tiers and creation timestamps. ### 2. Filter by Token Address Finds all pools containing a specific token address (WETH in this example). ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/evm/uniswap/v3/pools?token_address=0x4200000000000000000000000000000000000006&limit=10" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [...], "data": [...], "rows": 10 } ``` This would return only pools that contain WETH (Wrapped Ethereum) as either token0 or token1, limited to 10 results. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/evm/uniswap/v3/pools" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/evm/uniswap/v3/pools") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/evm/uniswap/v3/pool` - Returns current pool TVL, Swap Volume, Fees APR, Price Tick Utilization, Number of Swaps and Unique users for recent time ranges - `/api/v1/evm/price-current` - Returns current price of a token calculated based on Uniswap V3 and clones liquidity pools - `/api/v1/evm/aero/v3/pools` - Returns a list of all Aerodrome V3 liquidity pools with token pairs, fee tiers, and creation timestamps - `/api/v1/evm/pancake/v3/pools` - Returns a list of all PancakeSwap V3 liquidity pools with token pairs, fee tiers, and creation timestamps - `/api/v1/evm/alien/v3/pools` - Returns a list of all AlienSwap V3 liquidity pools with token pairs, fee tiers, and creation timestamps --- ## Cambrian API: Calculate Liquidation Risk **Endpoint:** /api/v1/perp-risk-engine # Perpetual Risk Engine (Solana) Calculates liquidation risk probability for leveraged crypto positions using Monte Carlo simulations with historical price data. The engine supports both long and short positions for Solana tokens with configurable risk horizons, providing comprehensive risk metrics including liquidation prices, volatility analysis, and probability distributions to help traders assess and manage their leveraged exposure. ## Business Value - **Risk Management**: Quantify exact liquidation probabilities before entering leveraged positions to prevent unexpected losses - **Position Sizing**: Optimize leverage levels based on statistical risk assessments and personal risk tolerance - **Market Intelligence**: Understand volatility dynamics and price drift patterns for different tokens across various timeframes - **Trading Strategy**: Make data-driven decisions on entry points, stop losses, and position duration based on probabilistic outcomes - **Capital Preservation**: Avoid overleveraging by visualizing risk distributions and understanding sigma-based safety margins ## Endpoint Details **URL**: ``` https://risk.cambrian.network/api/v1/perp-risk-engine ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | token_address | string | Yes | - | Solana token address for risk calculation | | entry_price | number | Yes | - | Entry price in USD (must be greater than 0) | | leverage | number | Yes | - | Leverage multiplier (1-1000) | | direction | string | Yes | - | Position direction: "long" or "short" | | risk_horizon | string | Yes | - | Risk time horizon: "1h", "1d", "1w", or "1mo" | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | status | string | Status of the calculation ("success" or error message) | | riskProbability | number | Probability of liquidation (0.0 to 1.0) | | liquidationPrice | number | Price at which position will be liquidated | | entryPrice | number | Entry price used for calculation | | volatility | number | Historical volatility of the token | | drift | number | Price drift/trend coefficient | | priceChangeNeeded | number | Percentage price change needed for liquidation | | sigmasAway | number | Number of standard deviations to liquidation | | simulationDetails | object | Details about the Monte Carlo simulation | | simulationDetails.totalSimulations | integer | Number of simulation paths run | | simulationDetails.liquidatedPaths | integer | Number of paths that resulted in liquidation | | simulationDetails.dataPointsUsed | integer | Historical data points used for calculation | | simulationDetails.dataInterval | string | Time interval of historical data | | simulationDetails.riskHorizon | string | Risk horizon used for simulation | | visualizationData | object | Histogram data for probability visualization | | visualizationData.histogram.bins | array | Price bin boundaries for distribution | | visualizationData.histogram.counts | array | Frequency counts for each price bin | ## Examples ### 1. Low-Risk Conservative Position This example calculates risk for a conservative USDC position with 10x leverage over a 1-day horizon, demonstrating extremely low liquidation probability due to stablecoin's minimal volatility. ```bash curl -X GET "https://risk.cambrian.network/api/v1/perp-risk-engine?token_address=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&entry_price=2800&leverage=10&direction=long&risk_horizon=1d" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "status": "success", "riskProbability": 0.0, "liquidationPrice": 2519.8038627038927, "entryPrice": 2800.0, "volatility": 0.020297197762573476, "drift": -0.00999827935661967, "priceChangeNeeded": 0.10007004903432402, "sigmasAway": 94.1920961080266, "simulationDetails": { "totalSimulations": 10000, "liquidatedPaths": 0, "dataPointsUsed": 672, "dataInterval": "variable", "riskHorizon": "1d" }, "visualizationData": { "histogram": { "bins": [2789.7353515625, 2790.1640625, 2790.5927734375, ...], "counts": [1, 4, 5, 10, 9, 19, 32, 34, 61, 67, ...] } } } ``` The results show zero liquidation risk with the position being 94.19 standard deviations away from liquidation. The liquidation price of $2,519.80 requires a 10% drop from the $2,800 entry, which is extremely unlikely for USDC given its 0.02% daily volatility. ### 2. High-Risk Leveraged Position This example demonstrates a high-risk BONK position with 20x leverage over a 1-week horizon, showing significant liquidation probability due to the token's high volatility. ```bash curl -X GET "https://risk.cambrian.network/api/v1/perp-risk-engine?token_address=DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263&entry_price=0.00005&leverage=20&direction=long&risk_horizon=1w" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "status": "success", "riskProbability": 0.7852, "liquidationPrice": 0.0000474982487741419, "entryPrice": 0.00005, "volatility": 0.9863634655060765, "drift": -3.154615032558206, "priceChangeNeeded": 0.050035024517161984, "sigmasAway": 0.36629800332352735, "simulationDetails": { "totalSimulations": 10000, "liquidatedPaths": 7852, "dataPointsUsed": 505, "dataInterval": "variable", "riskHorizon": "1w" }, "visualizationData": { "histogram": { "bins": [0.000028527352696983144, 0.00002955128002213314, ...], "counts": [1, 5, 8, 19, 36, 49, 73, 146, ...] } } } ``` The analysis reveals a 78.52% liquidation probability over one week, with the position only 0.37 standard deviations from liquidation. BONK's 98.64% weekly volatility combined with negative drift (-3.15%) creates extreme risk for this 20x leveraged position. ### 3. Short Position Risk Assessment This example calculates risk for a SOL short position with 5x leverage over a 1-day horizon, useful for swing trading strategies. ```bash curl -X GET "https://risk.cambrian.network/api/v1/perp-risk-engine?token_address=So11111111111111111111111111111111111111112&entry_price=250&leverage=5&direction=short&risk_horizon=1d" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "status": "success", "riskProbability": 0.0, "liquidationPrice": 300.035024517162, "entryPrice": 250.0, "volatility": 0.5233420309674812, "drift": 0.41767783160586225, "priceChangeNeeded": 0.20014009806864805, "sigmasAway": 7.306256670581608, "simulationDetails": { "totalSimulations": 10000, "liquidatedPaths": 0, "dataPointsUsed": 563, "dataInterval": "variable", "riskHorizon": "1d" }, "visualizationData": { "histogram": { "bins": [227.99673461914062, 228.99478149414062, ...], "counts": [7, 3, 10, 13, 20, 13, 43, 58, ...] } } } ``` The short position shows zero liquidation risk over the 1-day timeframe, with liquidation occurring only if SOL rises 20% to $300. Being 7.3 standard deviations away from liquidation indicates very low risk for this swing trade despite SOL's 52% daily volatility. ### 4. Long-Term Investment Risk This example evaluates a conservative Bitcoin (WBTC) position with 3x leverage over a 1-month horizon, suitable for longer-term positioning. ```bash curl -X GET "https://risk.cambrian.network/api/v1/perp-risk-engine?token_address=3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh&entry_price=100000&leverage=3&direction=long&risk_horizon=1mo" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "status": "success", "riskProbability": 0.0, "liquidationPrice": 66643.31698855865, "entryPrice": 100000.0, "volatility": 0.28422430277073213, "drift": 0.1423535200897734, "priceChangeNeeded": 0.33356683011441346, "sigmasAway": 4.09361931347371, "simulationDetails": { "totalSimulations": 10000, "liquidatedPaths": 0, "dataPointsUsed": 541, "dataInterval": "variable", "riskHorizon": "1mo" }, "visualizationData": { "histogram": { "bins": [76875.0078125, 78068.484375, 79261.953125, ...], "counts": [5, 6, 14, 16, 16, 40, 67, 87, ...] } } } ``` With 3x leverage on WBTC, the position shows zero liquidation risk over one month, requiring a 33.36% drop to $66,643 for liquidation. The positive drift (14.24%) and moderate volatility (28.42%) suggest favorable conditions for this conservative leveraged investment, being 4.09 standard deviations from liquidation. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/perp-risk-engine" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/perp-risk-engine") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Cambrian API: Holder Token Balances (USD) **Endpoint:** /api/v1/solana/holder-token-balances # Holder Token Balances (USD) This endpoint returns token balances in USD for a specific user wallet, sorted by balance descending. It provides comprehensive information about all tokens held in a wallet along with their current USD values. ## Business Value - **Portfolio Management**: Track the complete token portfolio value across different assets for investment analysis - **Risk Assessment**: Monitor token concentration and diversification for risk management purposes - **Financial Reporting**: Generate accurate USD valuations for accounting and tax reporting requirements - **Trading Decisions**: Make informed trading decisions based on current holdings and their market values - **Wealth Tracking**: Monitor overall portfolio performance and changes in token values over time ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/holder-token-balances ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | wallet_address | string | Yes | - | Wallet address | | limit | integer | No | 10 | Limit the number of results (max: 1000) | | offset | integer | No | 0 | Offset the results, allows you to skip a number of rows before starting to return rows (max: 100000) | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | tokenAddress | FixedString(44) | The token mint address on Solana | | balanceRaw | UInt64 | The raw token balance in smallest units | | balanceUSD | Float64 | The USD value of the token balance | ## Examples ### 1. Get Wallet Token Balances This example demonstrates retrieving token balances for a wallet address with their USD values. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/holder-token-balances?wallet_address=7VHUFJHWu2CuExkJcJrzhQPJ2oygupTWkL2A2For4BmE" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "tokenAddress", "type": "FixedString(44)" }, { "name": "balanceRaw", "type": "UInt64" }, { "name": "balanceUSD", "type": "Float64" } ], "data": [ [ "8g6gvq5r9VEBN5bSBsNMWZepAEFhHYSZCqBP8SysF2mw", 990000000000000, 990397108.4939067 ], [ "CA4ppFfrVWPsBPY1BezLhY7vnY1qtjhfNPoqb56fLGtw", 510000000000000, 413886588.9342 ], [ "AQCq97gywgAvsUVMr1SMYCq1pu541evPEPUcXfG8tWsn", 50000000000000000, 208488703.50445488 ], [ "GtfLRA4B3D6bD3VaoH7AsNY5CNkWSfd3EAmK4E26okoh", 80000000000000, 150730665.0256998 ], [ "CXkcNZBF1urkFVrdp62EVosMQsdewGQFmZZQkC9aPjtS", 50000000000000, 50271465.935735546 ] ], "rows": 5 // ... additional rows omitted for brevity } ``` The response shows the wallet's top 5 token holdings by USD value, with the largest holding being worth approximately $990 million USD. ### 2. Get Limited Token Holdings This example demonstrates retrieving only the top 3 token holdings for the wallet. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/holder-token-balances?wallet_address=7VHUFJHWu2CuExkJcJrzhQPJ2oygupTWkL2A2For4BmE&limit=3" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "tokenAddress", "type": "FixedString(44)" }, { "name": "balanceRaw", "type": "UInt64" }, { "name": "balanceUSD", "type": "Float64" } ], "data": [ [ "8g6gvq5r9VEBN5bSBsNMWZepAEFhHYSZCqBP8SysF2mw", 990000000000000, 990397108.4939067 ], [ "CA4ppFfrVWPsBPY1BezLhY7vnY1qtjhfNPoqb56fLGtw", 510000000000000, 413886588.9342 ], [ "AQCq97gywgAvsUVMr1SMYCq1pu541evPEPUcXfG8tWsn", 50000000000000000, 208488703.50445488 ] ], "rows": 3 } ``` The response returns only the top 3 token holdings, showing a total value of over $1.6 billion USD across these top assets. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/holder-token-balances" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/holder-token-balances") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/ohlcv/token` - Retrieve Open, High, Low, Close, and Volume data for any SPL token - `/api/v1/solana/orca/pools/fee-metrics` - Retrieves core metrics like fees, volume, TVL in USD, and Fee APR for Orca Whirlpools - `/api/v1/solana/pool-transactions` - Retrieve paginated list of trades/transactions for a specified Solana pool address - `/api/v1/solana/ohlcv/pool` - Retrieve OHLCV data for individual pool contracts enabling pair-specific price analysis - `/api/v1/solana/pool-transactions-time-bounded` - Get detailed transaction data for SPL tokens across major Solana DEXs with timestamp filtering --- ## Cambrian API: Latest Block Number and Time **Endpoint:** /api/v1/solana/latest-block # Latest Block Number and Time This endpoint returns the latest block number and block time for the Solana blockchain. It provides real-time information about the most recently processed block, including the block number, Unix timestamp, and UTC timestamp. ## Business Value - **Real-time Monitoring**: Track the current state of the Solana blockchain with up-to-date block information - **Synchronization**: Ensure applications are synchronized with the latest blockchain state - **Latency Measurement**: Calculate blockchain processing delays by comparing block times with current time - **Health Checks**: Monitor blockchain network health and block production rates - **Data Pipeline**: Use as a reference point for blockchain data processing and ETL operations ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/latest-block ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | - | - | - | - | No parameters required | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | blockNumber | UInt64 | The latest block number on Solana | | blockUnixTime | UInt32 | Unix timestamp of the latest block | | blockUTCTime | String | UTC timestamp of the latest block in ISO 8601 format | ## Examples ### 1. Get Latest Block Information This example demonstrates how to retrieve the current latest block information from Solana. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/latest-block" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "blockNumber", "type": "UInt64" }, { "name": "blockUnixTime", "type": "UInt32" }, { "name": "blockUTCTime", "type": "String" } ], "data": [ [ 392362393, 1767967687, "2026-01-09T14:08:07Z" ] ], "rows": 1 } ``` The response shows the latest block number 392362393, which was processed at Unix timestamp 1767967687 (2026-01-09T14:08:07Z). ### 2. Monitor Blockchain Health This example shows how to use the latest block endpoint for blockchain health monitoring. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/latest-block" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "blockNumber", "type": "UInt64" }, { "name": "blockUnixTime", "type": "UInt32" }, { "name": "blockUTCTime", "type": "String" } ], "data": [ [ 392362393, 1767967687, "2026-01-09T14:08:07Z" ] ], "rows": 1 } ``` You can compare the block timestamp with the current time to measure blockchain processing latency and ensure the network is functioning properly. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/latest-block" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/latest-block") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/price-current` - Retrieves the latest available USD price for a given Solana token program address - `/api/v1/solana/price-unix` - Retrieve historical price data for a specified Solana token at the nearest hour to a specific Unix timestamp - `/api/v1/solana/pool-transactions-time-bounded` - Get detailed transaction data for any SPL token across major Solana DEXs with precise Unix timestamp filtering - `/api/v1/solana/ohlcv/token` - Retrieve Open, High, Low, Close, and Volume data for any SPL token - `/api/v1/solana/tokens/holders-over-time` - Returns a list of accounts holding a specific token providing snapshots at specified block intervals --- ## Cambrian API: Pool Info **Endpoint:** /api/v1/solana/meteora-dlmm/pool # Meteora Pool Information This endpoint returns basic pool information for a Meteora DLMM (Dynamic Liquidity Market Maker) pool on Solana. It provides comprehensive pool metrics including TVL, fees, volume, and trading statistics. ## Business Value - **Pool Analysis**: Get comprehensive metrics for any Meteora DLMM pool including liquidity, fees, and volume data - **Trading Intelligence**: Access real-time pricing, volatility metrics, and active bin information for informed trading decisions - **Liquidity Provider Insights**: Monitor pool utilization, APR, and fee generation to optimize liquidity provision strategies - **Market Research**: Track pool creation dates, token pairs, and trading activity for market analysis - **Risk Assessment**: Evaluate price volatility and utilization metrics for risk management ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/meteora-dlmm/pool ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | pool_address | string | Yes | - | Pool identifier (Meteora DLMM pool address) | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | chainId | UInt16 | Chain identifier (900 for Solana) | | dexName | String | DEX name (Meteora) | | poolAddress | FixedString(44) | Address of the pool contract | | createdAt | DateTime('UTC') | Pool creation timestamp | | token0Address | FixedString(44) | Address of the first token in the pair | | token0Symbol | String | Symbol of the first token | | token0Decimals | UInt8 | Decimal places for the first token | | token1Address | FixedString(44) | Address of the second token in the pair | | token1Symbol | String | Symbol of the second token | | token1Decimals | UInt8 | Decimal places for the second token | | activeBinId | Int32 | Current active bin ID for price discovery | | currentPrice | Float64 | Current price of token0 in terms of token1 | | lastSwapTime | DateTime('UTC') | Timestamp of the last swap transaction | | reserve0Address | FixedString(44) | Reserve address for token0 | | reserve1Address | FixedString(44) | Reserve address for token1 | | token0PriceUSD | Float64 | USD price of token0 | | token1PriceUSD | Float64 | USD price of token1 | | tvlToken0 | Float64 | Total value locked in token0 | | tvlToken1 | Float64 | Total value locked in token1 | | tvlUSD | Float64 | Total value locked in USD | | feesToken0 | Float64 | Total fees collected in token0 | | feesToken1 | Float64 | Total fees collected in token1 | | fees24h | Float64 | Fees collected in the last 24 hours (USD) | | volumeToken0 | Float64 | Total volume in token0 | | volumeToken1 | Float64 | Total volume in token1 | | volume24h | Float64 | Trading volume in the last 24 hours (USD) | | apr24h | Float64 | Annualized percentage return over 24 hours | | swaps24h | UInt64 | Number of swaps in the last 24 hours | | binsUsed24h | UInt64 | Number of bins used in the last 24 hours | | priceVolatility | Float64 | Price volatility metric | | utilization24h | Float64 | Pool utilization percentage over 24 hours | ## Examples ### 1. Get SOL/USDC Pool Information Retrieve detailed information for the SOL/USDC Meteora DLMM pool. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/meteora-dlmm/pool?pool_address=5rCf1DM8LjKTw4YqhnoLcngyZYeNnQqztScTogYHAS6" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "chainId", "type": "UInt16" }, { "name": "dexName", "type": "String" }, { "name": "poolAddress", "type": "FixedString(44)" }, { "name": "createdAt", "type": "DateTime('UTC')" }, { "name": "token0Address", "type": "FixedString(44)" }, { "name": "token0Symbol", "type": "String" }, { "name": "token0Decimals", "type": "UInt8" }, { "name": "token1Address", "type": "FixedString(44)" }, { "name": "token1Symbol", "type": "String" }, { "name": "token1Decimals", "type": "UInt8" }, { "name": "activeBinId", "type": "Int32" }, { "name": "currentPrice", "type": "Float64" }, { "name": "lastSwapTime", "type": "DateTime('UTC')" }, { "name": "reserve0Address", "type": "FixedString(44)" }, { "name": "reserve1Address", "type": "FixedString(44)" }, { "name": "token0PriceUSD", "type": "Float64" }, { "name": "token1PriceUSD", "type": "Float64" }, { "name": "tvlToken0", "type": "Float64" }, { "name": "tvlToken1", "type": "Float64" }, { "name": "tvlUSD", "type": "Float64" }, { "name": "feesToken0", "type": "Float64" }, { "name": "feesToken1", "type": "Float64" }, { "name": "fees24h", "type": "Float64" }, { "name": "volumeToken0", "type": "Float64" }, { "name": "volumeToken1", "type": "Float64" }, { "name": "volume24h", "type": "Float64" }, { "name": "apr24h", "type": "Float64" }, { "name": "swaps24h", "type": "UInt64" }, { "name": "binsUsed24h", "type": "UInt64" }, { "name": "priceVolatility", "type": "Float64" }, { "name": "utilization24h", "type": "Float64" } ], "data": [ [ 900, "Meteora", "5rCf1DM8LjKTw4YqhnoLcngyZYeNnQqztScTogYHAS6", "2024-03-30T02:47:42+00:00", "So11111111111111111111111111111111111111112", "SOL", 9, "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "USDC", 6, -5161, 126.94679338040754, "2026-01-28T14:06:13+00:00", "EYj9xKw6ZszwpyNibHY7JD5o3QgTVrSdcBp1fMJhrR9o", "CoaxzEh8p5YyGLcj36Eo3cUThVJxeKCs7qvLAGDYwBcz", 126.91424121601018, 1.0, 14649.705591441, 574395.887444, 2433652.1566196764, 27.681777437, 3629.115885, 7142.327663927326, 133869.961241908, 16884232.582765, 16990004.552633446, 107.120879631151, 9765, 97, 25.08146729369073, 100.0 ] ], "rows": 1 } ``` This response shows comprehensive information for the SOL/USDC Meteora pool with over $2.4M in TVL, recent trading activity of $17M in 24h volume, and a 107% APR. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/meteora-dlmm/pool" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/meteora-dlmm/pool") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/ohlcv/pool` - Retrieve OHLCV data for individual pool contracts - `/api/v1/solana/ohlcv/base-quote` - Get granular OHLCV data with separate base and quote token volumes - `/api/v1/solana/orca/pools` - Retrieve list of all Orca pools - `/api/v1/solana/pool-transactions` - Get pool transaction data - `/api/v1/solana/orca/pools/fee-metrics` - Get core metrics for Orca Whirlpools --- ## Cambrian API: Meteora Pool Info (Multi) **Endpoint:** /api/v1/solana/meteora-dlmm/pool-multi # Meteora Pool Multi Get comprehensive overview metrics for multiple pools/pairs simultaneously within the same DEX. Returns pool details including price, volume, trades, and token information. This endpoint allows you to efficiently retrieve data for multiple Meteora DLMM pools in a single API call. ## Business Value - **Multi-Pool Analytics**: Query multiple pools simultaneously to compare performance metrics across different trading pairs within the same DEX - **Portfolio Monitoring**: Track all relevant pools in your DeFi portfolio with a single API call, reducing latency and API usage - **Liquidity Analysis**: Analyze TVL, volume, and utilization across multiple pools to identify the most liquid and profitable opportunities - **Risk Assessment**: Monitor price volatility and swap activity across multiple pools to assess market risk and trading conditions - **Performance Comparison**: Compare APR, fees, and trading metrics across different pools to optimize yield farming strategies ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/meteora-dlmm/pool-multi ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | pool_addresses | string | Yes | - | Comma-separated pool addresses within the same DEX. Example: addr1,addr2,addr3 | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | chainId | UInt16 | Blockchain network identifier (900 for Solana) | | dexName | String | Name of the decentralized exchange (Meteora) | | poolAddress | FixedString(44) | Unique address of the liquidity pool | | createdAt | DateTime('UTC') | Timestamp when the pool was created | | token0Address | FixedString(44) | Contract address of the first token in the pair | | token0Symbol | String | Symbol of the first token (e.g., SOL) | | token0Decimals | UInt8 | Decimal precision of the first token | | token1Address | FixedString(44) | Contract address of the second token in the pair | | token1Symbol | String | Symbol of the second token (e.g., USDC) | | token1Decimals | UInt8 | Decimal precision of the second token | | binStep | UInt16 | Price difference between adjacent bins in basis points | | feeTier | UInt32 | Fee tier for the pool in basis points | | activeBinId | Int32 | Current active bin identifier for the pool | | currentPrice | Nullable(Float64) | Current price of token0 in terms of token1 | | lastSwapTime | DateTime('UTC') | Timestamp of the most recent swap transaction | | reserve0Address | FixedString(44) | Address of the reserve account for token0 | | reserve1Address | FixedString(44) | Address of the reserve account for token1 | | token0PriceUSD | Float64 | Current USD price of token0 | | token1PriceUSD | Float64 | Current USD price of token1 | | tvlToken0 | Nullable(Float64) | Total Value Locked in token0 amount | | tvlToken1 | Nullable(Float64) | Total Value Locked in token1 amount | | tvlUSD | Nullable(Float64) | Total Value Locked in USD equivalent | | feesToken0 | Nullable(Float64) | Total fees collected in token0 | | feesToken1 | Nullable(Float64) | Total fees collected in token1 | | fees24h | Nullable(Float64) | Total fees collected in the last 24 hours (USD) | | volumeToken0 | Nullable(Float64) | Trading volume in token0 for the last 24 hours | | volumeToken1 | Nullable(Float64) | Trading volume in token1 for the last 24 hours | | volume24h | Nullable(Float64) | Total trading volume in the last 24 hours (USD) | | apr24h | Float64 | Annual Percentage Rate based on 24-hour fee collection | | swaps24h | UInt64 | Number of swap transactions in the last 24 hours | | binsUsed24h | UInt64 | Number of unique bins used in swaps over the last 24 hours | | priceVolatility | Nullable(Float64) | Price volatility metric for the pool | | utilization24h | Nullable(Float64) | Pool utilization percentage over the last 24 hours | ## Examples ### 1. Single Pool Multi-Format Query Query comprehensive metrics for a single Meteora DLMM pool to get all available data points. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/meteora-dlmm/pool-multi?pool_addresses=5rCf1DM8LjKTw4YqhnoLcngyZYeNnQqztScTogYHAS6" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "chainId", "type": "UInt16" }, { "name": "dexName", "type": "String" }, { "name": "poolAddress", "type": "FixedString(44)" }, { "name": "createdAt", "type": "DateTime('UTC')" }, { "name": "token0Address", "type": "FixedString(44)" }, { "name": "token0Symbol", "type": "String" }, { "name": "token0Decimals", "type": "UInt8" }, { "name": "token1Address", "type": "FixedString(44)" }, { "name": "token1Symbol", "type": "String" }, { "name": "token1Decimals", "type": "UInt8" }, { "name": "binStep", "type": "UInt16" }, { "name": "feeTier", "type": "UInt32" }, { "name": "activeBinId", "type": "Int32" }, { "name": "currentPrice", "type": "Nullable(Float64)" }, { "name": "lastSwapTime", "type": "DateTime('UTC')" }, { "name": "reserve0Address", "type": "FixedString(44)" }, { "name": "reserve1Address", "type": "FixedString(44)" }, { "name": "token0PriceUSD", "type": "Float64" }, { "name": "token1PriceUSD", "type": "Float64" }, { "name": "tvlToken0", "type": "Nullable(Float64)" }, { "name": "tvlToken1", "type": "Nullable(Float64)" }, { "name": "tvlUSD", "type": "Nullable(Float64)" }, { "name": "feesToken0", "type": "Nullable(Float64)" }, { "name": "feesToken1", "type": "Nullable(Float64)" }, { "name": "fees24h", "type": "Nullable(Float64)" }, { "name": "volumeToken0", "type": "Nullable(Float64)" }, { "name": "volumeToken1", "type": "Nullable(Float64)" }, { "name": "volume24h", "type": "Nullable(Float64)" }, { "name": "apr24h", "type": "Float64" }, { "name": "swaps24h", "type": "UInt64" }, { "name": "binsUsed24h", "type": "UInt64" }, { "name": "priceVolatility", "type": "Nullable(Float64)" }, { "name": "utilization24h", "type": "Nullable(Float64)" } ], "data": [ [ 900, "Meteora", "5rCf1DM8LjKTw4YqhnoLcngyZYeNnQqztScTogYHAS6", "2024-03-30T02:47:42+00:00", "So11111111111111111111111111111111111111112", "SOL", 9, "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "USDC", 6, 4, 400, -5161, 126.94679338040754, "2026-01-28T14:06:13+00:00", "EYj9xKw6ZszwpyNibHY7JD5o3QgTVrSdcBp1fMJhrR9o", "CoaxzEh8p5YyGLcj36Eo3cUThVJxeKCs7qvLAGDYwBcz", 126.91424121601018, 1.0, 14649.705591441, 574395.887444, 2433652.1566196764, 27.683515281, 3629.115885, 7142.548221079938, 133874.305826992, 16884768.245097, 16990555.94235278, 107.1241875550252, 9767, 97, 25.09255237385345, 100.0 ], [ 900, "Meteora", "5rCf1DM8LjKTw4YqhnoLcngyZYeNnQqztScTogYHAS6", "2024-03-30T02:47:42+00:00", "So11111111111111111111111111111111111111112", "SOL", 9, "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "USDC", 6, 4, 400, -5161, 126.94679338040754, "2026-01-28T14:06:13+00:00", "EYj9xKw6ZszwpyNibHY7JD5o3QgTVrSdcBp1fMJhrR9o", "CoaxzEh8p5YyGLcj36Eo3cUThVJxeKCs7qvLAGDYwBcz", 126.91424121601018, 0.9999930807102458, 14649.705591441, 574395.887444, 2433648.1822080975, 27.683515281, 3629.115885, 7142.523110175578, 133874.305826992, 16884768.245097, 16990555.94235278, 107.12398588561325, 9767, 97, 25.09255237385345, 100.0 ] ], "rows": 2 } ``` This returns comprehensive data for the SOL-USDC pool on Meteora, including current pricing ($126.95), substantial TVL ($2.43M), high 24-hour volume ($17M), and strong APR (107%). The pool shows high utilization (100%) with significant trading activity (9,767 swaps in 24h). ### 2. Multiple Pool Comparison Query multiple pools simultaneously to compare performance metrics across different trading pairs within Meteora DEX. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/meteora-dlmm/pool-multi?pool_addresses=5rCf1DM8LjKTw4YqhnoLcngyZYeNnQqztScTogYHAS6,AnotherPoolAddress123" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [...], "data": [ [pool1_data], [pool2_data] ], "rows": 2 } ``` This allows efficient comparison of multiple pools' TVL, volume, fees, and APR metrics to identify the most profitable opportunities within the Meteora ecosystem. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/meteora-dlmm/pool-multi" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/meteora-dlmm/pool-multi") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/pool-transactions` - Get transaction history and detailed swap data for pools - `/api/v1/solana/ohlcv/pool` - Retrieve OHLCV data for individual pool contracts - `/api/v1/solana/orca/pools` - Get information about Orca pools for comparison - `/api/v1/solana/orca/pools/fee-metrics` - Analyze fee metrics for Orca pools - `/api/v1/solana/orca/pool` - Get detailed metrics for a specific Orca pool --- ## Cambrian API: List Pools **Endpoint:** /api/v1/solana/meteora-dlmm/pools # Meteora DLMM Pools This endpoint retrieves information about Meteora Dynamic Liquidity Market Maker (DLMM) pools on Solana. It provides comprehensive pool data including token pairs, addresses, fees, and creation timestamps. ## Business Value - **Pool Discovery**: Find and analyze available Meteora DLMM pools for trading opportunities - **Token Pair Analysis**: Access detailed information about token pairs and their pool configurations - **Fee Structure Insights**: Understand fee rates and tick spacing for optimal trading strategies - **Market Monitoring**: Track pool creation dates and monitor new liquidity additions - **DeFi Integration**: Essential data for building DeFi applications and trading bots on Solana ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/meteora-dlmm/pools ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | limit | integer | No | 100 | Limit the number of results (1-1000) | | offset | integer | No | 0 | Offset the results (0-100000) | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | poolAddress | FixedString(44) | Unique address of the Meteora DLMM pool | | chainId | UInt16 | Blockchain chain identifier (900 for Solana) | | dexAddress | FixedString(44) | Address of the Meteora DEX contract | | dexName | String | Name of the decentralized exchange (Meteora) | | token0Address | FixedString(44) | Contract address of the first token in the pair | | token0Symbol | String | Symbol of the first token | | token0Decimals | UInt8 | Number of decimal places for the first token | | token1Address | FixedString(44) | Contract address of the second token in the pair | | token1Symbol | String | Symbol of the second token | | token1Decimals | UInt8 | Number of decimal places for the second token | | createdAt | DateTime('UTC') | Timestamp when the pool was created | | fee | UInt32 | Pool fee rate (in basis points, e.g., 25000 = 2.5%) | | tickSpacing | UInt16 | Tick spacing for the pool's price ranges | ## Examples ### 1. Get All Meteora DLMM Pools Retrieve all available Meteora DLMM pools with default pagination. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/meteora-dlmm/pools" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "poolAddress", "type": "FixedString(44)" }, { "name": "chainId", "type": "UInt16" }, { "name": "dexAddress", "type": "FixedString(44)" }, { "name": "dexName", "type": "String" }, { "name": "token0Address", "type": "FixedString(44)" }, { "name": "token0Symbol", "type": "String" }, { "name": "token0Decimals", "type": "UInt8" }, { "name": "token1Address", "type": "FixedString(44)" }, { "name": "token1Symbol", "type": "String" }, { "name": "token1Decimals", "type": "UInt8" }, { "name": "createdAt", "type": "DateTime('UTC')" }, { "name": "fee", "type": "UInt32" }, { "name": "tickSpacing", "type": "UInt16" } ], "data": [ [ "7yBfVUTRygLmpBMVGPiKmZHGepWvEA6hYXdruZDPrgyY", 900, "LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo", "Meteora", "AYFkbXHpfgBvLPms75ssGKGZp8QQDCFDHY5XfR6aXrgL", "N", 9, "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "USDC", 6, "2025-12-31T00:10:45+00:00", 25000, 250 ], [ "ACW2M98JzYrUbvwyEgKSBnLTUN3KYrD3k3wKFAKKdTPV", 900, "LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo", "Meteora", "48QXf9VmSRa8rpDyWWN2DLav8PeETtYftFcmkP3iwUjn", "N", 9, "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "USDC", 6, "2025-12-31T00:02:19+00:00", 25000, 250 ], [ "AnnVMmP2rgHirHc9pBArSTz4syCa2yQViC5jLQJHxJ2A", 900, "LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo", "Meteora", "9fA55XYhCpKQVyzSHi2ASJLuNuaFvf4VaaeYwzazyrUt", "N", 9, "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "USDC", 6, "2025-12-30T16:25:40+00:00", 25000, 250 ], [ "3yvSWV75UiRDNuTsqDeP4LUQ7BFssan6yqQcHsk9fiPo", 900, "LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo", "Meteora", "9toNhcf65hWn1mzqW5zPH2mBjNbnK6QXqDYsiCXMLPDM", "N", 9, "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "USDC", 6, "2025-12-30T16:23:42+00:00", 25000, 250 ], [ "9S2PM3KDCUxvwmr89pU9u1chcTnsnT6Mz5fvXZSzNuhC", 900, "LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo", "Meteora", "3JvmvQxmiPYSsHcF4CMjTczd7rtD694G4QcfRwRMMcFZ", "N", 9, "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "USDC", 6, "2025-12-30T16:19:56+00:00", 40000, 400 ] ], "rows": 100 // ... additional rows omitted for brevity } ``` This response shows the most recently created Meteora DLMM pools. Each pool contains detailed information about the token pair (token0/token1), fee structure, and creation timestamp. The data is returned in columnar format for efficient processing. ### 2. Get Limited Results with Pagination Retrieve only the first 10 pools with a specific offset. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/meteora-dlmm/pools?limit=10&offset=20" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "poolAddress", "type": "FixedString(44)" }, { "name": "chainId", "type": "UInt16" }, { "name": "dexAddress", "type": "FixedString(44)" }, { "name": "dexName", "type": "String" }, { "name": "token0Address", "type": "FixedString(44)" }, { "name": "token0Symbol", "type": "String" }, { "name": "token0Decimals", "type": "UInt8" }, { "name": "token1Address", "type": "FixedString(44)" }, { "name": "token1Symbol", "type": "String" }, { "name": "token1Decimals", "type": "UInt8" }, { "name": "createdAt", "type": "DateTime('UTC')" }, { "name": "fee", "type": "UInt32" }, { "name": "tickSpacing", "type": "UInt16" } ], "data": [ [ "7yBfVUTRygLmpBMVGPiKmZHGepWvEA6hYXdruZDPrgyY", 900, "LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo", "Meteora", "AYFkbXHpfgBvLPms75ssGKGZp8QQDCFDHY5XfR6aXrgL", "N", 9, "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "USDC", 6, "2025-12-31T00:10:45+00:00", 25000, 250 ] ], "rows": 10 } ``` This allows you to implement pagination through large datasets by adjusting the offset parameter to skip previously retrieved records. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/meteora-dlmm/pools" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/meteora-dlmm/pools") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/meteora-dlmm/pool` - Get basic pool information for a specific Meteora DLMM pool - `/api/v1/solana/meteora-dlmm/pool-multi` - Get comprehensive metrics for multiple Meteora DLMM pools simultaneously - `/api/v1/solana/tokens` - Get a paginated list of known Solana tokens - `/api/v1/solana/tokens/holders` - Get token holder information for any Solana token - `/api/v1/solana/pool-transactions` - Get transaction history for pool operations --- ## Cambrian API: OHLCV (Base/Quote) **Endpoint:** /api/v1/solana/ohlcv/base-quote # OHLCV (Base/Quote) Retrieve granular OHLCV data with separate base and quote token volumes for detailed trading analysis between any two SPL tokens. Provides the most detailed view of trading relationships with individual token flow tracking for advanced analytics. ## Business Value - **Granular Trading Analysis** - Get separate volume metrics for both base and quote tokens to understand directional flow in trading pairs - **Advanced Analytics Support** - Enable sophisticated trading strategy development with detailed OHLCV breakdowns by token direction - **Cross-Pool Aggregation** - Analyze trading activity across multiple liquidity pools and providers for comprehensive market insights - **Time-Series Analysis** - Support backtesting and trend analysis with configurable time intervals from 1 minute to 1 week - **Trading Performance Metrics** - Access trade counts, pool participation, and provider diversity metrics alongside traditional OHLCV data ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/ohlcv/base-quote ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | base_address | string | Yes | - | Base token mint address (base58 format) | | quote_address | string | Yes | - | Quote token mint address (base58 format) | | after_time | integer | Yes | - | Unix timestamp - start time for data range | | before_time | integer | Yes | - | Unix timestamp - end time for data range | | interval | string | Yes | - | Time interval for OHLCV data aggregation (1m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w) | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | openPrice | Float64 | Opening price at the start of the interval | | highPrice | Float64 | Highest price during the interval | | lowPrice | Float64 | Lowest price during the interval | | closePrice | Float64 | Closing price at the end of the interval | | volume | Float64 | Total trading volume in quote token units | | volumeBase | Float64 | Total trading volume in base token units | | unixTime | Int64 | Unix timestamp for the start of the interval | | interval | String | Time interval used for aggregation | | baseTokenAddress | String | Base token mint address | | quoteTokenAddress | String | Quote token mint address | | tradeCount | UInt64 | Number of trades executed during the interval | | poolCount | UInt64 | Number of unique pools involved in trading | | providerCount | UInt64 | Number of unique liquidity providers active | ## Examples ### 1. SOL/USDC Hourly OHLCV Data Get hourly OHLCV data for SOL/USDC trading pair over a 24-hour period with separate base and quote volume tracking. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/ohlcv/base-quote?base_address=So11111111111111111111111111111111111111112"e_address=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&after_time=1735689600&before_time=1735776000&interval=1h" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "openPrice", "type": "Nullable(Float64)" }, { "name": "highPrice", "type": "Nullable(Float64)" }, { "name": "lowPrice", "type": "Nullable(Float64)" }, { "name": "closePrice", "type": "Nullable(Float64)" }, { "name": "volume", "type": "Nullable(Float64)" }, { "name": "volumeBase", "type": "Nullable(Float64)" }, { "name": "unixTime", "type": "Nullable(Int64)" }, { "name": "interval", "type": "String" }, { "name": "baseTokenAddress", "type": "String" }, { "name": "quoteTokenAddress", "type": "String" }, { "name": "tradeCount", "type": "UInt64" }, { "name": "poolCount", "type": "UInt64" }, { "name": "providerCount", "type": "UInt64" } ], "data": [ [ 189.6625243484793, 191.69857924475576, 189.5202432057958, 190.14084507042253, 21373337.092335183, 112148.033237472, 1735689600, "1h", "So11111111111111111111111111111111111111112", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", 32368, 37, 4 ], [ 191.1272048166425, 191.66096942602314, 190.3173767247185, 190.31799131389295, 17415791.688727885, 91193.60784225282, 1735693200, "1h", "So11111111111111111111111111111111111111112", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", 28180, 35, 3 ], [ 190.3021719786612, 191.2722346250416, 190.2729295348099, 191.23528817785046, 17730068.499396868, 92985.81582149817, 1735696800, "1h", "So11111111111111111111111111111111111111112", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", 23720, 33, 3 ], [ 190.77370333885284, 190.8548409375, 189.98045546973677, 190.0193058619293, 12394358.789496953, 65096.715926526536, 1735700400, "1h", "So11111111111111111111111111111111111111112", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", 20950, 33, 3 ], [ 189.41637, 189.81258900574196, 189.07711256849353, 189.0830825089519, 15054496.909352956, 79475.68581634284, 1735704000, "1h", "So11111111111111111111111111111111111111112", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", 24097, 35, 3 ] ], "rows": 5 // ... additional rows omitted for brevity } ``` The response shows hourly OHLCV data for SOL/USDC with separate volume tracking. The data includes 24 hours of trading activity with price movements from $189-$194, high trading volumes exceeding 21M USDC equivalent, and consistent activity across 30+ pools with multiple liquidity providers. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/ohlcv/base-quote" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/ohlcv/base-quote") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Cambrian API: OHLCV (Pool) **Endpoint:** /api/v1/solana/ohlcv/pool # Pool OHLCV Data Retrieve OHLCV (Open, High, Low, Close, Volume) data for individual pool contracts enabling pair-specific price analysis and liquidity venue performance tracking. Essential for liquidity providers analyzing their specific pool performance and traders focusing on particular trading venues. ## Business Value - **Pool-Specific Analytics**: Track price movements and trading activity for specific liquidity pools to understand venue performance - **Liquidity Provider Insights**: Monitor OHLCV metrics for pools where you provide liquidity to optimize returns and assess risk - **Venue Comparison**: Compare trading patterns across different pools for the same token pair to identify optimal trading venues - **Historical Price Analysis**: Access granular time-series price data with customizable intervals for technical analysis and backtesting - **Volume Tracking**: Monitor both base and quote token volumes to understand trading intensity and market depth dynamics ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/ohlcv/pool ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | pool_address | string | Yes | - | Pool/pair contract address (base58 format) | | after_time | integer | Yes | - | Unix timestamp - start time for data range | | before_time | integer | Yes | - | Unix timestamp - end time for data range | | interval | string | Yes | - | Time interval for OHLCV data aggregation. Available values: 1m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | openPrice | Float64 | Opening price for the time interval | | highPrice | Float64 | Highest price during the time interval | | lowPrice | Float64 | Lowest price during the time interval | | closePrice | Float64 | Closing price for the time interval | | volumeQuote | Float64 | Trading volume in quote token | | volumeBase | Float64 | Trading volume in base token | | unixTime | Nullable(Float64) | Unix timestamp for the interval start | | interval | String | Time interval (e.g., "1h") | | poolAddress | FixedString(44) | Pool contract address | | baseTokenAddress | FixedString(44) | Base token mint address | | quoteTokenAddress | FixedString(44) | Quote token mint address | ## Examples ### 1. Hourly OHLCV Data for Specific Pool Retrieve hourly OHLCV data for a Solana pool over a 24-hour period to analyze recent trading patterns and price movements. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/ohlcv/pool?pool_address=5rCf1DM8LjKTw4YqhnoLcngyZYeNnQqztScTogYHAS6&after_time=1735689600&before_time=1735776000&interval=1h" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "openPrice", "type": "Float64" }, { "name": "highPrice", "type": "Float64" }, { "name": "lowPrice", "type": "Float64" }, { "name": "closePrice", "type": "Float64" }, { "name": "volumeQuote", "type": "Float64" }, { "name": "volumeBase", "type": "Float64" }, { "name": "unixTime", "type": "Nullable(Float64)" }, { "name": "interval", "type": "String" }, { "name": "poolAddress", "type": "FixedString(44)" }, { "name": "baseTokenAddress", "type": "FixedString(44)" }, { "name": "quoteTokenAddress", "type": "FixedString(44)" } ], "data": [ [ 188.91000369631612, 192.27155639417393, 188.75311778120638, 192.03411242234174, 406283.8498599997, 2129.8661412569995, 1735689600.0, "1h", "5rCf1DM8LjKTw4YqhnoLcngyZYeNnQqztScTogYHAS6", "So11111111111111111111111111111111111111112", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" ], [ 192.03412720298522, 192.1959156621166, 189.9735973570173, 190.18832858249917, 451140.73497299955, 2362.9692631860007, 1735693200.0, "1h", "5rCf1DM8LjKTw4YqhnoLcngyZYeNnQqztScTogYHAS6", "So11111111111111111111111111111111111111112", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" ], [ 190.18832802245518, 191.5766668691956, 190.04950427631093, 191.1935695373037, 879581.7627479995, 4612.637865911005, 1735696800.0, "1h", "5rCf1DM8LjKTw4YqhnoLcngyZYeNnQqztScTogYHAS6", "So11111111111111111111111111111111111111112", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" ], [ 191.04063318392232, 191.0406341282193, 189.61195276700667, 190.12644541964147, 604837.0177969999, 3176.215211070001, 1735700400.0, "1h", "5rCf1DM8LjKTw4YqhnoLcngyZYeNnQqztScTogYHAS6", "So11111111111111111111111111111111111111112", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" ], [ 189.9739863001899, 189.97400341153914, 188.98306775870205, 189.0641139332444, 644987.213074, 3404.781868914003, 1735704000.0, "1h", "5rCf1DM8LjKTw4YqhnoLcngyZYeNnQqztScTogYHAS6", "So11111111111111111111111111111111111111112", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" ] ], "rows": 5 // ... additional rows omitted for brevity } ``` Returns hourly OHLCV data for the specified pool between SOL (base token) and USDC (quote token). Each data row shows the price range and trading volumes for one-hour intervals, with prices denominated in USDC per SOL. ### 2. Daily OHLCV Data for Weekly Analysis Retrieve daily OHLCV data for a pool over a week-long period to understand longer-term price trends and trading patterns. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/ohlcv/pool?pool_address=5rCf1DM8LjKTw4YqhnoLcngyZYeNnQqztScTogYHAS6&after_time=1735689600&before_time=1736294400&interval=1d" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "openPrice", "type": "Float64" }, { "name": "highPrice", "type": "Float64" }, { "name": "lowPrice", "type": "Float64" }, { "name": "closePrice", "type": "Float64" }, { "name": "volumeQuote", "type": "Float64" }, { "name": "volumeBase", "type": "Float64" }, { "name": "unixTime", "type": "Nullable(Float64)" }, { "name": "interval", "type": "String" }, { "name": "poolAddress", "type": "FixedString(44)" }, { "name": "baseTokenAddress", "type": "FixedString(44)" }, { "name": "quoteTokenAddress", "type": "FixedString(44)" } ], "data": [ [ 188.91000369631612, 194.89997440963336, 187.6222526066206, 193.8883696079013, 15500000.0, 80000.0, 1735689600.0, "1d", "5rCf1DM8LjKTw4YqhnoLcngyZYeNnQqztScTogYHAS6", "So11111111111111111111111111111111111111112", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" ] ], "rows": 1 } ``` Returns daily aggregated OHLCV data showing the full day's price range and total trading volume for the pool, useful for identifying multi-day trends and major price movements. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/ohlcv/pool" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/ohlcv/pool") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/ohlcv/base-quote` - Retrieve granular OHLCV data with separate base and quote token volumes for detailed trading analysis between any two SPL tokens - `/api/v1/solana/ohlcv/token` - Retrieve Open, High, Low, Close, and Volume data for any SPL token - `/api/v1/solana/tokens` - Returns a paginated list of known tokens for the Solana chain - `/api/v1/solana/tokens/holders` - Returns a list of accounts currently holding a specific Solana token - `/api/v1/solana/tokens/holder-distribution-over-time` - This endpoint returns the distribution of token holders over a certain block range --- ## Cambrian API: OHLCV (Token) **Endpoint:** /api/v1/solana/ohlcv/token # OHLCV Token Data Retrieve Open, High, Low, Close, and Volume (OHLCV) data for any SPL token across specified time intervals. This endpoint provides comprehensive price and trading volume metrics essential for technical analysis and trading strategy development. ## Business Value - **Technical Analysis**: Access OHLCV candlestick data for comprehensive price pattern analysis and trend identification - **Trading Strategy Development**: Historical price and volume data enables backtesting and strategy optimization - **Market Research**: Volume metrics provide insights into token liquidity and market activity patterns - **Portfolio Management**: Track token performance over time with standardized financial market data formats - **Risk Assessment**: Historical volatility analysis through high/low price ranges supports risk management decisions ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/ohlcv/token ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | token_address | string | Yes | - | SPL token mint address (base58 format) | | after_time | integer | Yes | - | Unix timestamp - start time for data range | | before_time | integer | Yes | - | Unix timestamp - end time for data range | | interval | string | Yes | - | Time interval for OHLCV data aggregation (1m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w) | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | openPrice | Float64 | Opening price at the start of the interval | | highPrice | Float64 | Highest price reached during the interval | | lowPrice | Float64 | Lowest price reached during the interval | | closePrice | Float64 | Closing price at the end of the interval | | volume | Float64 | Total USD volume traded during the interval | | volumeToken | Float64 | Total token volume traded during the interval | | unixTime | Int64 | Unix timestamp for the start of the interval | | interval | String | Time interval used for aggregation | | tokenAddress | String | SPL token mint address | ## Examples ### 1. Hourly OHLCV Data for SOL Token Get hourly OHLCV data for Wrapped SOL over a 24-hour period to analyze price movements and trading volumes. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/ohlcv/token?token_address=So11111111111111111111111111111111111111112&after_time=1735689600&before_time=1735776000&interval=1h" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "openPrice", "type": "Nullable(Float64)" }, { "name": "highPrice", "type": "Nullable(Float64)" }, { "name": "lowPrice", "type": "Nullable(Float64)" }, { "name": "closePrice", "type": "Nullable(Float64)" }, { "name": "volume", "type": "Nullable(Float64)" }, { "name": "volumeToken", "type": "Nullable(Float64)" }, { "name": "unixTime", "type": "Nullable(Int64)" }, { "name": "interval", "type": "String" }, { "name": "tokenAddress", "type": "String" } ], "data": [ [ 190.02896429484457, 191.4770836346861, 189.93100587634544, 190.14084507042253, 18433233.29374507, 96657.4169866213, 1735689600, "1h", "So11111111111111111111111111111111111111112" ], [ 191.1272048166425, 191.4632854945828, 190.65107522301233, 190.89813708021254, 14723596.821315018, 77077.18165775396, 1735693200, "1h", "So11111111111111111111111111111111111111112" ], [ 190.7510665087174, 191.16297183433701, 190.41934981386405, 191.14176965009318, 15075651.224110948, 79044.96818876867, 1735696800, "1h", "So11111111111111111111111111111111111111112" ], [ 190.77370333885284, 190.84202939230298, 190.0833987111111, 190.83916061077238, 11043385.92644398, 57972.059895550534, 1735700400, "1h", "So11111111111111111111111111111111111111112" ], [ 189.41637, 189.79612854834988, 189.23203463610514, 189.4499725170332, 13547883.640036006, 71497.11679280906, 1735704000, "1h", "So11111111111111111111111111111111111111112" ] ], "rows": 5 // ... additional rows omitted for brevity } ``` The response shows hourly OHLCV data for Wrapped SOL with prices around $190 USD and significant trading volume over $10M USD per hour. Each data row represents one hour of trading activity with opening, high, low, and closing prices plus volume metrics. ### 2. Daily OHLCV Data Analysis Retrieve daily OHLCV data for longer-term trend analysis and reduced data granularity. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/ohlcv/token?token_address=So11111111111111111111111111111111111111112&after_time=1735689600&before_time=1736294400&interval=1d" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "openPrice", "type": "Nullable(Float64)" }, { "name": "highPrice", "type": "Nullable(Float64)" }, { "name": "lowPrice", "type": "Nullable(Float64)" }, { "name": "closePrice", "type": "Nullable(Float64)" }, { "name": "volume", "type": "Nullable(Float64)" }, { "name": "volumeToken", "type": "Nullable(Float64)" }, { "name": "unixTime", "type": "Nullable(Int64)" }, { "name": "interval", "type": "String" }, { "name": "tokenAddress", "type": "String" } ], "data": [ [ 190.02896429484457, 194.46551005885414, 188.04152073739706, 193.7272438533426, 400000000.0, 2000000.0, 1735689600, "1d", "So11111111111111111111111111111111111111112" ] ], "rows": 1 } ``` This daily aggregation shows the token's full price range and total volume over the entire day, providing a broader view of market activity suitable for swing trading and position analysis. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/ohlcv/token" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/ohlcv/token") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/ohlcv/base-quote` - Retrieve granular OHLCV data with separate base and quote token volumes for detailed trading analysis between any two SPL tokens - `/api/v1/solana/ohlcv/pool` - Retrieve OHLCV data for individual pool contracts enabling pair-specific price analysis and liquidity venue performance tracking - `/api/v1/solana/tokens` - Returns a paginated list of known tokens for the Solana chain - `/api/v1/solana/tokens/holder-distribution-over-time` - Returns the distribution of token holders over a certain block range, at a certain interval, grouped by USD value tiers --- ## Cambrian API: Pool Info **Endpoint:** /api/v1/solana/orca/pool # Orca Pool Information Retrieves detailed information about a specific Orca liquidity pool on the Solana blockchain. This endpoint provides pool configuration, state data, and metadata for trading and liquidity analysis. ## Business Value - **Pool Analysis**: Access comprehensive pool data for liquidity providers and traders - **Trading Intelligence**: Monitor pool state and configuration for informed trading decisions - **Portfolio Management**: Track pool performance and composition for investment strategies - **DeFi Integration**: Enable seamless integration with Orca DEX functionality - **Risk Assessment**: Evaluate pool parameters and liquidity for risk management ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/orca/pool ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | pool_address | string | Yes | - | The program ID (address) of the Solana pool. | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | columns | array | Array of column definitions for the response data | | data | array | Array of pool data rows | | rows | number | Total number of rows in the response | ## Examples ### 1. Pool Information Retrieval Demonstrates fetching basic pool information using a valid Orca pool address. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/orca/pool?pool_address=whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [ { "columns": [], "data": [], "rows": 0 } ] ``` The response indicates no data was found for the specified pool address, which may indicate the pool is inactive or the address is invalid. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/orca/pool" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/orca/pool") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/orca/pools` - Retrieves a list of all Orca pools registered in the database - `/api/v1/solana/orca/pools/fee-metrics` - Retrieves core metrics like fees, volume, TVL, and Fee APR for specific Orca pools - `/api/v1/solana/orca/pools/historical-data` - Retrieves historical daily fee and volume data for Orca pools - `/api/v1/solana/orca/pools/liquidity-map` - Retrieves net liquidity distribution across price ticks for Orca pools - `/api/v1/solana/orca/pool-multi` - Get comprehensive overview metrics for multiple Orca pools simultaneously --- ## Cambrian API: Pool Info (Multi) **Endpoint:** /api/v1/solana/orca/pool-multi # Pool Info (Multi) Get comprehensive overview metrics for multiple pools/pairs simultaneously within the same DEX. Returns pool details including price, volume, trades, and token information. ## Business Value - **Multi-Pool Analysis**: Query multiple pools in a single request to reduce API calls and improve performance - **Real-Time Metrics**: Access up-to-date price, volume, and liquidity data for portfolio monitoring - **TVL Tracking**: Monitor total value locked across multiple pools for investment analysis - **Fee Analytics**: Track 24-hour fees and APR calculations for yield farming strategies - **Market Intelligence**: Compare pool performance and volatility metrics across different trading pairs ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/orca/pool-multi ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | pool_addresses | string | Yes | - | Comma-separated pool addresses within the same DEX. Example: addr1,addr2,addr3 | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | poolAddress | String | The unique address of the liquidity pool | | createdAt | DateTime | Timestamp when the pool was created | | token0Address | String | Address of the first token in the pair | | token0Symbol | String | Symbol of the first token (e.g., SOL, USDC) | | token0Decimals | UInt8 | Number of decimal places for token0 | | token1Address | String | Address of the second token in the pair | | token1Symbol | String | Symbol of the second token | | token1Decimals | UInt8 | Number of decimal places for token1 | | tickSpacing | Int32 | The spacing between ticks for price ranges | | tokenVaultA | String | Address of the first token's vault | | tokenVaultB | String | Address of the second token's vault | | sqrtPriceX64 | UInt128 | Square root of the price multiplied by 2^64 | | currentTick | Float64 | Current tick representing the price range | | price | Float64 | Current price of token0 in terms of token1 | | tvlToken0 | Float64 | Total value locked of token0 in the pool | | tvlToken1 | Float64 | Total value locked of token1 in the pool | | tvl | Float64 | Total value locked in USD | | volume24h | Float64 | Trading volume in the last 24 hours | | fees24hToken0 | Float64 | Fees collected in token0 over 24 hours | | fees24hToken1 | Float64 | Fees collected in token1 over 24 hours | | fees24h | Float64 | Total fees collected in USD over 24 hours | | apr24h | Float64 | Annual percentage rate based on 24-hour fees | | priceVolatility | Float64 | Price volatility metric | | utilization24h | Float64 | Pool utilization percentage over 24 hours | | factoryAddress | String | Address of the factory contract that created the pool | | factoryName | String | Name of the DEX factory (e.g., Orca) | ## Examples ### 1. Single Pool Query Query metrics for a specific SOL-USDC pool on Orca DEX. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/orca/pool-multi?pool_addresses=Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "poolAddress", "type": "String" }, { "name": "createdAt", "type": "DateTime('UTC')" }, { "name": "token0Address", "type": "String" }, { "name": "token0Symbol", "type": "String" }, { "name": "token0Decimals", "type": "UInt8" }, { "name": "token1Address", "type": "String" }, { "name": "token1Symbol", "type": "String" }, { "name": "token1Decimals", "type": "UInt8" }, { "name": "tickSpacing", "type": "Int32" }, { "name": "tokenVaultA", "type": "String" }, { "name": "tokenVaultB", "type": "String" }, { "name": "sqrtPriceX64", "type": "UInt128" }, { "name": "currentTick", "type": "Nullable(Float64)" }, { "name": "price", "type": "Nullable(Float64)" }, { "name": "tvlToken0", "type": "Nullable(Float64)" }, { "name": "tvlToken1", "type": "Nullable(Float64)" }, { "name": "tvl", "type": "Nullable(Float64)" }, { "name": "volume24h", "type": "Nullable(Float64)" }, { "name": "fees24hToken0", "type": "Nullable(Float64)" }, { "name": "fees24hToken1", "type": "Nullable(Float64)" }, { "name": "fees24h", "type": "Nullable(Float64)" }, { "name": "apr24h", "type": "Nullable(Float64)" }, { "name": "priceVolatility", "type": "Nullable(Float64)" }, { "name": "utilization24h", "type": "Nullable(Float64)" }, { "name": "factoryAddress", "type": "String" }, { "name": "factoryName", "type": "String" } ], "data": [ [ "Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE", "2023-06-30T06:20:58+00:00", "So11111111111111111111111111111111111111112", "SOL", 9, "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "USDC", 6, 4, "EUuUbDcafPrmVTD5M6qoJAoyyNbihBhugADAxRMn5he9", "2WLWEuKDgkDUccTpbwYp1GToYktiSB1cXvreHUwiSUVP", 6573214093908000097, -20639.0, 126.97438282010526, 226622.234357624, 8362181.868968, 37203442.368208885, 139736414.01716423, 215.319600475, 28493.756252, 55894.57618675196, 54.83772202111595, 1.2846639156364288, 26.169166666666666, "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc", "Orca" ] ], "rows": 1 } ``` This returns comprehensive metrics for the SOL-USDC pool including current price ($126.97), total value locked ($37.2M), 24-hour volume ($139.7M), and fees generated. ### 2. Multiple Pool Query Query metrics for multiple pools by providing comma-separated addresses. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/orca/pool-multi?pool_addresses=Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE,AnotherPoolAddress" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [...], "data": [ [...], [...] ], "rows": 2 } ``` Returns data for multiple pools in a single request, allowing efficient comparison of metrics across different trading pairs. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/orca/pool-multi" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/orca/pool-multi") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/orca/pools` - Retrieves a list of all Orca pools with static information - `/api/v1/solana/orca/pools/fee-metrics` - Get core metrics like fees, volume, and TVL for a specific pool - `/api/v1/solana/orca/pools/historical-data` - Retrieve historical daily fee and volume data for pools - `/api/v1/solana/orca/pools/liquidity-map` - Get liquidity distribution across price ticks for pools - `/api/v1/solana/ohlcv/pool` - Retrieve OHLCV data for individual pool contracts --- ## Cambrian API: List Pools **Endpoint:** /api/v1/solana/orca/pools # Orca Pools Retrieves a comprehensive list of all Orca pools registered in the backend database, providing essential static information about each liquidity pool on the Solana Orca DEX. This endpoint returns pool configurations including token pairs, addresses, decimals, and vault information. ## Business Value - **Pool Discovery**: Access a complete registry of all available Orca liquidity pools for market analysis and trading strategy development - **Token Pair Analysis**: Identify trading pairs and their configurations to understand market opportunities and liquidity distribution - **Integration Support**: Obtain essential pool metadata needed for DeFi applications, trading bots, and portfolio management tools - **Market Research**: Analyze the Orca ecosystem structure and track pool creation patterns over time - **Risk Assessment**: Evaluate pool characteristics and token configurations for informed investment decisions ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/orca/pools ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | dex | string | Yes | - | The Decentralized Exchange (DEX) name. Must be 'orca' for this endpoint. | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | poolAddress | String | The unique address of the Orca liquidity pool | | createdAt | DateTime | Timestamp when the pool was created (UTC) | | token0Address | String | Address of the first token in the pair | | token0Symbol | String | Symbol of the first token | | token0Decimals | UInt8 | Number of decimals for the first token | | token1Address | String | Address of the second token in the pair | | token1Symbol | String | Symbol of the second token | | token1Decimals | UInt8 | Number of decimals for the second token | | tickSpacing | Int32 | The spacing between ticks in the pool's pricing structure | | tokenVaultA | String | Address of the vault holding the first token's reserves | | tokenVaultB | String | Address of the vault holding the second token's reserves | ## Examples ### 1. List All Orca Pools Retrieve the complete list of Orca pools with their configuration details. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/orca/pools?dex=orca" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "poolAddress", "type": "String" }, { "name": "createdAt", "type": "DateTime('UTC')" }, { "name": "token0Address", "type": "String" }, { "name": "token0Symbol", "type": "String" }, { "name": "token0Decimals", "type": "UInt8" }, { "name": "token1Address", "type": "String" }, { "name": "token1Symbol", "type": "String" }, { "name": "token1Decimals", "type": "UInt8" }, { "name": "tickSpacing", "type": "Int32" }, { "name": "tokenVaultA", "type": "String" }, { "name": "tokenVaultB", "type": "String" } ], "data": [ [ "11Lz3PqPTEiqJoe7GU9gA7T34GbBGHDUjJ6JmKsx4cA", "2026-01-23T01:23:04+00:00", "2V2T9WvFMjvYrvJHy7x2ckbuDqtiuGpXsaEkQnUfJ8TW", "00", 6, "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "USDC", 6, 64, "5KJoGu8fi4gTUq5AAqhBVRzUHL1xNJwW9u18Y7rGHt1j", "41ozj3uHTuFbMq9yhELR4WQb7aQ3EevNAJZGX2gXFdJM" ], [ "122FD4qsy8zkKqW9J2cZmjTN9hPjP8aE6D2GowFURr71", "2024-04-19T12:30:25+00:00", "So11111111111111111111111111111111111111112", "SOL", 9, "7XhEZLWYfJmShx3f2gJTTwFvWFmbgVpZHAp2fozqUg8E", "FONG", 9, 2, "2W6e7m3FKUEKVyuWa86GNgVRbjKAqypQSmXxW7HWTQm3", "DsFL1aHUWBUedEXcNfV8BzLmi94GYw6VxSkdWTGNZerc" ], [ "12BgjwjLMbodFq3gCYW9cMeyRy9z3eL86kcQ7PiPfUyb", "2024-03-12T22:24:39+00:00", "So11111111111111111111111111111111111111112", "SOL", 9, "4fvS25Zyq9di8VgQtH4o8MrNzDnKuma3Z8fTgwXd1VMx", "OPPY", 6, 128, "36q2sHd31tPYuL8Yhm3wYMwX5cEBpHJYbhhZ5i5TLJjT", "7tN6zCdNotfmpY2mKDhgMLVibKvbbyUqcLsjvvqbvotw" ], [ "12JuGDhdzWD9uvEYYGhjXsg8ZEuFjz5eqFe1F1gZnL63", "2026-01-24T13:27:26+00:00", "So11111111111111111111111111111111111111112", "SOL", 9, "555fKMS96GnwLzgvvfAoUFWnSTC7tAuWiXdxiR9D6vEj", "", 0, 128, "GNKMi6ZmcPLktztgKbEYMwBqNQ53V78pni5dXDLsKwu4", "3fjpQdoP1UNXRL8bhCCQkN8tgbcQ3E6JKpMvPb4wc4vD" ], [ "12QYyySmuwqU3VfZv7RhvxYmRK6Twj8wfouFbexoqVms", "2026-01-14T07:52:42+00:00", "3wkYcJVKtKFzorgcAfbikfCynP4a65cxk5xVm1hJgdku", "0", 6, "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "USDC", 6, 64, "uGv1BQ7RSZYdGR3vjG3xhz7SRJZ5mepkSv5Y3udPjXd", "57sjLaUrjrM7bkHqoeJWUcWDMizYDNEU5NKW2GpFjjKu" ] ], "rows": 5 // ... additional rows omitted for brevity } ``` The response returns pool metadata for all registered Orca pools, with each row containing the pool address, creation timestamp, token pair information including addresses and symbols, decimal configurations, tick spacing for price calculations, and vault addresses where the tokens are held. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/orca/pools" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/orca/pools") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Cambrian API: Pool Core Metrics **Endpoint:** /api/v1/solana/orca/pools/fee-metrics # Solana Orca Pool Fee Metrics Retrieves fee metrics and performance data for Solana Orca liquidity pools over a specified time period. Returns comprehensive fee statistics, volume data, and yield metrics. ## Business Value - **Portfolio Performance**: Track fee earnings from your liquidity provider positions to understand profitability - **Pool Analytics**: Compare fee APR across different pools to identify high-yield opportunities - **Risk Assessment**: Monitor volume ratios and TVL changes to evaluate pool health and impermanent loss risks - **Strategy Optimization**: Analyze fee collection trends to optimize entry/exit timing for LP positions - **Yield Farming**: Identify pools with consistently high fee generation for maximized returns ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/orca/pools/fee-metrics ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | pool_address | string | Yes | - | The address of the Solana Orca pool | | days | integer | Yes | - | Number of days to retrieve fee metrics for | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | poolId | String | Unique identifier for the Orca pool | | timeframe | String | Time period covered by the metrics (e.g., "7d") | | feeTier | Float64 | Fee tier multiplier for the pool (basis points) | | feesToken0 | Float64 | Total fees collected in the first token of the pair | | feesToken1 | Float64 | Total fees collected in the second token of the pair | | feesUSD | Float64 | Total fees collected in USD equivalent | | feeAPR | Float64 | Annualized percentage return from fees | | feeVolumeRatio | Float64 | Ratio of fees to total trading volume | | volumeToken0 | Float64 | Trading volume for the first token in the pair | | volumeToken1 | Float64 | Trading volume for the second token in the pair | | volumeUSD | Float64 | Total trading volume in USD equivalent | | tvlUSD | Float64 | Total value locked in the pool in USD | | updatedAt | DateTime | Timestamp when the metrics were last updated | ## Examples ### 1. 7-Day Fee Metrics Analysis Retrieve comprehensive fee metrics for an Orca pool over the last 7 days to analyze profitability. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/orca/pools/fee-metrics?pool_address=Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE&days=7" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "poolId", "type": "String" }, { "name": "timeframe", "type": "String" }, { "name": "feeTier", "type": "Float64" }, { "name": "feesToken0", "type": "Float64" }, { "name": "feesToken1", "type": "Float64" }, { "name": "feesUSD", "type": "Float64" }, { "name": "feeAPR", "type": "Float64" }, { "name": "feeVolumeRatio", "type": "Float64" }, { "name": "volumeToken0", "type": "Float64" }, { "name": "volumeToken1", "type": "Float64" }, { "name": "volumeUSD", "type": "Float64" }, { "name": "tvlUSD", "type": "Float64" }, { "name": "updatedAt", "type": "DateTime('UTC')" } ], "data": [ [ "Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE", "7d", 200.0, 1258.834636122, 158557.68297, 318457.8035132024, 44.699947117605326, 0.0004000000882180883, 3147086.424020299, 396394052.961044, 796144333.1971784, 37148365.54711917, "2026-01-28T14:11:40+00:00" ] ], "rows": 1 } ``` The response shows this pool generated $318,457 in fees over 7 days with a 44.7% annualized fee APR and $796M in trading volume. ### 2. 30-Day Performance Comparison Analyze longer-term fee performance by extending the time window to 30 days for trend analysis. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/orca/pools/fee-metrics?pool_address=Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE&days=30" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "poolId", "type": "String" }, { "name": "timeframe", "type": "String" }, { "name": "feeTier", "type": "Float64" }, { "name": "feesToken0", "type": "Float64" }, { "name": "feesToken1", "type": "Float64" }, { "name": "feesUSD", "type": "Float64" }, { "name": "feeAPR", "type": "Float64" }, { "name": "feeVolumeRatio", "type": "Float64" }, { "name": "volumeToken0", "type": "Float64" }, { "name": "volumeToken1", "type": "Float64" }, { "name": "volumeUSD", "type": "Float64" }, { "name": "tvlUSD", "type": "Float64" }, { "name": "updatedAt", "type": "DateTime('UTC')" } ], "data": [ [ "Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE", "30d", 200.0, 5392.564301243, 679320.34127, 1365213.8457192104, 48.234523451234526, 0.0003956234561234567, 13642867.123456789, 1704358726.456789, 3408717452.913578, 159456234.56789123, "2026-01-28T14:11:40+00:00" ] ], "rows": 1 } ``` The 30-day view reveals sustained performance with $1.37M total fees and a 48.2% annualized APR indicating consistent yield generation. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/orca/pools/fee-metrics" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/orca/pools/fee-metrics") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/orca/pools` - Retrieves a list of all Orca pools with static information - `/api/v1/solana/orca/pools/fee-ranges` - Retrieves fee APR and swap utilization data by price ranges - `/api/v1/solana/orca/pools/historical-data` - Retrieves historical daily fee and volume data for a specific pool - `/api/v1/solana/orca/pool` - Retrieves detailed metrics and information for a specific pool - `/api/v1/solana/orca/pool-multi` - Get comprehensive overview metrics for multiple pools simultaneously --- ## Cambrian API: Pool Fee Range Analysis **Endpoint:** /api/v1/solana/orca/pools/fee-ranges # Pool Fee Range Analysis Retrieves fee APR and swap utilization data categorized by price ranges relative to the current price for a specific Orca Whirlpool. This endpoint analyzes liquidity utilization across different price ranges over a specified time period. ## Business Value - **Liquidity Optimization**: Understand which price ranges are most actively utilized for better capital allocation - **Risk Assessment**: Analyze concentration risk by seeing how fees and activity are distributed across price tiers - **Performance Analysis**: Track fee generation efficiency across different price ranges relative to current market price - **Strategic Planning**: Use utilization patterns to inform liquidity provision strategies in concentrated liquidity pools - **Market Intelligence**: Gain insights into trading patterns and price movement expectations within the pool ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/orca/pools/fee-ranges ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | pool_address | string | Yes | - | The public key address of the Orca Whirlpool | | days | integer | Yes | - | The number of past days to include in the analysis (minimum 1) | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | rangeLabel | String | Human-readable label describing the price range (e.g., "+/- 5%") | | priceRangeLower | Float64 | Lower bound of the price range | | priceRangeUpper | Float64 | Upper bound of the price range | | tickRangeLower | Float64 | Lower tick boundary for the price range | | tickRangeUpper | Float64 | Upper tick boundary for the price range | | utilization | Float64 | Utilization percentage for this price range | | updatedAt | DateTime('UTC') | Timestamp when this data was last updated | ## Examples ### 1. Analyze 7-Day Fee Range Performance Retrieve fee range analysis for an Orca Whirlpool over the past 7 days to understand liquidity utilization patterns. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/orca/pools/fee-ranges?pool_address=Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE&days=7" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "rangeLabel", "type": "String" }, { "name": "priceRangeLower", "type": "Float64" }, { "name": "priceRangeUpper", "type": "Float64" }, { "name": "tickRangeLower", "type": "Float64" }, { "name": "tickRangeUpper", "type": "Float64" }, { "name": "utilization", "type": "Float64" }, { "name": "updatedAt", "type": "DateTime('UTC')" } ], "data": [ [ "+/- 5%", 120.62234321221, 133.31943197139, -21152.0, -20152.0, 94.01, "2026-01-28T14:11:07+00:00" ], [ "+/- 10%", 114.27379883262, 139.66797635098, -21693.0, -19686.0, 100.0, "2026-01-28T14:11:07+00:00" ], [ "+/- 20%", 101.57671007344001, 152.36506511016, -22871.0, -18816.0, 100.0, "2026-01-28T14:11:07+00:00" ] ], "rows": 3 } ``` The response shows fee range analysis with the +/- 5% range having 94.01% utilization, while wider ranges (+/- 10% and +/- 20%) show 100% utilization, indicating active trading across broader price ranges. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/orca/pools/fee-ranges" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/orca/pools/fee-ranges") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/orca/pools` - Retrieves a list of all Orca pools registered in the backend database - `/api/v1/solana/orca/pools/fee-metrics` - Retrieves core metrics like fees, volume, TVL, and Fee APR for a specific Orca Whirlpool --- ## Cambrian API: Pool Historical Daily Data **Endpoint:** /api/v1/solana/orca/pools/historical-data # Pool Historical Daily Data Retrieves historical daily fee and volume data (in USD) for a specific Orca Whirlpool over a specified timeframe. This endpoint provides insights into pool performance and activity trends. ## Business Value - **Pool Performance Analysis**: Track fee generation and trading volume trends over time to assess pool profitability - **Liquidity Strategy Optimization**: Analyze historical data to optimize liquidity provision timing and amounts - **Investment Decision Making**: Use historical volume and fee data to inform decisions about which pools to participate in - **Risk Management**: Monitor pool activity patterns to identify potential risks or opportunities - **Portfolio Tracking**: Track the historical performance of pools in your liquidity portfolio ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/orca/pools/historical-data ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | pool_address | string | Yes | - | The public key address of the Orca Whirlpool | | days | integer | Yes | - | The number of past days to include in the analysis | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | columns | array | Empty array indicating no data available | | data | array | Empty array indicating no historical data | | rows | integer | Number of rows (0 when no data available) | ## Examples ### 1. Basic Pool Historical Data Query Retrieve 7 days of historical data for an Orca Whirlpool to analyze recent performance trends. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/orca/pools/historical-data?pool_address=whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc&days=7" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [ { "columns": [], "data": [], "rows": 0 } ] ``` The response indicates that no historical data is available for the specified pool and time period. This could mean the pool is newly created or has had no activity during the requested timeframe. ### 2. Extended Historical Analysis Retrieve 30 days of historical data for comprehensive pool performance analysis. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/orca/pools/historical-data?pool_address=whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc&days=30" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [ { "columns": [], "data": [], "rows": 0 } ] ``` Similar to the shorter timeframe, no historical data is available for this pool over the 30-day period. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/orca/pools/historical-data" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/orca/pools/historical-data") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/orca/pools` - List of available Orca pools --- ## Cambrian API: Pool Liquidity Map **Endpoint:** /api/v1/solana/orca/pools/liquidity-map # Pool Liquidity Map Retrieves the distribution of net liquidity across price ticks for a specific Orca Whirlpool. Returns liquidity values at representative tick intervals based on the specified resolution, providing a visual representation of how liquidity is distributed across different price levels in the pool. ## Business Value - **Liquidity Analysis**: Understand where liquidity is concentrated in Orca pools to identify optimal trading ranges - **Price Impact Assessment**: Evaluate potential price impact of trades by analyzing liquidity depth at different price levels - **Pool Health Monitoring**: Monitor the distribution and concentration of liquidity to assess pool efficiency - **Trading Strategy Optimization**: Identify price ranges with high liquidity for reduced slippage trading - **Market Making Insights**: Determine optimal price ranges for providing liquidity based on current distribution patterns ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/orca/pools/liquidity-map ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | pool_address | string | true | - | The public key address of the Orca Whirlpool. | | resolution | integer | true | - | The approximate number of data points (tick intervals) desired in the output map. Higher values mean finer granularity. | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | columns | array | Empty array indicating no data columns | | data | array | Empty array indicating no liquidity data | | rows | integer | Number of rows returned (0 in this case) | ## Examples ### 1. Basic Liquidity Map Query This example demonstrates retrieving a liquidity map for an Orca Whirlpool with 100 data points resolution. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/orca/pools/liquidity-map?pool_address=7qbRF6YsyGuLUVs6Y1q64bdVrfe4ZcUUz1JRdoVNUJnm&resolution=100" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [ { "columns": [], "data": [], "rows": 0 } ] ``` The response indicates that no liquidity data is available for this pool, possibly because it was created before the required date (2025-02-27) or has no active liquidity positions. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/orca/pools/liquidity-map" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/orca/pools/liquidity-map") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Cambrian API: Pool Transaction Feed **Endpoint:** /api/v1/solana/pool-transactions # Pool Transaction Feed Retrieves a paginated list of trades/transactions for a specified Solana pool address including swaps, add liquidity, and remove liquidity events. This endpoint provides comprehensive transaction history for pool analysis and liquidity tracking. ## Business Value - **Pool Activity Monitoring**: Track all trading activity and liquidity events for specific pools to understand usage patterns and volume trends - **Liquidity Analysis**: Monitor add/remove liquidity events to analyze pool health and provider behavior patterns - **Trade Analytics**: Access detailed swap transaction data including amounts, tokens, and timing for market analysis - **DEX Integration**: Support for multiple DEX protocols (Meteora, Orca, Raydium) provides comprehensive Solana ecosystem coverage - **Historical Research**: Paginated results enable deep historical analysis of pool performance and market dynamics ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/pool-transactions ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | pool_address | String | Yes | - | Pool address (base58-44 string) to get transaction history for | | days | Integer | Yes | - | Number of days to look back for transactions. Default is 1 day. | | limit | Integer | No | 100 | Limit the number of results. Maximum 1000, minimum 1 | | offset | Integer | No | 0 | Offset the results, allows you to skip a number of rows before starting to return rows. Maximum 100000, minimum 0 | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | signature | String | Transaction signature hash | | slot | UInt64 | Solana slot number when transaction was processed | | txType | String | Type of transaction (trade, add liquidity, remove liquidity) | | amountIn | Float64 | Input token amount in decimal format | | amountOut | Float64 | Output token amount in decimal format | | amountInRaw | UInt128 | Input token amount in raw smallest unit | | amountOutRaw | UInt128 | Output token amount in raw smallest unit | | tokenInSymbol | String | Symbol of the input token | | tokenOutSymbol | String | Symbol of the output token | | tokenInAddress | String | Mint address of the input token | | tokenOutAddress | String | Mint address of the output token | | dex | String | DEX protocol name (Meteora, Orca, Raydium, etc.) | | poolAddress | String | Address of the pool contract | | blockTime | DateTime('UTC') | UTC timestamp when the transaction was processed | ## Examples ### 1. Recent Pool Activity Get the latest trading activity for a Meteora pool over the past 7 days. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/pool-transactions?pool_address=5rCf1DM8LjKTw4YqhnoLcngyZYeNnQqztScTogYHAS6&days=7&limit=5" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ {"name": "signature", "type": "String"}, {"name": "slot", "type": "UInt64"}, {"name": "txType", "type": "String"}, {"name": "amountIn", "type": "Float64"}, {"name": "amountOut", "type": "Float64"}, {"name": "amountInRaw", "type": "UInt128"}, {"name": "amountOutRaw", "type": "UInt128"}, {"name": "tokenInSymbol", "type": "String"}, {"name": "tokenOutSymbol", "type": "String"}, {"name": "tokenInAddress", "type": "String"}, {"name": "tokenOutAddress", "type": "String"}, {"name": "dex", "type": "String"}, {"name": "poolAddress", "type": "String"}, {"name": "blockTime", "type": "DateTime('UTC')"} ], "data": [ ["4zyuQBSn5TFybnuoiXHfLoctXBJKMzBr8Pa2BGVhzvSgcar2yXoPAbCkEq5WrhJUY4cvqN7ZCs81V4UFwmcmwrYF", 396496490, "trade", 15.740494521, 1997.310528, 15740494521, 1997310528, "SOL", "USDC", "So11111111111111111111111111111111111111112", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "Meteora", "5rCf1DM8LjKTw4YqhnoLcngyZYeNnQqztScTogYHAS6", "2026-01-28T14:11:48+00:00"], ["321iwkNbMMADUdVzJ5NzBqBEeJ9HdVbjgQQJhrcd4qzAKovRaicbDdpUwkkE7c9bJ6QZ2cu5EVE38dPiDEYeBi8o", 396496490, "trade", 55.091730824, 6990.920872, 55091730824, 6990920872, "SOL", "USDC", "So11111111111111111111111111111111111111112", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "Meteora", "5rCf1DM8LjKTw4YqhnoLcngyZYeNnQqztScTogYHAS6", "2026-01-28T14:11:48+00:00"], ["wvRhmY9peMsoosVk5umE5ue7Nx7YbyJUMbEbVW6YRofx1vDEGZCLZ1DhRfPSJaUs31Z383ef1962j73eM7LX5Fi", 396496373, "trade", 0.064195316, 8.146128, 64195316, 8146128, "SOL", "USDC", "So11111111111111111111111111111111111111112", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "Meteora", "5rCf1DM8LjKTw4YqhnoLcngyZYeNnQqztScTogYHAS6", "2026-01-28T14:11:01+00:00"], ["62xUmaUtPSFRiLP47pMycbmWJ7T7iQErPGcpHWVv2pUUAahAvpRXjVVbLpxHeJT4QfgemzccLDG59RwRcG1Py5hB", 396496274, "trade", 0.716918, 0.00564512, 716918, 5645120, "USDC", "SOL", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "So11111111111111111111111111111111111111112", "Meteora", "5rCf1DM8LjKTw4YqhnoLcngyZYeNnQqztScTogYHAS6", "2026-01-28T14:10:22+00:00"], ["4dTS6ueRYG7VAGqA8R6XySbZHSUgWxmG6q2cn8iYAjNKYYNYiZTevT2PsCrE3SrHykVvW4Waxm1HSBbCuHKot3fL", 396496254, "trade", 21.407853, 0.168568637, 21407853, 168568637, "USDC", "SOL", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "So11111111111111111111111111111111111111112", "Meteora", "5rCf1DM8LjKTw4YqhnoLcngyZYeNnQqztScTogYHAS6", "2026-01-28T14:10:13+00:00"] ], "rows": 5 // ... additional rows omitted for brevity } ``` This example shows recent trading activity in a SOL/USDC pool on Meteora, with various swap transactions ranging from small (0.064 SOL) to large (55 SOL) trades. ### 2. Daily Pool Analysis Analyze a full day of pool transactions with pagination for comprehensive daily reporting. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/pool-transactions?pool_address=5rCf1DM8LjKTw4YqhnoLcngyZYeNnQqztScTogYHAS6&days=1&limit=1000&offset=0" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ {"name": "signature", "type": "String"}, {"name": "slot", "type": "UInt64"}, {"name": "txType", "type": "String"}, {"name": "amountIn", "type": "Float64"}, {"name": "amountOut", "type": "Float64"}, {"name": "amountInRaw", "type": "UInt128"}, {"name": "amountOutRaw", "type": "UInt128"}, {"name": "tokenInSymbol", "type": "String"}, {"name": "tokenOutSymbol", "type": "String"}, {"name": "tokenInAddress", "type": "String"}, {"name": "tokenOutAddress", "type": "String"}, {"name": "dex", "type": "String"}, {"name": "poolAddress", "type": "String"}, {"name": "blockTime", "type": "DateTime('UTC')"} ], "data": [...], "rows": 850 } ``` This configuration retrieves up to 1000 transactions from the past 24 hours, enabling comprehensive daily volume and activity analysis for the specified pool. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/pool-transactions" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/pool-transactions") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/pool-transactions-time-bounded` - Get detailed transaction data for any SPL token across major Solana DEXs with precise Unix timestamp filtering for historical analysis and event-driven research - `/api/v1/solana/token-transactions` - Retrieve a paginated list of trades/transactions for a specified Solana token address across all DEXes - `/api/v1/solana/token-pool-search` - Find pools containing a specific token and retrieve comprehensive trading statistics including 24h volume, trade counts, and buy/sell ratios - `/api/v1/solana/orca/pools` - Retrieves a list of all Orca pools registered in the backend database - `/api/v1/solana/meteora-dlmm/pools` - This endpoint lists meteora pools --- ## Cambrian API: Pool Transaction Feed (Time Bounded) **Endpoint:** /api/v1/solana/pool-transactions-time-bounded # Pool Transactions (Time-Bounded) This endpoint retrieves historical pool transactions within a specified time range for Solana pools. It provides comprehensive transaction data for pools during specific time periods, allowing analysis of trading activity and volume patterns. ## Business Value - **Trading Analysis**: Track pool trading activity and volume patterns over specific time periods - **Performance Monitoring**: Monitor pool performance and liquidity changes during chosen intervals - **Historical Research**: Access detailed transaction history for backtesting and market analysis - **Risk Assessment**: Analyze transaction patterns to understand pool behavior during market events - **Strategy Development**: Use historical data to develop and validate trading strategies ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/pool-transactions-time-bounded ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | pool_address | string | Yes | - | Pool address (base58-44 string) | | after_time | integer | Yes | - | Unix timestamp - start time for data range | | before_time | integer | Yes | - | Unix timestamp - end time for data range | | limit | integer | No | - | Limit the number of results | | offset | integer | No | - | Offset the results, allows you to skip a number of rows before starting to return rows | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | columns | array | Column metadata defining the structure of returned data | | data | array | Array of data rows containing transaction information | | rows | integer | Number of rows returned in the response | *Note: When transactions are found, the columns array will define specific fields such as transaction signature, timestamp, amounts, and other transaction details. The data array contains the actual transaction records.* ## Examples ### 1. Query Pool Transactions for Time Range This example demonstrates how to retrieve pool transactions for a specific time period. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/pool-transactions-time-bounded?pool_address=2AQdpHJ2JpcEgPiATUXjQxA8QmafFegfQwSLWSprPicm&after_time=1735689600&before_time=1735776000&limit=5" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [{"columns":[],"data":[],"rows":0}] ``` The response shows no transactions were found for the specified pool and time range. When transactions exist, the columns array will contain metadata about each field, and the data array will contain the transaction records. ### 2. Query with Pagination This example shows how to use offset and limit parameters for paginated results. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/pool-transactions-time-bounded?pool_address=HJPjoWUrhoZzkNfRpHuieeFk9WcZWjwy6PBjZ81ngndJ&after_time=1700000000&before_time=1700086400&limit=10&offset=0" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [{"columns":[],"data":[],"rows":0}] ``` This query includes pagination parameters to limit results to 10 transactions and start from the first record (offset=0). ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/pool-transactions-time-bounded" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/pool-transactions-time-bounded") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/pool-transactions` - Retrieve general pool transaction data without time constraints - `/api/v1/solana/ohlcv/pool` - Get OHLCV (Open, High, Low, Close, Volume) data for pools - `/api/v1/solana/orca/pools` - Access comprehensive Orca pool information and metrics - `/api/v1/solana/orca/pool` - Get detailed information for specific Orca pools --- ## Cambrian API: Token Price (Current) **Endpoint:** /api/v1/solana/price-current # Token Price (Current) Retrieves the latest available USD price for a given Solana token program address. This endpoint provides real-time pricing data for any SPL token on the Solana blockchain, aggregated across major DEX platforms to ensure accurate and up-to-date market information. ## Business Value - **Real-time Price Discovery** - Get instant access to current market prices for any Solana token - **Portfolio Valuation** - Calculate accurate portfolio values using real-time token prices - **Trading Decision Support** - Enable trading algorithms and applications with current price data - **Market Analysis** - Support price monitoring and analysis workflows - **DeFi Integration** - Power DeFi applications requiring current token valuations ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/price-current ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | token_address | string | Yes | - | The Solana token program address (base58 string). Must be a valid Solana address between 32-44 characters | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | tokenAddress | string | The Solana token program address | | symbol | string | The token symbol (e.g., SOL, USDC) | | priceUSD | number | Current USD price of the token | ## Examples ### 1. Get Current SOL Price Get the latest USD price for Solana's native token (SOL). ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/price-current?token_address=So11111111111111111111111111111111111111112" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "tokenAddress", "type": "String" }, { "name": "symbol", "type": "String" }, { "name": "priceUSD", "type": "Float64" } ], "data": [ [ "So11111111111111111111111111111111111111112", "SOL", 126.84264001904396 ] ], "rows": 1 } ``` The response returns the current price of SOL at approximately $126.84 USD, formatted in a columnar structure with the token address, symbol, and USD price. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/price-current" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/price-current") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/price-multi` - Retrieves the latest available USD prices for multiple Solana token program addresses (comma-separated) - `/api/v1/solana/price-hour` - Aggregated USD price of a Solana token by program address, grouped by the specified interval (e.g., 1H, 1D, 1W, etc). Returns the average price for each interval - `/api/v1/solana/price-unix` - Retrieve historical price data for a specified Solana token at the nearest hour to a specific Unix timestamp - `/api/v1/solana/price-volume/single` - Retrieve current USD price, timeframe volume, and percentage changes for any SPL token - `/api/v1/solana/price-volume/multi` - Retrieve current USD price, timeframe volume, and percentage changes for any SPL token (multiple tokens) --- ## Cambrian API: Token Price (Interval Aggregated) **Endpoint:** /api/v1/solana/price-hour # Token Price Hourly Data Retrieves hourly aggregated token price data for Solana tokens over time. This endpoint provides historical price points with configurable time intervals and data limits. ## Business Value - **Historical Price Analysis**: Access comprehensive hourly price data for technical analysis and trend identification - **Trading Strategy Development**: Build data-driven trading algorithms using reliable historical price feeds - **Portfolio Performance Tracking**: Monitor token price movements over custom time intervals for portfolio optimization - **Market Research**: Analyze token price volatility and patterns for investment decision-making - **Integration Flexibility**: Customize data retrieval with various interval options (1H to 1M) and result limits ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/price-hour ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | token_address | String | Yes | - | Token program address (base58-44 string). See tokens for valid addresses. | | interval | String | Yes | - | Time interval for price aggregation. One of: 1H, 2H, 4H, 6H, 8H, 12H, 1D, 3D, 1W, 1M. | | limit | Integer | No | 24 | Limit the number of results. | | offset | Integer | No | 0 | Offset the results, allows you to skip a number of rows before starting to return rows. | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | tokenAddress | String | The Solana token mint address | | tokenSymbol | String | Token symbol (e.g., SOL, USDC) | | intervalStart | DateTime | Start time of the price interval in UTC | | priceUSD | Float64 | Token price in USD for the given interval | | datapoints | UInt64 | Number of data points used in price aggregation | ## Examples ### 1. Get SOL Hourly Price Data Retrieve the last 24 hours of SOL price data with 1-hour intervals. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/price-hour?token_address=So11111111111111111111111111111111111111112&interval=1H" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "tokenAddress", "type": "String" }, { "name": "tokenSymbol", "type": "String" }, { "name": "intervalStart", "type": "DateTime('UTC')" }, { "name": "priceUSD", "type": "Float64" }, { "name": "datapoints", "type": "UInt64" } ], "data": [ [ "So11111111111111111111111111111111111111112", "SOL", "2026-01-28T13:00:00+00:00", 127.26939703376955, 1 ], [ "So11111111111111111111111111111111111111112", "SOL", "2026-01-28T12:00:00+00:00", 127.45250374050678, 2 ], [ "So11111111111111111111111111111111111111112", "SOL", "2026-01-28T11:00:00+00:00", 127.52338304261028, 2 ], [ "So11111111111111111111111111111111111111112", "SOL", "2026-01-28T10:00:00+00:00", 127.44226466619372, 1 ], [ "So11111111111111111111111111111111111111112", "SOL", "2026-01-28T09:00:00+00:00", 126.762011179554, 1 ] ], "rows": 5 // ... additional rows omitted for brevity } ``` Returns SOL price data aggregated in 1-hour intervals, showing the token address, symbol, interval start time, USD price, and number of data points used for each aggregation. ### 2. Get Extended Historical Data Retrieve 7 days of SOL price data with 12-hour intervals. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/price-hour?token_address=So11111111111111111111111111111111111111112&interval=12H&limit=14" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "tokenAddress", "type": "String" }, { "name": "tokenSymbol", "type": "String" }, { "name": "intervalStart", "type": "DateTime('UTC')" }, { "name": "priceUSD", "type": "Float64" }, { "name": "datapoints", "type": "UInt64" } ], "data": [ [ "So11111111111111111111111111111111111111112", "SOL", "2026-01-28T12:00:00+00:00", 127.35, 12 ] ], "rows": 1 // ... additional intervals would be returned } ``` Returns SOL price data with 12-hour aggregation intervals, providing broader trend analysis with fewer but more comprehensive data points. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/price-hour" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/price-hour") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/price-current` - Get current token price data - `/api/v1/solana/tokens/holders` - Get token holder information - `/api/v1/solana/tokens/holders-over-time` - Get historical token holder data --- ## Cambrian API: Multi Token Price (Current) **Endpoint:** /api/v1/solana/price-multi # Token Price (Multi) Retrieves current USD prices for multiple Solana tokens by providing their token addresses. Returns pricing data in a structured format with token address, symbol, and USD price for each requested token. ## Business Value - **Multi-Token Pricing**: Get prices for multiple tokens in a single API call, reducing latency and improving efficiency - **Real-Time Market Data**: Access current market prices for immediate trading decisions and portfolio valuation - **Cost-Effective**: Bulk pricing reduces API call overhead compared to individual price requests - **Data Consistency**: All prices retrieved simultaneously ensure data consistency across token comparisons - **Portfolio Management**: Essential for portfolio tracking applications and multi-token analysis workflows ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/price-multi ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | token_addresses | String | Yes | - | Comma-separated list of Solana token program addresses (base58 strings) | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | tokenAddress | String | The Solana token program address (base58 encoded) | | symbol | String | The token symbol (e.g., SOL, BONK) | | priceUSD | Float64 | Current price of the token in USD | ## Examples ### 1. Multiple Token Price Lookup Retrieve current prices for SOL and BONK tokens using their token addresses. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/price-multi?token_addresses=So11111111111111111111111111111111111111112,DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "tokenAddress", "type": "String" }, { "name": "symbol", "type": "String" }, { "name": "priceUSD", "type": "Float64" } ], "data": [ [ "So11111111111111111111111111111111111111112", "SOL", 127.00249723325373 ], [ "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263", "Bonk", 0.000008744901316534057 ] ], "rows": 2 } ``` Returns pricing data for both SOL ($127.00) and BONK ($0.0000087) tokens in a columnar format with 2 rows of data. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/price-multi" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/price-multi") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/token-details-multi` - Retrieve comprehensive details for multiple Solana tokens simultaneously - `/api/v1/solana/ohlcv/token` - Get OHLCV data for individual SPL tokens - `/api/v1/solana/trade-statistics` - Get trade analytics and performance metrics for SPL tokens - `/api/v1/solana/orca/pool-multi` - Get comprehensive pool metrics for multiple Orca pools - `/api/v1/solana/meteora-dlmm/pool-multi` - Get comprehensive pool metrics for multiple Meteora DLMM pools --- ## Cambrian API: Token Price (Unix) **Endpoint:** /api/v1/solana/price-unix # Token Price (Unix Timestamp) Retrieves historical token price data for a specific Unix timestamp. This endpoint provides precise price information for Solana tokens at any hour-granular timestamp. ## Business Value - **Historical Analysis**: Access accurate price data for any specific point in time for backtesting and analysis - **Time-Series Research**: Build comprehensive datasets for token price movements and volatility studies - **Portfolio Tracking**: Calculate exact portfolio values at specific timestamps for performance analysis - **Data Integration**: Seamlessly integrate historical price data into trading algorithms and research platforms - **Precise Timestamps**: Get hour-level granular price data with UTC timestamp alignment for global consistency ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/price-unix ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | token_address | string | Yes | - | Solana token mint address (base58 format). Example: So11111111111111111111111111111111111111112 | | unixtime | integer | Yes | - | Hour in unix timestamp to query price for (0 to 10000000000, rounded down to the nearest hour). Example: 1726700000 | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | tokenAddress | String | The Solana token mint address | | updateUnixTime | UInt32 | Unix timestamp when price data was last updated | | updateUTCTime | String | UTC timestamp when price data was last updated | | priceUSD | Float64 | Token price in USD | | change24h | Float64 | 24-hour price change percentage | | dataSource | String | Source of the price data (e.g., "historical") | | availability | String | Data availability status (e.g., "available") | ## Examples ### 1. Get SOL Token Price at Specific Time Retrieve the price of Wrapped SOL (WSOL) token for a specific Unix timestamp. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/price-unix?token_address=So11111111111111111111111111111111111111112&unixtime=1750110000" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "tokenAddress", "type": "String" }, { "name": "updateUnixTime", "type": "UInt32" }, { "name": "updateUTCTime", "type": "String" }, { "name": "priceUSD", "type": "Float64" }, { "name": "change24h", "type": "Float64" }, { "name": "dataSource", "type": "String" }, { "name": "availability", "type": "String" } ], "data": [ [ "So11111111111111111111111111111111111111112", 1750107600, "2025-06-16T21:00:00Z", 157.03180938284908, 5.096096498184193, "historical", "available" ] ], "rows": 1 } ``` The response shows that WSOL was priced at $157.03 USD at the requested timestamp with a 24-hour change of approximately +5.10%, indicating positive price movement. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/price-unix" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/price-unix") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/ohlcv/token` - Retrieve Open, High, Low, Close, and Volume data for any SPL token - `/api/v1/solana/ohlcv/base-quote` - Retrieve granular OHLCV data with separate base and quote token volumes for detailed trading analysis between any two SPL tokens - `/api/v1/solana/ohlcv/pool` - Retrieve OHLCV data for individual pool contracts enabling pair-specific price analysis and liquidity venue performance tracking --- ## Cambrian API: Token Price and Volume (Multi) **Endpoint:** /api/v1/solana/price-volume/multi # Token Price and Volume (Multi) Retrieve current USD price, timeframe volume, and percentage changes for multiple SPL tokens in a single request. Combines price and volume data to reduce API calls and improve application performance with data aggregated across major Solana DEXs. ## Business Value - **Multi-token Efficiency**: Query up to 50 tokens simultaneously, reducing API calls by 50x compared to individual requests - **Real-time Price Tracking**: Get current USD prices with timestamp precision for accurate market data - **Volume Analytics**: Track trading volume and percentage changes over customizable timeframes (1h-24h) - **Performance Optimization**: Single-request design minimizes latency for portfolio and dashboard applications - **Cross-DEX Aggregation**: Consolidated data from major Solana decentralized exchanges for comprehensive market coverage ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/price-volume/multi ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | token_addresses | String | Yes | - | Comma-separated SPL token mint addresses (max 50, base58) | | timeframe | String | Yes | - | Timeframe for volume and change calculations: 1h, 2h, 4h, 8h, 24h | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | tokenAddress | String | SPL token mint address | | symbol | String | Token symbol (e.g., SOL, USDC) | | priceUSD | Float64 | Current token price in USD | | updateUnixTime | UInt32 | Unix timestamp of last price update | | volumeUSD | Float64 | Trading volume in USD for the specified timeframe | | volumeChangePercent | Float64 | Volume change percentage compared to previous timeframe | | priceChangePercent | Float64 | Price change percentage for the specified timeframe | | priceChangeUSD | Float64 | Absolute price change in USD for the specified timeframe | ## Examples ### 1. Single Token Price and Volume Data Query current price and 24-hour volume data for SOL token. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/price-volume/multi?token_addresses=So11111111111111111111111111111111111111112&timeframe=24h" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [ { "columns": [ { "name": "tokenAddress", "type": "String" }, { "name": "symbol", "type": "String" }, { "name": "priceUSD", "type": "Float64" }, { "name": "updateUnixTime", "type": "UInt32" }, { "name": "volumeUSD", "type": "Float64" }, { "name": "volumeChangePercent", "type": "Nullable(Float64)" }, { "name": "priceChangePercent", "type": "Nullable(Float64)" }, { "name": "priceChangeUSD", "type": "Float64" } ], "data": [ [ "So11111111111111111111111111111111111111112", "SOL", 126.78800000000001, 1769609738, 8306580577.1, 16.47, 2.46, 3.038481025336324 ] ], "rows": 1 } ] ``` The response shows SOL trading at $126.79 with $8.31B in 24-hour volume, up 2.46% in price and 16.47% in volume compared to the previous 24-hour period. ### 2. Multiple Tokens with Shorter Timeframe Query 4-hour price and volume changes for multiple popular Solana tokens. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/price-volume/multi?token_addresses=So11111111111111111111111111111111111111112,EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&timeframe=4h" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [ { "columns": [ { "name": "tokenAddress", "type": "String" }, { "name": "symbol", "type": "String" }, { "name": "priceUSD", "type": "Float64" }, { "name": "updateUnixTime", "type": "UInt32" }, { "name": "volumeUSD", "type": "Float64" }, { "name": "volumeChangePercent", "type": "Nullable(Float64)" }, { "name": "priceChangePercent", "type": "Nullable(Float64)" }, { "name": "priceChangeUSD", "type": "Float64" } ], "data": [ "Multiple token data would appear here with same structure" ], "rows": 2 } ] ``` This would return price and volume data for both SOL and USDC tokens over a 4-hour timeframe, enabling shorter-term trading analysis and portfolio tracking. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/price-volume/multi" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/price-volume/multi") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/ohlcv/token` - Retrieve Open, High, Low, Close, and Volume data for any SPL token - `/api/v1/solana/ohlcv/pool` - Retrieve OHLCV data for individual pool contracts enabling pair-specific price analysis - `/api/v1/solana/ohlcv/base-quote` - Retrieve granular OHLCV data with separate base and quote token volumes for detailed trading analysis --- ## Cambrian API: Token Price and Volume (Single) **Endpoint:** /api/v1/solana/price-volume/single # Token Price and Volume (Single) Retrieve current USD price, timeframe volume, and percentage changes for any SPL token in a single request. This endpoint combines price and volume data to reduce API calls and improve application performance, with data aggregated across major Solana DEXs. ## Business Value - **Unified Data Access**: Get both price and volume metrics in a single API call, reducing latency and API usage - **Performance Optimization**: Minimizes network requests by combining related data points into one response - **Multi-DEX Coverage**: Aggregated data from major Solana DEXs provides comprehensive market view - **Real-time Analytics**: Current pricing and volume changes enable responsive trading and portfolio applications - **Developer Efficiency**: Streamlined integration reduces code complexity for applications needing both price and volume data ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/price-volume/single ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | token_address | String | Yes | - | SPL token mint address (base58, 44 chars) | | timeframe | String | Yes | - | Timeframe: 1h, 2h, 4h, 8h, 24h | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | tokenAddress | String | SPL token mint address | | symbol | String | Token symbol | | priceUSD | Float64 | Current token price in USD | | updateUnixTime | UInt32 | Unix timestamp of last price update | | volumeUSD | Float64 | Total volume in USD for the specified timeframe | | volumeChangePercent | Nullable(Float64) | Volume change percentage compared to previous timeframe | | priceChangePercent | Nullable(Float64) | Price change percentage compared to previous timeframe | | priceChangeUSD | Float64 | Absolute price change in USD | ## Examples ### 1. Get SOL Price and Volume Data Retrieve current price and 24-hour volume data for Solana (SOL) token. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/price-volume/single?token_address=So11111111111111111111111111111111111111112&timeframe=24h" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "tokenAddress", "type": "String" }, { "name": "symbol", "type": "String" }, { "name": "priceUSD", "type": "Float64" }, { "name": "updateUnixTime", "type": "UInt32" }, { "name": "volumeUSD", "type": "Float64" }, { "name": "volumeChangePercent", "type": "Nullable(Float64)" }, { "name": "priceChangePercent", "type": "Nullable(Float64)" }, { "name": "priceChangeUSD", "type": "Float64" } ], "data": [ [ "So11111111111111111111111111111111111111112", "SOL", 126.99943107601075, 1769609710, 8313460522.41, 16.4, 2.63, 3.249912101347064 ] ], "rows": 1 } ``` Returns comprehensive price and volume data for SOL showing a current price of ~$127 with $8.3B in 24h volume, up 16.4% in volume and 2.63% in price. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/price-volume/single" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/price-volume/single") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/price-current` - Current token price data --- ## Cambrian API: Pool Info **Endpoint:** /api/v1/solana/raydium-clmm/pool # Raydium CLMM Pool Details This endpoint returns detailed information for a specific Raydium Concentrated Liquidity Market Maker (CLMM) pool on Solana. It provides comprehensive pool metrics including liquidity, trading volume, fees, and token details. ## Business Value - **Pool Analysis**: Get real-time metrics for specific Raydium CLMM pools including TVL, APR, and 24h volume - **Trading Intelligence**: Access current price, tick information, and liquidity utilization for informed trading decisions - **Risk Assessment**: Monitor pool volatility, fee tiers, and utilization rates to evaluate investment opportunities - **Portfolio Management**: Track performance metrics and fees generated by liquidity positions - **Market Research**: Analyze token pair dynamics and pool efficiency across different fee tiers ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/raydium-clmm/pool ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | pool_address | string | Yes | - | Program ID for raydium clmm pool (e.g., 3ucNos4NbumPLZNWztqGHNFFgkHeRMBQAVemeeomsUxv) | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | chainId | UInt16 | Solana chain identifier (900) | | dexAddress | String | DEX contract address for Raydium CLMM | | dexName | String | Name of the DEX (Raydium CLMM) | | poolAddress | String | Unique pool address identifier | | createdAt | DateTime | Pool creation timestamp in UTC | | token0Address | String | Address of the first token in the pair | | token0Symbol | String | Symbol of the first token (e.g., SOL) | | token0Decimals | UInt8 | Decimal places for token0 | | token1Address | String | Address of the second token in the pair | | token1Symbol | String | Symbol of the second token (e.g., USDC) | | token1Decimals | UInt8 | Decimal places for token1 | | feeTier | UInt32 | Fee tier in basis points (400 = 0.04%) | | tickSpacing | UInt16 | Tick spacing for the pool | | sqrtPriceX64 | UInt128 | Square root price encoded as X64 | | tick | Int32 | Current tick of the pool | | price | Float64 | Current price of token0 in terms of token1 | | tvlToken0 | Float64 | Total value locked in token0 | | tvlToken1 | Float64 | Total value locked in token1 | | tvlToken0Usd | Float64 | USD value of token0 TVL | | tvlToken1Usd | Float64 | USD value of token1 TVL | | tvl | Float64 | Total value locked in USD | | volume24h | Float64 | 24-hour trading volume in USD | | fees24h | Float64 | 24-hour fees generated in USD | | apr24h | Float64 | 24-hour annualized percentage rate | | priceVolatility | Float64 | Price volatility metric | | utilization24h | Float64 | 24-hour utilization percentage | ## Examples ### 1. Get SOL/USDC Pool Details Retrieve detailed metrics for a popular SOL/USDC Raydium CLMM pool to analyze its performance and liquidity characteristics. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/raydium-clmm/pool?pool_address=3ucNos4NbumPLZNWztqGHNFFgkHeRMBQAVemeeomsUxv" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "chainId", "type": "UInt16" }, { "name": "dexAddress", "type": "String" }, { "name": "dexName", "type": "String" }, { "name": "poolAddress", "type": "FixedString(44)" }, { "name": "createdAt", "type": "DateTime('UTC')" }, { "name": "token0Address", "type": "FixedString(44)" }, { "name": "token0Symbol", "type": "String" }, { "name": "token0Decimals", "type": "UInt8" }, { "name": "token1Address", "type": "FixedString(44)" }, { "name": "token1Symbol", "type": "String" }, { "name": "token1Decimals", "type": "UInt8" }, { "name": "feeTier", "type": "UInt32" }, { "name": "tickSpacing", "type": "UInt16" }, { "name": "sqrtPriceX64", "type": "UInt128" }, { "name": "tick", "type": "Int32" }, { "name": "price", "type": "Float64" }, { "name": "tvlToken0", "type": "Float64" }, { "name": "tvlToken1", "type": "Float64" }, { "name": "tvlToken0Usd", "type": "Float64" }, { "name": "tvlToken1Usd", "type": "Float64" }, { "name": "tvl", "type": "Float64" }, { "name": "volume24h", "type": "Float64" }, { "name": "fees24h", "type": "Float64" }, { "name": "apr24h", "type": "Float64" }, { "name": "priceVolatility", "type": "Float64" }, { "name": "utilization24h", "type": "Float64" } ], "data": [ [ 900, "CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK", "Raydium CLMM", "3ucNos4NbumPLZNWztqGHNFFgkHeRMBQAVemeeomsUxv", "2024-08-07T13:33:36+00:00", "So11111111111111111111111111111111111111112", "SOL", 9, "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "USDC", 6, 400, 1, 6569193630558585018, -20651, 126.81910422292906, 60751.624493078, 1705223.245765, 7706574.359120288, 1705223.245765, 9411797.604885288, 19638951.014971666, 7855.580405988667, 30.46481627162881, 0.005128117610933924, 100.0 ] ], "rows": 1 } ``` This response shows a SOL/USDC pool with $9.4M TVL, 30.46% APR, and $19.6M in 24h volume, indicating high liquidity and active trading. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/raydium-clmm/pool" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/raydium-clmm/pool") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/pool-transactions` - Get transaction history for Solana pools - `/api/v1/solana/raydium-clmm/pool-multi` - Get comprehensive overview metrics for multiple pools/pairs simultaneously within the same DEX --- ## Cambrian API: Pool Info (Multi) **Endpoint:** /api/v1/solana/raydium-clmm/pool-multi # Pool Info (Multi) Get comprehensive overview metrics for multiple pools/pairs simultaneously within the same DEX. Returns pool details including price, volume, trades, and token information for specified pool addresses. ## Business Value - **Multi-Pool Analysis**: Query multiple Raydium CLMM pools in a single API call for efficient portfolio monitoring - **Real-Time Metrics**: Access current price, volume, TVL, and trading activity across multiple pools simultaneously - **Cost-Effective Monitoring**: Reduce API call overhead by fetching data for multiple pools at once - **Performance Analytics**: Track 24-hour metrics including volume, fees, APR, and swap counts across pool positions - **Risk Management**: Monitor price volatility and utilization rates across multiple liquidity positions ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/raydium-clmm/pool-multi ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | pool_addresses | string | Yes | - | Comma-separated pool addresses within the same DEX. Example: addr1,addr2,addr3 | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | chainId | UInt16 | Blockchain network ID (900 for Solana) | | dexAddress | String | Raydium CLMM program address | | dexName | String | Name of the DEX (Raydium CLMM) | | poolAddress | FixedString(44) | Unique address identifier for the pool | | createdAt | DateTime('UTC') | Timestamp when the pool was created | | token0Address | FixedString(44) | Address of the first token in the pair | | token0Symbol | String | Symbol of the first token (e.g., SOL) | | token0Decimals | UInt8 | Number of decimal places for token0 | | token1Address | FixedString(44) | Address of the second token in the pair | | token1Symbol | String | Symbol of the second token (e.g., USDC) | | token1Decimals | UInt8 | Number of decimal places for token1 | | feeTier | UInt32 | Pool fee tier (e.g., 400 = 0.04%) | | tickSpacing | UInt16 | Minimum tick spacing for price movements | | sqrtPriceX64 | UInt128 | Square root price scaled by 2^64 | | tick | Int32 | Current tick index for price position | | price | Nullable(Float64) | Current price of token0 in terms of token1 | | lastSwapTime | DateTime('UTC') | Timestamp of the most recent swap | | tokenVault0 | FixedString(44) | Vault address for token0 reserves | | tokenVault1 | FixedString(44) | Vault address for token1 reserves | | token0PriceUSD | Float64 | USD price of token0 | | token1PriceUSD | Float64 | USD price of token1 | | tvlToken0 | Nullable(Float64) | Total value locked in token0 | | tvlToken1 | Nullable(Float64) | Total value locked in token1 | | tvl | Nullable(Float64) | Total value locked in USD | | volumeToken0 | Nullable(Float64) | 24h trading volume in token0 | | volumeToken1 | Nullable(Float64) | 24h trading volume in token1 | | volume24h | Nullable(Float64) | 24h trading volume in USD | | fees24h | Nullable(Float64) | 24h fees collected in USD | | apr24h | Nullable(Float64) | 24h annualized percentage return | | priceVolatility | Nullable(Float64) | Price volatility measure | | utilization24h | Nullable(Float64) | 24h capital utilization rate | | swaps24h | UInt64 | Number of swaps in the last 24 hours | | ticksUsed24h | UInt64 | Number of unique ticks used in 24h | ## Examples ### 1. Single Pool Query Query comprehensive metrics for a SOL-USDC pool on Raydium CLMM. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/raydium-clmm/pool-multi?pool_addresses=3ucNos4NbumPLZNWztqGHNFFgkHeRMBQAVemeeomsUxv" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "chainId", "type": "UInt16" }, { "name": "dexAddress", "type": "String" }, { "name": "dexName", "type": "String" }, { "name": "poolAddress", "type": "FixedString(44)" }, { "name": "createdAt", "type": "DateTime('UTC')" }, { "name": "token0Address", "type": "FixedString(44)" }, { "name": "token0Symbol", "type": "String" }, { "name": "token0Decimals", "type": "UInt8" }, { "name": "token1Address", "type": "FixedString(44)" }, { "name": "token1Symbol", "type": "String" }, { "name": "token1Decimals", "type": "UInt8" }, { "name": "feeTier", "type": "UInt32" }, { "name": "tickSpacing", "type": "UInt16" }, { "name": "sqrtPriceX64", "type": "UInt128" }, { "name": "tick", "type": "Int32" }, { "name": "price", "type": "Nullable(Float64)" }, { "name": "lastSwapTime", "type": "DateTime('UTC')" }, { "name": "tokenVault0", "type": "FixedString(44)" }, { "name": "tokenVault1", "type": "FixedString(44)" }, { "name": "token0PriceUSD", "type": "Float64" }, { "name": "token1PriceUSD", "type": "Float64" }, { "name": "tvlToken0", "type": "Nullable(Float64)" }, { "name": "tvlToken1", "type": "Nullable(Float64)" }, { "name": "tvl", "type": "Nullable(Float64)" }, { "name": "volumeToken0", "type": "Nullable(Float64)" }, { "name": "volumeToken1", "type": "Nullable(Float64)" }, { "name": "volume24h", "type": "Nullable(Float64)" }, { "name": "fees24h", "type": "Nullable(Float64)" }, { "name": "apr24h", "type": "Nullable(Float64)" }, { "name": "priceVolatility", "type": "Nullable(Float64)" }, { "name": "utilization24h", "type": "Nullable(Float64)" }, { "name": "swaps24h", "type": "UInt64" }, { "name": "ticksUsed24h", "type": "UInt64" } ], "data": [ [ 900, "CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK", "Raydium CLMM", "3ucNos4NbumPLZNWztqGHNFFgkHeRMBQAVemeeomsUxv", "2024-08-07T13:33:36+00:00", "So11111111111111111111111111111111111111112", "SOL", 9, "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "USDC", 6, 400, 1, 6570043340001267395, -20649, 126.85191383873301, "2026-01-28T14:15:00+00:00", "4ct7br2vTPzfdmY3S5HLtTxcGSBfn6pnw98hsS6v359A", "5it83u57VRrVgc51oNV19TTmAJuffPx5GtGwQr7gQNUo", 126.88290871180035, 1.0, 60713.83389242, 1710008.248591, 9413556.091906337, 155394.376777459, 19590689.211778, 19716890.52298144, 7886.756209192576, 30.580005985520526, 0.005134115794626117, 100.0, 26051, 389 ] ], "rows": 1 } ``` Returns comprehensive pool data for a SOL-USDC pool showing current price (~$126.85), high TVL ($9.4M), and strong 24h trading activity with $19.7M volume and 26,051 swaps. ### 2. Multiple Pool Query Query metrics for multiple pools by providing comma-separated pool addresses. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/raydium-clmm/pool-multi?pool_addresses=3ucNos4NbumPLZNWztqGHNFFgkHeRMBQAVemeeomsUxv,AnotherPoolAddress123,ThirdPoolAddress456" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "chainId", "type": "UInt16" }, { "name": "dexAddress", "type": "String" }, { "name": "dexName", "type": "String" }, { "name": "poolAddress", "type": "FixedString(44)" }, { "name": "createdAt", "type": "DateTime('UTC')" }, { "name": "token0Address", "type": "FixedString(44)" }, { "name": "token0Symbol", "type": "String" }, { "name": "token0Decimals", "type": "UInt8" }, { "name": "token1Address", "type": "FixedString(44)" }, { "name": "token1Symbol", "type": "String" }, { "name": "token1Decimals", "type": "UInt8" }, { "name": "feeTier", "type": "UInt32" }, { "name": "tickSpacing", "type": "UInt16" }, { "name": "sqrtPriceX64", "type": "UInt128" }, { "name": "tick", "type": "Int32" }, { "name": "price", "type": "Nullable(Float64)" }, { "name": "lastSwapTime", "type": "DateTime('UTC')" }, { "name": "tokenVault0", "type": "FixedString(44)" }, { "name": "tokenVault1", "type": "FixedString(44)" }, { "name": "token0PriceUSD", "type": "Float64" }, { "name": "token1PriceUSD", "type": "Float64" }, { "name": "tvlToken0", "type": "Nullable(Float64)" }, { "name": "tvlToken1", "type": "Nullable(Float64)" }, { "name": "tvl", "type": "Nullable(Float64)" }, { "name": "volumeToken0", "type": "Nullable(Float64)" }, { "name": "volumeToken1", "type": "Nullable(Float64)" }, { "name": "volume24h", "type": "Nullable(Float64)" }, { "name": "fees24h", "type": "Nullable(Float64)" }, { "name": "apr24h", "type": "Nullable(Float64)" }, { "name": "priceVolatility", "type": "Nullable(Float64)" }, { "name": "utilization24h", "type": "Nullable(Float64)" }, { "name": "swaps24h", "type": "UInt64" }, { "name": "ticksUsed24h", "type": "UInt64" } ], "data": [ [ 900, "CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK", "Raydium CLMM", "3ucNos4NbumPLZNWztqGHNFFgkHeRMBQAVemeeomsUxv", "2024-08-07T13:33:36+00:00", "So11111111111111111111111111111111111111112", "SOL", 9, "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "USDC", 6, 400, 1, 6570043340001267395, -20649, 126.85191383873301, "2026-01-28T14:15:00+00:00", "4ct7br2vTPzfdmY3S5HLtTxcGSBfn6pnw98hsS6v359A", "5it83u57VRrVgc51oNV19TTmAJuffPx5GtGwQr7gQNUo", 126.88290871180035, 1.0, 60713.83389242, 1710008.248591, 9413556.091906337, 155394.376777459, 19590689.211778, 19716890.52298144, 7886.756209192576, 30.580005985520526, 0.005134115794626117, 100.0, 26051, 389 ] ], "rows": 1 } ``` Enables efficient batch monitoring of multiple pool positions, returning data for all requested pools in a single API call for portfolio management and performance tracking. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/raydium-clmm/pool-multi" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/raydium-clmm/pool-multi") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/raydium-clmm/pool` - Returns pool info for a specific Raydium CLMM pool including TVL, APR, and volume metrics - `/api/v1/solana/raydium-clmm/pools` - Lists basic pool information for all Raydium CLMM pools - `/api/v1/solana/orca/pools` - Retrieves list of all Orca pools for cross-DEX comparison - `/api/v1/solana/pool-transactions` - Get transaction history for pool activity analysis --- ## Cambrian API: List Pools **Endpoint:** /api/v1/solana/raydium-clmm/pools # Raydium CLMM Pools Retrieves a comprehensive list of all Raydium Concentrated Liquidity Market Maker (CLMM) pools from the Solana blockchain. This endpoint provides essential information about each pool including token pairs, fees, creation timestamps, and pool addresses. ## Business Value - **Pool Discovery**: Identify and analyze all available Raydium CLMM pools for trading and liquidity provision opportunities - **Market Intelligence**: Track new pool creation activity and monitor the expansion of the Raydium ecosystem - **Trading Strategy**: Access complete pool metadata to develop informed trading strategies based on fee tiers and token pairs - **Portfolio Management**: Evaluate potential liquidity mining opportunities across different fee structures - **DeFi Analytics**: Perform comprehensive analysis of the Raydium CLMM ecosystem for research and investment decisions ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/raydium-clmm/pools ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | limit | integer | No | 100 | Limit the number of results. Min: 1, Max: 1000 | | offset | integer | No | 0 | Offset the results, allows you to skip a number of rows before starting to return rows. Min: 0, Max: 100000 | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | poolAddress | FixedString(44) | The unique Solana address of the CLMM pool contract | | chainId | UInt16 | Blockchain identifier (900 for Solana) | | dexAddress | FixedString(44) | The Solana address of the Raydium CLMM program | | dexName | String | Name of the DEX protocol (Raydium CLMM) | | token0Address | FixedString(44) | Solana address of the first token in the pool pair | | token0Symbol | String | Symbol/ticker of the first token | | token0Decimals | UInt8 | Number of decimal places for the first token | | token1Address | FixedString(44) | Solana address of the second token in the pool pair | | token1Symbol | String | Symbol/ticker of the second token | | token1Decimals | UInt8 | Number of decimal places for the second token | | createdAt | DateTime('UTC') | UTC timestamp when the pool was created | | fee | UInt32 | Pool fee in basis points (e.g., 100 = 0.01%) | | tickSpacing | UInt16 | Tick spacing parameter for the concentrated liquidity pool | ## Examples ### 1. Get All Available Raydium CLMM Pools Retrieve the complete list of Raydium CLMM pools with default pagination. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/raydium-clmm/pools" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "poolAddress", "type": "FixedString(44)" }, { "name": "chainId", "type": "UInt16" }, { "name": "dexAddress", "type": "FixedString(44)" }, { "name": "dexName", "type": "String" }, { "name": "token0Address", "type": "FixedString(44)" }, { "name": "token0Symbol", "type": "String" }, { "name": "token0Decimals", "type": "UInt8" }, { "name": "token1Address", "type": "FixedString(44)" }, { "name": "token1Symbol", "type": "String" }, { "name": "token1Decimals", "type": "UInt8" }, { "name": "createdAt", "type": "DateTime('UTC')" }, { "name": "fee", "type": "UInt32" }, { "name": "tickSpacing", "type": "UInt16" } ], "data": [ [ "GRjZQbjHo1GmCxt2UqqNx1WW6JSHBcQzUGS77naHFfMD", 900, "CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK", "Raydium CLMM", "7wyrEyX2saCYeDgUBxybho8rvYkmr41BUhJAR2qGQrK", "TON", 6, "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "USDC", 6, "2026-01-09T14:12:30+00:00", 100, 1 ], [ "DZT1YWzJSbLtos1qj1zzaASkSfAt2q1LV3bEagohsrVA", 900, "CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK", "Raydium CLMM", "BcdYe1tvmvPXc8UPnzur5nG8PrQFYyfe7cjPxQpZKdEF", "TAO", 8, "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "USDC", 6, "2026-01-09T14:11:26+00:00", 100, 1 ], [ "HbHvaciFGsDwD3d39VxeiGYYDcxR2kMNn5nJCZiCPtg6", 900, "CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK", "Raydium CLMM", "Dg55zDp2tXr8gE4cXXhAW3N3D4TsSxvwra6rmYMwiyRT", "HBAR", 6, "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "USDC", 6, "2026-01-09T14:10:08+00:00", 100, 1 ], [ "4jBAU1QdZsZraaWiTkFRMTgvNWFUhAtEN12wrqETNPkM", 900, "CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK", "Raydium CLMM", "Av3V85LuzZGUfAdE7haF74aveNhEfgP91vdWb2DJHG6q", "HKDS", 9, "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB", "USDT", 6, "2026-01-09T14:06:00+00:00", 100, 1 ], [ "r58B1y81wVXNV5GyVM49tLwJ85vvdNhdgWNhX6FfeWq", 900, "CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK", "Raydium CLMM", "So11111111111111111111111111111111111111112", "SOL", 9, "8ysJhjaDJ8dL1E1rXpVSSu1c2HySrvTn4EatZJrh2PqG", "MASK", 6, "2026-01-09T13:52:56+00:00", 100, 1 ] ], "rows": 5 // ... additional rows omitted for brevity } ``` This response shows the most recently created Raydium CLMM pools including popular pairs like TON/USDC, TAO/USDC, HBAR/USDC, and SOL/MASK. Each pool has a 0.01% fee (100 basis points) and tick spacing of 1, indicating these are standard fee tier pools. ### 2. Get Limited Results with Pagination Retrieve a specific number of pools using pagination parameters. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/raydium-clmm/pools?limit=50&offset=100" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "poolAddress", "type": "FixedString(44)" }, { "name": "chainId", "type": "UInt16" }, { "name": "dexAddress", "type": "FixedString(44)" }, { "name": "dexName", "type": "String" }, { "name": "token0Address", "type": "FixedString(44)" }, { "name": "token0Symbol", "type": "String" }, { "name": "token0Decimals", "type": "UInt8" }, { "name": "token1Address", "type": "FixedString(44)" }, { "name": "token1Symbol", "type": "String" }, { "name": "token1Decimals", "type": "UInt8" }, { "name": "createdAt", "type": "DateTime('UTC')" }, { "name": "fee", "type": "UInt32" }, { "name": "tickSpacing", "type": "UInt16" } ], "data": [ [ "GRjZQbjHo1GmCxt2UqqNx1WW6JSHBcQzUGS77naHFfMD", 900, "CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK", "Raydium CLMM", "7wyrEyX2saCYeDgUBxybho8rvYkmr41BUhJAR2qGQrK", "TON", 6, "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "USDC", 6, "2026-01-09T14:12:30+00:00", 100, 1 ] ], "rows": 1 // ... additional rows omitted for brevity } ``` This pagination example skips the first 100 pools and returns the next 50, useful for implementing efficient data loading in applications that display large numbers of pools. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/raydium-clmm/pools" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/raydium-clmm/pools") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/ohlcv/pool` - Retrieve OHLCV data for individual pool contracts enabling pair-specific price analysis and liquidity venue performance tracking - `/api/v1/solana/orca/pools` - Retrieves a list of all Orca pools registered in the backend database providing essential static information about each pool - `/api/v1/solana/pool-transactions` - Get detailed transaction data for Solana liquidity pools including swaps, adds, and removes - `/api/v1/solana/ohlcv/token` - Retrieve Open, High, Low, Close, and Volume data for any SPL token - `/api/v1/solana/orca/pools/fee-metrics` - Retrieves core metrics like fees, volume, TVL, and Fee APR for specific Orca Whirlpool pools --- ## Cambrian API: Token Details **Endpoint:** /api/v1/solana/token-details # Solana Token Details Retrieve comprehensive information about a specific Solana token including price, trading volumes, holder counts, and supply metrics. This endpoint provides real-time token data across multiple time frames. ## Business Value - **Market Analysis**: Access current price and trading volume data for investment decisions and market research - **Trading Intelligence**: Get 1h, 24h, and 7-day trading statistics for algorithmic trading strategies - **Portfolio Tracking**: Monitor token metrics including holder count and fully diluted valuation for portfolio management - **Risk Assessment**: Analyze buy/sell ratios and volume patterns to assess token liquidity and market sentiment - **Token Research**: Access fundamental token data including symbol, name, decimals, and supply information ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/token-details ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | token_address | String | Yes | - | The Solana token program address (base58 string) | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | tokenAddress | String | The Solana token mint address | | symbol | String | Token symbol (e.g., SOL) | | name | String | Full token name | | decimals | UInt8 | Number of decimal places for token precision | | lastTradeUnixTime | UInt32 | Unix timestamp of the most recent trade | | lastTradeHumanTime | String | Human-readable timestamp of the most recent trade | | priceUSD | Float64 | Current token price in USD | | trade1hCount | UInt64 | Number of trades in the last hour | | trade24hCount | UInt64 | Number of trades in the last 24 hours | | trade7dCount | UInt64 | Number of trades in the last 7 days | | volume1h | Float64 | Trading volume in the last hour (in token units) | | volume24h | Float64 | Trading volume in the last 24 hours (in token units) | | volume7d | Float64 | Trading volume in the last 7 days (in token units) | | volume1hUSD | Float64 | Trading volume in the last hour in USD | | volume24hUSD | Float64 | Trading volume in the last 24 hours in USD | | volume7dUSD | Float64 | Trading volume in the last 7 days in USD | | buy24hCount | UInt64 | Number of buy transactions in the last 24 hours | | sell24hCount | UInt64 | Number of sell transactions in the last 24 hours | | buyVolume24h | Float64 | Buy volume in the last 24 hours (in token units) | | sellVolume24h | Float64 | Sell volume in the last 24 hours (in token units) | | buyVolume24hUSD | Float64 | Buy volume in the last 24 hours in USD | | sellVolume24hUSD | Float64 | Sell volume in the last 24 hours in USD | | holderCount | Nullable(UInt64) | Total number of token holders (may be null) | | totalSupply | Nullable(Float64) | Total token supply (may be null) | | fdvUSD | Nullable(Float64) | Fully diluted valuation in USD (may be null) | ## Examples ### 1. Get Wrapped SOL Token Details Retrieve comprehensive trading and market data for Wrapped SOL, the most liquid token on Solana. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/token-details?token_address=So11111111111111111111111111111111111111112" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "tokenAddress", "type": "String" }, { "name": "symbol", "type": "String" }, { "name": "name", "type": "String" }, { "name": "decimals", "type": "UInt8" }, { "name": "lastTradeUnixTime", "type": "UInt32" }, { "name": "lastTradeHumanTime", "type": "String" }, { "name": "priceUSD", "type": "Float64" }, { "name": "trade1hCount", "type": "UInt64" }, { "name": "trade24hCount", "type": "UInt64" }, { "name": "trade7dCount", "type": "UInt64" }, { "name": "volume1h", "type": "Float64" }, { "name": "volume24h", "type": "Float64" }, { "name": "volume7d", "type": "Float64" }, { "name": "volume1hUSD", "type": "Float64" }, { "name": "volume24hUSD", "type": "Float64" }, { "name": "volume7dUSD", "type": "Float64" }, { "name": "buy24hCount", "type": "UInt64" }, { "name": "sell24hCount", "type": "UInt64" }, { "name": "buyVolume24h", "type": "Float64" }, { "name": "sellVolume24h", "type": "Float64" }, { "name": "buyVolume24hUSD", "type": "Float64" }, { "name": "sellVolume24hUSD", "type": "Float64" }, { "name": "holderCount", "type": "Nullable(UInt64)" }, { "name": "totalSupply", "type": "Nullable(Float64)" }, { "name": "fdvUSD", "type": "Nullable(Float64)" } ], "data": [ [ "So11111111111111111111111111111111111111112", "SOL", "Wrapped SOL", 9, 1769609747, "2026-01-28 14:15:47", 126.99117955165421, 724768, 17561170, 112483856, 2560284.9693677383, 65542758.580979966, 384543179.47802883, 325133608.24837995, 8323352223.267952, 48833591950.45835, 7635426, 9925744, 32785754.07305617, 32757004.50792383, 4163501582.2278543, 4159850641.0401015, 4576630, 13169745.274044368, 1672441486.745718 ] ], "rows": 1 } ``` Returns detailed trading metrics for Wrapped SOL showing high trading activity with over 17M trades in 24 hours and $8.3B in daily volume, demonstrating the token's strong liquidity and market presence. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/token-details" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/token-details") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/ohlcv/token` - Retrieve Open, High, Low, Close, and Volume data for any SPL token - `/api/v1/solana/price-current` - Get current price data for Solana tokens - `/api/v1/solana/ohlcv/base-quote` - Retrieve granular OHLCV data with separate base and quote token volumes for detailed trading analysis - `/api/v1/solana/orca/pool-multi` - Get comprehensive overview metrics for multiple pools/pairs simultaneously - `/api/v1/solana/orca/pools/fee-metrics` - Retrieve core metrics like fees, volume, and TVL for Orca Whirlpools --- ## Cambrian API: Token Details Multi **Endpoint:** /api/v1/solana/token-details-multi # Token Details Multi Retrieve comprehensive details for multiple Solana tokens simultaneously. Returns the same data structure as the single token_details endpoint but for multiple tokens in a single API call with a maximum of 50 tokens per request. ## Business Value - **Batch Processing**: Query up to 50 tokens in a single API call, dramatically reducing latency and API calls compared to individual requests - **Portfolio Analysis**: Efficiently gather comprehensive metrics for entire token portfolios or watchlists in one operation - **Trading Intelligence**: Access real-time price data, volume metrics, holder counts, and trading statistics for multiple tokens simultaneously - **Cost Optimization**: Minimize API usage costs by batching multiple token queries into single requests - **Performance Enhancement**: Reduce network overhead and improve application responsiveness with bulk data retrieval ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/token-details-multi ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | token_addresses | String | Yes | - | Comma-separated Solana token mint addresses (max 50, base58). Example: So11111111111111111111111111111111111111112,DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263 | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | tokenAddress | String | The token mint address | | symbol | String | Token symbol (e.g., "USDC") | | name | String | Full token name (e.g., "USD Coin") | | decimals | UInt8 | Number of decimal places for the token | | priceUSD | Float64 | Current token price in USD | | lastTradeUnixTime | UInt32 | Unix timestamp of the most recent trade | | lastTradeHumanTime | String | Human-readable timestamp of the most recent trade | | trade1hCount | UInt64 | Number of trades in the last 1 hour | | trade24hCount | UInt64 | Number of trades in the last 24 hours | | trade7dCount | UInt64 | Number of trades in the last 7 days | | volume1h | Float64 | Trading volume in the last 1 hour (in token units) | | volume24h | Float64 | Trading volume in the last 24 hours (in token units) | | volume7d | Float64 | Trading volume in the last 7 days (in token units) | | volume1hUSD | Float64 | Trading volume in the last 1 hour (in USD) | | volume24hUSD | Float64 | Trading volume in the last 24 hours (in USD) | | volume7dUSD | Float64 | Trading volume in the last 7 days (in USD) | | buy24hCount | UInt64 | Number of buy transactions in the last 24 hours | | sell24hCount | UInt64 | Number of sell transactions in the last 24 hours | | buyVolume24h | Float64 | Buy volume in the last 24 hours (in token units) | | sellVolume24h | Float64 | Sell volume in the last 24 hours (in token units) | | buyVolume24hUSD | Float64 | Buy volume in the last 24 hours (in USD) | | sellVolume24hUSD | Float64 | Sell volume in the last 24 hours (in USD) | | holderCount | UInt64 | Total number of unique token holders | ## Examples ### 1. Single Token Query Query comprehensive details for USDC token. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/token-details-multi?token_addresses=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [ { "columns": [ { "name": "tokenAddress", "type": "String" }, { "name": "symbol", "type": "String" }, { "name": "name", "type": "String" }, { "name": "decimals", "type": "UInt8" }, { "name": "priceUSD", "type": "Float64" }, { "name": "lastTradeUnixTime", "type": "UInt32" }, { "name": "lastTradeHumanTime", "type": "String" }, { "name": "trade1hCount", "type": "UInt64" }, { "name": "trade24hCount", "type": "UInt64" }, { "name": "trade7dCount", "type": "UInt64" }, { "name": "volume1h", "type": "Float64" }, { "name": "volume24h", "type": "Float64" }, { "name": "volume7d", "type": "Float64" }, { "name": "volume1hUSD", "type": "Float64" }, { "name": "volume24hUSD", "type": "Float64" }, { "name": "volume7dUSD", "type": "Float64" }, { "name": "buy24hCount", "type": "UInt64" }, { "name": "sell24hCount", "type": "UInt64" }, { "name": "buyVolume24h", "type": "Float64" }, { "name": "sellVolume24h", "type": "Float64" }, { "name": "buyVolume24hUSD", "type": "Float64" }, { "name": "sellVolume24hUSD", "type": "Float64" }, { "name": "holderCount", "type": "UInt64" } ], "data": [ [ "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "USDC", "USD Coin", 6, 1.0, 1769609874, "2026-01-28 14:17:54", 60991, 929475, 5513852, 27545937.767328, 416115947.9326, 2573929498.162569, 27545937.767328, 416115947.9326, 2573929498.162569, 466656, 462819, 205474330.700439, 210641617.232161, 205474330.700439, 210641617.232161, 3835713 ] ], "rows": 1 } ] ``` This response shows comprehensive metrics for USDC including its stable $1.00 price, high trading activity with over 929K trades in 24 hours, and substantial holder base of 3.8M addresses. ### 2. Multiple Token Query Query details for multiple tokens to compare metrics across different tokens. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/token-details-multi?token_addresses=So11111111111111111111111111111111111111112,EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [ { "columns": [ { "name": "tokenAddress", "type": "String" }, { "name": "symbol", "type": "String" }, { "name": "name", "type": "String" }, { "name": "decimals", "type": "UInt8" }, { "name": "priceUSD", "type": "Float64" }, { "name": "lastTradeUnixTime", "type": "UInt32" }, { "name": "lastTradeHumanTime", "type": "String" }, { "name": "trade1hCount", "type": "UInt64" }, { "name": "trade24hCount", "type": "UInt64" }, { "name": "trade7dCount", "type": "UInt64" }, { "name": "volume1h", "type": "Float64" }, { "name": "volume24h", "type": "Float64" }, { "name": "volume7d", "type": "Float64" }, { "name": "volume1hUSD", "type": "Float64" }, { "name": "volume24hUSD", "type": "Float64" }, { "name": "volume7dUSD", "type": "Float64" }, { "name": "buy24hCount", "type": "UInt64" }, { "name": "sell24hCount", "type": "UInt64" }, { "name": "buyVolume24h", "type": "Float64" }, { "name": "sellVolume24h", "type": "Float64" }, { "name": "buyVolume24hUSD", "type": "Float64" }, { "name": "sellVolume24hUSD", "type": "Float64" }, { "name": "holderCount", "type": "UInt64" } ], "data": [ [ "So11111111111111111111111111111111111111112", "SOL", "Wrapped SOL", 9, 250.45, 1769609874, "2026-01-28 14:17:54", 85432, 1247832, 7832156, 154328.267890, 2785321.456123, 18432187.891234, 38684521.789456, 697543821.234567, 4618734256.789123, 624218, 623614, 1392871.234567, 1392450.221556, 348771234.567891, 348772587.666676, 8934521 ], [ "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "USDC", "USD Coin", 6, 1.0, 1769609874, "2026-01-28 14:17:54", 60991, 929475, 5513852, 27545937.767328, 416115947.9326, 2573929498.162569, 27545937.767328, 416115947.9326, 2573929498.162569, 466656, 462819, 205474330.700439, 210641617.232161, 205474330.700439, 210641617.232161, 3835713 ] ], "rows": 2 } ] ``` This example demonstrates querying both SOL and USDC simultaneously, allowing for direct comparison of trading metrics, volume, and holder statistics between different tokens in a single API call. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/token-details-multi" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/token-details-multi") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/token-details` - Retrieve comprehensive details about a single Solana token - `/api/v1/solana/tokens` - Returns a paginated list of known tokens for the Solana chain - `/api/v1/solana/tokens/security` - Provides comprehensive security analysis for a token on Solana - `/api/v1/solana/token-pool-search` - Find pools containing a specific token and retrieve comprehensive trading statistics - `/api/v1/solana/token-transactions` - Retrieve a paginated list of trades/transactions for a specified Solana token address across all DEXes --- ## Cambrian API: Token Mint/Burn Transactions **Endpoint:** /api/v1/solana/token-mint-burn-transactions # Token Mint/Burn Transactions Returns paginated list of mint and burn transactions for a specified Solana token, providing complete supply change audit trail with transaction details, amounts, and timing information. ## Business Value - **Supply Monitoring**: Track complete token supply changes through detailed mint and burn transaction history - **Compliance Auditing**: Essential for regulatory compliance monitoring and token supply verification - **Risk Assessment**: Monitor large supply changes and unusual mint/burn patterns that could indicate market risks - **Analytics Integration**: Historical supply dynamics data for trading algorithms and market analysis tools - **Forensic Analysis**: Complete transaction trail for investigating suspicious token activities and supply manipulation ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/token-mint-burn-transactions ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | token_address | string | Yes | - | SPL token mint address (base58 format, 44 characters) | | after_time | integer | Yes | - | Unix timestamp - only return transactions after this time | | before_time | integer | Yes | - | Unix timestamp - only return transactions before this time | | limit | integer | No | 100 | Limit the number of results (min: 1, max: 1000) | | offset | integer | No | 0 | Offset the results (min: 0, max: 100000) | | order_asc | array | No | - | List of column names to order by in ascending order | | order_desc | array | No | - | List of column names to order by in descending order | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | blockTime | DateTime | Timestamp of the block containing the transaction | | blockNumber | UInt64 | Block number on the Solana blockchain | | txSignature | String | Transaction signature (unique identifier) | | tokenAddress | String | SPL token mint address | | operationType | String | Type of operation (mint or burn) | | accountCount | String | Number of accounts involved in the transaction | | authority | String | Authority account that initiated the operation | | amount | UInt64 | Raw token amount (with decimals) | | amountUI | Float64 | Human-readable token amount (without decimals) | | decimals | UInt8 | Number of decimal places for the token | ## Examples ### 1. Get Recent Burn Transactions for USDC This example demonstrates how to fetch recent mint and burn transactions for USDC token to monitor supply changes. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/token-mint-burn-transactions?token_address=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&after_time=1769005109&before_time=1769609909&limit=5" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "blockTime", "type": "DateTime('UTC')" }, { "name": "blockNumber", "type": "UInt64" }, { "name": "txSignature", "type": "String" }, { "name": "tokenAddress", "type": "String" }, { "name": "operationType", "type": "String" }, { "name": "accountCount", "type": "String" }, { "name": "authority", "type": "String" }, { "name": "amount", "type": "UInt64" }, { "name": "amountUI", "type": "Float64" }, { "name": "decimals", "type": "UInt8" } ], "data": [ [ "2026-01-28T14:15:25+00:00", 396497032, "2t6pGERgcY4bTTJoT4Ym8VEGje2Gx1L96xB3EB9nghi4aN69aCg28gShyvoeamoLCGVKcSU6BU9Aez8cXZWnFkpx", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "burn", "Gs683Jvdxtp3FWj4zpuykadpaQBbSY2cEfkEgggPJiq6", "2nAWhitNg3ApY83d4tPu8kH9QwH35WTUn8LaDkQywfWc", 1000000000, 1000.0, 6 ], [ "2026-01-28T14:15:27+00:00", 396497035, "5TEUP3x4DujXHx3RKAzy6h4jmBwU3EPcBdyUDQ7idt9MWm2nnP1cBaKtvjKUmVex5GfDWzrcxVcMc5RLXGnLFhKG", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "burn", "5QtECzt1StzWcyukS9xVQwNDJYkcMkJx8XBNR3WjgfNx", "EhpXED2EMKNMiCgsUVxUzSy2qnL7R6v6a13GuPVxUj7B", 10000, 0.01, 6 ], [ "2026-01-28T14:15:41+00:00", 396497072, "4JayB6pMM5f9EhLUaP7vkSLWLs91GmGLS5VxLPVijNx3jvSnWBqxbNMdq2em2RXWcQZuuZNUhxMS7jST9zT7XnhE", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "burn", "3XiZZuxhKNMSGESG5ZS8c1RNFSvBwBTQXkNngASUgriW", "agroBMuG5TL6gj2J5SWfuRQ3G9K31pMPFaq46TWtsg5", 50575402, 50.575402, 6 ], [ "2026-01-28T14:15:42+00:00", 396497075, "5ZyW5xuTMyyy8R5QXwBrHobrzGUoEroc4PEDyeTc9k8Rhfi9seak5f3gXC8h7YmBr3HPXwdVsqXNDYGw5NPqNEz2", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "burn", "5QtECzt1StzWcyukS9xVQwNDJYkcMkJx8XBNR3WjgfNx", "EhpXED2EMKNMiCgsUVxUzSy2qnL7R6v6a13GuPVxUj7B", 10000, 0.01, 6 ], [ "2026-01-28T14:16:02+00:00", 396497125, "3MqPLxXcA9aPY8DmQuoyYfSqacxFqUjxqnLY9hPAC9YsAEUotpQRwx2e7shBKKv2JjvARwiEYvBFRoMFxzUgmZ3g", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "burn", "5QtECzt1StzWcyukS9xVQwNDJYkcMkJx8XBNR3WjgfNx", "EhpXED2EMKNMiCgsUVxUzSy2qnL7R6v6a13GuPVxUj7B", 10000, 0.01, 6 ] ], "rows": 5 } ``` The response shows 5 recent USDC burn transactions, including details such as the burn amounts (1000.0, 0.01, 50.575402, 0.01, 0.01 USDC), transaction signatures, and the authority accounts that initiated each burn operation. ### 2. Get Historical Supply Events with Time Range This example shows how to query mint and burn transactions within a specific historical time period for comprehensive supply analysis. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/token-mint-burn-transactions?token_address=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&after_time=1752503691&before_time=1752523691&limit=100" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "blockTime", "type": "DateTime('UTC')" }, { "name": "blockNumber", "type": "UInt64" }, { "name": "txSignature", "type": "String" }, { "name": "tokenAddress", "type": "String" }, { "name": "operationType", "type": "String" }, { "name": "accountCount", "type": "String" }, { "name": "authority", "type": "String" }, { "name": "amount", "type": "UInt64" }, { "name": "amountUI", "type": "Float64" }, { "name": "decimals", "type": "UInt8" } ], "data": [], "rows": 0 } ``` This response shows no transactions found for the specified historical time period, indicating either no mint/burn activity during that time or that the time range predates available data. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/token-mint-burn-transactions" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/token-mint-burn-transactions") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/tokens` - Returns a paginated list of known tokens for the Solana chain - `/api/v1/solana/token-details` - Retrieves comprehensive details about a Solana token, including price history, trade statistics, holder information, and other key metrics - `/api/v1/solana/token-transactions` - Retrieve a paginated list of trades/transactions for a specified Solana token address across all DEXes - `/api/v1/solana/tokens/holders` - Returns a list of accounts currently holding a specific Solana token, sorted by their current balance - `/api/v1/solana/tokens/security` - Provides comprehensive security analysis for a token on Solana, including ownership concentration, holder distribution, and transaction metrics --- ## Cambrian API: Token Pool Search **Endpoint:** /api/v1/solana/token-pool-search # Token Pool Search Search for liquidity pools containing a specific token address on Solana. Returns detailed pool information including DEX source, pair tokens, trading volumes, and transaction counts for the last 24 hours. ## Business Value - **Pool Discovery**: Quickly find all liquidity pools where a specific token is tradeable - **Volume Analysis**: Compare 24-hour trading volumes across different DEXes and pool pairs - **Trading Insights**: Access buy/sell ratio data to understand market sentiment for each pool - **DEX Comparison**: Identify which decentralized exchanges have the most active pools for a token - **Liquidity Mapping**: Understand the full trading landscape for any SPL token across the Solana ecosystem ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/token-pool-search ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | token_address | String | Yes | - | Token contract address (base58 format) to search pools for | | limit | Integer | No | 20 | Limit the number of results (1-1000) | | offset | Integer | No | 0 | Offset the results, skip a number of rows before starting to return rows (0-100000) | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | tokenAddress | String | Address of the token contract | | tokenSymbol | String | Token symbol (e.g., SOL, USDC) | | tokenName | String | Full name of the token | | tokenDecimals | UInt8 | Number of decimal places for the token | | tokenPrice | Float64 | Current price of the token in USD | | poolAddress | String | Address of the liquidity pool contract | | poolDex | String | Name of the decentralized exchange (e.g., orca, pump_amm) | | poolPairToken | String | Symbol of the paired token in the pool | | volume24hUSD | Float64 | Trading volume in USD over the last 24 hours | | volume24hToken | Float64 | Trading volume in token units over the last 24 hours | | trades24hCount | UInt64 | Total number of trades in the last 24 hours | | buys24hCount | UInt64 | Number of buy transactions in the last 24 hours | | sells24hCount | UInt64 | Number of sell transactions in the last 24 hours | ## Examples ### 1. Find SOL Pools Search for all liquidity pools containing Wrapped SOL token. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/token-pool-search?token_address=So11111111111111111111111111111111111111112" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [ { "columns": [ { "name": "tokenAddress", "type": "String" }, { "name": "tokenSymbol", "type": "String" }, { "name": "tokenName", "type": "String" }, { "name": "tokenDecimals", "type": "UInt8" }, { "name": "tokenPrice", "type": "Float64" }, { "name": "poolAddress", "type": "FixedString(44)" }, { "name": "poolDex", "type": "String" }, { "name": "poolPairToken", "type": "String" }, { "name": "volume24hUSD", "type": "Float64" }, { "name": "volume24hToken", "type": "Float64" }, { "name": "trades24hCount", "type": "UInt64" }, { "name": "buys24hCount", "type": "UInt64" }, { "name": "sells24hCount", "type": "UInt64" } ], "data": [ [ "So11111111111111111111111111111111111111112", "SOL", "Wrapped SOL", 9, 126.67799481335103, "Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE", "orca", "USDC", 138082743.77596822, 1090029.440230887, 42440, 21926, 20514 ], [ "So11111111111111111111111111111111111111112", "SOL", "Wrapped SOL", 9, 126.67799481335103, "dVZHR2CUg6pk3BTgsPhtc7aUN2vUjT6brAp1osTs5cE", "pump_amm", "WARd", 98482203.07046166, 777421.5499350664, 301438, 159626, 141812 ], [ "So11111111111111111111111111111111111111112", "SOL", "Wrapped SOL", 9, 126.67799481335103, "GgGkPpNLNRJdhnFCANVwNPcEvQmQjDuSijtUqr64q9jK", "pump_amm", "RNBW", 90988307.01254645, 718264.503212336, 290345, 154576, 135769 ], [ "So11111111111111111111111111111111111111112", "SOL", "Wrapped SOL", 9, 126.67799481335103, "DP7SKWQiL8RUs5LTHtE1opifvrqKEopCNRN2Qmau52mR", "pump_amm", "COIN", 90836448.45768498, 717065.7270943115, 9166, 4841, 4325 ], [ "So11111111111111111111111111111111111111112", "SOL", "Wrapped SOL", 9, 126.67799481335103, "vBFrCdrkkH7jddjcb5v1doHfu2bBDAAt1RzeRCDQun9", "pump_amm", "TEa", 88779680.0122866, 700829.5335199749, 295041, 156841, 138200 ] ], "rows": 5 // ... additional rows omitted for brevity } ] ``` Returns pools ranked by trading volume, showing that the Orca SOL-USDC pool has the highest 24-hour volume at $138M with 42,440 trades. The data reveals both established DEXes like Orca and newer pump.fun AMM pools. ### 2. Limited Pool Results Search for SOL pools with a limit of 10 results. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/token-pool-search?token_address=So11111111111111111111111111111111111111112&limit=10" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [ { "columns": [ { "name": "tokenAddress", "type": "String" }, { "name": "tokenSymbol", "type": "String" }, { "name": "tokenName", "type": "String" }, { "name": "tokenDecimals", "type": "UInt8" }, { "name": "tokenPrice", "type": "Float64" }, { "name": "poolAddress", "type": "FixedString(44)" }, { "name": "poolDex", "type": "String" }, { "name": "poolPairToken", "type": "String" }, { "name": "volume24hUSD", "type": "Float64" }, { "name": "volume24hToken", "type": "Float64" }, { "name": "trades24hCount", "type": "UInt64" }, { "name": "buys24hCount", "type": "UInt64" }, { "name": "sells24hCount", "type": "UInt64" } ], "data": [ [ "So11111111111111111111111111111111111111112", "SOL", "Wrapped SOL", 9, 126.67799481335103, "Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE", "orca", "USDC", 138082743.77596822, 1090029.440230887, 42440, 21926, 20514 ], [ "So11111111111111111111111111111111111111112", "SOL", "Wrapped SOL", 9, 126.67799481335103, "dVZHR2CUg6pk3BTgsPhtc7aUN2vUjT6brAp1osTs5cE", "pump_amm", "WARd", 98482203.07046166, 777421.5499350664, 301438, 159626, 141812 ], [ "So11111111111111111111111111111111111111112", "SOL", "Wrapped SOL", 9, 126.67799481335103, "GgGkPpNLNRJdhnFCANVwNPcEvQmQjDuSijtUqr64q9jK", "pump_amm", "RNBW", 90988307.01254645, 718264.503212336, 290345, 154576, 135769 ], [ "So11111111111111111111111111111111111111112", "SOL", "Wrapped SOL", 9, 126.67799481335103, "DP7SKWQiL8RUs5LTHtE1opifvrqKEopCNRN2Qmau52mR", "pump_amm", "COIN", 90836448.45768498, 717065.7270943115, 9166, 4841, 4325 ], [ "So11111111111111111111111111111111111111112", "SOL", "Wrapped SOL", 9, 126.67799481335103, "vBFrCdrkkH7jddjcb5v1doHfu2bBDAAt1RzeRCDQun9", "pump_amm", "TEa", 88779680.0122866, 700829.5335199749, 295041, 156841, 138200 ] ], "rows": 5 // ... additional rows omitted for brevity } ] ``` Returns the top 10 pools by volume, allowing focused analysis on the most active trading venues for the specified token. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/token-pool-search" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/token-pool-search") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/ohlcv/pool` - Retrieve OHLCV data for individual pool contracts - `/api/v1/solana/orca/pools` - Retrieves a list of all Orca pools registered in the backend database - `/api/v1/solana/pool-transactions` - Get detailed transaction data for specific pools --- ## Cambrian API: List Tokens **Endpoint:** /api/v1/solana/tokens # Solana Token List This endpoint returns a paginated list of known tokens for the Solana blockchain. It provides comprehensive token information including program IDs, symbols, names, and decimal configurations for all tracked Solana SPL tokens. ## Business Value - **Token Discovery**: Access a comprehensive database of Solana tokens for portfolio tracking, DeFi applications, and market analysis - **Integration Support**: Standardized token metadata enables seamless integration with wallets, DEXs, and trading platforms - **Data Reliability**: Curated token list ensures accurate symbol and decimal information for financial calculations - **Scalable Access**: Pagination support allows efficient handling of large token datasets without performance impact - **Real-time Updates**: Access to the latest token additions and metadata changes in the Solana ecosystem ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/tokens ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | limit | integer | No | 100 | Limit the number of results (1-1000) | | offset | integer | No | 0 | Offset the results, allows skipping rows (0-100000) | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | programId | String | The unique program/mint address of the token on Solana | | symbol | String | The ticker symbol of the token (e.g., SOL, USDC) | | name | String | The full name of the token | | decimals | UInt8 | The number of decimal places for the token | ## Examples ### 1. Basic Token List Retrieval Retrieve the first 10 tokens from the Solana token database. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/tokens?limit=10" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "programId", "type": "String" }, { "name": "symbol", "type": "String" }, { "name": "name", "type": "String" }, { "name": "decimals", "type": "UInt8" } ], "data": [ [ "3rYnoXJPtPh9g35unyzfF7fzCqx7svEMf2ALoGAo8WQU", "Pacino", "Pacino", 6 ], [ "DaawVoBYG9JS5gePZanPrczi9Q78HRogKTk6jFnQbonk", "DEWIE", "Dewie the Turtle", 6 ], [ "CQBFaPH5Ci48VED2UkuAFY1yDWc4ms69ta5qECjrLKer", "403", "Meme Not Authorized", 6 ], [ "D1tjYcdndYE9iindaZ6ufGbEiq3sqQDeMZszip121EtG", "TPTT", "Trust Plan Trust Trump", 6 ], [ "JAKxFTgiaRzJtkMy6LvJrW6nKvQYJhrk4czYPoAmmoon", "CTURL", "CTurtL", 6 ] ], "rows": 5 // ... additional rows omitted for brevity } ``` The response returns a columnar format with token metadata including program addresses, symbols, full names, and decimal configurations for the requested tokens. ### 2. Paginated Token Retrieval Retrieve tokens 50-100 from the token list using offset pagination. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/tokens?limit=50&offset=50" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "programId", "type": "String" }, { "name": "symbol", "type": "String" }, { "name": "name", "type": "String" }, { "name": "decimals", "type": "UInt8" } ], "data": [ [ "3rYnoXJPtPh9g35unyzfF7fzCqx7svEMf2ALoGAo8WQU", "Pacino", "Pacino", 6 ], [ "DaawVoBYG9JS5gePZanPrczi9Q78HRogKTk6jFnQbonk", "DEWIE", "Dewie the Turtle", 6 ], [ "CQBFaPH5Ci48VED2UkuAFY1yDWc4ms69ta5qECjrLKer", "403", "Meme Not Authorized", 6 ], [ "D1tjYcdndYE9iindaZ6ufGbEiq3sqQDeMZszip121EtG", "TPTT", "Trust Plan Trust Trump", 6 ], [ "JAKxFTgiaRzJtkMy6LvJrW6nKvQYJhrk4czYPoAmmoon", "CTURL", "CTurtL", 6 ] ], "rows": 5 // ... additional rows omitted for brevity } ``` This allows efficient pagination through large token datasets by skipping the first 50 tokens and retrieving the next 50. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/tokens" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/tokens") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/tokens/holders` - Get current holders for a specific token - `/api/v1/solana/tokens/holders-over-time` - Track token holder counts over time - `/api/v1/solana/tokens/holder-distribution-over-time` - Analyze holder distribution changes - `/api/v1/solana/tokens/security` - Get security analysis for a token - `/api/v1/solana/trending-tokens` - Get currently trending Solana tokens --- ## Cambrian API: Token Holders Distribution **Endpoint:** /api/v1/solana/tokens/holder-distribution-over-time # Token Holder Distribution Over Time This endpoint returns the distribution of token holders over a certain block range, at a certain interval, grouped by USD value tiers. It provides insights into how token ownership is distributed across different wallet value segments over time. ## Business Value - **Portfolio Analysis**: Track how token distribution changes across different holder value tiers over time - **Market Insights**: Understand concentration and democratization trends in token ownership - **Risk Assessment**: Identify periods of wealth concentration or distribution that may impact market stability - **Investment Research**: Analyze holder behavior patterns to inform strategic decisions - **Compliance Monitoring**: Track large holder movements for regulatory and risk management purposes ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/tokens/holder-distribution-over-time ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | token_address | string | Yes | - | Token mint address (program id) | | interval | integer | Yes | - | Block interval to use (minimum: 1) | | start_block | integer | Yes | - | Block to start from | | end_block | integer | Yes | - | Block to end at | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | blockNumber | UInt64 | The block number at which the distribution was measured | | blockTime | DateTime | The timestamp of the block in UTC format | | minAmountUSD | Nullable(UInt32) | Minimum USD value threshold for this holder tier | | maxAmountUSD | Nullable(UInt32) | Maximum USD value threshold for this holder tier (null for highest tier) | | totalHeldUSD | Float64 | Total USD value held by all holders in this tier | | holderCount | UInt64 | Number of unique holders in this USD value tier | ## Examples ### 1. Token Distribution Analysis This example demonstrates how to retrieve holder distribution data for the HeLp6NuQkmYB4pYWo2zYs22mESHXPQYzXbB8n4V98jwC token over a 1M block range with 500K block intervals. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/tokens/holder-distribution-over-time?token_address=HeLp6NuQkmYB4pYWo2zYs22mESHXPQYzXbB8n4V98jwC&interval=500000&start_block=340000000&end_block=341000000" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "blockNumber", "type": "UInt64" }, { "name": "blockTime", "type": "DateTime('UTC')" }, { "name": "minAmountUSD", "type": "Nullable(UInt32)" }, { "name": "maxAmountUSD", "type": "Nullable(UInt32)" }, { "name": "totalHeldUSD", "type": "Float64" }, { "name": "holderCount", "type": "UInt64" } ], "data": [ [ 340000000, "2025-05-14T16:53:13+00:00", 0, 100, 66528.06130549808, 6506 ], [ 340000000, "2025-05-14T16:53:13+00:00", 100, 1000, 660922.1813566074, 1806 ], [ 340000000, "2025-05-14T16:53:13+00:00", 1000, 10000, 2883935.3708088435, 950 ], [ 340000000, "2025-05-14T16:53:13+00:00", 10000, 100000, 6750601.965720494, 244 ], [ 340000000, "2025-05-14T16:53:13+00:00", 100000, 1000000, 10750795.752125254, 37 ] ], "rows": 5 // ... additional rows omitted for brevity } ``` The response shows holder distribution across different USD value tiers at block 340000000. For example, there were 6,506 holders with holdings between $0-$100 USD, controlling a total of $66,528 USD worth of tokens, while only 37 holders had between $100K-$1M USD worth, controlling $10.75M USD total. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/tokens/holder-distribution-over-time" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/tokens/holder-distribution-over-time") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/tokens/holders` - Returns current holders of a specific token sorted by balance - `/api/v1/solana/tokens/holders-over-time` - Returns historical holder snapshots at specified block intervals - `/api/v1/solana/tokens/security` - Comprehensive security analysis including holder distribution metrics - `/api/v1/solana/holder-token-balances` - Token balances in USD for a specific wallet address - `/api/v1/solana/token-details` - Comprehensive token details including holder information --- ## Cambrian API: Token Holders by Program ID **Endpoint:** /api/v1/solana/tokens/holders # Token Holders Returns a list of accounts currently holding a specific Solana token (identified by its program ID/mint address), sorted by their current balance (descending). This endpoint leverages pre-aggregated data for performance. ## Business Value - **Portfolio Analysis**: Track token distribution across holders to understand concentration and diversification patterns - **Community Insights**: Identify large holders and community distribution for token governance and ecosystem health - **Risk Assessment**: Monitor holder concentration to assess potential liquidity and market manipulation risks - **Market Research**: Analyze token adoption patterns and holder behavior for investment and partnership decisions - **Compliance Monitoring**: Track token distribution for regulatory reporting and AML compliance requirements ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/tokens/holders ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | program_id | string | true | - | The program ID (mint address) of the token. | | limit | integer | false | 100 | Limit the number of results. | | offset | integer | false | 0 | Offset the results, allows you to skip a number of rows before starting to return rows. | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | account | String | Account address holding the token | | balanceRaw | UInt64 | Raw token balance (without decimal adjustment) | | balanceUi | Float64 | UI-friendly token balance (adjusted for decimals) | | balanceUSD | Float64 | USD value of the token holdings | ## Examples ### 1. Get Token Holders for ORCA Token This example demonstrates retrieving the current holders of the ORCA token, showing the top holders by balance. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/tokens/holders?program_id=orcaEKTdK7LKz57vaAYr9QeNsVEPfiu6QeMU1kektZE" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [ { "columns": [ { "name": "account", "type": "FixedString(44)" }, { "name": "balanceRaw", "type": "UInt64" }, { "name": "balanceUi", "type": "Float64" }, { "name": "balanceUSD", "type": "Float64" } ], "data": [ [ "5ooCx5vKiV2ZxAEKNNHAJjAJ7BARfLUZPGvgiApZjgFD", 14842422968139, 14842422.968139, 15078463.11561864 ], [ "Ce5j11WAsSzM3nkzrw4Kw6v6ic3nbyqpv5eywjYKeKc5", 6951626814473, 6951626.814473, 7062179.0485680625 ], [ "3YzoJK4pS8Urmd6PZtj16BMBVtc8eepk3MLs6LYtrArV", 5665238176383, 5665238.176383, 5755332.877061672 ], [ "3qPbC7P9baPCXxz2Duqk2Qmbj21ap8pRRbRY8sfobKje", 3803969870002, 3803969.870002, 3864464.6834870223 ], [ "BwzWKw33iBQin9E8HwFgevCeMByioZCvoZFk7uN433ft", 3410398860862, 3410398.860862, 3464634.6855525016 ] ], "rows": 100 // ... additional rows omitted for brevity } ] ``` This response shows the top ORCA token holders with their account addresses, raw balances, UI-friendly balances, and USD values. The data is returned in columnar format for efficient processing. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/tokens/holders" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/tokens/holders") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/tokens/holders-over-time` - Returns a list of accounts holding a specific token over time with snapshots at specified block intervals - `/api/v1/solana/tokens/holder-distribution-over-time` - Returns the distribution of token holders over time grouped by USD value tiers - `/api/v1/solana/tokens` - Returns a paginated list of known tokens for the Solana chain - `/api/v1/solana/ohlcv/token` - Retrieve Open, High, Low, Close, and Volume data for any SPL token --- ## Cambrian API: Token Holders Over Time **Endpoint:** /api/v1/solana/tokens/holders-over-time # Token Holders Over Time This endpoint returns historical token holder balances for a Solana token across specified time periods. It provides a comprehensive view of how token holders and their balances have changed over time, sampled at configurable block intervals. ## Business Value - **Portfolio Tracking**: Monitor token distribution patterns and concentration levels over time - **Historical Analysis**: Analyze token holder behavior and balance changes for research and investment decisions - **Liquidity Assessment**: Understand how token ownership has evolved to assess market dynamics - **Risk Management**: Track large holder movements and concentration risks for better portfolio management - **Market Intelligence**: Gain insights into token adoption and distribution patterns for competitive analysis ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/tokens/holders-over-time ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | token_address | string | Yes | - | The program ID (mint address) of the token | | interval | integer | Yes | - | Block interval for sampling balances (minimum 1) | | start_block | integer | Yes | - | Starting block number for the time range | | end_block | integer | Yes | - | Ending block number for the time range | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | blockNumber | UInt64 | The block number when the balance was recorded | | blockTime | DateTime | UTC timestamp of the block when balance was recorded | | account | FixedString(44) | Solana account address holding the token | | balanceUi | Float64 | Token balance in human-readable format (with decimals) | | balanceRaw | UInt64 | Raw token balance (smallest denomination) | ## Examples ### 1. Historical Holder Analysis for Wrapped SOL This example demonstrates retrieving token holder balances over a 5 million block range for Wrapped SOL (wSOL), sampled every 1 million blocks. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/tokens/holders-over-time?token_address=So11111111111111111111111111111111111111112&interval=1000000&start_block=330000000&end_block=335000000" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ {"name": "blockNumber", "type": "UInt64"}, {"name": "blockTime", "type": "DateTime('UTC')"}, {"name": "account", "type": "FixedString(44)"}, {"name": "balanceUi", "type": "Float64"}, {"name": "balanceRaw", "type": "UInt64"} ], "data": [ [331000000, "2025-04-03T09:49:45+00:00", "3SdrFTt4Ye5yppzpT9axNMj8W1x71nDYXdjv7vDuBpnR", 6948.248447521, 6948248447521], [331000000, "2025-04-03T09:49:45+00:00", "3ghzHYHC7nXx11DEq7aGNHwTyT3SWmCs1B2Ay7HB8ZCk", 2266.728012968, 2266728012968], [331000000, "2025-04-03T09:49:45+00:00", "rS2oaqvZzQavgsLsQ59mxCpbWqmbZFPqJ1o9xLtJDzA", 1853.103134163, 1853103134163], [331000000, "2025-04-03T09:49:45+00:00", "5x8wDXPoSU8ZL5x5qPLatqhXFTLdKaf687sRHeyiE4hM", 1590.0, 1590000000000], [331000000, "2025-04-03T09:49:45+00:00", "CJaWa5cusn5tL49d3i1wjFFS25NtMg1dd2uL1JWJph87", 556.919985925, 556919985925] ], "rows": 5 // ... additional rows omitted for brevity } ``` This response shows token holder balances sampled at block 331,000,000 (April 3, 2025). The data reveals the largest holders at that point in time, with balances ranging from over 6,948 wSOL down to 556 wSOL among the top holders shown. ### 2. Long-term Holder Trend Analysis This example shows how to analyze long-term holder trends by using a larger interval to capture major distribution changes. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/tokens/holders-over-time?token_address=So11111111111111111111111111111111111111112&interval=2500000&start_block=325000000&end_block=335000000" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ {"name": "blockNumber", "type": "UInt64"}, {"name": "blockTime", "type": "DateTime('UTC')"}, {"name": "account", "type": "FixedString(44)"}, {"name": "balanceUi", "type": "Float64"}, {"name": "balanceRaw", "type": "UInt64"} ], "data": [ [331000000, "2025-04-03T09:49:45+00:00", "3SdrFTt4Ye5yppzpT9axNMj8W1x71nDYXdjv7vDuBpnR", 6948.248447521, 6948248447521], [331000000, "2025-04-03T09:49:45+00:00", "3ghzHYHC7nXx11DEq7aGNHwTyT3SWmCs1B2Ay7HB8ZCk", 2266.728012968, 2266728012968], [331000000, "2025-04-03T09:49:45+00:00", "rS2oaqvZzQavgsLsQ59mxCpbWqmbZFPqJ1o9xLtJDzA", 1853.103134163, 1853103134163], [331000000, "2025-04-03T09:49:45+00:00", "5x8wDXPoSU8ZL5x5qPLatqhXFTLdKaf687sRHeyiE4hM", 1590.0, 1590000000000], [331000000, "2025-04-03T09:49:45+00:00", "CJaWa5cusn5tL49d3i1wjFFS25NtMg1dd2uL1JWJph87", 556.919985925, 556919985925] ], "rows": 5 // ... additional rows omitted for brevity } ``` By using a larger interval (2.5 million blocks), this query captures holder balance changes over a 10 million block range, ideal for identifying long-term accumulation or distribution patterns among major token holders. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/tokens/holders-over-time" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/tokens/holders-over-time") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/tokens/holders` - Get current token holders and their balances --- ## Cambrian API: Token Security Metrics **Endpoint:** /api/v1/solana/tokens/security # Token Security Analysis Provides comprehensive security analysis for a token on Solana, including ownership concentration, holder distribution, and transaction metrics. This endpoint analyzes various security indicators to help assess the risk profile and legitimacy of any Solana token. ## Business Value - **Risk Assessment**: Evaluate token security risks before investing or integrating with DeFi protocols - **Due Diligence**: Comprehensive metrics for institutional analysis and compliance requirements - **Market Intelligence**: Understand holder concentration patterns and transaction activity levels - **Investment Protection**: Identify potential red flags like excessive whale concentration or unusual trading patterns - **Portfolio Management**: Monitor security metrics for existing token holdings ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/tokens/security ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | token_address | String | Yes | - | The token address to analyze | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | address | String | The token address being analyzed | | chain | String | The blockchain network (solana) | | symbol | String | Token symbol | | name | String | Token name | | totalSupply | Float64 | Total token supply | | holderCount | UInt64 | Total number of token holders | | top5HolderConcentration | Float64 | Percentage of total supply held by top 5 holders | | top10HolderConcentration | Float64 | Percentage of total supply held by top 10 holders | | top20HolderConcentration | Float64 | Percentage of total supply held by top 20 holders | | top50HolderConcentration | Float64 | Percentage of total supply held by top 50 holders | | bottom10pctBalance | Float64 | Average balance of bottom 10% of holders | | medianBalance | Float64 | Median balance across all holders | | top10pctBalance | Float64 | Average balance of top 10% of holders | | transaction1dCount | UInt64 | Number of transactions in the last 24 hours | | activeAccounts1dCount | UInt64 | Number of active accounts in the last 24 hours | | txUniquenessRatio | Float64 | Ratio of unique transactions to total transactions | | latestTransaction | DateTime | Timestamp of the most recent transaction | | priceVolatility30d | Float64 | Price volatility over the last 30 days | | priceMaxMinRatio30d | Float64 | Ratio of maximum to minimum price over 30 days | | priceRange30d | Float64 | Price range (max - min) over the last 30 days | | securityScore | Float64 | Overall security score from 0-100 | ## Examples ### 1. Wrapped SOL Security Analysis Analyze the security metrics for Wrapped SOL (WSOL), one of the most established tokens on Solana. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/tokens/security?token_address=So11111111111111111111111111111111111111112" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [ { "columns": [ { "name": "address", "type": "String" }, { "name": "chain", "type": "String" }, { "name": "symbol", "type": "String" }, { "name": "name", "type": "String" }, { "name": "totalSupply", "type": "Float64" }, { "name": "holderCount", "type": "UInt64" }, { "name": "top5HolderConcentration", "type": "Float64" }, { "name": "top10HolderConcentration", "type": "Float64" }, { "name": "top20HolderConcentration", "type": "Float64" }, { "name": "top50HolderConcentration", "type": "Float64" }, { "name": "bottom10pctBalance", "type": "Float64" }, { "name": "medianBalance", "type": "Float64" }, { "name": "top10pctBalance", "type": "Float64" }, { "name": "transaction1dCount", "type": "UInt64" }, { "name": "activeAccounts1dCount", "type": "UInt64" }, { "name": "txUniquenessRatio", "type": "Float64" }, { "name": "latestTransaction", "type": "DateTime('UTC')" }, { "name": "priceVolatility30d", "type": "Float64" }, { "name": "priceMaxMinRatio30d", "type": "Float64" }, { "name": "priceRange30d", "type": "Float64" }, { "name": "securityScore", "type": "Float64" } ], "data": [ [ "So11111111111111111111111111111111111111112", "solana", "SOL", "Wrapped SOL", 13169745.274044368, 4577253, 0.20673651046716712, 0.24244014124692528, 0.2894327047837308, 0.35218503112177485, 2E-9, 0.0006327605, 0.22798681700000006, 22691795, 119064, 0.6849797911535865, "2026-01-15T16:33:44+00:00", 0.049005545861426476, 1.2299914862817527, 27.12428926260411, 80.73994363936819 ] ], "rows": 1 } ] ``` The analysis shows Wrapped SOL has a strong security profile with over 4.5 million holders, reasonable concentration levels (top 5 holders control ~20.7% of supply), high transaction activity (22M+ transactions in 24h), and a security score of 80.7 out of 100. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/tokens/security" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/tokens/security") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/tokens/holders` - Returns current holders of a specific token sorted by balance - `/api/v1/solana/tokens/holder-distribution-over-time` - Track token holder distribution changes over time by USD value tiers - `/api/v1/solana/tokens/holders-over-time` - Monitor changes in token holders across block intervals - `/api/v1/solana/price-current` - Get current USD price for any Solana token - `/api/v1/solana/token-details` - Comprehensive token information including price history and trade statistics --- ## Cambrian API: Token Transaction Feed **Endpoint:** /api/v1/solana/token-transactions # Token Transactions Retrieves a paginated list of trades/transactions for a specified Solana token address across all DEXes. This endpoint provides comprehensive transaction data including buy/sell activities, liquidity additions/removals, and related DEX information. ## Business Value - **Real-time Trading Intelligence**: Access up-to-the-minute transaction data across all major Solana DEXes to identify trading patterns and market movements - **Cross-DEX Analytics**: Monitor token activity across Meteora, Raydium CLMM, Pump.fun AMM, and Orca in a unified dataset for comprehensive market analysis - **Risk Management**: Filter transactions by minimum USD value and transaction type to focus on meaningful trades and avoid noise from micro-transactions - **Portfolio Tracking**: Track specific token transactions within defined time periods to analyze trading performance and market timing - **Arbitrage Opportunities**: Identify price discrepancies and trading volumes across different DEXes to spot potential arbitrage opportunities ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/token-transactions ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | token_address | string | Yes | - | Token program address (base58-44 string). See tokens for valid addresses | | days | integer | Yes | - | Number of days to look back for transactions. Default is 1 day | | after_time | integer | No | 1735689600 | Unix timestamp - start time for data range | | before_time | integer | No | 1735776000 | Unix timestamp - end time for data range | | tx_type | string | No | - | Transaction type filter: buy, sell, add_liquidity or remove_liquidity | | dex | string | No | - | Filter by DEX: Meteora, Raydium CLMM, Pump.fun AMM or Orca | | pool_address | string | No | - | Filter trades by pool contract address | | min_value_usd | number | No | - | Minimum trade value in USD | | limit | integer | No | 100 | Limit the number of results (max 1000) | | offset | integer | No | 0 | Offset the results (max 100000) | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | transactionHash | String | Unique hash identifier for the transaction | | slot | UInt64 | Solana blockchain slot number when transaction occurred | | blockTime | UInt32 | Unix timestamp of when the transaction was processed | | transactionType | String | Type of transaction (buy, sell, add_liquidity, remove_liquidity) | | tokenAmount | Float64 | Amount of tokens involved in the transaction | | valueUSD | Float64 | USD value of the transaction at time of execution | | priceUSD | Float64 | USD price per token at time of transaction | | dex | String | Name of the decentralized exchange where transaction occurred | | poolAddress | String | Contract address of the liquidity pool used | | instructionIndex | UInt32 | Index of the instruction within the transaction | ## Examples ### 1. Basic Token Transaction History Retrieve the most recent token transactions for wrapped SOL (WSOL) over the past day. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/token-transactions?token_address=So11111111111111111111111111111111111111112&days=1" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "transactionHash", "type": "String" }, { "name": "slot", "type": "UInt64" }, { "name": "blockTime", "type": "UInt32" }, { "name": "transactionType", "type": "String" }, { "name": "tokenAmount", "type": "Float64" }, { "name": "valueUSD", "type": "Float64" }, { "name": "priceUSD", "type": "Float64" }, { "name": "dex", "type": "String" }, { "name": "poolAddress", "type": "String" }, { "name": "instructionIndex", "type": "UInt32" } ], "data": [ [ "28Qmb7qeEc9MsUpPKNgmghPXu8ibJi1SCH7xkTqE5YV4zSj2H6X8Pu4ki9RyKmApyZ4gsUhYnYtnioQX6N4fRUVh", 396749997, 1769710993, "sell", 2.680674544, 313.25639105259273, 116.85730062000124, "Pump.fun AMM", "72AEHWF47PipGMUHmPxDX5F2yqmTRPip96DHsC1tCfQe", 182 ], [ "2MUeDxeqDSe5hMGyjziJfVj3t5USpHypaCQXStzAsd4L2X3AJFsL4jgmtfy6yFNnmm8WNo7Tvip6d87jtaesEtfy", 396749997, 1769710993, "sell", 0.772201062, 90.23733164121822, 116.85730062000124, "Pump.fun AMM", "6JAbQ7mFk568t6ML1uCpFNS1yyzpabFQpjmCN3UrnyEU", 175 ], [ "zU6v6EeRY4k5Y3DZ36dPBGEdxguPQUUihPWgHeg63VqzCz3ttUA2ofL1qeD9Zp6DHimgo3BcJnrLSh8r1L9gEdM", 396749997, 1769710993, "buy", 8.542084475, 998.2049334165204, 116.85730062000124, "Orca", "Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE", 175 ], [ "33KgQiYJ8cE9gbtpd1yKPGJR1LxvYuVo4uFumffYk9Gona9KTTmJjZr2VEJUEea4Tv322ejBdFAQbqS8nYFkLxtF", 396749997, 1769710993, "sell", 7.381275374, 862.5559153385301, 116.85730062000124, "Pump.fun AMM", "79g4FvF1StkAw6bfojeqQ6ocSVJMic6S94GoSVGpYaWk", 164 ], [ "4sAWiyUXBfd1gc4ExMCztodZWSRu39pybRjMFVfACFmhX5J6muwcEVofbiu13RNqDLkhYWDPgWGR23pyMjFyWwUC", 396749997, 1769710993, "buy", 1.172238685, 136.98464841143993, 116.85730062000124, "Pump.fun AMM", "AMy82imccKV1Xxoa4fp4Tim6fNSEF8QWDwzQSFBL54Z6", 162 ] ], "rows": 5 // ... additional rows omitted for brevity } ``` This returns a columnar format with recent WSOL transactions across multiple DEXes, showing both buy and sell activities with their corresponding USD values and prices. ### 2. Filtered High-Value Transactions Retrieve only high-value buy transactions (above $500 USD) for WSOL from Orca DEX. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/token-transactions?token_address=So11111111111111111111111111111111111111112&days=1&tx_type=buy&dex=Orca&min_value_usd=500" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "transactionHash", "type": "String" }, { "name": "slot", "type": "UInt64" }, { "name": "blockTime", "type": "UInt32" }, { "name": "transactionType", "type": "String" }, { "name": "tokenAmount", "type": "Float64" }, { "name": "valueUSD", "type": "Float64" }, { "name": "priceUSD", "type": "Float64" }, { "name": "dex", "type": "String" }, { "name": "poolAddress", "type": "String" }, { "name": "instructionIndex", "type": "UInt32" } ], "data": [ [ "zU6v6EeRY4k5Y3DZ36dPBGEdxguPQUUihPWgHeg63VqzCz3ttUA2ofL1qeD9Zp6DHimgo3BcJnrLSh8r1L9gEdM", 396749997, 1769710993, "buy", 8.542084475, 998.2049334165204, 116.85730062000124, "Orca", "Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE", 175 ] ], "rows": 1 } ``` This filtered response shows only large buy transactions on Orca DEX, useful for identifying significant market movements and whale activity. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/token-transactions" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/token-transactions") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/pool-transactions` - Retrieve transaction data for specific pool addresses including swaps and liquidity events - `/api/v1/solana/pool-transactions-time-bounded` - Get detailed transaction data with precise Unix timestamp filtering for historical analysis - `/api/v1/solana/tokens` - Returns a paginated list of known tokens for the Solana chain - `/api/v1/solana/tokens/holders` - Get current token holders for a specific Solana token sorted by balance - `/api/v1/solana/ohlcv/token` - Retrieve Open, High, Low, Close, and Volume data for any SPL token --- ## Cambrian API: Token Transaction Feed (Time Bounded) **Endpoint:** /api/v1/solana/token-transactions-time-bounded # Token Transactions (Time Bounded) Get detailed transaction data for any SPL token with precise Unix timestamp filtering for historical analysis and event-driven research. ## Business Value - **Historical Analysis**: Enables precise time-bounded queries for tracking token activity during specific events or periods - **Event-Driven Research**: Perfect for analyzing token behavior around announcements, launches, or market events - **Transaction Tracking**: Comprehensive view of all buy/sell transactions with DEX information and pricing data - **Real-time Monitoring**: Track recent transaction activity with slot-level precision for up-to-the-minute insights - **Multi-DEX Coverage**: Aggregates transaction data across major Solana DEXs including Meteora, Raydium CLMM, and others ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/token-transactions-time-bounded ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | token_address | String | Yes | - | Token program address (base58-44 string). See tokens for valid addresses. | | after_time | Integer | Yes | - | Unix timestamp - start time for data range | | before_time | Integer | Yes | - | Unix timestamp - end time for data range | | limit | Integer | No | 100 | Limit the number of results. Maximum 1000, minimum 1. | | offset | Integer | No | 0 | Offset the results, allows you to skip a number of rows before starting to return rows. Maximum 100000, minimum 0. | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | signature | String | Transaction signature identifier | | slot | UInt64 | Solana blockchain slot number when transaction was processed | | txType | String | Type of transaction (buy/sell) | | tokenAmount | Float64 | Amount of tokens transacted | | valueUSD | Float64 | USD value of the transaction | | priceUSD | Float64 | USD price per token at time of transaction | | dex | String | Decentralized exchange where transaction occurred | | poolAddress | String | Address of the liquidity pool used for the transaction | ## Examples ### 1. Recent SOL Transactions Analysis Query recent SOL transactions within a 24-hour period to analyze trading patterns and market activity. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/token-transactions-time-bounded?token_address=So11111111111111111111111111111111111111112&after_time=1735689600&before_time=1735776000&limit=5" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "signature", "type": "String" }, { "name": "slot", "type": "UInt64" }, { "name": "txType", "type": "String" }, { "name": "tokenAmount", "type": "Float64" }, { "name": "valueUSD", "type": "Float64" }, { "name": "priceUSD", "type": "Float64" }, { "name": "dex", "type": "String" }, { "name": "poolAddress", "type": "String" } ], "data": [ [ "5NY1QG3qHqr333JHWgxnPVJsqgKdyHtcvybQLkpBmhft8jXtprBgXgR3KM1fbniBGcnanV1vdyzTQnDEDYMzohBW", 311292616, "buy", 5.540280975, 1074.4584055063153, 193.9357246238428, "Meteora", "FqW6QxWG7kDHbQgZ9pxZR5rqXYJHd7ZHwUEcCugHFmSQ" ], [ "4Dqa1fme5FfHC1iBJ9jUPVbRsDJ92SmSAyFP138R5ybUiX38UC9XVxB9ZKjmj7nXoo27PCc5Ew76SedE1e33cfVz", 311292616, "buy", 0.074712157, 14.489356306005309, 193.9357246238428, "Meteora", "FqW6QxWG7kDHbQgZ9pxZR5rqXYJHd7ZHwUEcCugHFmSQ" ], [ "58vRkVdv26UFFfsyH8x6SzrrsZvHnisLppetJFqGA8hirJsKxzN6JiXLmZkH41r9Q41cpmkBszLj9VJeVxgF7HDZ", 311292616, "sell", 11.319778006, 2195.309350174648, 193.9357246238428, "Raydium CLMM", "8sN9549P3Zn6xpQRqpApN57xzkCh6sJxLwuEjcG2W4Ji" ], [ "58vRkVdv26UFFfsyH8x6SzrrsZvHnisLppetJFqGA8hirJsKxzN6JiXLmZkH41r9Q41cpmkBszLj9VJeVxgF7HDZ", 311292616, "sell", 11.319778006, 2195.309350174648, 193.9357246238428, "Raydium CLMM", "8sN9549P3Zn6xpQRqpApN57xzkCh6sJxLwuEjcG2W4Ji" ], [ "2BjnScg6rTGu3757nbPkqyM3gdr18CQHwC13foo4bTdKdqCNTrCvvNPRsqf8GYj4it45CZu3qEWzkJyUNFBHUxHq", 311292616, "sell", 11.344764636, 2200.1551503696064, 193.9357246238428, "Raydium CLMM", "EtU7GUW6ogxke9gSjRFm8akgxwyuMT4Rm1mgbkEBTi34" ] ], "rows": 5 } ``` The response returns 5 SOL transactions showing both buy and sell activity across Meteora and Raydium CLMM DEXs. Each transaction includes the exact slot number, transaction signature, token amounts, USD values, and pool addresses. Notice the consistent SOL price of ~$194 during this period, with transaction sizes ranging from 0.07 to 11.34 SOL. ### 2. Extended Historical Range Query transactions over a longer time period to analyze trading volume and patterns. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/token-transactions-time-bounded?token_address=So11111111111111111111111111111111111111112&after_time=1735603200&before_time=1735776000&limit=10&offset=0" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "signature", "type": "String" }, { "name": "slot", "type": "UInt64" }, { "name": "txType", "type": "String" }, { "name": "tokenAmount", "type": "Float64" }, { "name": "valueUSD", "type": "Float64" }, { "name": "priceUSD", "type": "Float64" }, { "name": "dex", "type": "String" }, { "name": "poolAddress", "type": "String" } ], "data": [ [ "5NY1QG3qHqr333JHWgxnPVJsqgKdyHtcvybQLkpBmhft8jXtprBgXgR3KM1fbniBGcnanV1vdyzTQnDEDYMzohBW", 311292616, "buy", 5.540280975, 1074.4584055063153, 193.9357246238428, "Meteora", "FqW6QxWG7kDHbQgZ9pxZR5rqXYJHd7ZHwUEcCugHFmSQ" ], [ "4Dqa1fme5FfHC1iBJ9jUPVbRsDJ92SmSAyFP138R5ybUiX38UC9XVxB9ZKjmj7nXoo27PCc5Ew76SedE1e33cfVz", 311292616, "buy", 0.074712157, 14.489356306005309, 193.9357246238428, "Meteora", "FqW6QxWG7kDHbQgZ9pxZR5rqXYJHd7ZHwUEcCugHFmSQ" ], [ "58vRkVdv26UFFfsyH8x6SzrrsZvHnisLppetJFqGA8hirJsKxzN6JiXLmZkH41r9Q41cpmkBszLj9VJeVxgF7HDZ", 311292616, "sell", 11.319778006, 2195.309350174648, 193.9357246238428, "Raydium CLMM", "8sN9549P3Zn6xpQRqpApN57xzkCh6sJxLwuEjcG2W4Ji" ], [ "58vRkVdv26UFFfsyH8x6SzrrsZvHnisLppetJFqGA8hirJsKxzN6JiXLmZkH41r9Q41cpmkBszLj9VJeVxgF7HDZ", 311292616, "sell", 11.319778006, 2195.309350174648, 193.9357246238428, "Raydium CLMM", "8sN9549P3Zn6xpQRqpApN57xzkCh6sJxLwuEjcG2W4Ji" ], [ "2BjnScg6rTGu3757nbPkqyM3gdr18CQHwC13foo4bTdKdqCNTrCvvNPRsqf8GYj4it45CZu3qEWzkJyUNFBHUxHq", 311292616, "sell", 11.344764636, 2200.1551503696064, 193.9357246238428, "Raydium CLMM", "EtU7GUW6ogxke9gSjRFm8akgxwyuMT4Rm1mgbkEBTi34" ] ], "rows": 5 } ``` This extended query demonstrates the flexibility of time-bounded filtering, allowing analysis of token activity over custom date ranges for deeper market insights and trend analysis. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/token-transactions-time-bounded" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/token-transactions-time-bounded") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/token-transactions` - Retrieve a paginated list of trades/transactions for a specified Solana token address across all DEXes - `/api/v1/solana/token-mint-burn-transactions` - Returns paginated list of mint and burn transactions for a specified Solana token - `/api/v1/solana/pool-transactions-time-bounded` - Get detailed transaction data for any SPL token across major Solana DEXs with precise Unix timestamp filtering - `/api/v1/solana/ohlcv/token` - Retrieve Open, High, Low, Close, and Volume data for any SPL token - `/api/v1/solana/tokens/security` - Provides comprehensive security analysis for a token on Solana, including ownership concentration and transaction metrics --- ## Cambrian API: Token Traders Leaderboard **Endpoint:** /api/v1/solana/traders/leaderboard # Token Traders Leaderboard This endpoint provides a leaderboard of the top traders by trade count, buy/sell/total volume for any SPL token across major Solana DEXs, for a specified recent interval. The leaderboard supports front-end sorting of columns by total_volume, buy_volume, sell_volume, and trade_count. ## Business Value - **Trading Intelligence**: Identify the most active traders for any SPL token to understand market dynamics and trading patterns - **Market Analysis**: Track who's driving volume and trades for specific tokens across multiple DEX platforms - **Real-time Insights**: Get recent trading activity with configurable time intervals from 30 minutes to 24 hours - **Volume Tracking**: Separate buy and sell volume metrics provide detailed trading behavior analysis - **Performance Ranking**: Sortable columns enable flexible analysis of trader performance across multiple dimensions ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/traders/leaderboard ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | token_address | string | yes | - | SPL token mint address (base58) | | interval | string | yes | - | Lookback window for trades (SQL Interval: '24 HOUR', '12 HOUR', '1 HOUR', '30 MINUTE') | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | trader | String | The trader's wallet address (44 character base58 string) | | tradeCount | UInt64 | Total number of trades executed by the trader in the specified interval | | sellVolume | UInt128 | Total volume of token sells in raw token units | | buyVolume | UInt128 | Total volume of token buys in raw token units | | totalVolume | UInt128 | Combined buy and sell volume in raw token units | ## Examples ### 1. Get Top USDC Traders (24 Hour) This example retrieves the top traders for USDC over the past 24 hours. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/traders/leaderboard?token_address=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&interval=24%20HOUR" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [ { "columns": [ { "name": "trader", "type": "FixedString(44)" }, { "name": "tradeCount", "type": "UInt64" }, { "name": "sellVolume", "type": "UInt128" }, { "name": "buyVolume", "type": "UInt128" }, { "name": "totalVolume", "type": "UInt128" } ], "data": [ [ "5XF5V2r5HfBMXAh8xeBCwdpgEAFsjCfqXvVcN9pGpJEy", 1, 0, 1461346, 1461346 ], [ "DbCnMJyx82WTyKvmz3r4GWgPtYCY6jo6uLmP5ZDz4P2G", 1, 5953726, 0, 5953726 ], [ "GxcTwfj8jEUBfgoksKjGsEkgCzfcmEu8FLE6LfbJeTfF", 1, 19247543, 0, 19247543 ], [ "6WX5qrBBVJB9q9GSHnN3pjR3HhhL4JpiQUuKKjiv9gdk", 1, 2946386, 0, 2946386 ] ] } ] ``` The response shows the top 4 USDC traders in the past 24 hours, with their wallet addresses, trade counts, and volume breakdowns. The data is returned in columnar format for efficient processing. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/traders/leaderboard" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/traders/leaderboard") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/tokens/holders` - Returns a list of accounts currently holding a specific Solana token, sorted by balance - `/api/v1/solana/ohlcv/token` - Retrieve Open, High, Low, Close, and Volume data for any SPL token - `/api/v1/solana/price-volume/single` - Retrieve current USD price, timeframe volume, and percentage changes for any SPL token - `/api/v1/solana/tokens` - Returns a paginated list of known tokens for the Solana chain - `/api/v1/solana/orca/pools/fee-metrics` - Retrieves core metrics like fees and volume for specific Orca Whirlpools --- ## Cambrian API: Trade Statistics **Endpoint:** /api/v1/solana/trade-statistics # Trade Statistics Get instant trade analytics and performance metrics for any SPL tokens. View buy/sell volume breakdowns, trade counts, and USD values across customizable timeframes (1h to 30d). Perfect for portfolio tracking, performance dashboards, and quick market analysis. ## Business Value - **Real-Time Analytics**: Get instant trade statistics for any Solana token with up-to-date buy/sell volume data - **Market Insights**: Access comprehensive metrics including trade counts, volume ratios, and USD values for informed decision-making - **Portfolio Tracking**: Monitor performance across multiple tokens with customizable timeframes from 1 hour to 30 days - **Trading Intelligence**: Leverage buy-to-sell ratios and volume breakdowns to understand market sentiment and trading patterns - **Dashboard Integration**: Perfect for building performance dashboards and market analysis tools with structured data ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/trade-statistics ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | token_addresses | String | Yes | - | Comma-separated token addresses | | timeframe | String | Yes | - | Time interval: 1h, 4h, 12h, 24h, 7d | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | tokenAddress | String | The SPL token mint address | | timeframe | String | The requested timeframe (1h, 4h, 12h, 24h, 7d) | | buyCount | UInt64 | Total number of buy transactions | | sellCount | UInt64 | Total number of sell transactions | | totalTradeCount | UInt64 | Combined buy and sell transaction count | | volumeBuy | Float64 | Total volume of buy transactions in native token units | | volumeSell | Float64 | Total volume of sell transactions in native token units | | totalVolume | Float64 | Combined buy and sell volume in native token units | | volumeBuyUSD | Float64 | USD value of buy volume | | volumeSellUSD | Float64 | USD value of sell volume | | totalVolumeUSD | Float64 | Combined USD value of all trades | | buyToSellRatio | Nullable(Float64) | Ratio of buy volume to sell volume (null if no sells) | ## Examples ### 1. Get 24h Trade Statistics for SOL Get comprehensive 24-hour trading statistics for Wrapped SOL token. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/trade-statistics?token_addresses=So11111111111111111111111111111111111111112&timeframe=24h" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [ { "columns": [ { "name": "tokenAddress", "type": "String" }, { "name": "timeframe", "type": "String" }, { "name": "buyCount", "type": "UInt64" }, { "name": "sellCount", "type": "UInt64" }, { "name": "totalTradeCount", "type": "UInt64" }, { "name": "volumeBuy", "type": "Float64" }, { "name": "volumeSell", "type": "Float64" }, { "name": "totalVolume", "type": "Float64" }, { "name": "volumeBuyUSD", "type": "Float64" }, { "name": "volumeSellUSD", "type": "Float64" }, { "name": "totalVolumeUSD", "type": "Float64" }, { "name": "buyToSellRatio", "type": "Nullable(Float64)" } ], "data": [ [ "So11111111111111111111111111111111111111112", "24h", 7636466, 9926594, 17563060, 32832279.64900277, 32804646.889137466, 65636926.53814024, 4157538072.631192, 4154038947.6109357, 8311577020.242128, 1.0008 ] ], "rows": 1 } ] ``` The response shows SOL had over 17.5M trades in 24h with $8.3B total volume. The buy-to-sell ratio of 1.0008 indicates nearly balanced buying and selling pressure. ### 2. Get Hourly Trade Statistics for Multiple Tokens Query multiple tokens with a shorter timeframe to track rapid market movements. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/trade-statistics?token_addresses=So11111111111111111111111111111111111111112,EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&timeframe=1h" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [ { "columns": [ { "name": "tokenAddress", "type": "String" }, { "name": "timeframe", "type": "String" }, { "name": "buyCount", "type": "UInt64" }, { "name": "sellCount", "type": "UInt64" }, { "name": "totalTradeCount", "type": "UInt64" }, { "name": "volumeBuy", "type": "Float64" }, { "name": "volumeSell", "type": "Float64" }, { "name": "totalVolume", "type": "Float64" }, { "name": "volumeBuyUSD", "type": "Float64" }, { "name": "volumeSellUSD", "type": "Float64" }, { "name": "totalVolumeUSD", "type": "Float64" }, { "name": "buyToSellRatio", "type": "Nullable(Float64)" } ], "data": [ [ "So11111111111111111111111111111111111111112", "1h", 318186, 413609, 731795, 1368016.3537511664, 1367456.1912378024, 2735472.545988969, 173301675.26516503, 173230082.1928905, 346531757.4580555, 1.0004 ], [ "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "1h", 125643, 128975, 254618, 45782341.234567, 46123789.876543, 91906131.111110, 45782341.234567, 46123789.876543, 91906131.111110, 0.9926 ] ], "rows": 2 } ] ``` The response shows hourly statistics for both SOL and USDC, allowing comparison of trading activity between major tokens. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/trade-statistics" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/trade-statistics") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/tokens/holders` - Returns a list of accounts currently holding a specific Solana token - `/api/v1/solana/tokens/holders-over-time` - Returns token holder snapshots at specified block intervals - `/api/v1/solana/ohlcv/token` - Retrieve Open, High, Low, Close, and Volume data for any SPL token - `/api/v1/solana/orca/pools/fee-metrics` - Get core metrics like fees, volume, TVL, and Fee APR for Orca pools - `/api/v1/solana/orca/pools/historical-data` - Retrieve historical daily fee and volume data for Orca pools --- ## Cambrian API: Tokens Trending **Endpoint:** /api/v1/solana/trending-tokens # Trending Tokens Retrieves a list of trending Solana tokens, ordered by price change in 24hs, trade volume in 24hs or current price. This endpoint allows you to track token performance and identify tokens with significant price movements or trading activity. ## Business Value - **Market Analysis**: Track trending tokens to identify emerging market opportunities and price momentum patterns - **Investment Research**: Analyze token performance metrics including 24-hour price changes and trading volumes to inform investment decisions - **Risk Management**: Monitor token volatility and trading activity to assess market risk and liquidity conditions - **Portfolio Optimization**: Identify high-performing tokens based on price appreciation and volume metrics for portfolio diversification - **Trading Strategy**: Use trending data to develop momentum-based trading strategies and identify entry/exit points ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/trending-tokens ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | order_by | string | Yes | - | Column to sort the results by. Options: price_change_percentage, volume_usd_24h, current_price_usd | | limit | integer | No | 10 | Limit the number of results (1-1000) | | offset | integer | No | 0 | Offset the results, allows you to skip a number of rows (0-100000) | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | tokenAddress | String | The token's mint address on Solana | | symbol | String | Token symbol/ticker | | currentPriceUSD | Float64 | Current token price in USD | | price24hAgo | Float64 | Token price 24 hours ago in USD | | priceChangePercentage | Float64 | Percentage change in price over 24 hours | | volume24hUSD | Float64 | Trading volume in the last 24 hours in USD | ## Examples ### 1. Get Top 5 Trending Tokens by Price Change This example demonstrates how to retrieve the top 5 tokens with the highest 24-hour price percentage changes. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/trending-tokens?order_by=price_change_percentage&limit=5" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "tokenAddress", "type": "String" }, { "name": "symbol", "type": "String" }, { "name": "currentPriceUSD", "type": "Float64" }, { "name": "price24hAgo", "type": "Float64" }, { "name": "priceChangePercentage", "type": "Float64" }, { "name": "volume24hUSD", "type": "Float64" } ], "data": [ [ "6VKDRsckuBSk3rFnsvoHV9hrPKnzNHRSCfrS91Cupump", "Ditto", 0.00005313623154318319, 0.000014776157632777156, 259.60790933438574, 72446.12936012667 ], [ "AWc8uws9nh7pYjFQ8FzxavmP8WTUPwmQZAvK2yAPBAGS", "ZHC", 0.0028328309623358587, 0.0010027201852745697, 182.5146041674786, 873324.2777910972 ], [ "81N3XkeSL28tfyKUEEVSTiyT3xyT1WKc4QrZEgNMpump", "GooGooGaga", 0.0001302789756645811, 0.00005090819792348477, 155.909619626275, 44547.12389077158 ], [ "aXKEWTAJb58e58tybyXZF3dqTunWLPEaK4Ccn3Be1iN", "cd", 0.00009629904274771568, 0.00004089656262920902, 135.46977192390557, 1627667.6195803545 ], [ "CPLTbYbtDMKZtHBaPqdDmHjxNwESCEB14gm6VuoDpump", "DTV", 0.0025435318605601877, 0.001225105981183932, 107.6172918609164, 205113.99916285655 ] ], "rows": 5 } ``` Returns the top 5 tokens with the highest 24-hour price percentage changes, with Ditto showing an impressive 259.6% increase. ### 2. Get Top Tokens by Trading Volume This example shows how to retrieve tokens ordered by their 24-hour trading volume to identify the most actively traded tokens. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/trending-tokens?order_by=volume_usd_24h&limit=10" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json { "columns": [ { "name": "tokenAddress", "type": "String" }, { "name": "symbol", "type": "String" }, { "name": "currentPriceUSD", "type": "Float64" }, { "name": "price24hAgo", "type": "Float64" }, { "name": "priceChangePercentage", "type": "Float64" }, { "name": "volume24hUSD", "type": "Float64" } ], "data": [ [ "AWc8uws9nh7pYjFQ8FzxavmP8WTUPwmQZAvK2yAPBAGS", "ZHC", 0.0028328309623358587, 0.0010027201852745697, 182.5146041674786, 873324.2777910972 ], [ "aXKEWTAJb58e58tybyXZF3dqTunWLPEaK4Ccn3Be1iN", "cd", 0.00009629904274771568, 0.00004089656262920902, 135.46977192390557, 1627667.6195803545 ], [ "CPLTbYbtDMKZtHBaPqdDmHjxNwESCEB14gm6VuoDpump", "DTV", 0.0025435318605601877, 0.001225105981183932, 107.6172918609164, 205113.99916285655 ], [ "6VKDRsckuBSk3rFnsvoHV9hrPKnzNHRSCfrS91Cupump", "Ditto", 0.00005313623154318319, 0.000014776157632777156, 259.60790933438574, 72446.12936012667 ], [ "81N3XkeSL28tfyKUEEVSTiyT3xyT1WKc4QrZEgNMpump", "GooGooGaga", 0.0001302789756645811, 0.00005090819792348477, 155.909619626275, 44547.12389077158 ] ], "rows": 5 // ... additional rows omitted for brevity } ``` Returns tokens ordered by their 24-hour trading volume, helping identify the most liquid and actively traded tokens in the market. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/trending-tokens" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/trending-tokens") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/tokens` - Get comprehensive token information and metrics - `/api/v1/solana/token-details` - Get detailed information for specific tokens - `/api/v1/solana/tokens/holders` - Get token holder distribution data - `/api/v1/solana/ohlcv/token` - Get OHLCV price data for tokens - `/api/v1/solana/orca/pools` - Get Orca DEX pool information for token trading --- ## Cambrian API: Wallet Token Balance History **Endpoint:** /api/v1/solana/wallet-balance-history # Wallet Token Balance History Returns paginated list of balance changes for a specified wallet address, providing complete audit trail of portfolio changes with transaction details, pre/post balances, and timing information. Essential for portfolio tracking and compliance monitoring. ## Business Value - **Portfolio Tracking**: Track detailed balance changes over time for comprehensive wallet monitoring and analysis - **Compliance Monitoring**: Provide complete audit trail of all token balance changes with transaction-level detail - **Transaction Analysis**: Analyze balance impact of each transaction with before/after balance states - **Historical Analysis**: Access complete historical balance data for research and backtesting purposes - **Risk Management**: Monitor wallet activity patterns and balance fluctuations for risk assessment ## Endpoint Details **URL**: ``` https://opabinia.cambrian.network/api/v1/solana/wallet-balance-history ``` **Method**: GET **Authentication**: Required via `X-API-Key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | wallet_address | String | Yes | - | Solana wallet address (base58 format, 32-44 characters) | | token_address | String | Yes | - | Filter by specific token address (base58 format) | | after_time | Integer | Yes | - | Unix timestamp - start time for data range | | before_time | Integer | Yes | - | Unix timestamp - end time for data range | | limit | Integer | No | 100 | Limit the number of results (1-1000) | | offset | Integer | No | 0 | Offset the results, allows you to skip a number of rows before starting to return rows (0-100000) | | order_asc | Array | No | - | List of column names to order by in ascending order | | order_desc | Array | No | - | List of column names to order by in descending order | ## Response Field Descriptions | Response Field | Type | Description | |---------------|------|-------------| | txHash | String | Transaction hash (signature) | | slot | Number | Solana slot number where the transaction occurred | | blockTime | Number | Unix timestamp of the block | | blockHumanTime | String | Human-readable timestamp in ISO format | | tokenAddress | String | Token mint address (44-character base58) | | tokenSymbol | String | Token symbol (e.g., SOL) | | tokenDecimals | Number | Number of decimal places for the token | | preBalance | Number | Token balance before the transaction (raw units) | | postBalance | Number | Token balance after the transaction (raw units) | | changeAmount | Number | Change in balance (postBalance - preBalance, raw units) | | uiPreBalance | Number | Pre-transaction balance in human-readable format | | uiPostBalance | Number | Post-transaction balance in human-readable format | | uiChangeAmount | Number | Balance change in human-readable format | ## Examples ### 1. Basic Wallet Balance History Query This example demonstrates retrieving SOL balance history for a specific wallet over a 24-hour period. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/wallet-balance-history?wallet_address=DKxRinQQhKnZcfdaSnKov5v4ja95pEncjBYU8ajzVgsW&token_address=So11111111111111111111111111111111111111112&after_time=1735689600&before_time=1735776000&limit=5" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [ { "columns": [ { "name": "txHash", "type": "FixedString(88)" }, { "name": "slot", "type": "UInt64" }, { "name": "blockTime", "type": "UInt32" }, { "name": "blockHumanTime", "type": "String" }, { "name": "tokenAddress", "type": "FixedString(44)" }, { "name": "tokenSymbol", "type": "String" }, { "name": "tokenDecimals", "type": "UInt8" }, { "name": "preBalance", "type": "UInt64" }, { "name": "postBalance", "type": "UInt64" }, { "name": "changeAmount", "type": "Int64" }, { "name": "uiPreBalance", "type": "Float64" }, { "name": "uiPostBalance", "type": "Float64" }, { "name": "uiChangeAmount", "type": "Float64" } ], "data": [ [ "5ka8cDRSyuk2htLLyzU8yRZEJ2Nu7XANEaqJD8qK9i53WPC7UbEHdiBLCh99QEQj44g51VaJnXeDxcjemGyG4XWH", 311111849, 1735702200, "2025-01-01T03:30:00Z", "So11111111111111111111111111111111111111112", "SOL", 9, 41949517781, 41978232196, 28714415, 41.949517781, 41.978232196, 0.028714415 ], [ "4BHFZZahgc28MbLNHhbv4TEBLqNjhb2HG51cPp9qSPPPrXRh4d24Ne8cdNEwC92KtoP5cHoLYL7XDxWjhP1tMX9q", 311111849, 1735702200, "2025-01-01T03:30:00Z", "So11111111111111111111111111111111111111112", "SOL", 9, 41914786696, 41949517781, 34731085, 41.914786696, 41.949517781, 0.034731085 ], [ "mizx16g3DfdpzWzwmUR3LjWLh9175xM1aLH4nSmsgzzA1ADBqUpGiED8FheEv3YsPy3hhq8zxpYKpr3efJdSwCq", 311187140, 1735732800, "2025-01-01T12:00:00Z", "So11111111111111111111111111111111111111112", "SOL", 9, 42030430752, 41955631794, -74798958, 42.030430752, 41.955631794, -0.074798958 ], [ "4D2vmKXg5bbEjDEKQb4ofUXacvvzz8qeR3bP83UEXcWM9cqqBHdGRKx9qYpouKGrgKXenK4Dux675otSR4wT1dfu", 311107452, 1735700400, "2025-01-01T03:00:00Z", "So11111111111111111111111111111111111111112", "SOL", 9, 41912731005, 41945464581, 32733576, 41.912731005, 41.945464581, 0.032733576 ], [ "4sCotkN5Vq1XcEvEi2J4hTugGWhm6Q1LB5k2LhEgYQxHht7u95HLcAZVDL9vbbKwT47UDPGhU4a5eVwWHzZcg9BY", 311107452, 1735700400, "2025-01-01T03:00:00Z", "So11111111111111111111111111111111111111112", "SOL", 9, 41972880805, 41914786696, -58094109, 41.972880805, 41.914786696, -0.058094109 ] ], "rows": 5 } ] ``` The response shows 5 balance change records for the specified wallet's SOL token between January 1, 2025 00:00:00 and 23:59:59. Each record includes the transaction hash, timing information, and detailed before/after balance states, allowing for complete transaction-level audit trails. ### 2. Paginated Results with Ordering This example demonstrates retrieving balance history with custom ordering and pagination. ```bash curl -X GET "https://opabinia.cambrian.network/api/v1/solana/wallet-balance-history?wallet_address=DKxRinQQhKnZcfdaSnKov5v4ja95pEncjBYU8ajzVgsW&token_address=So11111111111111111111111111111111111111112&after_time=1735689600&before_time=1735776000&limit=10&offset=0&order_desc=blockTime" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` **Response:** ```json [ { "columns": [ { "name": "txHash", "type": "FixedString(88)" }, { "name": "slot", "type": "UInt64" }, { "name": "blockTime", "type": "UInt32" }, { "name": "blockHumanTime", "type": "String" }, { "name": "tokenAddress", "type": "FixedString(44)" }, { "name": "tokenSymbol", "type": "String" }, { "name": "tokenDecimals", "type": "UInt8" }, { "name": "preBalance", "type": "UInt64" }, { "name": "postBalance", "type": "UInt64" }, { "name": "changeAmount", "type": "Int64" }, { "name": "uiPreBalance", "type": "Float64" }, { "name": "uiPostBalance", "type": "Float64" }, { "name": "uiChangeAmount", "type": "Float64" } ], "data": [ [ "5ka8cDRSyuk2htLLyzU8yRZEJ2Nu7XANEaqJD8qK9i53WPC7UbEHdiBLCh99QEQj44g51VaJnXeDxcjemGyG4XWH", 311111849, 1735702200, "2025-01-01T03:30:00Z", "So11111111111111111111111111111111111111112", "SOL", 9, 41949517781, 41978232196, 28714415, 41.949517781, 41.978232196, 0.028714415 ] ], "rows": 1 // ... additional rows omitted for brevity } ] ``` The response returns balance history ordered by block time in descending order (most recent first), with pagination support for processing large result sets. ## x402 Payment Option This endpoint supports pay-per-use access via the [x402 payment protocol](https://x402.org) (v2) β€” pay **$0.05 USDC per request** using blockchain micropayments. No API key required. ### Quick Start (TypeScript) ```bash npm install @x402/fetch @x402/evm viem ``` ```typescript import { x402Client } from "@x402/core/client"; import { ExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`); const client = new x402Client(); client.register("eip155:*", new ExactEvmScheme(signer)); const fetchWithPayment = wrapFetchWithPayment(fetch, client); const response = await fetchWithPayment( "https://x402.cambrian.network/api/v1/solana/wallet-balance-history" ); const data = await response.json(); ``` ### Quick Start (Python) ```bash pip install "x402[httpx]" ``` ```python import asyncio, os from eth_account import Account from x402 import x402Client from x402.http.clients import x402HttpxClient from x402.mechanisms.evm import EthAccountSigner from x402.mechanisms.evm.exact.register import register_exact_evm_client async def main(): client = x402Client() account = Account.from_key(os.getenv("EVM_PRIVATE_KEY")) register_exact_evm_client(client, EthAccountSigner(account)) async with x402HttpxClient(client) as http: response = await http.get("https://x402.cambrian.network/api/v1/solana/wallet-balance-history") print(response.json()) asyncio.run(main()) ``` ### Payment Flow 1. Send a normal request to the endpoint (no API key needed) 2. Server returns `402 Payment Required` with payment details 3. The x402 SDK automatically signs a payment authorization with your wallet 4. The SDK resubmits the request with the signed payment 5. Server verifies payment and returns the API response The x402 SDK handles steps 2–5 automatically. **Network**: Base (chain ID 8453) | **Currency**: USDC | **Price**: $0.05 per request --- ## Related Endpoints - `/api/v1/solana/holder-token-balances` - Returns token balances in USD for a specific user wallet, sorted by balance descending - `/api/v1/solana/token-details` - Get detailed information about a specific token including metadata and statistics - `/api/v1/solana/token-details-multi` - Get detailed information about multiple tokens in a single request - `/api/v1/solana/token-mint-burn-transactions` - Track minting and burning transactions for specific tokens - `/api/v1/solana/ohlcv/token` - Get OHLCV (price) data for tokens over time ---