Skip to content

About

Octopus Energy API package for Go

Resources

Stars

4 stars

Watchers

1 watching

Forks

Latest commit

 

History

16 Commits

Folders and files

Repository files navigation

Octopus Energy API

PkgGoDev Go Report Card tests build

This package provides an interface to Octopus Energy's API, which provides a lot of useful data, including viewing half-hourly consumption of an electricity or gas meter.

An API key from Octopus Energy is required, as mentioned here. This can be obtained from your online dashboard.

Usage

client, err := octopusenergyapi.NewClient("{API_KEY}", http.DefaultClient)
if err != nil {
    log.Fatal(err)
}

mpoint, err := client.GetMeterPoint(mpan)
if err != nil {
    log.Fatal(err)
}

fmt.Printf("MPAN: %s\nProfile class: %d (%s)\n",
    mpoint.MPAN, mpoint.ProfileClass, octopusenergyapi.PCs[mpoint.ProfileClass])
fmt.Printf("GSP: %s (%s)\n",
    mpoint.GSP.GSPGroupID, mpoint.GSP.Name)

If you find bug or would like to see some additional functionality, please raise an issue. PRs are also more than welcome.

About

Octopus Energy API package for Go

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages