Reading Data from awattar API - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Reading Data from awattar API (/showthread.php?tid=2615) |
Reading Data from awattar API - benjamin Narten - 27.04.2020 Hello everybody, there is a new electricity provider in Austria and Germany that offers electricity prices at market prices. I would like to read the hourly electricity prices for the next 24 hours via a script. The prices for the next 24 hours should be visible in a table and a group address should be addressed in the hour with the cheapest electricity. Here is the description of the provider: API - PRICE DATA FEED Become an energy pioneer with our API data feed and realize your own ideas Whether it's a heat pump, e-car or your battery: your devices automatically know when it's green and cheap via the aWATTar data interface. And the day before. The aWATTar electricity price interface allows inventors and developers to develop their own ideas for the energy transition and lower prices. Access is free for all aWATTar customers. What data does the data feed provide? Our data feed provides the exchange prices for the next day via a defined web interface. These are the data of the EPEX Spot ® electricity exchange, which are updated every day at 2:00 p.m. for the next day. What do I need to use? Become an aWATTar customer and use our data feed free of charge according to the fair use principle (60 queries per minute). You currently do not need an access token! wb_sunny Intelligent Automatic shift of your electricity consumption all_inclusive Innovative Fully automated and without loss of comfort star Optimized price Consume when it's cheap check Forward-looking For a green and sustainable future DOCUMENTATION Basics server https://api.awattar.de resource v1 / marketdata call HTTP GET Encryption SSL - HTTPS Data format JSON parameter begin Epoch seconds including milliseconds. Defines the start time from which the data should be retrieved. (Optional) end Epoch seconds including milliseconds. Defines the end time up to which the data should be retrieved. (Optional) RESPONSE example { "object": "list", "data": [{ // Value for money in Epoch milliseconds "start_timestamp": 1428591600000, // Value for money up to in Epoch milliseconds "end_timestamp": 1428595200000, // Market price in euros / MWh, excluding VAT. "market price": 42.09, "unit": "Eur / MWh"}, ... ] } TOKEN No access token is currently required. EXAMPLE $ curl https://api.awattar.de/v1/marketdata Delivers the electricity price data from now up to 24 hours into the future. $ curl "https://api.awattar.de/v1/marketdata?start=1565481600000" Returns the electricity prices from August 11, 2019 8:00 a.m. - August 12, 2019 8:00 a.m. (24 hours). $ curl "https://api.awattar.de/v1/marketdata?start=1565481600000&end=1565665200000" Returns the electricity prices from August 11, 2019 8:00 a.m. to August 13, 2019 3:00 a.m. source: https://www.awattar.de/services/api I would be happy if someone already has a ready solution for me. best regards Benjamin RE: Reading Data from awattar API - Erwin van der Zwart - 27.04.2020 Hi, Try this: Code: -- Load needed libs Erwin |