Tron (TRX) API: Fails to fetch data for Contract Calls with zero TRX amount but non-zero fees
P
Peach puff Grasshopper
The API works as expected when a contract call like FreezeBalance, VoteWitness etc have non-zero amount_trx and zero/non-zero fees. However, when a contract call is done with no bandwidth balance, TRX is used as fees with amount_trx as zero and Koinly skips pulling these.
I wrote a script that pulls all my TRX transactions into a CSV and then compared it with Koinly's balance history. Attached 3 images here where the 1st image has such a transaction marked in red in the CSV and the second image from Koinlys API pull which is missing this transaction. Multiple such transactions have created a considerable difference in the computed vs reported balance as in image 3.