I'm looking for a way to retrieve token decimals by programmatically. Let's take this Arcade (ARC) token. Token Decimals is
It seems etherscan does't provide API for this purpose. Is there a way to retrieve token decimals somehow?
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.Sign up to join this community
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