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

# get price signal

> Returns a home-context price signal. Omit the body for the default home window, or provide both ISO 8601 startTime and endTime.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/homes/{id}/price_signal
openapi: 3.0.0
info:
  title: WattShift API
  description: An API for the WattShift Service (https://wattshift.com/partners)
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /v1/homes/{id}/price_signal:
    post:
      tags:
        - homes
      summary: get price signal
      description: >-
        Returns a home-context price signal. Omit the body for the default home
        window, or provide both ISO 8601 startTime and endTime.
      operationId: getHomePriceSignal
      parameters:
        - name: x-ws-api-key
          in: header
          description: WattShift API Key
          schema:
            type: string
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: false
        description: >-
          Optional home-context signal window. If either startTime or endTime is
          provided, provide both.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetPriceSignalRequestDto'
            example:
              startTime: '2025-02-25T16:13:37.902Z'
              endTime: '2025-02-26T16:13:37.902Z'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPriceSignalResponseDto'
              example:
                homeId: ws_home_123456789
                startTime: '2025-02-25T16:13:37.902Z'
                endTime: '2025-02-26T16:13:37.902Z'
                data:
                  - startTime: '2025-02-25T16:13:37.902Z'
                    endTime: '2025-02-26T01:13:37.902Z'
                    price: 0.42625
                    import: 0.42625
                    export: 0
                    confidence: 0.95
                  - startTime: '2025-02-26T01:13:37.902Z'
                    endTime: '2025-02-26T04:13:37.902Z'
                    price: 0.46486
                    import: 0.46486
                    export: 0
                    confidence: 0.95
                  - startTime: '2025-02-26T04:13:37.902Z'
                    endTime: '2025-02-26T16:13:37.902Z'
                    price: 0.42625
                    import: 0.42625
                    export: 0
                    confidence: 0.95
                prices:
                  - 0.42625
                  - 0.46486
                  - 0.42625
                export:
                  - 0
                  - 0
                  - 0
                import:
                  - 0.42625
                  - 0.46486
                  - 0.42625
        '400':
          description: Validation failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelopeDto'
              example:
                request_id: req_123
                error_code: VALIDATION_FAILED
                message: Request validation failed.
                field_errors:
                  - field: zipcode
                    message: zipcode is invalid
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelopeDto'
              example:
                request_id: req_123
                error_code: AUTH_MISSING_API_KEY
                message: Missing x-ws-api-key header.
                recovery_action: >-
                  Provide the x-ws-api-key header. If this contradicts the
                  public docs or OpenAPI contract, submit structured feedback
                  through /v1/feedback.
      security:
        - x-ws-api-key: []
        - x-ws-api-key: []
components:
  schemas:
    GetPriceSignalRequestDto:
      type: object
      properties:
        startTime:
          type: string
          nullable: true
        endTime:
          type: string
          nullable: true
    GetPriceSignalResponseDto:
      type: object
      properties:
        startTime: {}
        endTime: {}
        data:
          type: array
          items:
            type: object
            properties:
              startTime: {}
              endTime: {}
              price:
                type: number
              import:
                type: number
              export:
                type: number
              confidence:
                type: number
            required:
              - startTime
              - endTime
              - price
              - import
              - export
              - confidence
        prices:
          description: expected price in $/kWh in 15min intervals
          type: array
          items:
            type: number
        export:
          description: export rate in $/kWh in 15min intervals
          type: array
          items:
            type: number
        import:
          description: import rate in $/kWh in 15min intervals
          type: array
          items:
            type: number
        exportCompensation:
          description: >-
            metadata for the export compensation source used to populate export
            prices
          type: object
          properties:
            dataset:
              type: string
            resolver:
              type: string
            mode:
              type: string
            status:
              type: string
            profileId:
              type: string
            profileVersion:
              type: string
            profileIds:
              type: array
              items:
                type: string
            profileVersions:
              type: array
              items:
                type: string
            baseUtility:
              type: string
            vintage:
              type: string
            customerClass:
              type: string
            sourceCoverage:
              type: string
            intervalCount:
              type: number
            missingIntervalCount:
              type: number
            warnings:
              type: array
              items:
                type: string
          required:
            - dataset
            - resolver
            - status
        homeId:
          type: string
      required:
        - startTime
        - endTime
        - data
        - prices
        - export
        - import
        - homeId
    ApiErrorEnvelopeDto:
      type: object
      properties:
        request_id:
          type: string
          example: req_123
        error_code:
          type: string
          enum:
            - AUTH_MISSING_API_KEY
            - AUTH_INVALID_API_KEY
            - AUTH_EXPIRED_CREDENTIAL
            - AUTH_REVOKED_CREDENTIAL
            - AUTH_INSUFFICIENT_SCOPE
            - VALIDATION_FAILED
            - RATE_LIMITED
            - NOT_FOUND
            - FORBIDDEN
            - PRODUCTION_ACCESS_DENIED
            - INTERNAL_ERROR
          example: VALIDATION_FAILED
        message:
          type: string
          example: Request validation failed.
        recovery_action:
          type: string
          example: >-
            Provide the x-ws-api-key header. If this contradicts the public
            docs, submit feedback through /v1/feedback.
        field_errors:
          type: array
          items:
            $ref: '#/components/schemas/ApiFieldErrorDto'
        retry_after_seconds:
          type: number
          example: 3600
      required:
        - request_id
        - error_code
        - message
    ApiFieldErrorDto:
      type: object
      properties:
        field:
          type: string
          example: zipcode
        message:
          type: string
          example: zipcode is invalid
      required:
        - message
  securitySchemes:
    x-ws-api-key:
      type: apiKey
      in: header
      name: x-ws-api-key
      description: WattShift API key

````