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

# Get historical candlestick data for token by id

| Hedera Network | Base URL                                                                   |
| -------------- | -------------------------------------------------------------------------- |
| Mainnet        | [https://api.saucerswap.finance](https://api.saucerswap.finance)           |
| Testnet        | [https://test-api.saucerswap.finance](https://test-api.saucerswap.finance) |
| Previewnet     | *Not supported*                                                            |


## OpenAPI

````yaml GET /tokens/prices/{tokenId}
openapi: 3.0.4
info:
  title: SaucerSwap REST API
  version: 1.0.0
servers:
  - url: https://api.saucerswap.finance
  - url: https://test-api.saucerswap.finance
security: []
paths:
  /tokens/prices/{tokenId}:
    get:
      tags:
        - Tokens
      summary: Get historical candlestick data for token by id
      parameters:
        - $ref: '#/components/parameters/ApiKeyParam'
        - name: tokenId
          description: Token id (shard.realm.num)
          in: path
          required: true
          schema:
            type: string
            example: 0.0.731861
        - name: from
          in: query
          required: true
          schema:
            type: integer
            example: 1697600000
          description: From unix seconds
        - name: to
          in: query
          required: true
          schema:
            type: integer
            example: 1697610000
          description: To unix seconds
        - name: interval
          in: query
          description: Data interval
          required: true
          schema:
            type: string
            example: HOUR
            enum:
              - FIVEMIN
              - HOUR
              - DAY
              - WEEK
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TokenCandlestickData'
components:
  parameters:
    ApiKeyParam:
      name: x-api-key
      in: header
      required: true
      schema:
        type: string
        default: 875e1017-87b8-4b12-8301-6aa1f1aa073b
      description: >-
        API key for authentication. The demo api key provided is globally rate
        limited. Do not use in production.
  schemas:
    TokenCandlestickData:
      type: object
      properties:
        tokenId:
          type: string
          description: Token id (shard.realm.num)
          example: 0.0.731861
        open:
          type: integer
          example: 36358807
          description: >-
            The open price of the token in tinybars (i.e. first minutely
            observation over the INTERVAL)
        openUsd:
          type: number
          format: float
          example: 0.017246927356274498
          description: >-
            The open price of the token in USD (i.e. first minutely observation
            over the INTERVAL)
        high:
          type: integer
          example: 36370090
          description: The high price of the token over the INTERVAL, in tinybars
        highUsd:
          type: number
          format: float
          example: 0.017248478665373164
          description: The high price of the token over the INTERVAL, in USD
        low:
          type: integer
          example: 36334867
          description: The low price of the token over the INTERVAL, in tinybars
        lowUsd:
          type: number
          format: float
          example: 0.0169388611613325
          description: The low price of the token over the INTERVAL, in USD
        close:
          type: integer
          example: 36353193
          description: The close price of the token over the INTERVAL, in tinybars
        closeUsd:
          type: number
          format: float
          example: 0.0169388611613325
          description: The close price of the token over the INTERVAL, in USD
        avg:
          type: number
          format: float
          example: 36347000.92028988
          description: The (minutely) avg price of the token over the INTERVAL, in tinybars
        avgUsd:
          type: number
          format: float
          example: 0.017085609229304164
          description: The (minutely) avg price of the token over the INTERVAL, in USD
        volume:
          type: string
          example: '4484168318250'
          description: >-
            The sum of total volume traded of the token over the INTERVAL, in
            tinybars
        liquidity:
          type: string
          example: '5976854242691456'
          description: >-
            The point in time liquidity of the token, as of timestampSeconds
            (the end timestamp of the INTERVAL), in tinybars
        volumeUsd:
          type: number
          format: float
          example: 2110.33
          description: >-
            The sum of total volume traded of the token over the INTERVAL, in
            USD
        liquidityUsd:
          format: float
          example: 2784930.18
          description: >-
            The point in time liquidity of the token, as of timestampSeconds
            (the end timestamp of the INTERVAL), in USD
        timestampSeconds:
          type: integer
          example: 1697681880
          description: The end unix timestamp of the INTERVAL, in seconds
        startTimestampSeconds:
          type: integer
          example: 1697673600
          description: The start unix timestamp of the INTERVAL, in seconds
      required:
        - tokenId
        - open
        - openUsd
        - high
        - highUsd
        - low
        - lowUsd
        - close
        - closeUsd
        - avg
        - avgUsd
        - volume
        - liquidity
        - volumeUsd
        - liquidityUsd
        - timestampSeconds
        - startTimestampSeconds

````