There is some way that I can subscribe to the balance to a address using web3js of Eth

  • When you use the word 'subscribe' here, do you mean get live updates as the balance changes? Or simply retrieve the data about the Ethereum balance? – Shawn Tabrizi Jul 20 '18 at 18:13
  • yes when the balance of an account changes, using the subscribe of web3js – Rafael Sequeiros Alvarado Jul 20 '18 at 18:48

You can't directly subscribe to a value stored on the blockchain, though if you emit an event in the balance function then you can set up listeners for those events. See the documentation for more details.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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