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

# Batch token price

> Returns a price snapshot (name, symbol, logo, price and market cap in native and USD, and USD liquidity) for up to 100 pools in one call. Each input targets its own chain id and pool id. Per-input failures are reported inline; the batch as a whole still returns 200.

```bash theme={null}
curl -X POST "https://staging-api.struct.to/v1/token/market/batch-price?fields=short" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"requests":[{"chain":"robinhood","chain_id":4663,"pool_id":"0xEd50bDeeA8aDC232f159486192a4157281D722ff"}]}'
```

```json Response (Long) theme={null}
[
  {
    "pool_id": "0xEd50bDeeA8aDC232f159486192a4157281D722ff",
    "data": {
      "pool_id": "0xEd50bDeeA8aDC232f159486192a4157281D722ff",
      "token_address": "0x39dBED3a2bd333467115dE45665cC57F813C4571",
      "name": "Pons",
      "symbol": "PONS",
      "logo": "https://cdn.example.com/pons.png",
      "price": 3.906497e-05,
      "price_native": 3.906497e-05,
      "price_usd": 0.09664868619,
      "market_cap": 39064.97,
      "market_cap_native": 39064.97,
      "market_cap_usd": 96648686.19,
      "liquidity_usd": 2319220.17
    }
  }
]
```

```jsonc Response (Short) theme={null}
[
  {
    "p": "0xEd50bDeeA8aDC232f159486192a4157281D722ff",
    "d": {
      "p": "0xEd50bDeeA8aDC232f159486192a4157281D722ff",
      "ta": "0x39dBED3a2bd333467115dE45665cC57F813C4571",
      "n": "Pons",
      "sy": "PONS",
      "iu": "https://cdn.example.com/pons.png",
      "px": 3.906497e-05,
      "pn": 3.906497e-05,
      "pu": 0.09664868619,
      "mc": 39064.97,
      "mcn": 39064.97,
      "mcu": 96648686.19,
      "lq": 2319220.17
    }
  }
]
```


## OpenAPI

````yaml onchain-openapi.json POST /token/market/batch-price
openapi: 3.1.0
info:
  title: Struct On-chain API
  description: >-
    RESTful API for token market data, discovery, holders, audits, and trader
    analytics across supported chains. Pass `fields=short` or header
    `x-field-names: short` for abbreviated keys. HTTP defaults to `long`. Token
    candlesticks, token trades and wallet batch trades also support
    `fields=array` for typed positional rows.
  version: 1.0.0
servers:
  - url: https://staging-api.struct.to/v1
    description: Staging
security:
  - ApiKey: []
paths:
  /token/market/batch-price:
    post:
      tags:
        - Token / Market
      summary: Batch token price
      description: >-
        Returns a price snapshot (name, symbol, logo, price and market cap in
        native and USD, and USD liquidity) for up to 100 pools in one call. Each
        input targets its own chain id and pool id. Per-input failures are
        reported inline; the batch as a whole still returns 200.
      operationId: post_token_batch_price
      parameters:
        - name: x-field-names
          in: header
          required: false
          description: >-
            Select long (full) or short (abbreviated) field names. HTTP defaults
            to `long`. Takes precedence over `fields`. See [Response
            Format](/api-reference/response-format#long-and-short-field-names).
          schema:
            type: string
            enum:
              - long
              - short
            default: long
          example: short
        - name: fields
          in: query
          required: false
          description: >-
            Same as `x-field-names`. Use `long` or `short`. HTTP defaults to
            `long`. Ignored when the header is set. `field_names` is accepted as
            an alias.
          schema:
            type: string
            enum:
              - long
              - short
            default: long
          example: short
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchPriceRequest'
            example:
              requests:
                - chain: robinhood
                  chain_id: 4663
                  pool_id: '0xEd50bDeeA8aDC232f159486192a4157281D722ff'
        required: true
      responses:
        '200':
          description: Per-input price snapshots
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BatchPriceResult'
              examples:
                long:
                  summary: Response (Long)
                  value:
                    - pool_id: '0xEd50bDeeA8aDC232f159486192a4157281D722ff'
                      data:
                        pool_id: '0xEd50bDeeA8aDC232f159486192a4157281D722ff'
                        token_address: '0x39dBED3a2bd333467115dE45665cC57F813C4571'
                        name: Pons
                        symbol: PONS
                        logo: https://cdn.example.com/pons.png
                        price: 0.00003906497
                        price_native: 0.00003906497
                        price_usd: 0.09664868619
                        market_cap: 39064.97
                        market_cap_native: 39064.97
                        market_cap_usd: 96648686.19
                        liquidity_usd: 2319220.17
                short:
                  summary: Response (Short)
                  value:
                    - p: '0xEd50bDeeA8aDC232f159486192a4157281D722ff'
                      d:
                        p: '0xEd50bDeeA8aDC232f159486192a4157281D722ff'
                        ta: '0x39dBED3a2bd333467115dE45665cC57F813C4571'
                        'n': Pons
                        sy: PONS
                        iu: https://cdn.example.com/pons.png
                        px: 0.00003906497
                        pn: 0.00003906497
                        pu: 0.09664868619
                        mc: 39064.97
                        mcn: 39064.97
                        mcu: 96648686.19
                        lq: 2319220.17
        '400':
          description: >-
            Validation error — missing body, empty `requests`, or more than 100
            inputs.
components:
  schemas:
    BatchPriceRequest:
      type: object
      description: Request body for the batch price endpoint.
      required:
        - requests
      properties:
        requests:
          type: array
          items:
            $ref: '#/components/schemas/BatchPriceInput'
          description: Inputs to resolve. Max 100. Inputs may span multiple chains.
    BatchPriceResult:
      type: object
      description: |-
        Result for a single batch input. Echoes the resolved chain and pool so
        callers can correlate results, and carries either the price data or a
        per-input `error`.
      required:
        - pool_id
      properties:
        pool_id:
          type: string
        data:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PoolTokenPrice'
        error:
          type:
            - string
            - 'null'
    BatchPriceInput:
      type: object
      description: A single price input within a batch request.
      required:
        - pool_id
      properties:
        chain_id:
          type:
            - integer
            - 'null'
          format: int64
          description: Chain id (defaults to the primary chain when omitted).
        chain:
          type:
            - string
            - 'null'
          description: Chain name (alternative to `chain_id`).
        pool_id:
          type: string
          description: Pool address (required).
    PoolTokenPrice:
      type: object
      description: A pool's price snapshot.
      required:
        - pool_id
      properties:
        pool_id:
          type: string
          description: Pool address this snapshot is for.
        token_address:
          type:
            - string
            - 'null'
          description: The token whose price and market cap are reported.
        name:
          type:
            - string
            - 'null'
        symbol:
          type:
            - string
            - 'null'
        logo:
          type:
            - string
            - 'null'
        price:
          type:
            - number
            - 'null'
          format: double
          description: Price in the pool's counter-token units.
        price_native:
          type:
            - number
            - 'null'
          format: double
          description: Price in the chain's native coin.
        price_usd:
          type:
            - number
            - 'null'
          format: double
          description: Price in USD.
        market_cap:
          type:
            - number
            - 'null'
          format: double
          description: Market cap in the pool's counter-token units.
        market_cap_native:
          type:
            - number
            - 'null'
          format: double
          description: Market cap in the chain's native coin.
        market_cap_usd:
          type:
            - number
            - 'null'
          format: double
          description: Market cap in USD.
        liquidity_usd:
          type:
            - number
            - 'null'
          format: double
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: Secret API key (`sk_*`) or JWT public key (`pk_jwt_*`).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.