amberelectric / public-api

Discuss the Amber public API
MIT License
50 stars 3 forks source link

Price api endpoint seems to be having issues at the moment #224

Open Mijawel opened 1 month ago

Mijawel commented 1 month ago

I'm assuming you know already but just in case, the prices endpoint seems to be returning tariffs that don't make sense:

Here is a summary followed by the raw output: {perKwh: 30.12297, spotPerKwh: 19.49739, nemTime: 2024-09-26T16:55:00+10:00} {perKwh: 204.0065, spotPerKwh: 29.60355, nemTime: 2024-09-26T17:00:00+10:00} {perKwh: 236.56839, spotPerKwh: 30.45084, nemTime: 2024-09-26T17:05:00+10:00} {perKwh: 223.65405, spotPerKwh: 38.03492, nemTime: 2024-09-26T17:10:00+10:00} {perKwh: 254.67663, spotPerKwh: 52.74907, nemTime: 2024-09-26T17:15:00+10:00} {perKwh: 259.79592, spotPerKwh: 1268.74393, nemTime: 2024-09-26T17:20:00+10:00} {perKwh: 295.61723, spotPerKwh: 1589.7618, nemTime: 2024-09-26T17:25:00+10:00} {perKwh: 2021.72801, spotPerKwh: 1925.0, nemTime: 2024-09-26T17:30:00+10:00} {perKwh: -18.52582, spotPerKwh: 19.49739, nemTime: 2024-09-26T16:55:00+10:00} {perKwh: -176.60176, spotPerKwh: 29.60355, nemTime: 2024-09-26T17:00:00+10:00} {perKwh: -206.20347, spotPerKwh: 30.45084, nemTime: 2024-09-26T17:05:00+10:00} {perKwh: -194.46316, spotPerKwh: 38.03492, nemTime: 2024-09-26T17:10:00+10:00} {perKwh: -222.66551, spotPerKwh: 52.74907, nemTime: 2024-09-26T17:15:00+10:00} {perKwh: -227.31941, spotPerKwh: 1268.74393, nemTime: 2024-09-26T17:20:00+10:00} {perKwh: -259.88424, spotPerKwh: 1589.7618, nemTime: 2024-09-26T17:25:00+10:00} {perKwh: -1829.07585, spotPerKwh: 1925.0, nemTime: 2024-09-26T17:30:00+10:00}

