Hello
I am trying to receive analytical reports from Twitter Ads API for the several accounts. I requested accounts information, campaigns and generate reports for each of them. I use such key metrics as clicks, impressions and billed_charge_local_micro (spend column on the screenshots) for comparing them.
After comparing with gui, I received such results:
left table extracted by the Twitter API, middle table is GUI data, right table is the table with discrepancy in red cells.
Screenshots from gui:
(18ce53uyoec)

(18ce54vcyco)
(18ce55bff8q)
So, I use the same algorithm for all accounts. Midnight time used as start_time parameter in the algorigthm. First of all, I request active_entities url to get all campaigns in the period of time:
curl -H 'Authorization: OAuth oauth_nonce="--", oauth_signature="--", oauth_callback="--", oauth_token="--", oauth_consumer_key="--", oauth_signature_method="--", oauth_version="1.0", oauth_timestamp="--"' -A 'Jersey/2.31' 'https://ads-api.twitter.com/10/stats/accounts/18ce55bff8q/active_entities?start_time=2021-12-26T23%3A00%3A00Z&end_time=2022-01-01T23%3A00%3A00Z&entity=CAMPAIGN
Then I create jobs, monitor progress and compute final results:
curl -X POST --data '' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Authorization: OAuth oauth_nonce="--", oauth_signature="--", oauth_callback="--", oauth_token="--", oauth_consumer_key="--", oauth_signature_method="--", oauth_version="1.0", oauth_timestamp="--"' -A 'Jersey/2.31' 'https://ads-api.twitter.com/10/stats/jobs/accounts/18ce55bff8q?start_time=2021-12-26T23%3A00%3A00Z&granularity=DAY&end_time=2022-01-01T23%3A00%3A00Z&metric_groups=LIFE_TIME_VALUE_MOBILE_CONVERSION%2CBILLING%2CVIDEO%2CMOBILE_CONVERSION%2CENGAGEMENT%2CMEDIA%2CWEB_CONVERSION&placement=ALL_ON_TWITTER&entity_ids=gmif1%2Cgtu0u%2Cgqexi%2Cg0qfs%2Cgtv6d%2Cgtufj%2Cgmisp&entity=CAMPAIGN'
But I see these discrepancies after all transformations. Why do these discrepancies appear?