> ## 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.

# Fetch token price stats

> Get tokens price stats like volume, high and low, price and volume change.

export const SupportedChainsList = 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: "GET"
        });
        if (!response.ok) {
          throw new Error(`HTTP error! status: ${response.status}`);
        }
        const responseData = await response.json();
        const filteredData = responseData.filter(entry => {
          const product = entry.endpoints[props.product_name];
          return product !== null;
        });
        setData(filteredData);
        setIsLoading(false);
      } catch (error) {
        setIsLoading(false);
      }
    };
    fetchData();
  }, []);
  if (isLoading) {
    return <div>Loading chain information...</div>;
  }
  if (!data) {
    return <div>No data available</div>;
  }
  const isCustomSQL = props.product_name === "custom_sql";
  return <div>
            {data.length > 0 && <table className="w-full">
                    <thead>
                        <tr>
                            <th>Chain</th>
                            <th>Chain ID</th>
                            <th>Status</th>
                            {isCustomSQL && <th>Tables</th>}
                        </tr>
                    </thead>
                    <tbody>
                        {data.map(chain => {
    const endpoint = chain.endpoints[props.product_name];
    return <tr key={chain.id}>
                                    <td style={{
      padding: '12px'
    }}>{chain.label}</td>
                                    <td style={{
      padding: '12px'
    }}><code>{chain.id}</code></td>
                                    <td style={{
      padding: '12px'
    }}>{endpoint ? endpoint.availability === "beta" ? "🌱 Beta" : "✅ Supported" : "❌ Not Supported"}</td>
                                    {isCustomSQL && <td style={{
      padding: '12px'
    }}>
                                            {endpoint && endpoint.tables ? endpoint.tables.map(t => t.name).join(", ") : "-"}
                                        </td>}
                                </tr>;
  })}
                    </tbody>
                </table>}
        </div>;
};

This endpoint returns token price statistics based on on-chain activity. These stats are calculated from our on-chain DEX-based prices.

## Available Stats

| Stat           | Time Window |
| :------------- | :---------- |
| High/Low       | 24h, 1h     |
| % Price Change | 24h, 1h     |

## Important Notes

* **Price high/low and price changes** are calculated from filtered prices to avoid outlying trades producing inaccurate values

## Pagination

This endpoint returns prices for up to 200 tokens in a single request.

## Supported Chains

<SupportedChainsList product_name="token_latest_price" />


## OpenAPI

````yaml /_openapi/prices-api.json POST /api/v1/developer/prices/stats
openapi: 3.1.0
info:
  title: Allium API
  version: 0.1.0
servers:
  - url: https://api.allium.so
security: []
paths:
  /api/v1/developer/prices/stats:
    post:
      tags:
        - PRICES
        - DEVELOPER
      summary: Token Stats
      description: Get the stats for the given token addresseses.
      operationId: get_stats_api_v1_developer_prices_stats_post
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/PayloadTokenAddress'
              minItems: 1
              maxItems: 200
              description: List of token addresses to get stats for.
              title: Addresses
            example:
              - token_address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
                chain: ethereum
              - token_address: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                chain: solana
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Envelope_TokenStatsWithHiddenFields_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyBearer: []
components:
  schemas:
    PayloadTokenAddress:
      properties:
        token_address:
          type: string
          title: Token Address
          description: Token contract address
        chain:
          type: string
          title: Chain
          description: Lowercase chain name
      type: object
      required:
        - token_address
        - chain
      title: PayloadTokenAddress
      example:
        chain: ethereum
        token_address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
    Envelope_TokenStatsWithHiddenFields_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/TokenStatsWithHiddenFields'
          type: array
          title: Items
          description: Response items
        cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Cursor
          description: Pagination cursor for next page
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
          description: Informational message (e.g. partial results)
      type: object
      required:
        - items
      title: Envelope[TokenStatsWithHiddenFields]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TokenStatsWithHiddenFields:
      properties:
        mint:
          type: string
          title: Mint
          description: Token contract address
        chain:
          type: string
          title: Chain
          description: Lowercase chain name
        timestamp:
          type: string
          format: date-time
          title: Timestamp
          description: ISO 8601 UTC timestamp
        latest_price:
          type: number
          title: Latest Price
          description: Latest price (USD)
        low_24h:
          type: number
          title: Low 24H
          description: Lowest price (USD) over last 24h
        high_24h:
          type: number
          title: High 24H
          description: Highest price (USD) over last 24h
        low_1h:
          type: number
          title: Low 1H
          description: Lowest price (USD) over last 1h
        high_1h:
          type: number
          title: High 1H
          description: Highest price (USD) over last 1h
        percent_change_24h:
          anyOf:
            - type: number
            - type: 'null'
          title: Percent Change 24H
          description: Price change (%) over last 24h
        percent_change_1h:
          anyOf:
            - type: number
            - type: 'null'
          title: Percent Change 1H
          description: Price change (%) over last 1h
        decimals:
          anyOf:
            - type: integer
            - type: 'null'
          title: Decimals
          description: Token decimal places
      type: object
      required:
        - mint
        - chain
        - timestamp
        - latest_price
        - low_24h
        - high_24h
        - low_1h
        - high_1h
        - percent_change_24h
        - percent_change_1h
      title: TokenStatsWithHiddenFields
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyBearer:
      type: apiKey
      in: header
      name: X-API-KEY

````