Author

Topic: How can I find out what token was sent from the transaction "input"? (Read 73 times)

newbie
Activity: 3
Merit: 0
Please, help me. (BUMP)
newbie
Activity: 3
Merit: 0
Hello everyone!

I'm working on something for my project and my goals are to get the value of a transaction and what coin was sent. I'm currently at the point where everything works fine but the problem is I can't find out what token is being sent within the transaction. The issue shows up only for Ethereum tokens transactions (for the other coins I found different ways to distinguish what was sent). I'm using Etherscan's API to retrieve all the raw information for the transactions of an address. The API is returning JSON arrays with objects. Example of an API return:

Code:
results:
       0:
            ......... (SOME NECESSARY DATA)

            hash: "TRANSACTION HASH"

            ......... (SOME NECESSARY DATA)

            value: "0" (BECAUSE IT IS ETHEREUM TOKEN TRANSACTION)

            ......... (SOME NECESSARY DATA)

            input: "0xa9059cbb000000000000000000000000e59cd29be3be4461d79c0881d238cbe87d64595a0000000000000000000000000000000000000000000000000000000077359400" (EXAMPLE INPUT)

       1:
            ..........

       2:
            ..........

Above is shown all the useful information that can somehow help me to retrieve the information I need. How can I get what token is being transferred within the transaction?
Jump to: