Transactions API¶
Base paths:
/core/api/communities/{community_id}/sessions/transactions/core/api/communities/{community_id}/market/transaction_adjustments
Transactions are the energy exchanges between community resources (and therefore members) produced by
market clearing, one record per provider/receiver pair per 15-minute ISP. They feed
settlement. See Transactions for the data model and
transaction types (INTRA_CPE, PUBLIC_CPE) and the Internal Transactions guide.
Transaction adjustments record, per resource and ISP, the metered energy (e_met) before and after the market
adjusted it, so small metering discrepancies (within the community's transaction_adjustment_tolerance, default
0.05) can be audited.
Both resources are read-only through the API: there are no create/update/delete routes (the records are produced by the market and settlement processing). Energy is in kWh, price in EUR/kWh.
Endpoint summary¶
| Method | Path | Purpose |
|---|---|---|
GET |
/core/api/communities/{community_id}/sessions/transactions |
Energy transactions between dates, aggregated by granularity |
GET |
/core/api/communities/{community_id}/market/transaction_adjustments/pagination |
Paginated, filterable list of transaction adjustments |
Routes from older docs that do not exist
Earlier versions of this page described GET .../sessions/transactions/adjustments and
POST .../sessions/transactions/adjustments (with adjustment_kwh). Neither exists. Adjustments are read from
/market/transaction_adjustments/pagination and cannot be created through the API.
Transactions¶
Get Transactions¶
Returns the energy traded in the community between two dates, summed into time buckets of the requested granularity.
Auth / permissions: any member of the community, community admin or platform admin. A community member only receives transactions where they are the provider or the receiver; admins receive all transactions.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
community_id |
path | UUID | Yes | Community |
start_date |
query | date (YYYY-MM-DD) |
Yes | First day of the range |
end_date |
query | date (YYYY-MM-DD) |
Yes | Last day of the range (the whole day is included) |
granularity |
query | enum | Yes | MIN15, HOUR, DAY, MONTH or YEAR (see GranularityType) |
effective_at |
query | date | No | Date used to resolve which resources the caller owned (relevant to members). Defaults to today |
Example
curl "https://<host>/core/api/communities/3fa85f64-5717-4562-b3fc-2c963f66afa6/sessions/transactions?start_date=2025-01-15&end_date=2025-01-15&granularity=HOUR" \
-H "Authorization: Bearer $TOKEN"
Response (abridged)
[
{
"id": null,
"price": null,
"energy": 1.84,
"transaction_type": null,
"datetime_timestamp": "2025-01-15T10:00:00+00:00",
"session_id": null,
"community_id": null,
"provider_meter_id": null,
"provider_user_id": null,
"provider_resource_id": null,
"receiver_meter_id": null,
"receiver_user_id": null,
"receiver_resource_id": null
}
]
Tip
- The response is an aggregate: transactions are grouped by the start of the bucket and only
datetime_timestampand the summedenergy(kWh) are populated.price,transaction_typeand all provider/receiver, session and community ids arenull. Use Query Settlement Outputs with the*_bilateraloutput types when you need per-pair detail. MIN15returns the raw 15-minute resolution (all pairs in the same ISP are summed). Larger buckets are aligned to the start of the hour, day, month or year.- Zero-energy records are dropped before summing, and an empty range returns
[]. - For a member, energy is summed over every transaction in which they take part on either side, so a member that both provides and receives energy in the same bucket sees both amounts added together.
- Invalid or missing
granularity/dates return 422. A caller that is neither a community member nor an admin gets 403.
Transaction adjustments¶
List Transaction Adjustments (paginated)¶
Returns a page of transaction adjustments for the resources of the community, with the total count and the distinct dates and times present in the filtered set (used to populate table filters in the UI).
Auth / permissions: any member of the community, community admin or platform admin. Results are not restricted to the caller's own resources.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
community_id |
path | UUID | Yes | Community |
limit |
query | integer | Yes | Maximum number of rows to return |
offset |
query | integer | Yes | Number of rows to skip |
date |
query | string (YYYY-MM-DD) |
No | Keep only adjustments whose timestamp falls on this date |
time |
query | string (HH:MM:SS) |
No | Keep only adjustments whose timestamp has this time of day |
resource_id |
query | UUID | No | Keep only adjustments of this resource |
sort_column |
query | string | No | date, time, resource_id (sorts by resource name), or a column: datetime_timestamp, original_e_met, adjusted_e_met, e_met_difference. Without it the order is unspecified |
sort_direction |
query | string | No | asc; any other value (or none) sorts descending. Only used together with sort_column |
Example
curl "https://<host>/core/api/communities/3fa85f64-5717-4562-b3fc-2c963f66afa6/market/transaction_adjustments/pagination?limit=50&offset=0&date=2025-01-15&sort_column=e_met_difference&sort_direction=desc" \
-H "Authorization: Bearer $TOKEN"
Response (abridged)
{
"total_count": 96,
"data": [
{
"id": "0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
"datetime_timestamp": "2025-01-15T10:00:00+00:00",
"session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"resource_id": "5b2c1e40-0c3a-4c52-9d0e-1f6a8d9b7a11",
"original_e_met": 0.512,
"adjusted_e_met": 0.5,
"e_met_difference": 0.012
}
],
"distinct_dates": [{ "date": "2025-01-15" }],
"distinct_times": [{ "time": "10:00:00" }, { "time": "10:15:00" }]
}
Tip
total_count,distinct_datesanddistinct_timesreflect the filtered set, not the page, so they can be used to build pagination controls and filter drop-downs.original_e_met,adjusted_e_metande_met_differenceare kWh and may benull.limitandoffsetare required (a missing value returns 422). There is no upper bound onlimit.sort_columnis passed to the database as a raw column name: use only the values listed above, since an unknown name results in a server error instead of a validation error.- The community-level tolerance for these discrepancies is the
transaction_adjustment_tolerancecommunity setting (see Communities).