{"id":16559341,"url":"https://github.com/anders94/bitcoin-mempool-tracker","last_synced_at":"2026-02-09T21:03:26.432Z","repository":{"id":229328724,"uuid":"776453559","full_name":"anders94/bitcoin-mempool-tracker","owner":"anders94","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-05T18:01:56.000Z","size":88,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-26T09:01:43.208Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/anders94.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-03-23T14:55:09.000Z","updated_at":"2024-10-05T18:02:00.000Z","dependencies_parsed_at":"2024-03-27T01:44:05.425Z","dependency_job_id":"72bcd090-7985-415b-aa71-83b8943b4e36","html_url":"https://github.com/anders94/bitcoin-mempool-tracker","commit_stats":null,"previous_names":["anders94/bitcoin-mempool-tracker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders94%2Fbitcoin-mempool-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders94%2Fbitcoin-mempool-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders94%2Fbitcoin-mempool-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders94%2Fbitcoin-mempool-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anders94","download_url":"https://codeload.github.com/anders94/bitcoin-mempool-tracker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248579189,"owners_count":21127772,"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-10-11T20:25:37.276Z","updated_at":"2026-02-09T21:03:26.352Z","avatar_url":"https://github.com/anders94.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"bitcoin-mempool-tracker\n=======================\n\nRecords timing of entry / exit / block inclusion and value / fee information for\ntransactions as they go through the mempool and potential block inclusion lifecycle.\nData is stored in a PostgreSQL database for later querying.\n\nThis project is in support of an MIT project analyzing the Bitcoin fee market.\n\nPrerequisites\n-------------\n* PostgreSQL\n* Node.js\n* RPC and ZeroMQ access to a full Bitcoin node\n\nSetup\n-----\nInstall dependancies:\n```sh\nnpm i\n```\nSet the environment variables described in `config/index.js`.\n\nUsage\n-----\n```\nnode .\n```\nRuns the mempool watcher which connects to the ZeroMQ port (see http://bitcoincoredocs.com/zmq.html)\nand records mempool entry / exit for transactions as well as recording blocks.\n\nDetail\n------\nTransactions are recorded in the `txs` table. Inputs to transactions are recorded in the `txis` table\nwhile outputs are recorded in the `txos` table. A transaction output can become a transaction input\nwhich would represent a respend and in this case will be recorded in both tables. The `txis` table\nhas a `spent_in_txid` column which records the transaction id of the spending transaction wheras the\n`txos` table contains an `amount` column.\n\nThe ways a transaction is added to the `txs` table include:\n* A new transaction is pushed to the mempool via publication through ZeroMQ\n* A new transaction is found in the mempool via dumping the mempool through the RPC\n* An existing transaction is referenced by a mempool transaction input\n\nPushed transactions populate the `mempool_entry` and `mempool_exit` columns whereas pulled transactions\npopulate the `mempool_seen_at` and `mempool_unseen_at` columns. Transactions with no `mempool_*`\ninformation were not seen in the mempool and were added in the process of filling out inputs. Use\n`mempool_seen_at` and `mempool_unseen_at` primarily. If `mempool_entry` or `mempool_exit` is populated,\nuse that instead because that will be more accurate.\n\nNotes\n-----\nDump data to CSV files with:\n```\n\\copy (select * from txs) to 'txs.csv' with csv delimiter ',' header\n\\copy (select * from txis) to 'txis.csv' with csv delimiter ',' header\n\\copy (select * from txos) to 'txos.csv' with csv delimiter ',' header\n\\copy (select * from blocks) to 'blocks2.csv' with csv delimiter ',' header\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanders94%2Fbitcoin-mempool-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanders94%2Fbitcoin-mempool-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanders94%2Fbitcoin-mempool-tracker/lists"}