0

I am doing the following request with the boto library:

params = {
  'Operation': 'GetRequesterStatistic',
  'Statistic': 'TotalRewardAndFeePayout',
  'TimePeriod': 'OneDay',
  'Count': 5
}
response = self.conn.make_request(action=None, params=params, path='/', verb='GET')
reward_fee_payout = float(self.conn._process_response(response).DoubleValue)

According to their GetRequesterStatistic Documentation it should be returning a Data point for each of the Days in the Count (so, in the above case, five data points). However, I am only seeing one point -- for the earliest date.

{'marker': None, 'is_truncated': False, 'next_token': None, 'GetRequesterStatisticResponse': '', 'GetStatisticResult': '', 'OperationRequest': '', 'markers': [], 'next_upload_id_marker': None, 'next_generation_marker': None, 'Date': u'2015-02-06T08:00:00Z', 'TimePeriod': u'OneDay', 'next_marker': None, 'status': True, 'next_version_id_marker': None, 'Request': '', 'DoubleValue': u'0', 'RequestId': u'113a81fc-d613-44a8-bde5-f06ef27a71d8', 'version_id_marker': None, 'next_key_marker': None, 'DataPoint': '', 'key_marker': None, 'Statistic': u'TotalRewardAndFeePayout'}

Why is this occurring and how would I fix this?

David542
  • 104,438
  • 178
  • 489
  • 842

1 Answers1

1

I don't know boto, so it's either a bug there or in how you're parsing the response. The API definitely returns multiple days. Here's an example structure:

<GetRequesterStatisticResponse>
<OperationRequest>
<RequestId>192e5df4-5258-4852-93b7-c0dd3bbacea3</RequestId>
</OperationRequest>
<GetStatisticResult>
<Request>
<IsValid>True</IsValid>
</Request>
<DataPoint>
<Date>2015-02-18T08:00:00Z</Date>
<DoubleValue>0</DoubleValue>
</DataPoint>
<DataPoint>
<Date>2015-02-17T08:00:00Z</Date>
<DoubleValue>0</DoubleValue>
</DataPoint>
<DataPoint>
<Date>2015-02-16T08:00:00Z</Date>
<DoubleValue>0</DoubleValue>
</DataPoint>
<DataPoint>
<Date>2015-02-15T08:00:00Z</Date>
<DoubleValue>0</DoubleValue>
</DataPoint>
<DataPoint>
<Date>2015-02-14T08:00:00Z</Date>
<DoubleValue>0</DoubleValue>
</DataPoint>
<TimePeriod>OneDay</TimePeriod>
<Statistic>TotalRewardAndFeePayout</Statistic>
</GetStatisticResult>
</GetRequesterStatisticResponse>
Thomas
  • 43,637
  • 12
  • 109
  • 140