Skip to content

MercatiElettrici

mercati_energetici.MercatiElettrici

Bases: MercatiEnergetici

Electricity Markets low level API wrapper. See the GME website for an explanation of the markets.

get_markets() async

Get electricity markets.

Returns:

Type Description
dict

A list of Python dictionaries like: [{data: ..., mercato: ..., volumi: ...}]

get_prices(market, day=None) async

Get electricity prices in €/MWh for a specific day on all the market zones.

Parameters:

Name Type Description Default
market str

The market to get prices from.

required
day date | str

Get prices of this date. Default is today. A string in the format "YYYYMMDD" or a datetime.date object.

None

Returns:

Type Description
list[dict]

A Python dictionary like: [{"data": 20230323, "ora": 1, "mercato": "MGP", "zona": "CALA", "prezzo": 128.69 },]

get_volumes(market, day=None) async

Get bought and sold volume for a specific day on all the market zones.

Parameters:

Name Type Description Default
market str

The market to get volumes from.

required
day date | str

Get volumes of this date. Default is today. A string in the format "YYYYMMDD" or a datetime.date object.

None

Returns:

Type Description
list[dict]

A Python dictionary like: [{ "data": 20230323, "ora": 1, "mercato": "MGP", "zona": "CALA", "acquisti": 482.198, "vendite": 1001.576 },]

get_liquidity(day=None) async

Get liquidity of electricity markets.

Parameters:

Name Type Description Default
day date | str

Get liquidity of this date. Default is today. A string in the format "YYYYMMDD" or a datetime.date object.

None

Returns:

Type Description
dict

A Python dictionary like: [{"data": 20230323, "ora": 1, "liquidita": 74.4741952239522 },]