Track pool data

Hello everyone.

Forgive my ignorance, but I am relatively new to this area. I would like to know if I can track Harmony pools using web3.py. I have read that Harmony is compatible with Ethereum, but I don’t know if this is possible.

If not, what is the best way to download data from Harmony chain using Python code?

Thanks in advance.

1 Like

You can use the Harmony Python SDK

(Install from GIT as the pip package is missing dependencies)

Alternatively you can connect to the RPC’s Harmony Node API with your own code and it is compatible with ETH RPC calls.
json-rpc | Ethereum Wiki

Because I don’t need the full package, I made this function to call the RPC that we use to gather data from the chain.

It also has connections to Smartstake and Prometheus as well…

Feel free to contact me if you need any direction…

Hey I created this exact use case as example for harmony:. It’s in JavaScript, but it should work quite similar in python:

Note: The abi is like a description of the structure of a contract, it differs depending on what contract is used.

1 Like

You could use the web3 library for Python and pretty much copy paste this code… It is basically the same…

1 Like