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(5y ago)05.1kMITPHPCI failing

Since Jan 12Pushed 5y 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 3w ago

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

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity56

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

1899d ago

Major Versions

0.2.0 → v1.x-dev2019-02-23

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/118745?v=4)[Andrew Joll](/maintainers/andrewjoll)[@andrewjoll](https://github.com/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

[m4tthumphrey/php-gitlab-api

GitLab API v4 client for PHP

9515.7M72](/packages/m4tthumphrey-php-gitlab-api)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35729.6k2](/packages/telnyx-telnyx-php)[jolicode/slack-php-api

An up to date PHP client for Slack's API

2554.6M13](/packages/jolicode-slack-php-api)[jane-php/open-api-runtime

Jane OpenAPI Runtime Library, dependencies and utility class for a library generated by jane/openapi

1911.3M117](/packages/jane-php-open-api-runtime)[brd6/notion-sdk-php

Notion SDK for PHP

6021.6k](/packages/brd6-notion-sdk-php)[chartmogul/chartmogul-php

ChartMogul API PHP Client

181.4M](/packages/chartmogul-chartmogul-php)

PHPackages © 2026

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