Get transaction history
curl --request GET \
--url https://api.otark.energy/v1/transactions/{transaction_id}/history \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.otark.energy/v1/transactions/{transaction_id}/history"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.otark.energy/v1/transactions/{transaction_id}/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.otark.energy/v1/transactions/{transaction_id}/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.otark.energy/v1/transactions/{transaction_id}/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.otark.energy/v1/transactions/{transaction_id}/history")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.otark.energy/v1/transactions/{transaction_id}/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"transactions": [
{
"id": "txn_k8m2p4q7r1",
"type": "ppa",
"contract_id": "con_a1b2c3d4",
"status": "valid",
"version": 2,
"sender": {
"eic": "11YWINDPARKNO--A",
"asset_id": "ast_w1x2y3z4",
"tso": "DE_TENNET"
},
"receiver": {
"eic": "11YGREENENERGY-Z",
"tso": "DE_TENNET"
},
"delivery_start": "2026-01-15T14:00:00Z",
"delivery_end": "2026-01-15T14:15:00Z",
"slot_number": 57,
"volume": 12.5,
"created_at": "2026-01-14T18:00:00Z",
"previous_transaction_id": "txn_j5n3w8v2x6"
}
],
"assets": [
{
"id": "ast_w1x2y3z4",
"name": "Zonnepark De Wilgen",
"nominal_power": 25,
"technology": "solar",
"tso": "DE_TENNET"
}
]
}{
"type": "https://brp.otark.team/errors/invalid_api_key",
"title": "Invalid API Key",
"status": 401
}{
"type": "https://brp.otark.team/errors/insufficient_scopes",
"title": "Insufficient API Key Scopes",
"status": 403,
"detail": "Missing scope: customers:write. Please create a new API key with the required scopes."
}{
"type": "https://brp.otark.team/errors/customer_not_found",
"title": "Customer Not Found",
"status": 404,
"instance": "/v1/customers/cust_r8s9t0u1"
}Transactions
Get transaction history
Retrieve the full version history of a transaction, following the previous_transaction_id chain. Returns all versions ordered from newest to oldest.
Required scope: transactions:read
GET
/
v1
/
transactions
/
{transaction_id}
/
history
Get transaction history
curl --request GET \
--url https://api.otark.energy/v1/transactions/{transaction_id}/history \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.otark.energy/v1/transactions/{transaction_id}/history"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.otark.energy/v1/transactions/{transaction_id}/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.otark.energy/v1/transactions/{transaction_id}/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.otark.energy/v1/transactions/{transaction_id}/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.otark.energy/v1/transactions/{transaction_id}/history")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.otark.energy/v1/transactions/{transaction_id}/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"transactions": [
{
"id": "txn_k8m2p4q7r1",
"type": "ppa",
"contract_id": "con_a1b2c3d4",
"status": "valid",
"version": 2,
"sender": {
"eic": "11YWINDPARKNO--A",
"asset_id": "ast_w1x2y3z4",
"tso": "DE_TENNET"
},
"receiver": {
"eic": "11YGREENENERGY-Z",
"tso": "DE_TENNET"
},
"delivery_start": "2026-01-15T14:00:00Z",
"delivery_end": "2026-01-15T14:15:00Z",
"slot_number": 57,
"volume": 12.5,
"created_at": "2026-01-14T18:00:00Z",
"previous_transaction_id": "txn_j5n3w8v2x6"
}
],
"assets": [
{
"id": "ast_w1x2y3z4",
"name": "Zonnepark De Wilgen",
"nominal_power": 25,
"technology": "solar",
"tso": "DE_TENNET"
}
]
}{
"type": "https://brp.otark.team/errors/invalid_api_key",
"title": "Invalid API Key",
"status": 401
}{
"type": "https://brp.otark.team/errors/insufficient_scopes",
"title": "Insufficient API Key Scopes",
"status": 403,
"detail": "Missing scope: customers:write. Please create a new API key with the required scopes."
}{
"type": "https://brp.otark.team/errors/customer_not_found",
"title": "Customer Not Found",
"status": 404,
"instance": "/v1/customers/cust_r8s9t0u1"
}Authorizations
Path Parameters
Transaction identifier
Example:
"txn_k8m2p4q7r1"
Query Parameters
Include a deduplicated assets array in the response, containing all assets referenced by the returned transactions
Available options:
true, false Was this page helpful?
⌘I