SDKs & Libraries

Official Python SDK for accessing UK energy data. Solidity contracts coming soon for on-chain integration.

Python

Available
ppaoracle
View Docs
pip install ppaoracle
Type hintsAsync supportPandas integrationCLI included
from ppaoracle import PPAOracle

client = PPAOracle(api_key="your-key")

# Get latest price
price = client.uk.prices.latest()
print(f"Current: £{price.value}/MWh")

# Get carbon intensity
carbon = client.uk.carbon.current()
print(f"Carbon: {carbon.intensity} gCO2/kWh")

# Calculate PPA settlement
settlement = client.uk.settlement.calculate(
    contract_type="discount",
    discount=5,
    volume=1000,
    month="2024-12"
)
print(f"Settlement: £{settlement.total:,.2f}")

Solidity

Coming Soon
@ppaoracle/contracts
Chainlink compatibleGas optimizedMultiple networksOn-chain verification
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import "@ppaoracle/contracts/IPPAOracle.sol";

contract MyPPA {
    IPPAOracle public oracle;

    constructor(address _oracle) {
        oracle = IPPAOracle(_oracle);
    }

    function getSettlementPrice() external view returns (uint256) {
        return oracle.getLatestPrice();
    }
}
Phase 2 - On-chain Integration

Features

FeaturePythonSolidity
Real-time prices
Historical data-
Carbon intensity
Settlement calculation
On-chain verification-
DataFrame export-

= Coming in Phase 2 (On-chain Integration)