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

# ペア - キャンドル

> 取引ペア（形式：TOKEN_A_ADDRESS-TOKEN_B_ADDRESS）の OHLCV ローソク足データを取得



## OpenAPI

````yaml /jp/api-reference/openapi-data-jp.yaml GET /v2/token/{chain}/pair/{pair}/candles
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}/pair/{pair}/candles:
    get:
      tags:
        - Token
      summary: ペア - ローソク足
      description: 取引ペア（形式：TOKEN_A_ADDRESS-TOKEN_B_ADDRESS）の OHLCV ローソク足データを取得
      operationId: get.pair.candles
      parameters:
        - name: chain
          in: path
          description: サポートされているネットワークに記載されているチェーン名
          required: true
          schema:
            $ref: '#/components/schemas/ChainSymbol'
          example: sol
        - name: pair
          in: path
          description: 取引ペア識別子（形式：TOKEN_A_ADDRESS-TOKEN_B_ADDRESS）。ペアは自動的にソートされます
          required: true
          schema:
            type: string
          example: >-
            9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump-EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
        - name: resolution
          in: query
          description: ローソク足データの時間解像度
          required: true
          schema:
            $ref: '#/components/schemas/Resolution'
          example: 1h
        - name: priceType
          in: query
          description: 価格タイプ：usd（デフォルト）またはネイティブトークン価格
          required: false
          schema:
            oneOf:
              - $ref: '#/components/schemas/PriceType'
            default: usd
          example: usd
        - name: from
          in: query
          description: 開始タイムスタンプ（Unix エポック秒）
          required: false
          schema:
            type: integer
            format: int64
          example: 1741647950000
        - name: to
          in: query
          description: 終了タイムスタンプ（Unix エポック秒）
          required: false
          schema:
            type: integer
            format: int64
          example: 1741700970000
        - name: limit
          in: query
          description: 返すローソク足の数
          required: false
          schema:
            type: integer
            format: int64
          example: 100
      responses:
        '200':
          description: ペアローソク足を取得
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TokenCandle'
components:
  schemas:
    ChainSymbol:
      type: string
      description: Supported blockchain chains
      enum:
        - sol
        - eth
        - bsc
    Resolution:
      type: string
      description: Candle resolution
      enum:
        - 1s
        - 15s
        - 30s
        - 1m
        - 3m
        - 5m
        - 15m
        - 30m
        - 1h
        - 2h
        - 4h
        - 6h
        - 8h
        - 12h
        - 1d
        - 3d
        - 1w
        - 1M
    PriceType:
      type: string
      description: Price type for candle data
      enum:
        - usd
        - native
    TokenCandle:
      type: object
      description: Token candle (OHLCV)
      required:
        - timestamp
        - open
        - high
        - low
        - close
        - volume
      properties:
        close:
          type: string
          description: Close price
          example: '51.2'
        high:
          type: string
          description: High price
          example: '51.8'
        low:
          type: string
          description: Low price
          example: '50.1'
        open:
          type: string
          description: Open price
          example: '50.5'
        timestamp:
          type: integer
          format: int64
          description: Timestamp
          example: 1709251200000
        trades:
          type:
            - integer
            - 'null'
          format: int64
          description: Number of trades (swaps) in this candle bar
          example: 128
        volume:
          type: string
          description: Volume in USD or native currency (depending on priceType)
          example: '1000000'
        volumeInTokenAmount:
          type:
            - string
            - 'null'
          description: Base token quantity (e.g. number of CAKE or SOL tokens traded)
          example: '42000.5'
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    api_key_auth:
      type: apiKey
      in: header
      name: X-API-KEY

````