### Get cheapest window under deadline Source: https://pradcast.pl/dokumentacja-api Finds the cheapest window to run a load before a deadline (PL time). With interruptible=false (default) returns a contiguous window of N hours; with interruptible=true returns N cheapest scattered hours. Combines RDN prices with D+1..D+3 forecasts and returns start, end, average price, savings vs average window, and confidence level. ```http GET https://api.pradcast.pl/ha/best-window?duration=2&by=2026-05-19T06:30:00&interruptible=false ``` -------------------------------- ### Python (requests) example for /prices/today Source: https://pradcast.pl/dokumentacja-api Python example using the requests library to retrieve today's prices. The response JSON is parsed to extract the 'prices' list. ```python import requests r = requests.get( "https://api.pradcast.pl/prices/today", headers={"X-API-Key": "pcast_..."}, ) prices = r.json()["prices"] ``` -------------------------------- ### GET /ha/best-window Source: https://pradcast.pl/dokumentacja-api Zwraca najtańsze okno uruchomienia obciążenia przed zadanym terminem (czas PL). `interruptible=false` (domyślnie) - spójne okno N godzin pod rząd (pralka, zmywarka, boiler/CWU). `interruptible=true` - N najtańszych rozproszonych godzin (ładowanie auta, bank energii). Łączy ceny RDN z prognozą D+1..D+3, zwraca `start`, `end`, średnią cenę, oszczędność vs średnia okna i poziom pewności. ```APIDOC ## GET /ha/best-window ### Description Zwraca najtańsze okno uruchomienia obciążenia przed zadanym terminem (czas PL). `interruptible=false` (domyślnie) - spójne okno N godzin pod rząd (pralka, zmywarka, boiler/CWU). `interruptible=true` - N najtańszych rozproszonych godzin (ładowanie auta, bank energii). Łączy ceny RDN z prognozą D+1..D+3, zwraca `start`, `end`, średnią cenę, oszczędność vs średnia okna i poziom pewności. ### Method GET ### Endpoint https://api.pradcast.pl/ha/best-window?duration=2&by=2026-05-19T06:30:00&interruptible=false ### Parameters #### Query Parameters - **duration** (integer) - Required - Liczba godzin okna (N). - **by** (string, format: date-time) - Required - Termin, przed którym okno musi się zakończyć (czas PL). - **interruptible** (boolean) - Optional - Czy okno może być przerywane. Domyślnie false. ### Response #### Success Response (200) - **start** (string) - Początek okna. - **end** (string) - Koniec okna. - **średnia cena** (number) - Średnia cena w oknie. - **oszczędność** (number) - Oszczędność vs średnia okna. - **poziom pewności** (string) - Poziom pewności prognozy. #### Response Example { "start": "2026-05-19T02:00:00", "end": "2026-05-19T04:00:00", "średnia cena": 0.25, "oszczędność": 0.05, "poziom pewności": "wysoki" } ``` -------------------------------- ### curl example for /prices/today Source: https://pradcast.pl/dokumentacja-api Fetches today's prices from the Pradcast API using curl. Requires an API key in the X-API-Key header. ```bash curl -H "X-API-Key: pcast_..." \ https://api.pradcast.pl/prices/today ``` -------------------------------- ### GET /prices/cheap-hours Source: https://pradcast.pl/dokumentacja-api Zwraca N najtańszych godzin dla wskazanej daty. Domyślnie 5, max 24. ```APIDOC ## GET /prices/cheap-hours ### Description Zwraca N najtańszych godzin dla wskazanej daty. Domyślnie 5, max 24. ### Method GET ### Endpoint https://api.pradcast.pl/prices/cheap-hours?target_date=2026-05-18&count=5 ### Parameters #### Query Parameters - **target_date** (string, format: YYYY-MM-DD) - Required - Data, dla której szukane są najtańsze godziny. - **count** (integer) - Optional - Liczba najtańszych godzin do zwrócenia. Domyślnie 5, maksymalnie 24. ### Response #### Success Response (200) - **godziny** (array) - Lista najtańszych godzin dla wskazanej daty. #### Response Example { "godziny": ["2026-05-18T02:00:00", "2026-05-18T03:00:00", ...] } ``` -------------------------------- ### GET /prices/today Source: https://pradcast.pl/dokumentacja-api Pobiera 24 godzinne ceny energii dla bieżącej doby. Aktualizowane po publikacji TGE około 10:45 - od tego momentu ceny są potwierdzone, wcześniej serwujemy prognozę modelu. ```APIDOC ## GET /prices/today ### Description Pobiera 24 godzinne ceny energii dla bieżącej doby. Aktualizowane po publikacji TGE około 10:45 - od tego momentu ceny są potwierdzone, wcześniej serwujemy prognozę modelu. ### Method GET ### Endpoint https://api.pradcast.pl/prices/today ### Response #### Success Response (200) - **ceny** (array) - 24 ceny godzinowe dla bieżącej doby. #### Response Example { "ceny": [0.25, 0.30, 0.28, ...] } ``` -------------------------------- ### GET /prices/forecasts/{date} Source: https://pradcast.pl/dokumentacja-api Zwraca wszystkie prognozy dla danej daty zindeksowane po horyzoncie - przydatne do nakładania prognozy z różnych dni na jeden wykres. ```APIDOC ## GET /prices/forecasts/{date} ### Description Zwraca wszystkie prognozy dla danej daty zindeksowane po horyzoncie - przydatne do nakładania prognozy z różnych dni na jeden wykres. ### Method GET ### Endpoint https://api.pradcast.pl/prices/forecasts/2026-05-19 ### Parameters #### Path Parameters - **date** (string, format: YYYY-MM-DD) - Required - Data, dla której pobierane są prognozy. ### Response #### Success Response (200) - **prognozy** (object) - Prognozy zindeksowane po horyzoncie (D+1, D+2, D+3). #### Response Example { "prognozy": { "D+1": [0.25, 0.30, 0.28, ...], "D+2": [0.24, 0.29, 0.27, ...], "D+3": [0.23, 0.28, 0.26, ...] } } ``` -------------------------------- ### Get cheapest hours Source: https://pradcast.pl/dokumentacja-api Returns the N cheapest hours for the specified date. Default count is 5, maximum is 24. ```http GET https://api.pradcast.pl/prices/cheap-hours?target_date=2026-05-18&count=5 ``` -------------------------------- ### Get complete forecasts (D+1, D+2, D+3) for a date Source: https://pradcast.pl/dokumentacja-api Returns all forecasts for a given date indexed by horizon, useful for overlaying forecasts from different days on one chart. ```http GET https://api.pradcast.pl/prices/forecasts/2026-05-19 ``` -------------------------------- ### Get today's RDN prices Source: https://pradcast.pl/dokumentacja-api Retrieves 24 hourly prices for the current day. Prices are updated after TGE publication around 10:45; before that, the model forecast is served. ```http GET https://api.pradcast.pl/prices/today ``` -------------------------------- ### GET /prices/date/{date} Source: https://pradcast.pl/dokumentacja-api Pobiera ceny lub prognozę dla konkretnej daty. Zakres: daty od 1 czerwca 2026 do popojutrza (D+3). Dla ostatnich dni (obecnie 7) zwraca potwierdzone godzinowe ceny RDN; dla starszych dat oraz dat przyszłych - prognozę modelu. ```APIDOC ## GET /prices/date/{date} ### Description Pobiera ceny lub prognozę dla konkretnej daty. Zakres: daty od 1 czerwca 2026 do popojutrza (D+3). Dla ostatnich dni (obecnie 7) zwraca potwierdzone godzinowe ceny RDN; dla starszych dat oraz dat przyszłych - prognozę modelu. ### Method GET ### Endpoint https://api.pradcast.pl/prices/date/2026-05-18 ### Parameters #### Path Parameters - **date** (string, format: YYYY-MM-DD) - Required - Data, dla której pobierane są ceny lub prognoza. ### Response #### Success Response (200) - **ceny** (array) - Godzinowe ceny lub prognoza dla wskazanej daty. #### Response Example { "ceny": [0.25, 0.30, 0.28, ...] } ``` -------------------------------- ### Get prices or forecast for a specific date Source: https://pradcast.pl/dokumentacja-api Returns confirmed hourly RDN prices for recent days (currently 7) and model forecasts for older and future dates. Date range: from June 1, 2026 to day after tomorrow (D+3). ```http GET https://api.pradcast.pl/prices/date/2026-05-18 ``` -------------------------------- ### Home Assistant REST sensor for /ha/sensor Source: https://pradcast.pl/dokumentacja-api Minimal Home Assistant REST sensor configuration for the Pradcast API. Provides the daily average and cheap hours for tomorrow. Requires an API key and scans every 3600 seconds. ```yaml sensor: - platform: rest name: "Cena prądu - prognoza" resource: https://api.pradcast.pl/ha/sensor headers: X-API-Key: pcast_... scan_interval: 3600 value_template: "{{ value_json.daily_avg }}" json_attributes: - cheap_hours - prices ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.