Amber: use billing-native resolution, request up to 72 hours ahead (#22538)

This commit is contained in:
ross-w 2025-07-28 00:59:17 +10:00 • committed by GitHub
parent 7d4acf339f
commit 350bc70155
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,6 +1,14 @@
package amber
const URI = "https://api.amber.com.au/v1/sites/%s/prices/current?resolution=30&next=96"
import "fmt"
const (
// ForecastIntervals represents 72 hours of 5-minute intervals for price forecasting
// This is an "up to" figure, so it should still be OK for 30-minute billing customers
ForecastIntervals = 864 // 72 hours * 12 intervals per hour
)
var URI = fmt.Sprintf("https://api.amber.com.au/v1/sites/%%s/prices/current?next=%d", ForecastIntervals)
type AdvancedPrice struct {
Low float64 `json:"low"`