This package aims to build Pandas-based API wrappers for Energy Markets Data coming from publicly available sources. The results are returned in the Pandas dataFrame format unless specified otherwise.
disclaimer While readily useable, this API library is under constant in development. The reliability of the data from the API list depends on the sources. Enjoy!
Supported APIs:
Australia
- Western Australia Gas Bulletin Board
- ACCC LNG Netback Price Index
- Australian REC Register
- AEMC Gas Scheme Register (developing)
- Western Australia Wholesale Electricity Market (WEM)
- Bureau of Meteorology
Singapore
Japan
- Japan Electric Power Exchange
- Kyushu Electric Power Company - H/5M Demand and Forecasted Demand
- Chubu Electric Power Company - Hourly Historical and Current Demand
- Tokyo Electric Power Company - Hourly Historical and Current Demand
- Chugoku Electric Power Company - Hourly Historical Demand
- FEPC - Federation of Electric Power Companies - Power Statistics Library
Global
- Python 3.6 or 3.7
To install, use pip
:
$ pip install energy-trading-api
- Python 3.7
from energy_trading_api import australiaWEM
df = australiaWEM.loadForecast()
df1 = australiaWEM.demandSideProgrammePrices(year="2019")
from energy_trading_api import australiaLNG
netback,netforward,merged = australiaLNG.acccNetbackPrice()
print(netback.head())
ACCC LNG Netback Price Series Documentation
from energy_trading_api import australiaREC
df = australiaREC.recDay("2019-01-01")
REC Registry API Documentation
from energy_trading_api import australiaNG
df = australiaNG.pipelineRegister()
df1 = australiaNG.pipelineRegisterSearch(state="NSW",operator="APA Group")
AEMC Gas Scheme Register Website
from energy_trading_api import wagbb
wagbb.capacityOutlook()
Retrieves BOM records into a pandas dataframe, given Product and location.
For instance, Bankstown time series data has a product code of IDN60901.94765.
To return Air Temp, Apparent Temp Rel Humidity, Cloud data in a pandas df, simply do:
from energy_trading_api import australiaBOM
df1 = australiaBOM.airTemp('IDN60901.94765')
df2 = australiaBOM.apparentTemp('IDN60901.94765')
df2 = australiaBOM.relativeHumidity('IDN60901.94765')
df3 = australiaBOM.cloud('IDN60901.94765')
You can also access the entire dataset by doing:
from energy_trading_api import australiaBOM
df, df_header = australiaBOM.__call_api_BOM('IDN60901.94765')
# e.g. dew point:
print(df['dewpt'].to_string())
from energy_trading_api import singaporeNEMS
df = singaporeNEMS.singaporeUSEP(date="2019-01-01")
from energy_trading_api import jepx
df = jepx.spotLatest()
df = jepx.spotLatest("20190101")
from energy_trading_api import japanElectricity as je
df = je.kyushuElectricdemandJapanese()
df1 = je.kyushuElectricdemandJapanese(day="20190101")
from energy_trading_api import japanElectricity as je
df = je.chubuElectricdemandJapanese()
df1 = je.chubuElectricDemandJapaneseRange(begtime="20190101",endtime="20190101")
from energy_trading_api import japanElectricity as je
df = je.tepcoElectricDemandHistoricalJapanese("2018")
df1 = je.tepcoElectricDemandCurrentJapanese()
from energy_trading_api import japanElectricity as je
df = je.chugokuElectricDemandJapanese("2018")
from energy_trading_api import japanFEPC as je
df = je.demandByIndustry()
from energy_trading_api import eia_api
df = eia_api.ngAustraliaProduction("<YOUR-API-KEY-HERE>")