PHPackages                             ourenergy/ea-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. ourenergy/ea-api

ActiveLibrary[API Development](/categories/api)

ourenergy/ea-api
================

A wrapper for the Electricity Authority's Electricity Market Information API

0.4.2(4y ago)05.0kMITPHPCI failing

Since Jan 12Pushed 4y agoCompare

[ Source](https://github.com/our-energy/ea-api)[ Packagist](https://packagist.org/packages/ourenergy/ea-api)[ RSS](/packages/ourenergy-ea-api/feed)WikiDiscussions master Synced today

READMEChangelog (6)Dependencies (6)Versions (8)Used By (0)

[![Build Status](https://camo.githubusercontent.com/86914f013f6bfd8a008be060ed47fa7a2cabe0b2f4ef0329ede1e7a0a2c09a83/68747470733a2f2f7472617669732d63692e6f72672f6f75722d656e657267792f65612d6170692e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/our-energy/ea-api)[![Latest Stable Version](https://camo.githubusercontent.com/4de998450e2b3717b138504cc58223df56459e9b389b8246369f08593ea1d248/68747470733a2f2f706f7365722e707567782e6f72672f6f7572656e657267792f65612d6170692f762f737461626c653f666f726d61743d666c6174)](https://packagist.org/packages/ourenergy/ea-api)

Electricity Market Information API
==================================

[](#electricity-market-information-api)

A PHP wrapper for the [Electricity Authority's EMI API](https://emi.portal.azure-api.net/). Supports PHP 7.1+.

You must have an active subscription key for the API you wish you use.

Requires a valid HTTPlug-compatible client, like [php-http/guzzle6-adapter](https://github.com/php-http/guzzle6-adapter).

Installation
------------

[](#installation)

```
composer require ourenergy/ea-api

```

Prices
------

[](#prices)

Retrieves five-minute pricing data. Client type can be one of the following;

- `rtp` - Real-time prices
- `rtd` - Real-time dispatch

### Get the latest prices

[](#get-the-latest-prices)

```
use OurEnergy\Emi\Prices\Factories\ClientFactory;

$subscriptionKey = "your subscription key";

$client = ClientFactory::create("rtp", $subscriptionKey);

$prices = $client->getPrices();

print_r($prices);
```

### Get prices within a date range

[](#get-prices-within-a-date-range)

```
$prices = $client->getPrices(
    new DateTime("2019-01-01 00:00:00"),
    new DateTime("2019-01-01 00:30:00")
);

print_r($prices);
```

### Subscribe to push updates

[](#subscribe-to-push-updates)

```
$serviceName = "Your service";
$callbackUrl = "http://yourwebsite.com";

$client->subscribe($serviceName, $callbackUrl);
```

### Unsubscribe from push updates

[](#unsubscribe-from-push-updates)

```
$client->unsubscribe($callbackUrl);
```

### Get a list of current subscriptions

[](#get-a-list-of-current-subscriptions)

```
$subscriptions = $client->getSubscriptions();

print_r($subscriptions);
```

ICP connection data
-------------------

[](#icp-connection-data)

Provides methods to get data on Installation Control Points.

### Look up an ICP number

[](#look-up-an-icp-number)

```
use OurEnergy\Emi\Icp\Factories\ClientFactory;

$subscriptionKey = "your subscription key";

$client = ClientFactory::create($subscriptionKey);

$icp = $client->getById("0000143418TRD9F");

echo $icp->getNetwork()->getParticipantId();
```

### Look up a list of ICP numbers

[](#look-up-a-list-of-icp-numbers)

```
$icps = $client->getByIdList([
    "0000143418TRD9F",
    "0000130040TR3DB"
]);

print_r($icps);
```

### Search by address

[](#search-by-address)

```
$icps = $client->search("260", "Tinakori");

print_r($icps);
```

###  Health Score

28

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity55

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

Every ~136 days

Recently: every ~194 days

Total

7

Last Release

1805d ago

Major Versions

0.2.0 → v1.x-dev2019-02-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/02b7e52b569aef810afb40f3601ee78b7607362f77b7a8701dad159b9a9de926?d=identicon)[andrewjoll](/maintainers/andrewjoll)

---

Top Contributors

[![andrewjoll](https://avatars.githubusercontent.com/u/118745?v=4)](https://github.com/andrewjoll "andrewjoll (24 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ourenergy-ea-api/health.svg)

```
[![Health](https://phpackages.com/badges/ourenergy-ea-api/health.svg)](https://phpackages.com/packages/ourenergy-ea-api)
```

###  Alternatives

[knplabs/github-api

GitHub API v3 client

2.2k15.3M170](/packages/knplabs-github-api)[intercom/intercom-php

Intercom API client.

30120.1M25](/packages/intercom-intercom-php)[m4tthumphrey/php-gitlab-api

GitLab API v4 client for PHP

9555.3M58](/packages/m4tthumphrey-php-gitlab-api)[toin0u/digitalocean-v2

DigitalOcean API v2 client for PHP

7341.1M14](/packages/toin0u-digitalocean-v2)[jolicode/slack-php-api

An up to date PHP client for Slack's API

2534.3M12](/packages/jolicode-slack-php-api)[jane-php/jane-php

All jane libraries into one repository

678248.7k3](/packages/jane-php-jane-php)

PHPackages © 2026

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