OSTEC-Arbitrage Module
Type: OSTEC_ARBITRAGEM
Category: Market Integration
Maturity: DEVELOPMENT ๐ก
Requires external API: Yes (market price feed)
Optimizes a battery for price arbitrage against the daily electricity market (OMIE/MIBEL).
A trader configuration defines the buy/sell prices and markup strategy. Designed for the
Capwatt use case.
Configuration Schema
| Field |
Type |
Description |
battery_id |
UUID |
Battery resource to optimize |
trader_config |
object |
Trader and pricing configuration (see below) |
battery_constraints |
object |
Optional overrides for battery physical parameters |
trader_config
| Field |
Type |
Default |
Required |
Description |
market_price_source |
string |
โ |
Yes |
OMIE ยท MIBEL ยท CUSTOM_API |
trader_name |
string |
โ |
No |
Name of the electricity trader |
price_api_url |
string (URI) |
โ |
No |
Price feed endpoint (when CUSTOM_API) |
price_api_key |
string |
โ |
No |
API key for price feed |
buy_markup |
number |
0.0 |
No |
Added to market price when buying |
sell_discount |
number |
0.0 |
No |
Subtracted from market price when selling |
markup_type |
string |
"ABSOLUTE" |
No |
ABSOLUTE (โฌ/kWh) ยท PERCENTAGE |
battery_constraints (optional overrides)
| Field |
Type |
Default |
Description |
min_soc |
number |
0.2 |
Minimum state of charge (0โ1) |
max_soc |
number |
0.9 |
Maximum state of charge (0โ1) |
charge_efficiency |
number |
0.95 |
Charging efficiency (0โ1) |
discharge_efficiency |
number |
0.95 |
Discharging efficiency (0โ1) |
max_charge_power |
number |
โ |
Max charging power (kW) |
max_discharge_power |
number |
โ |
Max discharging power (kW) |
capacity |
number |
โ |
Battery capacity (kWh) |
degradation_cost |
number |
โ |
Battery degradation cost (โฌ/kWh) |
{
"battery_id": "550e8400-e29b-41d4-a716-446655440000",
"trader_config": {
"market_price_source": "OMIE",
"buy_markup": 0.01,
"sell_discount": 0.005,
"markup_type": "ABSOLUTE"
}
}
Activation
curl -X POST \
https://<host>/core/api/communities/{community_id}/energy_management/configs \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"module_type": "OSTEC_ARBITRAGEM",
"horizon": 24,
"delta_t": 1.0,
"config_data": {
"battery_id": "550e8400-e29b-41d4-a716-446655440000",
"trader_config": {
"market_price_source": "OMIE",
"buy_markup": 0.01,
"sell_discount": 0.005,
"markup_type": "ABSOLUTE"
}
}
}'
Triggering a Calculation
curl -X POST \
"https://<host>/core/api/communities/{community_id}/energy_management/configs/{config_id}/calculate?target_date=2026-04-18" \
-H "Authorization: Bearer <token>"