Fralgo
August 12, 2022, 7:54am
1
The transaction below sends a remainder USDT from the close to an another address, but I the api v2 does not provide the closing amount, even though the explorer does have a closing amount. Does anyone know where I can find the asset closing amount using the API?
https://algoexplorer.io/tx/G6RUAGPKXL2OTHCUJUSCGEP75P2YHEQLAJZR4OIM3R7N7YFFOIGQ
You need to use the indexer API for that:
$ curl "https://algoindexer.algoexplorerapi.io/v2/transactions/G6RUAGPKXL2OTHCUJUSCGEP75P2YHEQLAJZR4OIM3R7N7YFFOIGQ?pretty"
{
"current-round": 22790489,
"transaction": {
"asset-transfer-transaction": {
"amount": 10000,
"asset-id": 312769,
"close-amount": 90000,
"close-to": "LTDTBYRGVANCZRYWAKUZDRMCDYOTJWSSNT5ZCUTBQKUTRANLLCQOUSZWKU",
"receiver": "LTDTBYRGVANCZRYWAKUZDRMCDYOTJWSSNT5ZCUTBQKUTRANLLCQOUSZWKU"
},
"close-rewards": 0,
"closing-amount": 0,
"confirmed-round": 8786948,
"fee": 1000,
"first-valid": 8786943,
"genesis-hash": "wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qzkkit8=",
"genesis-id": "mainnet-v1.0",
"id": "G6RUAGPKXL2OTHCUJUSCGEP75P2YHEQLAJZR4OIM3R7N7YFFOIGQ",
"intra-round-offset": 11,
"last-valid": 8787042,
"receiver-rewards": 0,
"round-time": 1598864389,
"sender": "R7CJKCJMLSRYZ6RKJ7YIZ77GAB4CLB7QOQSF7GT2E4AHRZZPYUY4IHV5QA",
"sender-rewards": 0,
"signature": {
"sig": "JqiBie0uWeCgK5z3hE2R3mYGwzdpuWNbAgoEdpeFclV2Jaq8kJpFYOZZmzGKonTN3PQCjifZ9heEFpnrU0AIAA=="
},
"tx-type": "axfer"
}
}
1 Like
Fralgo
August 13, 2022, 9:49pm
3
Turns out only that transaction does not have the “aca” in the call. The next one did have it.