> ## Documentation Index
> Fetch the complete documentation index at: https://docs.allium.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Realtime and historical token prices calculated from on-chain DEX trades.

export const SupportedChainsTable = props => {
  const [data, setData] = useState(null);
  const [isLoading, setIsLoading] = useState(true);
  useEffect(() => {
    const fetchData = async () => {
      try {
        const response = await fetch("https://api.allium.so/api/v1/supported-chains/realtime-apis", {
          method: "POST",
          headers: {
            'Content-Type': 'application/json'
          },
          body: JSON.stringify({
            endpoints: props.products
          })
        });
        if (!response.ok) {
          throw new Error(`HTTP error! status: ${response.status}`);
        }
        const responseData = await response.json();
        setData(responseData);
        setIsLoading(false);
      } catch (error) {
        setIsLoading(false);
      }
    };
    fetchData();
  }, []);
  if (isLoading) {
    return <div>Loading chain information...</div>;
  }
  if (!data) {
    return <div>No data available</div>;
  }
  const PRODUCT_LABELS = {
    historical_fungible_token_balances: "Historical Fungible Token Balances",
    latest_fungible_token_balances: "Latest Fungible Token Balances",
    transactions: "Transactions",
    pnl: "PnL",
    token_transfers: "Token Transfers",
    token_price_history: "Token Price History",
    token_latest_price: "Token Latest Price",
    token_price_stats: "Token Price Stats",
    nft_apis: "NFT APIs",
    custom_sql: "Custom SQL",
    latest_nft_balances: "Latest NFT Balances"
  };
  return <div>
            <div className="mb-2 flex gap-4 justify-start">
                <span>✅ Supported</span>
                <span>🌱 Beta</span>
                <span>❌ Not supported</span>
            </div>
            <div className="overflow-x-auto">
                <table className="min-w-full divide-y">
                    <thead>
                        <tr>
                            <th className="px-6 py-3 text-left text-xs font-medium tracking-wider">Chain</th>
                            {props.products.map(product => <th key={product} className="px-6 py-3 text-left text-xs font-medium tracking-wider">
                                    {PRODUCT_LABELS[product] || product.replace(/_/g, ' ').replace(/\b\w/g, l => l.toUpperCase())}
                                </th>)}
                        </tr>
                    </thead>
                    <tbody className="divide-y">
                        {data.map(chain => <tr key={chain.label}>
                                <td className="px-6 py-4 whitespace-nowrap text-sm font-medium">{chain.label}</td>
                                {props.products.map(product => {
    const endpoint = chain.endpoints[product];
    let status = "❌";
    if (endpoint) {
      switch (endpoint.availability) {
        case "internal_only":
          status = "❌";
          break;
        case "beta":
          status = "🌱";
          break;
        case "ga":
          status = "✅";
          break;
        default:
          status = "❌";
          break;
      }
    }
    return <td key={`${chain.label}-${product}`} className="px-6 py-4 whitespace-nowrap text-sm">
                                            {status}
                                        </td>;
  })}
                            </tr>)}
                    </tbody>
                </table>
            </div>
        </div>;
};

Allium's Prices APIs provide realtime token prices and historical price data based on on-chain trading activity across multiple DEXes. Use cases range from live price charts to portfolio valuation and market analytics.

## Key Features

<CardGroup cols={3}>
  <Card title="Realtime & Historical" icon="clock">
    Latest prices update in realtime, with historical data available at multiple
    intervals and granularities
  </Card>

  <Card title="On-Chain Calculation" icon="link">
    Prices computed directly from on-chain DEX trades for low latency and
    comprehensive coverage
  </Card>

  <Card title="New Token Support" icon="sparkles">
    Prices available as soon as a token's first DEX trade occurs, including
    pump.fun tokens
  </Card>
</CardGroup>

## Methodology

<Tabs>
  <Tab title="Price Calculation">
    Our token prices are calculated based on on-chain DEX activity:

    1. **Track DEX trades** - Monitor popular DEXes and identify trades
    2. **Convert to USD** - Generate USD prices for each token traded against known tokens (SOL, USDC, WETH, etc.)
    3. **Construct candles** - Build OHLC values for predefined time windows
    4. **Calculate VWAP** - Return volume-weighted average price for each window
  </Tab>

  <Tab title="Outlier Detection">
    On-chain arbitrage activity can cause undesirable price spikes that don't represent actual token value. This makes raw DEX trade prices difficult to use for portfolio management and price charts.

    **Our solution:** We apply z-score-based outlier detection to filter out trades outside the typical price range, resulting in more accurate prices across all endpoints.
  </Tab>

  <Tab title="Tracked DEXes">
    Current list of Solana DEXes used in our price calculations:

    <AccordionGroup>
      <Accordion title="View all tracked DEXes">
        * clmm-v2
        * cropper-whirlpool
        * fluxbeam
        * invariant
        * lifinity-v2
        * mercurial
        * meteora
        * meteora-damm-v2
        * meteora-dlmm
        * orca-v1
        * orca-v2
        * orca-whirlpool
        * phoenix
        * pumpfun
        * pumpswap
        * raydium-clmm
        * raydium-cp
        * raydium-stable
        * raydium-v4
        * saber-stableswap
        * solfi
        * stepn
      </Accordion>
    </AccordionGroup>

    We continuously work on adding new popular DEXes and protocols.
  </Tab>
</Tabs>

## Supported Chains

<SupportedChainsTable products={["token_latest_price", "token_price_history", "token_price_stats"]} />

<Info>
  Interested in testing the Prices API or need pricing data for other chains?
  [Contact us](https://www.allium.so/contact) to discuss your needs.
</Info>
