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

# Token price points (timestamp + value)

> Returns up to price_point_limit (default 60, maximum 300) lightweight `{ timestamp, value }` price points for a token or pool at the given resolution, where `value` is the close of each candle for the selected `data_type`. Provide either pool_id or token_address. Pagination is returned in the top-level response `pagination` field.

```bash theme={null}
curl "https://staging-api.struct.to/v1/token/market/price-points?chain=robinhood&chain_id=4663&price_point_limit=60&pool_id=0xEd50bDeeA8aDC232f159486192a4157281D722ff&token_address=0x39dBED3a2bd333467115dE45665cC57F813C4571&fields=short" \
  -H "X-API-Key: YOUR_API_KEY"
```

```json Response (Long) theme={null}
[
  {
    "timestamp": 1784216400000,
    "value": 0.09664868619
  }
]
```

```jsonc Response (Short) theme={null}
[
  {
    "t": 1784216400000,
    "v": 0.09664868619
  }
]
```


## OpenAPI

````yaml onchain-openapi.json GET /token/market/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/price-points:
    get:
      tags:
        - Token / Market
      summary: Token price points (timestamp + value)
      description: >-
        Returns up to price_point_limit (default 60, maximum 300) lightweight `{
        timestamp, value }` price points for a token or pool at the given
        resolution, where `value` is the close of each candle for the selected
        `data_type`. Provide either pool_id or token_address. Pagination is
        returned in the top-level response `pagination` field.
      operationId: get_token_price_points
      parameters:
        - name: chain
          in: query
          description: Chain name. Required unless `chain_id` is provided.
          required: false
          schema:
            type: string
          example: robinhood
        - name: chain_id
          in: query
          description: Chain id. Required unless `chain` is provided. Use `-1` for Solana.
          required: false
          schema:
            type: integer
            format: int64
          example: 4663
        - name: price_point_limit
          in: query
          description: Maximum price points. Defaults to 60; range 1–300.
          required: false
          schema:
            $ref: '#/components/schemas/PricePointLimit'
          example: 60
        - name: pool_id
          in: query
          description: Pool address. Either `pool_id` or `token_address` is required.
          required: false
          schema:
            type: string
          example: '0xEd50bDeeA8aDC232f159486192a4157281D722ff'
        - name: token_address
          in: query
          description: Token address. Either `pool_id` or `token_address` is required.
          required: false
          schema:
            type: string
          example: '0x39dBED3a2bd333467115dE45665cC57F813C4571'
        - name: resolution
          in: query
          description: Candle resolution (default `1`).
          required: false
          schema:
            $ref: '#/components/schemas/CandlestickResolution'
        - name: data_type
          in: query
          description: >-
            Series to chart (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
            (SOL, ETH, BNB, ...).
          required: false
          schema:
            $ref: '#/components/schemas/CandlestickDataType'
        - 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
      responses:
        '200':
          description: Price-point series
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PricePointsResponse'
              examples:
                long:
                  summary: Response (Long)
                  value:
                    - timestamp: 1784216400000
                      value: 0.09664868619
                short:
                  summary: Response (Short)
                  value:
                    - t: 1784216400000
                      v: 0.09664868619
        '400':
          description: >-
            Validation error — missing `pool_id`/`token_address`, invalid
            address, or unsupported `resolution`/`data_type`.
components:
  schemas:
    PricePointLimit:
      type: integer
      default: 60
      maximum: 300
      minimum: 1
    CandlestickResolution:
      type: string
      description: >-
        Candle resolution for `/token/market/candlestick`.

        `1S`/`5S`/`15S`/`30S` are seconds; `1`/`5`/`15`/`30`/`60`/`240`/`720`
        are

        minutes; `D`/`1D` are one day.
      enum:
        - 1S
        - 5S
        - 15S
        - 30S
        - '1'
        - '5'
        - '15'
        - '30'
        - '60'
        - '240'
        - '720'
        - D
        - 1D
    CandlestickDataType:
      type: string
      description: |-
        Which price/market-cap series the candlestick endpoint charts.
        - `price`: price in the pool's counter-token units
        - `price_usd`: price in USD (default)
        - `price_native`: price in the chain's native coin (SOL, ETH, BNB, ...)
        - `market_cap`: market cap in the pool's counter-token units
        - `market_cap_usd`: market cap in USD
        - `market_cap_native`: market cap in the chain's native coin
      enum:
        - price
        - price_usd
        - price_native
        - market_cap
        - market_cap_usd
        - market_cap_native
    PricePointsResponse:
      type: array
      items:
        $ref: '#/components/schemas/PricePoint'
    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.