# Getting next hours electric spot-price from Nordpool via nordpool-api-plus

**URL:** https://discourse.nodered.org/t/getting-next-hours-electric-spot-price-from-nordpool-via-nordpool-api-plus/82198
**Category:** General
**Created:** [19 October 2023 19:28 UTC](https://discourse.nodered.org/t/getting-next-hours-electric-spot-price-from-nordpool-via-nordpool-api-plus/82198 "2023-10-19T19:28:03Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [19 October 2023 20:27 UTC](https://discourse.nodered.org/t/getting-next-hours-electric-spot-price-from-nordpool-via-nordpool-api-plus/82198/5 "2023-10-19T20:27:07Z")

</div>

So you need to determine the hour you're in then use that to find the array with that index  
e.g.

```auto
const date = new Date();
///date.setHours(date.getHours()+1); // uncomment for next hour
const index = date.getHours();
msg.payload = msg.payload[index].price
return msg;

```

your error is  
You must return an object to each output.  
eg. set the price to a msg property.

---

_[View the full topic](https://discourse.nodered.org/t/getting-next-hours-electric-spot-price-from-nordpool-via-nordpool-api-plus/82198)._
