Skip to content

v0.7.0

Choose a tag to compare

@ericbstie ericbstie released this 13 Oct 22:29
· 6 commits to master since this release
6fccac3

Quarterly resolution price info

There are still some endpoints that are yet to be implemented, but for now you can get quarterly resolution price info like this:

import tibber

account = tibber.Account(tibber.DEMO_TOKEN)
subscription = account.homes[0].current_subscription

# The API requires the date to be passed as a base64 encoded string with timezone information
date = datetime.datetime(2025, 1, 1, 0, 0, 0)
encoded_date = base64.b64encode(date.astimezone().isoformat().encode("utf-8")).decode("utf-8")

# QUARTER_HOURLY, HOURLY or DAILY
connection = subscription.fetch_price_info_range("QUARTER_HOURLY", first=10, after=encoded_date)

connection.nodes  # A list of Price objects