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

# Get Price History

> Get price history for a canonical product.



## OpenAPI

````yaml get /v0/price-tracking/history/{canonical_product_id}
openapi: 3.1.0
info:
  title: Channel3 API
  version: 0.1.0
servers:
  - url: https://api.trychannel3.com
    description: Production
security: []
paths:
  /v0/price-tracking/history/{canonical_product_id}:
    get:
      tags:
        - price-tracking
      summary: Get Price History
      description: Get price history for a canonical product.
      operationId: get_price_history_v0_price_tracking_history__canonical_product_id__get
      parameters:
        - name: canonical_product_id
          in: path
          required: true
          schema:
            type: string
            title: Canonical Product Id
        - name: days
          in: query
          required: false
          schema:
            type: integer
            maximum: 90
            minimum: 1
            description: Number of days of history to fetch (default 90, max 90)
            default: 90
            title: Days
          description: Number of days of history to fetch (default 90, max 90)
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PriceHistoryResponse'
        '401':
          description: Unauthorized - Invalid or missing authentication
          content:
            application/json:
              examples:
                missing_key:
                  summary: Missing API Key
                  value:
                    detail: >-
                      Unauthorized. Missing authentication key. Make sure to
                      attach an x-api-key with your request. Need help? Reach
                      out to support@trychannel3.com.
                invalid_key:
                  summary: Invalid API Key
                  value:
                    detail: >-
                      API key was provided but is invalid. Need help? Reach out
                      to support@trychannel3.com.
              schema:
                $ref: '#/components/schemas/app__routers__utils__ErrorResponse'
        '402':
          description: Payment required
          content:
            application/json:
              examples:
                credits_exhausted:
                  summary: API key out of credits
                  value:
                    detail: >-
                      You have used all of your free credits. Add a payment
                      method to continue.
                mpp_challenge:
                  summary: MPP Tempo payment required
                  value:
                    detail: >-
                      Payment required. Satisfy the MPP Tempo challenge in
                      WWW-Authenticate.
              schema:
                $ref: '#/components/schemas/app__routers__utils__ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/app__routers__utils__ErrorResponse'
              example:
                detail: Canonical product xyz123 not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/app__routers__utils__ErrorResponse'
              example:
                detail:
                  - loc:
                      - body
                      - query
                    msg: field required
                    type: value_error.missing
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/app__routers__utils__ErrorResponse'
              example:
                detail: Internal Server Error
      security:
        - APIKeyHeader: []
      x-codeSamples:
        - lang: python
          label: Python
          source: |
            from channel3_sdk import Channel3
            from channel3_sdk.environment import Channel3Environment

            client = Channel3(
                api_key="<value>",
                environment=Channel3Environment.PRODUCTION,
            )

            client.price_tracking.retrieve_history(
                canonical_product_id="canonical_product_id",
            )
        - lang: typescript
          label: TypeScript
          source: |
            import { Channel3 } from "@channel3/sdk";

            const client = new Channel3({ apiKey: "YOUR_API_KEY" });

            await client.priceTracking.retrieveHistory({
                canonical_product_id: "canonical_product_id"
            });
components:
  schemas:
    PriceHistoryResponse:
      properties:
        canonical_product_id:
          type: string
          title: Canonical Product Id
        product_title:
          anyOf:
            - type: string
            - type: 'null'
          title: Product Title
        history:
          items:
            $ref: '#/components/schemas/PriceHistoryPoint'
          type: array
          title: History
          default: []
        statistics:
          anyOf:
            - $ref: '#/components/schemas/PriceStatistics'
            - type: 'null'
      type: object
      required:
        - canonical_product_id
      title: PriceHistoryResponse
    app__routers__utils__ErrorResponse:
      properties:
        detail:
          anyOf:
            - type: string
            - items:
                additionalProperties: true
                type: object
              type: array
          title: Detail
      type: object
      required:
        - detail
      title: ErrorResponse
    PriceHistoryPoint:
      properties:
        timestamp:
          type: string
          format: date-time
          title: Timestamp
        price:
          type: number
          title: Price
        currency:
          type: string
          title: Currency
      type: object
      required:
        - timestamp
        - price
        - currency
      title: PriceHistoryPoint
    PriceStatistics:
      properties:
        mean:
          type: number
          title: Mean
        std_dev:
          type: number
          title: Std Dev
        min_price:
          type: number
          title: Min Price
        max_price:
          type: number
          title: Max Price
        current_price:
          type: number
          title: Current Price
        current_status:
          $ref: '#/components/schemas/PriceStatus'
        currency:
          type: string
          title: Currency
      type: object
      required:
        - mean
        - std_dev
        - min_price
        - max_price
        - current_price
        - current_status
        - currency
      title: PriceStatistics
    PriceStatus:
      type: string
      enum:
        - low
        - typical
        - high
      title: PriceStatus
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.