name: eptr2-api-discovery
description: Discover and explore available eptr2 API endpoints for Turkish electricity market data. List all 213+ API calls, find endpoints by category (GÖP, GİP, DGP, Üretim, Tüketim), search for specific data types, and get parameter requirements. Use when asking what data is available, how to find endpoints, or exploring the API. Triggers on: available endpoints, API calls, list endpoints, what data, which API, how to find, hangi veri, mevcut servisler.
allowed-tools: Read, Bash(python:*)
eptr2 API Discovery Guide
Overview
This skill helps you discover and explore the 213+ API endpoints available in eptr2 for Turkish electricity market data. Use this when you need to find the right endpoint for your data needs.
Quick Start
from eptr2 import EPTR2
# Initialize
eptr = EPTR2(use_dotenv=True, recycle_tgt=True)
# List all available API calls
all_calls = eptr.get_available_calls()
print(f"Total available calls: {len(all_calls)}")
print(all_calls[:20]) # First 20 calls
Discovery Methods
1. Get All Available Calls
# List all endpoint names
calls = eptr.get_available_calls()
print(calls)
2. Get Number of Calls
# Get count of available endpoints
count = eptr.get_number_of_calls()
print(f"Available endpoints: {count}")
3. Get Aliases
# Some endpoints have shorthand aliases
aliases = eptr.get_aliases()
print(aliases)
# Example: 'ptf' is alias for 'mcp', 'smf' is alias for 'smp'
4. Get Help for Specific Call
from eptr2.mapping.help import get_help_d
# Get detailed info about an endpoint
help_info = get_help_d("mcp")
print(f"Category: {help_info['category']}")
print(f"Title (EN): {help_info['title']['en']}")
print(f"Title (TR): {help_info['title']['tr']}")
print(f"Description: {help_info['desc']['en']}")
print(f"URL: {help_info['url']}")
API Categories
| Category |
Turkish |
Description |
Example Calls |
| GÖP |
Gün Öncesi Piyasası |
Day-Ahead Market |
mcp, dam-clearing, dam-volume |
| GİP |
Gün İçi Piyasası |
Intraday Market |
wap, idm-qty, idm-log |
| DGP |
Dengeleme Güç Piyasası |
Balancing Power Market |
smp, bpm-up, bpm-down |
| Üretim |
Üretim |
Generation |
rt-generation, uevm, dpp |
| Tüketim |
Tüketim |
Consumption |
rt-cons, uecm, load-plan |
| Dengesizlik |
Dengesizlik |
Imbalance |
imbalance-price, imb-qty, imb-vol |
| İA |
İkili Anlaşmalar |
Bilateral Contracts |
bi-long, bi-short |
| Barajlar |
Barajlar |
Dams/Reservoirs |
dams-daily-level, dams-active-fullness |
| Kurulu Güç |
Kurulu Güç |
Installed Capacity |
installed-capacity, lic-pp-list |
Common Endpoint Patterns
Price Data
mcp / ptf - Market Clearing Price
smp / smf - System Marginal Price
wap - Weighted Average Price (IDM)
imbalance-price - Imbalance prices
Quantity Data
rt-generation - Real-time generation
rt-cons - Real-time consumption
dam-clearing - DAM cleared quantity
idm-qty - IDM matched quantity
Plan Data
load-plan - Demand forecast
dpp / kgup - Daily production plan
kudup - Settlement production plan
Settlement Data
uevm - Settlement generation
uecm - Settlement consumption
Finding the Right Endpoint
Search by Keyword
from eptr2.mapping.help import get_help_d
# Get all help entries
all_help = get_help_d()
# Search for keywords
keyword = "price" # or "fiyat" for Turkish
matches = {
k: v for k, v in all_help.items()
if keyword.lower() in v['title']['en'].lower()
or keyword.lower() in v['desc']['en'].lower()
}
for call, info in matches.items():
print(f"{call}: {info['title']['en']}")
List by Category
all_help = get_help_d()
# Filter by category
category = "GÖP" # Day-Ahead Market
gop_calls = {
k: v for k, v in all_help.items()
if v['category'] == category
}
print(f"GÖP (Day-Ahead Market) endpoints:")
for call, info in gop_calls.items():
print(f" {call}: {info['title']['en']}")
Parameter Requirements
Get Required Parameters
from eptr2.mapping.parameters import get_required_parameters, get_optional_parameters
# Check what parameters an endpoint needs
required = get_required_parameters("mcp")
optional = get_optional_parameters("mcp")
print(f"Required: {required}")
print(f"Optional: {optional}")
Common Parameters
| Parameter |
Type |
Description |
start_date |
str |
Start date (YYYY-MM-DD) |
end_date |
str |
End date (YYYY-MM-DD) |
org_id |
int/str |
Organization ID |
pp_id |
int/str |
Power plant ID |
uevcb_id |
int/str |
Production unit ID |
Quick Reference Tables
Most Used Price Endpoints
| Call |
Description |
mcp |
Market Clearing Price |
smp |
System Marginal Price |
wap |
IDM Weighted Average Price |
imbalance-price |
Imbalance prices |
mcp-smp-imb |
Combined MCP, SMP, Imbalance |
Most Used Quantity Endpoints
| Call |
Description |
rt-generation |
Real-time generation by type |
rt-cons |
Real-time consumption |
load-plan |
Demand forecast |
dam-clearing |
DAM cleared volume |
idm-qty |
IDM matched volume |
Production Plan Endpoints
| Call |
Description |
dpp / kgup |
Daily Production Plan (KGÜP) |
kgup-v1 |
KGUP Version 1 |
kudup |
Settlement Production Plan |
uevm |
Settlement Generation (UEVM) |
For More Details
- See endpoint-categories.md for complete category listings
- Run the helper script in
scripts/list_endpoints.py for interactive discovery
1---2name: eptr2-api-discovery3description: This skill helps you discover and explore the 213+ API endpoints available in eptr2 for Turkish electricity market data. Use this when you need to find the right endpoint for your data needs.4---5
6---
7name: eptr2-api-discovery
8description: Discover and explore available eptr2 API endpoints for Turkish electricity market data. List all 213+ API calls, find endpoints by category (GÖP, GİP, DGP, Üretim, Tüketim), search for specific data types, and get parameter requirements. Use when asking what data is available, how to find endpoints, or exploring the API. Triggers on: available endpoints, API calls, list endpoints, what data, which API, how to find, hangi veri, mevcut servisler.
9allowed-tools: Read, Bash(python:*)
10---
11
12# eptr2 API Discovery Guide
13
14## Overview
15
16This skill helps you discover and explore the 213+ API endpoints available in eptr2 for Turkish electricity market data. Use this when you need to find the right endpoint for your data needs.
17
18## Quick Start
19
20```python
21from eptr2 import EPTR2
22
23# Initialize
24eptr = EPTR2(use_dotenv=True, recycle_tgt=True)
25
26# List all available API calls
27all_calls = eptr.get_available_calls()
28print(f"Total available calls: {len(all_calls)}")
29print(all_calls[:20]) # First 20 calls
30```
31
32## Discovery Methods
33
34### 1. Get All Available Calls
35
36```python
37# List all endpoint names
38calls = eptr.get_available_calls()
39print(calls)
40```
41
42### 2. Get Number of Calls
43
44```python
45# Get count of available endpoints
46count = eptr.get_number_of_calls()
47print(f"Available endpoints: {count}")
48```
49
50### 3. Get Aliases
51
52```python
53# Some endpoints have shorthand aliases
54aliases = eptr.get_aliases()
55print(aliases)
56# Example: 'ptf' is alias for 'mcp', 'smf' is alias for 'smp'
57```
58
59### 4. Get Help for Specific Call
60
61```python
62from eptr2.mapping.help import get_help_d
63
64# Get detailed info about an endpoint
65help_info = get_help_d("mcp")
66print(f"Category: {help_info['category']}")
67print(f"Title (EN): {help_info['title']['en']}")
68print(f"Title (TR): {help_info['title']['tr']}")
69print(f"Description: {help_info['desc']['en']}")
70print(f"URL: {help_info['url']}")
71```
72
73## API Categories
74
75| Category | Turkish | Description | Example Calls |
76|----------|---------|-------------|---------------|
77| GÖP | Gün Öncesi Piyasası | Day-Ahead Market | `mcp`, `dam-clearing`, `dam-volume` |
78| GİP | Gün İçi Piyasası | Intraday Market | `wap`, `idm-qty`, `idm-log` |
79| DGP | Dengeleme Güç Piyasası | Balancing Power Market | `smp`, `bpm-up`, `bpm-down` |
80| Üretim | Üretim | Generation | `rt-generation`, `uevm`, `dpp` |
81| Tüketim | Tüketim | Consumption | `rt-cons`, `uecm`, `load-plan` |
82| Dengesizlik | Dengesizlik | Imbalance | `imbalance-price`, `imb-qty`, `imb-vol` |
83| İA | İkili Anlaşmalar | Bilateral Contracts | `bi-long`, `bi-short` |
84| Barajlar | Barajlar | Dams/Reservoirs | `dams-daily-level`, `dams-active-fullness` |
85| Kurulu Güç | Kurulu Güç | Installed Capacity | `installed-capacity`, `lic-pp-list` |
86
87## Common Endpoint Patterns
88
89### Price Data
90- `mcp` / `ptf` - Market Clearing Price
91- `smp` / `smf` - System Marginal Price
92- `wap` - Weighted Average Price (IDM)
93- `imbalance-price` - Imbalance prices
94
95### Quantity Data
96- `rt-generation` - Real-time generation
97- `rt-cons` - Real-time consumption
98- `dam-clearing` - DAM cleared quantity
99- `idm-qty` - IDM matched quantity
100
101### Plan Data
102- `load-plan` - Demand forecast
103- `dpp` / `kgup` - Daily production plan
104- `kudup` - Settlement production plan
105
106### Settlement Data
107- `uevm` - Settlement generation
108- `uecm` - Settlement consumption
109
110## Finding the Right Endpoint
111
112### Search by Keyword
113
114```python
115from eptr2.mapping.help import get_help_d
116
117# Get all help entries
118all_help = get_help_d()
119
120# Search for keywords
121keyword = "price" # or "fiyat" for Turkish
122matches = {
123 k: v for k, v in all_help.items()
124 if keyword.lower() in v['title']['en'].lower()
125 or keyword.lower() in v['desc']['en'].lower()
126}
127
128for call, info in matches.items():
129 print(f"{call}: {info['title']['en']}")
130```
131
132### List by Category
133
134```python
135all_help = get_help_d()
136
137# Filter by category
138category = "GÖP" # Day-Ahead Market
139gop_calls = {
140 k: v for k, v in all_help.items()
141 if v['category'] == category
142}
143
144print(f"GÖP (Day-Ahead Market) endpoints:")
145for call, info in gop_calls.items():
146 print(f" {call}: {info['title']['en']}")
147```
148
149## Parameter Requirements
150
151### Get Required Parameters
152
153```python
154from eptr2.mapping.parameters import get_required_parameters, get_optional_parameters
155
156# Check what parameters an endpoint needs
157required = get_required_parameters("mcp")
158optional = get_optional_parameters("mcp")
159
160print(f"Required: {required}")
161print(f"Optional: {optional}")
162```
163
164### Common Parameters
165
166| Parameter | Type | Description |
167|-----------|------|-------------|
168| `start_date` | str | Start date (YYYY-MM-DD) |
169| `end_date` | str | End date (YYYY-MM-DD) |
170| `org_id` | int/str | Organization ID |
171| `pp_id` | int/str | Power plant ID |
172| `uevcb_id` | int/str | Production unit ID |
173
174## Quick Reference Tables
175
176### Most Used Price Endpoints
177| Call | Description |
178|------|-------------|
179| `mcp` | Market Clearing Price |
180| `smp` | System Marginal Price |
181| `wap` | IDM Weighted Average Price |
182| `imbalance-price` | Imbalance prices |
183| `mcp-smp-imb` | Combined MCP, SMP, Imbalance |
184
185### Most Used Quantity Endpoints
186| Call | Description |
187|------|-------------|
188| `rt-generation` | Real-time generation by type |
189| `rt-cons` | Real-time consumption |
190| `load-plan` | Demand forecast |
191| `dam-clearing` | DAM cleared volume |
192| `idm-qty` | IDM matched volume |
193
194### Production Plan Endpoints
195| Call | Description |
196|------|-------------|
197| `dpp` / `kgup` | Daily Production Plan (KGÜP) |
198| `kgup-v1` | KGUP Version 1 |
199| `kudup` | Settlement Production Plan |
200| `uevm` | Settlement Generation (UEVM) |
201
202## For More Details
203
204- See [endpoint-categories.md](endpoint-categories.md) for complete category listings
205- Run the helper script in `scripts/list_endpoints.py` for interactive discovery