Raw output: [{"type":"CurrentInterval","date":"2024-09-26","duration":5,"startTime":"2024-09-26T06:50:01Z","endTime":"2024-09-26T06:55:00Z","nemTime":"2024-09-26T16:55:00+10:00","perKwh":30.12297,"renewables":15.549,"spotPerKwh":19.49739,"channelType":"general","spikeStatus":"none","tariffInformation":{"period":"offPeak","season":"default"},"descriptor":"veryLow","estimate":false},{"type":"ForecastInterval","date":"2024-09-26","duration":5,"startTime":"2024-09-26T06:55:01Z","endTime":"2024-09-26T07:00:00Z","nemTime":"2024-09-26T17:00:00+10:00","perKwh":40.68579,"renewables":15.353,"spotPerKwh":29.60355,"channelType":"general","spikeStatus":"none","tariffInformation":{"period":"offPeak","season":"default"},"descriptor":"low","advancedPrice":{"low":28.92551,"predicted":204.0065,"high":464.05813}},{"type":"ForecastInterval","date":"2024-09-26","duration":5,"startTime":"2024-09-26T07:00:01Z","endTime":"2024-09-26T07:05:00Z","nemTime":"2024-09-26T17:05:00+10:00","perKwh":41.57137,"renewables":12.609,"spotPerKwh":30.45084,"channelType":"general","spikeStatus":"none","tariffInformation":{"period":"offPeak","season":"default"},"descriptor":"neutral","advancedPrice":{"low":29.97734,"predicted":236.56839,"high":581.4826}},{"type":"ForecastInterval","date":"2024-09-26","duration":5,"startTime":"2024-09-26T07:05:01Z","endTime":"2024-09-26T07:10:00Z","nemTime":"2024-09-26T17:10:00+10:00","perKwh":49.49814,"renewables":12.45,"spotPerKwh":38.03492,"channelType":"general","spikeStatus":"none","tariffInformation":{"period":"offPeak","season":"default"},"descriptor":"neutral","advancedPrice":{"low":31.12493,"predicted":223.65405,"high":500.7976}},{"type":"ForecastInterval","date":"2024-09-26","duration":5,"startTime":"2024-09-26T07:10:01Z","endTime":"2024-09-26T07:15:00Z","nemTime":"2024-09-26T17:15:00+10:00","perKwh":64.87717,"renewables":12.289,"spotPerKwh":52.74907,"channelType":"general","spikeStatus":"none","tariffInformation":{"period":"offPeak","season":"default"},"descriptor":"high","advancedPrice":{"low":32.71477,"predicted":254.67663,"high":542.284}},{"type":"ForecastInterval","date":"2024-09-26","duration":5,"startTime":"2024-09-26T07:15:01Z","endTime":"2024-09-26T07:20:00Z","nemTime":"2024-09-26T17:20:00+10:00","perKwh":1335.81822,"renewables":7.689,"spotPerKwh":1268.74393,"channelType":"general","spikeStatus":"spike","tariffInformation":{"period":"offPeak","season":"default"},"descriptor":"spike","advancedPrice":{"low":36.50474,"predicted":259.79592,"high":500.83514}},{"type":"ForecastInterval","date":"2024-09-26","duration":5,"startTime":"2024-09-26T07:20:01Z","endTime":"2024-09-26T07:25:00Z","nemTime":"2024-09-26T17:25:00+10:00","perKwh":1671.34166,"renewables":7.175,"spotPerKwh":1589.7618,"channelType":"general","spikeStatus":"spike","tariffInformation":{"period":"offPeak","season":"default"},"descriptor":"spike","advancedPrice":{"low":37.87295,"predicted":295.61723,"high":594.50625}},{"type":"ForecastInterval","date":"2024-09-26","duration":5,"startTime":"2024-09-26T07:25:01Z","endTime":"2024-09-26T07:30:00Z","nemTime":"2024-09-26T17:30:00+10:00","perKwh":2021.72801,"renewables":6.855,"spotPerKwh":1925,"channelType":"general","spikeStatus":"spike","tariffInformation":{"period":"offPeak","season":"default"},"descriptor":"spike","advancedPrice":{"low":39.32233,"predicted":307.60395,"high":674.0149}},{"type":"CurrentInterval","date":"2024-09-26","duration":5,"startTime":"2024-09-26T06:50:01Z","endTime":"2024-09-26T06:55:00Z","nemTime":"2024-09-26T16:55:00+10:00","perKwh":-18.52582,"renewables":15.549,"spotPerKwh":19.49739,"channelType":"feedIn","spikeStatus":"none","descriptor":"high","estimate":false},{"type":"ForecastInterval","date":"2024-09-26","duration":5,"startTime":"2024-09-26T06:55:01Z","endTime":"2024-09-26T07:00:00Z","nemTime":"2024-09-26T17:00:00+10:00","perKwh":-28.12838,"renewables":15.353,"spotPerKwh":29.60355,"channelType":"feedIn","spikeStatus":"none","descriptor":"high","advancedPrice":{"low":-17.43722,"predicted":-176.60176,"high":-413.01233}},{"type":"ForecastInterval","date":"2024-09-26","duration":5,"startTime":"2024-09-26T07:00:01Z","endTime":"2024-09-26T07:05:00Z","nemTime":"2024-09-26T17:05:00+10:00","perKwh":-28.93345,"renewables":12.609,"spotPerKwh":30.45084,"channelType":"feedIn","spikeStatus":"none","descriptor":"high","advancedPrice":{"low":-18.39342,"predicted":-206.20347,"high":-519.76184}},{"type":"ForecastInterval","date":"2024-09-26","duration":5,"startTime":"2024-09-26T07:05:01Z","endTime":"2024-09-26T07:10:00Z","nemTime":"2024-09-26T17:10:00+10:00","perKwh":-36.13961,"renewables":12.45,"spotPerKwh":38.03492,"channelType":"feedIn","spikeStatus":"none","descriptor":"high","advancedPrice":{"low":-19.43669,"predicted":-194.46316,"high":-446.41184}},{"type":"ForecastInterval","date":"2024-09-26","duration":5,"startTime":"2024-09-26T07:10:01Z","endTime":"2024-09-26T07:15:00Z","nemTime":"2024-09-26T17:15:00+10:00","perKwh":-50.12055,"renewables":12.289,"spotPerKwh":52.74907,"channelType":"feedIn","spikeStatus":"none","descriptor":"high","advancedPrice":{"low":-20.882,"predicted":-222.66551,"high":-484.12675}},{"type":"ForecastInterval","date":"2024-09-26","duration":5,"startTime":"2024-09-26T07:15:01Z","endTime":"2024-09-26T07:20:00Z","nemTime":"2024-09-26T17:20:00+10:00","perKwh":-1205.5215,"renewables":7.689,"spotPerKwh":1268.74393,"channelType":"feedIn","spikeStatus":"spike","descriptor":"spike","advancedPrice":{"low":-24.32743,"predicted":-227.31941,"high":-446.44597}},{"type":"ForecastInterval","date":"2024-09-26","duration":5,"startTime":"2024-09-26T07:20:01Z","endTime":"2024-09-26T07:25:00Z","nemTime":"2024-09-26T17:25:00+10:00","perKwh":-1510.54281,"renewables":7.175,"spotPerKwh":1589.7618,"channelType":"feedIn","spikeStatus":"spike","descriptor":"spike","advancedPrice":{"low":-25.57125,"predicted":-259.88424,"high":-531.60153}},{"type":"ForecastInterval","date":"2024-09-26","duration":5,"startTime":"2024-09-26T07:25:01Z","endTime":"2024-09-26T07:30:00Z","nemTime":"2024-09-26T17:30:00+10:00","perKwh":-1829.07585,"renewables":6.855,"spotPerKwh":1925,"channelType":"feedIn","spikeStatus":"spike","descriptor":"spike","advancedPrice":{"low":-26.88887,"predicted":-270.78125,"high":-603.88211}}]

madpilot commented 1 month ago

What doesn't make sense?

Mijawel commented 1 month ago

Why would the perKwh value be -1829 during the same interval as the spotPerKwh be 1925?

Oh wait. Sorry, the channel type is feed-in.

On that note, I always thought the spot price was the feedIn price. What does it mean to have a separate perKwh and spotPerkwh price on the feed in channel that appear to be different from the spot price on the general channel?

madpilot commented 1 month ago

No, feed in price is spot price x loss factors. When the price is high the loss factors make a bigger difference.

Mijawel commented 1 month ago

Ok that makes sense. And same as with general prices, the predicted price on the feedin channel should be a bit more accurate than the perKwh price?

madpilot commented 1 month ago

Yep. The predicted price is predicting the spot price and then we just apply network fees over the top