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

# 代幣 - 按時間查價格

> 取得代幣在特定時間戳的價格

<Note>
  取得代幣以 USD 與原生貨幣計價的當前價格。如需歷史價格，請使用 `/prices` 端點或 GraphQL `DEXTrades` Cube。
</Note>

**相關**: [GraphQL DEX 交易](/zh-Hant/graphql/examples/dex-trades) | MCP: `token_get_price`


## OpenAPI

````yaml /zh-Hant/api-reference/openapi-data-zh-Hant.yaml GET /v2/token/{chain}/{tokenAddress}/price
openapi: 3.1.0
info:
  title: Services API
  description: Services API
  contact:
    name: AI
    email: ai@sx.ai
  license:
    name: MIT
  version: '1.0'
servers:
  - url: https://api.chainstream.io
    description: Production
security:
  - bearer_auth: []
  - api_key_auth: []
tags:
  - name: Blockchain
    description: 區塊鏈相關操作
  - name: Token
    description: 代幣相關操作
  - name: Trade
    description: 交易相關操作
  - name: Wallet
    description: 錢包相關操作
  - name: Dex
    description: DEX 相關操作
  - name: Ranking
    description: 排行榜相關操作
  - name: DexPool
    description: DEX 池子相關操作
  - name: Watchlist
    description: 關注列表相關操作
  - name: KYT
    description: KYT 相關操作
  - name: Webhook
    description: Webhook 相關操作
  - name: RedPacket
    description: 紅包相關操作
  - name: IPFS
    description: IPFS 相關操作
  - name: DexScreener
    description: DexScreener 相關操作
paths:
  /v2/token/{chain}/{tokenAddress}/price:
    get:
      tags:
        - Token
      summary: 代幣 - 按時間查價格
      description: 取得代幣在特定時間戳的價格
      operationId: get.price.by.time
      parameters:
        - name: chain
          in: path
          description: 支援網路列表中的鏈名稱
          required: true
          schema:
            $ref: '#/components/schemas/ChainSymbol'
          example: sol
        - name: tokenAddress
          in: path
          description: 代幣地址
          required: true
          schema:
            type: string
          example: 6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN
        - name: timestamp
          in: query
          description: 價格時間戳（Unix 秒級時間戳）
          required: true
          schema:
            type: integer
            format: int64
          example: 1763461274000
      responses:
        '200':
          description: 按時間取得價格
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenPrice'
components:
  schemas:
    ChainSymbol:
      type: string
      description: Supported blockchain chains
      enum:
        - sol
        - eth
        - bsc
    TokenPrice:
      type: object
      description: Token price
      required:
        - address
        - timestamp
        - priceInUsd
      properties:
        address:
          type: string
          description: Token address
          example: 6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN
        priceInNative:
          type:
            - string
            - 'null'
          description: Price in native token (alias)
          example: '1000'
        priceInSol:
          type:
            - string
            - 'null'
          description: Price in native token
          example: '1000'
        priceInUsd:
          type: string
          description: Price in USD
          example: '1000'
        timestamp:
          type: integer
          format: int64
          description: Timestamp
          example: 1754055151000
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    api_key_auth:
      type: apiKey
      in: header
      name: X-API-KEY

````