Meaning of metrics returned by API call

We requested information on our active entities from September 10 to September 12 using the following code. Our understanding was that this should have meant we got information for September 10 and September 11. However the “array of ints” that we got had 3 numbers. Could you explain what those 3 numbers are? Could this have to do with different entities (different campaigns) starting on different days?
This is the code we used, most of which comes from the examples github:

def date_range(data):
    """Returns the minimum activity start time and the maximum activity end time
    from the active entities response. These dates are modified in the following
    way. The hours (and minutes and so on) are removed from the start and end
    times and a *day* is added to the end time. These are the dates that should
    be used in the subsequent analytics request.
    start = min([parse(d['activity_start_time']) for d in data])
    end = max([parse(d['activity_end_time']) for d in data])
    start = remove_hours(start)
    end = remove_hours(end) + datetime.timedelta(days=1)
    return start, end

today =
yesterday = today - datetime.timedelta(days=1)

active_entities = LineItem.active_entities(account, yesterday, today)
active_ids = [d['entity_id'] for d in active_entities]
start, end = date_range(active_entities)


@Pruthviraj Can you provide us the full data of that API call? Also, would be helpful if you can give us your actual code snippet (including all parameters you used).

In addition to what @Yatri asked for, I’d like to get some clarity on what the issue is. Is the following correct?

  • you’re requesting two days of information in the Active Entities request
  • when you make the subsequent analytics request, you’re getting data for three days (i.e., the array length is 3)
Is that right? Is the question why you’d see three days of analytics metrics instead of two?