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

# Get token price history

> Get the historical price of the specified token.



## OpenAPI

````yaml get /v1/token/price/history
openapi: 3.0.2
info:
  title: 🪙 Token API
  version: v1.0.0
servers:
  - url: https://api.chainbase.online
    description: production server
security: []
paths:
  /v1/token/price/history:
    get:
      tags:
        - Market Data
      summary: Get token price history
      description: Get the historical price of the specified token.
      operationId: GetTokenPriceHistory
      parameters:
        - description: >-
            chain network id, see [list of
            details](/platform/features/api/web3-api)
          required: true
          schema:
            title: Chain Id
            type: string
            description: >-
              chain network id, see [list of
              details](/platform/features/api/web3-api)
          example: '1'
          name: chain_id
          in: query
        - description: The address of the token contract
          required: true
          schema:
            title: Contract Address
            pattern: ^0[xX]{1}[a-fA-F0-9]{40}$
            type: string
            description: The address of the token contract
          example: '0xdac17f958d2ee523a2206206994597c13d831ec7'
          name: contract_address
          in: query
        - description: Inclusive start timestamp
          required: true
          schema:
            title: From Timestamp
            type: integer
            description: Inclusive start timestamp
          example: 1672502400
          name: from_timestamp
          in: query
        - description: Inclusive end timestamp, the interval should not exceed 90 days
          required: true
          schema:
            title: End Timestamp
            type: integer
            description: Inclusive end timestamp, the interval should not exceed 90 days
          example: 1677524800
          name: end_timestamp
          in: query
        - required: true
          schema:
            title: X-Api-Key
            type: string
            example: demo
          example: demo
          name: x-api-key
          in: header
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseGetTokenPriceHistory'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
components:
  schemas:
    ResponseGetTokenPriceHistory:
      title: ResponseGetTokenPriceHistory
      required:
        - data
      type: object
      properties:
        code:
          title: Code
          type: integer
          default: 0
        message:
          title: Message
          type: string
          default: ok
        data:
          title: Data
          type: array
          items:
            $ref: '#/components/schemas/TokenPrice'
    ErrorMessage:
      title: ErrorMessage
      required:
        - code
        - message
      type: object
      properties:
        code:
          title: Code
          type: integer
        message:
          title: Message
          type: string
    TokenPrice:
      title: TokenPrice
      required:
        - price
        - symbol
        - decimals
        - updated_at
      type: object
      properties:
        price:
          title: Price
          type: number
          description: The price of the ERC-20 token in USD.
        symbol:
          title: Symbol
          type: string
          description: The symbol of the ERC-20 token.
        decimals:
          title: Decimals
          type: integer
          description: The number of decimals of the ERC-20 token.
        updated_at:
          title: Updated At
          type: string
          description: The updated time of the price for the ERC-20 token.
          format: date-time

````