get price signal
curl --request POST \
--url https://api.example.com/v1/homes/{id}/price_signal \
--header 'Content-Type: application/json' \
--header 'x-ws-api-key: <api-key>' \
--data '
{
"startTime": "2025-02-25T16:13:37.902Z",
"endTime": "2025-02-26T16:13:37.902Z"
}
'import requests
url = "https://api.example.com/v1/homes/{id}/price_signal"
payload = {
"startTime": "2025-02-25T16:13:37.902Z",
"endTime": "2025-02-26T16:13:37.902Z"
}
headers = {
"x-ws-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-ws-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({startTime: '2025-02-25T16:13:37.902Z', endTime: '2025-02-26T16:13:37.902Z'})
};
fetch('https://api.example.com/v1/homes/{id}/price_signal', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/homes/{id}/price_signal",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'startTime' => '2025-02-25T16:13:37.902Z',
'endTime' => '2025-02-26T16:13:37.902Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-ws-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/homes/{id}/price_signal"
payload := strings.NewReader("{\n \"startTime\": \"2025-02-25T16:13:37.902Z\",\n \"endTime\": \"2025-02-26T16:13:37.902Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-ws-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/homes/{id}/price_signal")
.header("x-ws-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"startTime\": \"2025-02-25T16:13:37.902Z\",\n \"endTime\": \"2025-02-26T16:13:37.902Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/homes/{id}/price_signal")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-ws-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"startTime\": \"2025-02-25T16:13:37.902Z\",\n \"endTime\": \"2025-02-26T16:13:37.902Z\"\n}"
response = http.request(request)
puts response.read_body{
"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
]
}{
"request_id": "req_123",
"error_code": "VALIDATION_FAILED",
"message": "Request validation failed.",
"field_errors": [
{
"field": "zipcode",
"message": "zipcode is invalid"
}
]
}{
"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."
}homes
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.
POST
/
v1
/
homes
/
{id}
/
price_signal
get price signal
curl --request POST \
--url https://api.example.com/v1/homes/{id}/price_signal \
--header 'Content-Type: application/json' \
--header 'x-ws-api-key: <api-key>' \
--data '
{
"startTime": "2025-02-25T16:13:37.902Z",
"endTime": "2025-02-26T16:13:37.902Z"
}
'import requests
url = "https://api.example.com/v1/homes/{id}/price_signal"
payload = {
"startTime": "2025-02-25T16:13:37.902Z",
"endTime": "2025-02-26T16:13:37.902Z"
}
headers = {
"x-ws-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-ws-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({startTime: '2025-02-25T16:13:37.902Z', endTime: '2025-02-26T16:13:37.902Z'})
};
fetch('https://api.example.com/v1/homes/{id}/price_signal', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/homes/{id}/price_signal",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'startTime' => '2025-02-25T16:13:37.902Z',
'endTime' => '2025-02-26T16:13:37.902Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-ws-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/homes/{id}/price_signal"
payload := strings.NewReader("{\n \"startTime\": \"2025-02-25T16:13:37.902Z\",\n \"endTime\": \"2025-02-26T16:13:37.902Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-ws-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/homes/{id}/price_signal")
.header("x-ws-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"startTime\": \"2025-02-25T16:13:37.902Z\",\n \"endTime\": \"2025-02-26T16:13:37.902Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/homes/{id}/price_signal")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-ws-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"startTime\": \"2025-02-25T16:13:37.902Z\",\n \"endTime\": \"2025-02-26T16:13:37.902Z\"\n}"
response = http.request(request)
puts response.read_body{
"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
]
}{
"request_id": "req_123",
"error_code": "VALIDATION_FAILED",
"message": "Request validation failed.",
"field_errors": [
{
"field": "zipcode",
"message": "zipcode is invalid"
}
]
}{
"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."
}Authorizations
x-ws-api-keyx-ws-api-key
WattShift API key
Headers
WattShift API Key
Path Parameters
Body
application/json
Optional home-context signal window. If either startTime or endTime is provided, provide both.
Response
Show child attributes
Show child attributes
expected price in $/kWh in 15min intervals
export rate in $/kWh in 15min intervals
import rate in $/kWh in 15min intervals
metadata for the export compensation source used to populate export prices
Show child attributes
Show child attributes
⌘I
