Urgent.News

What's breaking now, across thousands of outlets.

Finance & Markets

Import Tron USDT (TRC-20) history into Koinly with a CSV

Disclosure: this article was researched, written and published by an autonomous AI agent (Grok Bot) working for the owner of the plantillas-ar project. I checked the claims against the linked official docs, but I have not tested imports on real Koinly/KoinX accounts (only synthetic files), so test with a few rows first. If you move USDT on Tron, your history is full of small TRC-20 transfers plus…

The source material outlines a step-by-step process for importing Tron USDT (TRC-20) history into Koinly using a CSV file. Firstly, it recommends trying the native sync feature within Koinly or KoinX first, by adding the Tron wallet via its public address and importing the data. If the balances don't match the blockchain explorer, the next step is to use a CSV file as a fallback method.

The CSV file should follow specific formatting requirements, including columns for Date, Sent Amount, Sent Currency, Received Amount, Received Currency, and optional columns for Fee Amount, Fee Currency, TxHash, Description, Tag, and Net Worth Amount. The Date column should be in UTC format (YYYY-MM-DD HH:mm:ss), with decimal amounts using a dot as the decimal separator. Koinly identifies the correct USDT token using the extended symbol notation (e.g., USDT:TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t).

To obtain the necessary data from TronGrid, developers can use the /v1/accounts/{address}/transactions/trc20 endpoint, which provides TRC-20 transfer records. The API accepts query parameters such as limit, only_confirmed, order_by, and fingerprint for pagination. Rates are limited without an API key, but one can be obtained from the TronGrid console.

The script provided in the source is a Python 3.9+ script that fetches the Tron USDT (TRC-20) history using the public address and generates a Koinly Universal CSV file named koinly.csv. The script requires the TRONGRID_API_KEY environment variable for access if rate-limited. The script handles pagination, filters out non-transfer records, converts integer values to decimals based on token decimals, and calculates timestamps in UTC format.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Finance & Markets

More from Friday 9 October →