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

# REST API: Latest token candlestick

> Retrieve the most recent OHLCV candlestick for a token at a chosen interval, with open, high, low, close, and average prices in tinybar and USD.



## OpenAPI

````yaml GET /tokens/prices/latest/{tokenId}
openapi: 3.0.4
info:
  title: SaucerSwap REST API
  version: 1.0.0
servers:
  - url: https://api.saucerswap.finance
    description: Mainnet
  - url: https://test-api.saucerswap.finance
    description: Testnet
security:
  - ApiKeyAuth: []
paths:
  /tokens/prices/latest/{tokenId}:
    get:
      tags:
        - Tokens
      summary: Get the latest 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: 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
        example: YOUR_API_KEY
      description: >-
        API key for authentication. Request a key from
        support@saucerswap.finance.
  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
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key provisioned by the SaucerSwap team. Request one from
        support@saucerswap.finance and send it in the x-api-key header with
        every request.

````