bundesAPI / bundesAPI/smard-api
Include information about download endpoint
- Dominant language
- Python
- Stars
- 94
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
There is another way to fetch data from the API as CSV. This is probably more useful for some usecases. The endpoint URL is https://www.smard.de/nip-download-manager/nip/download/market-data . It takes only Post requests with this body:
```json
{
"request_form": [
{
"format": "CSV",
"moduleIds": [
2000122,
2005097,
2000715,
2000125,
2003791,
2000123
],
"region": "DE",
"timestamp_from": 1663452000000,
"timestamp_to": 16634916000000,
"type": "discrete",
"language": "de"
}
]
}
```
You can get the moduleIds from the "Daten herunterladen" Page on smard.de . For some weird reason only the moduleIds used by the download form there work **together**. For example,. you can't combine consumption and production data into one request.
Maybe you want to include this endpoint in the docs?
I have also built a currently incomplete (supports only production, forecast and consumption) go client for it: https://github.com/niwla23/smard-go
EDIT:
these are the id sets that work together:
```go
productionModuleIds := []int{1001224, 1004066, 1004067, 1004068, 1001223, 1004069, 1004071, 1004070, 1001226, 1001228, 1001227, 1001225}
productionForecastIds := []int{2000122, 2005097, 2000715, 2000125, 2003791, 2000123}
consumptionModuleIds := []int{5000410, 5004387, 5004359}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.