Quickstart

Learn how to scan the Bitcoin blockchain for Ordinals activity.

In this quickstart guide, you will set up ordhook to explore and index Ordinal activity on the Bitcoin blockchain. You will learn how to install, configure, and run basic commands to scan and stream Ordinal inscriptions and transfers.

Check out the Ordhook as a service for a more advanced use case.

Scanning for Ordinal activity

To scan blocks for Ordinal activity, you can use the scan blocks command. The output will show details of the inscription, including the block number it was revealed at, ordinal_number, and inscription_number.

Terminal
ordhook scan blocks --interval 767430:767753 --mainnet

The --interval flag is used to specify a block range. The range is inclusive, meaning both the start and end blocks will be included in the scan. And the --mainnet flag is used to specify the Bitcoin network to scan.

Note

When running scan for the first time, an archive of Bitcoin blockchain data will be downloaded. The subsequent scans will use the cached chainstate if already present, speeding up iterations and the overall feedback loop. To learn more, check out the Hiro Archive section.

Inspecting a specific inscription

To inspect an inscription, you can run a similar command, scan inscription and pass in the inscription's ID.

Terminal
ordhook scan inscription 6fb976ab49dcec017f1e201e84395983204ae1a7c2abf7ced0a85d692e442799i0 --mainnet

The output will show where and when the inscription was revealed and any subsequent transfer events.

Inscription 6fb976ab49dcec017f1e201e84395983204ae1a7c2abf7ced0a85d692e442799i0 revealed at block #767430 (ordinal_number 1252201400444387, inscription_number 0)
Transferred in transaction bc4c30829a9564c0d58e6287195622b53ced54a25711d1b86be7cd3a70ef61ed at block 785396

Next steps