Beeminder Forum

API "delta" value vs displayed "hard cap" value

I have a do-less goal (go-to-bed) which, on the website, currently says “limit +07:18”, and in the Android widget says “hard cap +07:18”. But the delta value returned by the API is -7.316666666666666; if I multiply that up to get a number of minutes, then take the number of minutes past the hour, I don’t get 18:

>>> 7.316666666666666 * 60 % 60

7 hours and 18 minutes is in fact exactly 7.3 hours.

Is this something like “submitting a value of 7:18 will not derail you; submitting 7:19 will”, and the displayed “limit”/“hard cap” is one and delta is the other? Or is the website/Android app just subtracting a minute as a safety margin against rounding errors?

1 Like

Dang, astute question! And your guess is spot on. With the made-for-human-consumption number on the website and the apps, we conservaround, i.e., round in the conservative direction. The API’s delta field does not do that.

I’m not entirely sure that means there’s no bug here though. It sounds like 7+19/60 is the true exact value that would put you exactly on the bright red line so I suspect that “7h19m” is what the website should be telling you is your hard cap. If you could mention this and your goal’s URL in an email to we’d be grateful to be able to dig in further on this example.

(Also, DM me a postal address if you want to claim your stickers, which is our bug bounty!)

Cool, I’ve sent that email – thanks! Expect a DM shortly :slight_smile:

1 Like