I'm currently using TzScan as a source of data about Tezos blockchain. Unfortunately, I am receiving many http errors from their API, making my products seem unreliable. So I decided to get the data directly from the Tezos node. I imagine there is a way to get it from a local endpoint, like https://127.0.0.1:8732/chains... How can I get, then, a list of a baker's delegators from a Tezos node?
1 Answer
Here the RPC API method: /chains/main/blocks/head/context/delegates/tz1.../delegated_contracts
Worth to know:
If you are working on baking-related software, you should be careful with the level of the block where you get the context. Probably, you might want to use snapshot blocks instead of head, as in example above.