> ## 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 points (timestamp + value)

> Returns up to price_point_limit (default 60, maximum 300) lightweight `{ t, value }` price points for each requested pool id or token address. The whole batch shares chain, resolution, and data type. 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-points?fields=short" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"chain":"robinhood","chain_id":4663,"pool_ids":["0xEd50bDeeA8aDC232f159486192a4157281D722ff"],"token_addresses":["0x39dBED3a2bd333467115dE45665cC57F813C4571"],"resolution":"1","data_type":"price_usd","price_point_limit":60}'
```

```json Response (Long) theme={null}
[
  {
    "token_address": "0x39dBED3a2bd333467115dE45665cC57F813C4571",
    "pool_id": "0xEd50bDeeA8aDC232f159486192a4157281D722ff",
    "points": [
      {
        "timestamp": 1784216400000,
        "value": 0.09664868619
      }
    ]
  }
]
```

```jsonc Response (Short) theme={null}
[
  {
    "ta": "0x39dBED3a2bd333467115dE45665cC57F813C4571",
    "p": "0xEd50bDeeA8aDC232f159486192a4157281D722ff",
    "pts": [
      {
        "t": 1784216400000,
        "v": 0.09664868619
      }
    ]
  }
]
```


## OpenAPI

````yaml onchain-openapi.json POST /token/market/batch-price-points
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-points:
    post:
      tags:
        - Token / Market
      summary: Batch token price points (timestamp + value)
      description: >-
        Returns up to price_point_limit (default 60, maximum 300) lightweight `{
        t, value }` price points for each requested pool id or token address.
        The whole batch shares chain, resolution, and data type. Per-input
        failures are reported inline; the batch as a whole still returns 200.
      operationId: post_token_batch_price_points
      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/BatchPricePointsRequest'
            example:
              chain: robinhood
              chain_id: 4663
              pool_ids:
                - '0xEd50bDeeA8aDC232f159486192a4157281D722ff'
              token_addresses:
                - '0x39dBED3a2bd333467115dE45665cC57F813C4571'
              resolution: '1'
              data_type: price_usd
              price_point_limit: 60
        required: true
      responses:
        '200':
          description: Per-input price-point series
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BatchPricePointsResult'
              examples:
                long:
                  summary: Response (Long)
                  value:
                    - token_address: '0x39dBED3a2bd333467115dE45665cC57F813C4571'
                      pool_id: '0xEd50bDeeA8aDC232f159486192a4157281D722ff'
                      points:
                        - timestamp: 1784216400000
                          value: 0.09664868619
                short:
                  summary: Response (Short)
                  value:
                    - ta: '0x39dBED3a2bd333467115dE45665cC57F813C4571'
                      p: '0xEd50bDeeA8aDC232f159486192a4157281D722ff'
                      pts:
                        - t: 1784216400000
                          v: 0.09664868619
        '400':
          description: >-
            Validation error — missing body, empty `pool_ids`/`token_addresses`,
            or more than 50 total inputs.
components:
  schemas:
    BatchPricePointsRequest:
      type: object
      description: Request body for the batch price-points endpoint.
      properties:
        chain:
          type:
            - string
            - 'null'
          description: Chain name. Defaults to `solana`.
        chain_id:
          type:
            - integer
            - 'null'
          format: int64
          description: Chain id. Defaults to Solana `-1`.
        pool_ids:
          type: array
          items:
            type: string
          description: >-
            Pool addresses to resolve. Combined total with `token_addresses`
            cannot exceed 50.
        token_addresses:
          type: array
          items:
            type: string
          description: >-
            Token addresses to resolve. Combined total with `pool_ids` cannot
            exceed 50.
        resolution:
          type:
            - string
            - 'null'
          description: Candle resolution shared by every requested series (default `1`).
        data_type:
          type:
            - string
            - 'null'
          description: >-
            Series shared by every requested input (default `price_usd`):
            `price` /

            `market_cap` in the pool's counter-token units, `price_usd` /

            `market_cap_usd` in USD, `price_native` / `market_cap_native` in the

            chain's native coin.
        price_point_limit:
          oneOf:
            - type: integer
              default: 60
              maximum: 300
              minimum: 1
          description: Maximum price points per input. Defaults to 60; range 1–300.
    BatchPricePointsResult:
      type: object
      description: >-
        Result for a single batch input. Echoes the resolved chain/token/pool so

        callers can correlate results with inputs, and carries either the points
        or

        a per-input `error`.
      required:
        - points
      properties:
        token_address:
          type:
            - string
            - 'null'
          description: Echoed token address, if this result came from `token_addresses`.
        pool_id:
          type:
            - string
            - 'null'
          description: Echoed pool id, if this result came from `pool_ids`.
        points:
          type: array
          items:
            $ref: '#/components/schemas/PricePoint'
          description: Price series for this input (empty when `error` is set).
        error:
          type:
            - string
            - 'null'
          description: Per-input error message, if this input could not be resolved.
    PricePoint:
      type: object
      description: |-
        A single point in a price series: unix millis timestamp and the close
        value for the requested `data_type`.
      required:
        - timestamp
      properties:
        timestamp:
          type: integer
          format: int64
          description: Bucket timestamp in unix milliseconds.
          minimum: 0
        value:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
              description: Close value for the requested `data_type` (price/market cap).
    Decimal:
      type: number
      format: double
      description: Floating-point number serialized as JSON number.
      examples:
        - 4.108801574e-7
  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.