MetDesk’s API platform allows analysts, traders, data partners and IT departments access to a range of our content from our website in a fast and easy to use format, and embed this data into the heart of trading operations. The API is designed to offer the same speed and reliability as the MetDesk website, as well as an identical range of climate and historical datasets that are available on many of our web based pages.
Access
In order to access the API you will require a specific commercial arrangement and a valid access key from your client manager.
The API platform provides the following APIs:
Most endpoints produce output in JSON format, with the VMO endpoint also allowing .csv and .xml - Other formats can be accessed using Postman -.txt, .xml and .html.
There are 5 different ways to retrieve data via the API platform: -
Click the links above for more detailed information on retrieving data using these methods.
Limitations
Each user of the API is subject to a maximum number of requests that can be made per
hour. This maximum is determined by usage of all Endpoint's accessed by a unique API Key
within the current hour.
For example, if you made 500 requests to the CWG API and a further 1000 to the PowerGen
API within the same hour, this would add 1500 requests towards your hourly limit.
-> Contact your Account Manager for further information.
Many of the APIs follow a common design pattern to follow when retrieving data.
Within each API, the Endpoints are divided into ‘dimensions’ or ‘facts’.
Dimensions are used to retrieve valid data to be used in the Facts endpoints.
Common examples of these types of endpoints in the ’Power Generation’ API are:
You can use the ‘Dimensions’ type endpoints to identify the parameters that will be used in subsequent requests to the ‘Facts’.
/forecasts
In addition to the ‘/forecasts’ endpoint it is also possible to retrieve Observations and Climate data too, check the API documentation site for further details. These endpoints are currently available in the following APIs:
Focusing on the ’Power Generation’ API, let’s examine the API in detail. Our objective is to retrieve a specific forecast.
The parameters are:
• Location: Austria
• Model: EC-Op
• Element: wind
• Issue: 2022-06-15 00Z
• Start DTG: 2022-06-15T 01Z
• End DTG: 2022-06-24 23Z
• Interval: High Resolution
Before continuing, check the documentation for the PowerGen ‘forecasts’ endpoint:
It requires the following mandatory parameters:
• Model
• Issue
• Start DTG
• End DTG
• Location
• Location Type
• Element
• Interval
Note that ‘Location Type’, ’Element’ and ‘Interval’, only allow predefined options e.g., Element only accepts either ‘wind’, ‘solar’ or ‘combined’. Check the API documentation site for further information. You can use the ‘dimensions’ endpoints to find acceptable values for the other parameters.
Using each of the Dimensions endpoints, let's retrieve the information needed to retrieve a forecast.
https://api.metdesk.com/get/metdesk/powergen/v2/locations?location_type=country
Using ‘locations’ we identify the location codes for Countries available. Note the use of ‘location_type’ to specify the Type of Locations we are looking for.
Using the first result as example, we will use the location code for ‘Austria’ in the next endpoint.
{
"location": "AT",
"name": "Austria"
}
https://api.metdesk.com/get/metdesk/powergen/v2/models?location=AT&location_type=country
In this request to the Models we use ‘location_type’ and the’ location’ parameter, to check which Models are available for this location. The first result is returned as follows:
{
"model": "ecop",
"name": "EC op"
}
https://api.metdesk.com/get/metdesk/powergen/v2/issues?model=ecop
Request the current ‘Issues’ for the “EC Op” Model. In this example, let's get the first Issue and find out what DTGs are available for this Issue.
“2022-06-15T00:00:00Z"
Request the ‘DTGS’ endpoint to find all the DTGs contained within the Issue.
Let's use the first and last DTGs to be our ‘Start DTG’ and ‘End DTG’ in the next endpoint.
[
"2022-06-15T01:00:00Z",
…
"2022-06-24T23:00:00Z"
]
Now you have all the information needed to query the ‘forecasts’.
Note: the use of the mandatory ‘interval’ parameter, in this example it is ‘hires’.
Our first DTG in the resulting data set:
{
"dtg": "2022-06-15T01:00:00Z",
"member": "",
"value": 57.9
}
And the final DTG is:
{
"dtg": "2022-06-24T23:00:00Z",
"member": "",
"value": 166.71
}