Is there any data dump available for devs/analysts? I would like to grab and explore Harmony’s data to create some visuals that can be useful for the community.
There is the Harmony’s API but I will have to do multiple/loop calls. Is there any alternatives like data dump or guidance on how to pull the whole harmony data and in what format it is?
Thanks
2 Likes
Run an archieval node then you can fetch all the data from the network.
2 Likes
Maffaz
December 9, 2021, 12:37pm
3
What @xiaoyu2006 says is by far the best way but you can also contact the chain via RPC / API
and there is also a Promethues & Grafana API for other data:
I would suggest that if you get stuck with anything to post here what you need and the community can assist
1 Like
Maffaz
December 9, 2021, 12:40pm
4
I have an example of Prometheus here from metrics we use in the Validator Dao info.
It is for specific needs but the connection to the api etc should help…
from requests import get
from json import dump
prometheus = "https://gateway.harmony.one/api/v1/metrics"
prometheus_data = get(prometheus).json()["data"]
with open("prometheus_json.json", "w") as j:
dump(prometheus_data, j, indent=4)
blskey = "03561c6e33eabc526246f3eb0c7c2d9cc3ca229458bb4034770796a530c3e5487a11b601d46910569dfaf0d2bb4ae28b"
def bls_key_version(blskey: str, prometheus_data: list) -> tuple:
# hmy_consensus_bingo
# hmy_consensus_blskeys
# hmy_consensus_finality
# hmy_consensus_signatures
# hmy_consensus_sync
# hmy_downloader_num_blocks_inserted_beacon_helper
This file has been truncated. show original
Json Example of response:
[
{
"hmy_consensus_bingo": {
"time_stamp": "2021-10-18T07:11:07.235011848Z",
"type": "COUNTER",
"help": "counter of consensus",
"metrics": [
{
"labels": {
"consensus": "bingo",
"instance": "QmRLmsC2xw9xQAkQ651qf6dMoMoKZsrYPngPdVsmubyYDa",
"job": "mainnet/v2"
},
"value": "2"
},
{
"labels": {
"consensus": "signatures",
"instance": "QmRLmsC2xw9xQAkQ651qf6dMoMoKZsrYPngPdVsmubyYDa",
"job": "mainnet/v2"
This file has been truncated. show original