---
title: "Get energy prices from a contract"
method: GET
path: "/users/{userId}/electricity-contracts/{contractId}/energy-prices"
tags: ["Contracts"]
---

# Get energy prices from a contract

`GET /users/{userId}/electricity-contracts/{contractId}/energy-prices`

## Request

- Base URL: `https://connect.clever.gy`
- URL: `https://connect.clever.gy/users/{userId}/electricity-contracts/{contractId}/energy-prices`
- Auth: API key in header `clevergy-api-key`

Gets the contract energy prices for specific dates. It allows to filter by start and end date, with a maximum of a year between them. Dates are in UTC.

## Path parameters

- `userId` string, required
- `contractId` string, required

## Query parameters

- `startDate` string, date-time, required
- `endDate` string, date-time, required

## Response `200`

Contract prices added successfully

- ContractEnergyPriceResponse: Energy prices and surplus prices for a contract
  - `prices` ContractEnergyPriceItem[]: List of energy prices and dates
    - `date` string, date-time: UTC date and hour of the price
    - `price` number: Price of the energy
    - `surplusPrice` number: Price of the surplus energy

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `default`: Unexpected error

---

[API](https://skmtc.dev/clevergy/apis/clevergy-connect-api.md) - [All operations](https://skmtc.dev/clevergy/apis/clevergy-connect-api/llms.txt) - [OpenAPI document](https://skmtc.dev/clevergy/apis/clevergy-connect-api/revisions/d333c5eecb5b?raw)
