PHPackages                             kayrah87/agile-octopus-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. kayrah87/agile-octopus-api

ActiveLibrary[API Development](/categories/api)

kayrah87/agile-octopus-api
==========================

A package to wrap the various commands to interact with Agile Octopus tarriffs API

v1.0.0(5y ago)03[2 PRs](https://github.com/Kayrah87/AgileOctopusAPI/pulls)MITPHP

Since Jun 13Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Kayrah87/AgileOctopusAPI)[ Packagist](https://packagist.org/packages/kayrah87/agile-octopus-api)[ Docs](https://github.com/Kayrah87/AgileOctopusAPI)[ RSS](/packages/kayrah87-agile-octopus-api/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)Dependencies (2)Versions (4)Used By (0)

AgileOctopusAPI
===============

[](#agileoctopusapi)

Welcome to the Agile Octopus API Wrapper.
This may be included in any PHP project and will soon be adapted for Laravel

You may access all of the information you require for this package at [Octopus Energy](https://octopus.energy/dashboard/developer)

---

Basic Usage
-----------

[](#basic-usage)

installing Agile Octopus API is as simple as requiring it through composer

`$ composer require kayrah87/agile-octopus-api`

Once it is included in your project you can instantiate the API in your project thusly:

`$api = new kayrah87\AgileOctopusAPI\API($account, $api_key, $tz);`

`$account` is your Octopus account number.
`$api_key` is your Octopus API key.
`$tz` is your Timezone, most usually 'Europe/London' but Octopus is available in other countries now, so might be worth checking.

Examples
--------

[](#examples)

### ⚡ Current Electricity Price

[](#-current-electricity-price)

`$api->getElectricityPrice($region)`

`$region` is the DNO code from the region you wish to get the price for. For more information or if you are not sure, see [energy-stats.uk](https://www.energy-stats.uk/dno-region-codes-explained/)

### ⚡ Half-Hourly Electricity Prices

[](#-half-hourly-electricity-prices)

The half hourly electricity prices can be called using

`$api->getHalfHourlyRates($region)`

where `$region` is the DNO for the desired region.

### ⚡ Electricity Meter Point Details

[](#-electricity-meter-point-details)

The meter point details (for electric only) can be called using

`$api->getMeterPointDetails($electricity_mpan)`

where `$electricity_mpan` is the mpan from your electricity meter found under your developer dashboard.

This will return an object with the following properties:
GSP
MPAN
Profile Class

### ⚡ Electricity Meter Point Consumption

[](#-electricity-meter-point-consumption)

The electricity meter point half-hourly consumption can be called using

`$api->getMeterPointConsumption($electricity_mpan, $electricity_serial, $date)`

`$electricity_mpan` is the mpan from your electricity meter found under your developer dashboard.
`$electricity_serial` is the serial number from your electricity meter found under your developer dashboard.
`$date` is the date you want to get the consumption for.

### 🔥 Gas Meter Point Consumption

[](#-gas-meter-point-consumption)

The gas meter point half-hourly consumption can be called using

`$api->getMeterPointConsumption($gas_mprn, $gas_serial, $date)`

`$gas_mprn` is the MPRN from your gas meter found under your developer dashboard.
`$electricity_serial` is the serial number from your gas meter found under your developer dashboard. `$date` is the date you want to get the consumption for.

---

Queries
-------

[](#queries)

If you have any queries please raise a github issue. If you like this API then consider telling your friends about it and earn both them and me £50 in the process: [Here](https://share.octopus.energy/blue-rook-804)

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1848d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1a682d9d5e3e71fad9e590ac8dd8a98f6857a25c14302cc5011e87a2d93748ee?d=identicon)[kayrah87](/maintainers/kayrah87)

---

Top Contributors

[![Kayrah87](https://avatars.githubusercontent.com/u/6371001?v=4)](https://github.com/Kayrah87 "Kayrah87 (12 commits)")

---

Tags

apiAgilewrappersmartsupplierenergyelectricityoctopusgas

### Embed Badge

![Health badge](/badges/kayrah87-agile-octopus-api/health.svg)

```
[![Health](https://phpackages.com/badges/kayrah87-agile-octopus-api/health.svg)](https://phpackages.com/packages/kayrah87-agile-octopus-api)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[statamic/cms

The Statamic CMS Core Package

4.8k3.6M992](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[smodav/mpesa

M-Pesa API implementation

16467.9k1](/packages/smodav-mpesa)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
