{"id":20138342,"url":"https://github.com/pinax-network/firehose-examples-go","last_synced_at":"2026-05-05T16:40:06.110Z","repository":{"id":221522434,"uuid":"743944963","full_name":"pinax-network/firehose-examples-go","owner":"pinax-network","description":"Examples on how to use Firehose endpoints in Golang","archived":false,"fork":false,"pushed_at":"2024-03-20T15:48:08.000Z","size":80,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-01-13T09:46:47.177Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pinax-network.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-16T10:16:49.000Z","updated_at":"2024-01-16T10:17:05.000Z","dependencies_parsed_at":"2024-02-08T14:29:44.706Z","dependency_job_id":"4c704e71-6d83-4fa9-9414-5465767c453f","html_url":"https://github.com/pinax-network/firehose-examples-go","commit_stats":null,"previous_names":["pinax-network/firehose-examples-go"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinax-network%2Ffirehose-examples-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinax-network%2Ffirehose-examples-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinax-network%2Ffirehose-examples-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinax-network%2Ffirehose-examples-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pinax-network","download_url":"https://codeload.github.com/pinax-network/firehose-examples-go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241582552,"owners_count":19985845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T21:37:30.528Z","updated_at":"2026-05-05T16:40:05.260Z","avatar_url":"https://github.com/pinax-network.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Firehose Client Examples (Golang)\n\nThis is an exemplary Golang application on how to stream or fetch blocks from Firehose and transform the chain agnostic\nblock wrapper into a chain-specific block type.\n\n### Prerequisite\n\nBefore you can connect to our infrastructure, you need to sign up on https://app.pinax.network and create an API key for\nyourself. You will find all Firehose endpoints on the Pinax App as well. We offer a generous free tier plan which should\nbe sufficient for most use cases.\n\n### Fetch Firehose Block\n\nTo fetch a single block from firehose just run the example in `fetch_block.go`:\n\n```bash\n$ export SUBSTREAMS_API_KEY=\u003cyour_api_key\u003e\n$ go run fetch_block.go\nreceived block: 800000, blocktime: 2023-07-24 05:17:09 +0200 CEST, hash: 00000000000000000002a7c4c1e48d76c5a37902165a270156b7a8d72728a054, trxs: 3721\n```\n\n### Stream Firehose Blocks\n\nTo stream blocks from a configurable start block, run:\n\n```bash\n$ export SUBSTREAMS_API_KEY=\u003cyour_api_key\u003e\n$ go run stream_blocks_eth.go\nreceived block: 19183642, blocktime: 2024-02-08 13:07:23 +0000 UTC, hash: bbd1f26f3c68458e8d764d6a9a381258cb4f3b5defaadcf0c5e447c76e3f5026, trxs: 143\nreceived block: 19183643, blocktime: 2024-02-08 13:07:35 +0000 UTC, hash: b7a587953892fe5042be072a4e8ffeceab77c25f0e27f043eaa2464dc8f3f780, trxs: 92\nreceived block: 19183644, blocktime: 2024-02-08 13:07:47 +0000 UTC, hash: 23c3ccfd2f591590ed4838efac0d9285be36cdf87e5290515dee5f0c3bec2d22, trxs: 124\nreceived block: 19183645, blocktime: 2024-02-08 13:07:59 +0000 UTC, hash: 4b2491a32ceeb470628de53ef7d66faf16afc77f2b03b1b5188bac6f8791ee99, trxs: 137\n```\n\n### Block Definitions\n\nTo consume other chains, you will need their respective block definitions. Note that chains that are based on the same\nblockchain technology will not provide dedicated block definitions (for example, the BSC firehose endpoints do not come\nwith their own types but will use the Ethereum ones).\n\n| Blockchain Technology | Go Module                                                             |\n|-----------------------|-----------------------------------------------------------------------|\n| Antelope              | `buf.build/gen/go/pinax/firehose-antelope/protocolbuffers/go`         |\n| Arweave               | `buf.build/gen/go/pinax/firehose-arweave/protocolbuffers/go`          |\n| Beacon                | `buf.build/gen/go/pinax/firehose-beacon/protocolbuffers/go`           |\n| Bitcoin               | `buf.build/gen/go/streamingfast/firehose-bitcoin/protocolbuffers/go`  |\n| Cosmos                | `github.com/graphprotocol/proto-cosmos`                               |\n| Ethereum              | `buf.build/gen/go/streamingfast/firehose-ethereum/protocolbuffers/go` |\n| Near                  | `buf.build/gen/go/streamingfast/firehose-near/protocolbuffers/go`     |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinax-network%2Ffirehose-examples-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpinax-network%2Ffirehose-examples-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinax-network%2Ffirehose-examples-go/lists"}