When you want to create a schedule that follows the energy price range (i.e., only use energy when the price is below €0.05/kWh), call the threshold-level-slots API endpoint.

FlatPeak will use the Location tariff and, if present, data on local generation to find all time slots that fit your requested tariff level (high or low). You must specify either the relative or absolute parameter.

Example Request
curl --request GET \
  --url 'https://api.flatpeak.com/slots/threshold/loc_641b90b758fb8e6293716e40
  ?start_time=2023-06-15T09:00:00Z
  &end_time=2023-06-15T13:00:00Z
  ?relative=0.05
  &segment=LOW' \
  --header 'Authorization: Bearer <token>'