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

# Get token price chart data

> Retrieves historical price data for a SUI token with different time intervals based on the range
Unix timestamp in seconds. If not provided, returns data for last 24 hours.
Different ranges will have different intervals:
- < 1 day: 5-minute intervals
- < 7 days: 1-hour intervals
- ≥ 7 days: 1-day intervals




## OpenAPI

````yaml /api-reference/openapi.json get /tokens/sui/price/chart
openapi: 3.0.0
info:
  title: Nimbus API
  version: 1.0.0
  description: >-
    API for Nimbus


    ## Rate Limiting

    This API implements rate limiting to ensure fair usage and protect our
    services. The current rate limit is:


    - **40 requests per 1 minute** per IP address


    If you exceed this limit, you will receive a 429 (Too Many Requests)
    response. Please wait for the rate limit window to reset before making
    additional requests.


    If you need more, please contact us at **thanhle@getnimbus.io** or TG
    **@thanhle27** to get premium API Key.
servers:
  - url: https://api.getnimbus.io
    description: API server
security: []
tags: []
paths:
  /tokens/sui/price/chart:
    get:
      tags:
        - Token
      summary: Get token price chart data
      description: >
        Retrieves historical price data for a SUI token with different time
        intervals based on the range

        Unix timestamp in seconds. If not provided, returns data for last 24
        hours.

        Different ranges will have different intervals:

        - < 1 day: 5-minute intervals

        - < 7 days: 1-hour intervals

        - ≥ 7 days: 1-day intervals
      parameters:
        - in: query
          name: address
          required: true
          schema:
            type: string
          example: 0x2::sui::SUI
          description: The token contract address
        - in: query
          name: range
          schema:
            type: string
            enum:
              - 1h
              - 1D
              - 1W
              - 1M
              - YTD
              - ALL
          description: >-
            (recommended) The time range to get the price chart data. If not
            provided, defaults to using the 'from' and 'to' parameters.
          example: 1h
        - in: query
          name: from
          schema:
            type: integer
          description: >-
            Start timestamp in seconds. If not provided, defaults to 24 hours
            ago
        - in: query
          name: to
          schema:
            type: integer
          description: End timestamp in seconds. If not provided, defaults to current time
      responses:
        '200':
          description: Successful response with price chart data
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      tokenMeta:
                        type: object
                        properties:
                          name:
                            type: string
                            example: Sui
                          symbol:
                            type: string
                            example: SUI
                          decimals:
                            type: number
                            example: 9
                          logo:
                            type: string
                            nullable: true
                            example: https://token-logo.service.com/sui.png
                      data:
                        type: array
                        items:
                          type: object
                          properties:
                            price:
                              type: number
                              example: 1.23
                            updatedAt:
                              type: string
                              format: date-time
                              example: '2024-03-20T10:30:00.000Z'
        '400':
          description: Invalid address or timestamp parameters provided
        '500':
          description: Internal server error
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication
      x-default: nimbus-6a7c85b1-99f4-4d99-b8f3-e6e49b8daad0

````