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

# Price Signals for Shifting Optimization

> Getting price signals for onboarded homes

<script type="text/javascript" id="hs-script-loader" async defer src="//js.hs-scripts.com/46106422.js" />

As an alternative to [optimized device outputs](/docs/optimize_shifts_calculate_impacts/receiving-updates), WattShift provides detailed
price signals for those who prefer to independently manage and optimize energy usage.
These signals incorporate a comprehensive range of factors, including tariffs,
wholesale price impacts, carbon prices, and non-net solar pricing.

To receive price signals for an onboarded home or site, use the following endpoint:\
`[POST] /v1/homes/<homeId>/price_signal`

Price signals are home-backed in the public API. The older direct rate-plan price-signal route is not published in public OpenAPI and is not available for public sandbox keys. For proposal-stage bill calculations before home creation, use [`POST /v1/homes/bill/period/rateplan/{ratePlanId}`](/api-reference/endpoint/homes/calculate-period-bill-using-a-specific-rate-plan); create a sandbox or partner home when you need a full price signal.

```json theme={null}
// Request Body
// [POST] /v1/homes/ws_home_7bc31940df8a4615b2dc9e84f3a92c51/price_signal
{
  "startTime": "2025-02-25T16:13:37.902Z",
  "endTime": "2025-02-26T16:13:37.902Z"
}
```

With this example output

```typescript theme={null}
{
   "homeId":"ws_home_7bc31940df8a4615b2dc9e84f3a92c51",
   "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
      },
      {
         "startTime":"2025-02-26T01:13:37.902Z",
         "endTime":"2025-02-26T04:13:37.902Z",
         "price":0.46486,
         "import":0.46486,
         "export":0
      },
      {
         "startTime":"2025-02-26T04:13:37.902Z",
         "endTime":"2025-02-26T16:13:37.902Z",
         "price":0.42625,
         "import":0.42625,
         "export":0
      }
   ],
   "prices":[
      0.42625,
      0.42625,
      ...
      0.42625,
      0.46486,
      ...
      0.46486,
      0.46486,
      0.46486,
      0.42625,
      0.42625,
      ...
      0.42625,
      0.42625
   ],
   "imports":[
      0.42625,
      0.42625,
      ...
      0.42625,
      0.46486,
      ...
      0.46486,
      0.46486,
      0.46486,
      0.42625,
      0.42625,
      ...
      0.42625,
      0.42625
   ],
   "exports":[
      0.0,
      0.0,
      ...
      0.0,
      0.0
   ]
}
```

The `prices` represents \$ / kWh for a 15-minute interval, starting at
`startTime` until `endTime`.

## Price Signal Webhooks

Use a price signal webhook when WattShift should push price signals for all homes in your organization.

Register or update the destination URL with [`POST /v1/webhook/price_signal/set`](/api-reference/endpoint/webhook/set-or-update-the-price-signal-webhook-for-the-organization):

```json theme={null}
{
  "webhookUrl": "https://example.com/wattshift/price-signals",
  "securityKey": "replace-with-your-shared-secret",
  "openAdr": false
}
```

Trigger a delivery window with [`POST /v1/webhook/price_signal/trigger`](/api-reference/endpoint/webhook/trigger-price-signal-webhook-for-organization-homes):

```json theme={null}
{
  "startTime": "2025-02-25T16:13:37.902Z",
  "endTime": "2025-02-26T16:13:37.902Z"
}
```

## OpenADR 3.0

We also make this data available in OpenADR 3.0 format.

```typescript theme={null}
await wattshiftApiCall(
  `/homes/ws_home_7bc31940df8a4615b2dc9e84f3a92c51/price_signal/open_adr`,
);
```

```typescript theme={null}
{
  "id": "12227765-47a7-4441-b9c4-215c779938e7",
  "programID": "wattshift-open-adr",
  "createdDateTime": "2024-12-22T23:38:09.218Z",
  "modificationDateTime": "2024-12-22T23:38:09.218Z",
  "eventName": "Price Event 2024-12-22",
  "intervalPeriod": {
    "start": "2024-12-22T23:38:09.218Z",
    "duration": "PT24H"
  },
  "intervals": [
    {
      "id": 0,
      "intervalPeriod": {
        "start": "2024-12-22T23:38:09.218Z",
        "duration": "PT1H"
      },
      "payloads": [
        {
          "type": "PRICE",
          "values": [
            0.4007
          ]
        }
      ]
    },
    {
      "id": 1,
      "intervalPeriod": {
        "start": "2024-12-23T00:38:09.218Z",
        "duration": "PT4H"
      },
      "payloads": [
        {
          "type": "PRICE",
          "values": [
            0.3897
          ]
        }
      ]
    },
    {
      "id": 2,
      "intervalPeriod": {
        "start": "2024-12-23T04:38:09.218Z",
        "duration": "PT1H"
      },
      "payloads": [
        {
          "type": "PRICE",
          "values": [
            0.4007
          ]
        }
      ]
    },
    {
      "id": 3,
      "intervalPeriod": {
        "start": "2024-12-23T05:38:09.218Z",
        "duration": "PT2H"
      },
      "payloads": [
        {
          "type": "PRICE",
          "values": [
            0.4118
          ]
        }
      ]
    },
    {
      "id": 4,
      "intervalPeriod": {
        "start": "2024-12-23T07:38:09.218Z",
        "duration": "PT1H"
      },
      "payloads": [
        {
          "type": "PRICE",
          "values": [
            0.3938
          ]
        }
      ]
    },
    {
      "id": 5,
      "intervalPeriod": {
        "start": "2024-12-23T08:38:09.218Z",
        "duration": "PT14H"
      },
      "payloads": [
        {
          "type": "PRICE",
          "values": [
            0.3758
          ]
        }
      ]
    },
    {
      "id": 6,
      "intervalPeriod": {
        "start": "2024-12-23T22:38:09.218Z",
        "duration": "PT1H"
      },
      "payloads": [
        {
          "type": "PRICE",
          "values": [
            0.3938
          ]
        }
      ]
    }
  ]
}
```
