1

I'm looking for a way to retrieve token decimals by programmatically. Let's take this Arcade (ARC) token. Token Decimals is 18.

It seems etherscan does't provide API for this purpose. Is there a way to retrieve token decimals somehow?

1 Answer 1

3

I have checked the contract source code and it has a public variable decimals. This means the contract has a public function with the same name which returns the value.

EDIT: It seems Etherscan does not provide an API to access the token info, however I found another free service called ethplorer which provides it through HTTP : https://github.com/EverexIO/Ethplorer/wiki/Ethplorer-API?from=etop#get-token-info

2
  • @lunc, can I retrieve this value via HTTP GET request?
    – Erik
    Feb 11, 2018 at 19:34
  • Please see my edit.
    – lunr
    Feb 11, 2018 at 19:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.