pythontrontronweb

min_timesatamp and max_timestamp are not working in the trongridAPI


API reference: https://developers.tron.network/reference/get-transaction-info-by-account-address

Here is the HTTP request:

headers = {
    'Content-Type': "application/json",
    'TRON-PRO-API-KEY':api_key
}
response = requests.get(f"https://api.trongrid.io/v1/accounts/{address}/transactions?min_timestamp={min_timestamp}", headers=headers)

where min_timestamp:

min_timestamp="2024-11-01T04:30:00Z"

or

min_timestamp="1730558155"

Neither of them worked


Solution

  • The timestamp should be provided in milliseconds, not mentioned in the docs

    Example: min_timestamp="1730558155000"