smard-api icon indicating copy to clipboard operation
smard-api copied to clipboard

Marketdata is available on smard.de

Open nandbert2 opened this issue 3 years ago • 2 comments

There are further parameters possible to access market data (hourly prices) from smard.de: An access is as follows, the parameter 4169 is used as an example; full list is below:

  1. get list of timestamps curl https://www.smard.de/app/chart_data/4169/DE/index_hour.json timestamps.json

  2. select one timestamp and get the data curl https://www.smard.de/app/table_data/4169/DE/4169_DE_hour_1655676000000.json > marketdata_4169.json

As before the parameter needs to be repeated and the "DE" must be always there even when accessing market data from other regions.

The list of possible parameters I found when downloading data from on smard.de:

  • 4169 - Marktpreis: Deutschland/Luxemburg
  • 5078 - Marktpreis: Anrainer DE/LU
  • 4996 - Marktpreis: Belgien
  • 4997 - Marktpreis: Norwegen 2
  • 4170 - Marktpreis: Österreich
  • 252 - Marktpreis: Dänemark 1
  • 253 - Marktpreis: Dänemark 2
  • 254 - Marktpreis: Frankreich
  • 255 - Marktpreis: Italien (Nord)
  • 256 - Marktpreis: Niederlande
  • 257 - Marktpreis: Polen
  • 258 - Marktpreis: Polen
  • 259 - Marktpreis: Schweiz
  • 260 - Marktpreis: Slowenien
  • 261 - Marktpreis: Tschechien
  • 262 - Marktpreis: Ungarn

Can this list be added to the yaml/smard-api?

nandbert2 avatar Jul 02 '22 07:07 nandbert2

It looks like there is a table-data endpoint additionally to the documented chart-data endpoint and you discovered more filters. However this endpoint is not available for all filters.

Still, adjusting the documentation should be straightforward, feel free to create a PR. I'll try to work on this next week, if you don't want to work on it yourself.

lukaspanni avatar Aug 06 '22 07:08 lukaspanni

I created a pull-request; please have a look. Let me know if things are missing; my experiences with openapi and github are limited.

nandbert2 avatar Aug 08 '22 08:08 nandbert2