Hi,
I have found that there is a rounding issue with data coming from the timeseries endpoint when compared to the intraday data. The API looks like it is flooring the sum, while the graph on the dashboard looks like it is ceiling the sum.
In the application I work on, we store the data locally so that we can present graphs to our users. Here is 1 data point for 1 user on November 1st of 2015:
mysql> SELECT SUM(STPS), SUM(DSTNC), SUM(CAL_OUT) FROM omd_usr_sonoa_ftbt WHERE DATAPT_TS = '2015-11-01'; +-----------+--------------------+--------------+ | SUM(STPS) | SUM(DSTNC) | SUM(CAL_OUT) | +-----------+--------------------+--------------+ | 17986 | 13.580129999999999 | 3355 | +-----------+--------------------+--------------+ 1 row in set (0.00 sec)

https://api.fitbit.com/1/user/-/activities/log/calories/date/2015-11-01/1d.json

As you can see, there is a slight discrepancy. But it gets worse when there's a lot of data. This is the difference over the month of November 2015 up to the 18th:


Best AnswerTo further confirm, I queried the intraday dataset and ran a sum over dataset, then a floor & ceil to see if the values changed, and they did:

This is the dataset:
{ | 1 <?php
"activities-calories": [ | 2
{ | 3 $json = file_get_contents(__DIR__ . '/calories.json');
"dateTime": "2015-11-18", | 4 $json = json_decode($json);
"value": "1283" | 5
} | 6 $path = 'activities-calories-intraday';
], | 7
"activities-calories-intraday": { | 8 $sum = 0;
"dataset": [ 
Best AnswerHi team, is there an update for this bug?
Best Answer