/ / ▶ Ordinals API
/ --- / A service that ingests Bitcoin ordinal inscriptions to expose them via REST API endpoints.
/ /
- Inscription endpoints
- Genesis block and transaction information
- Transfer history
- Transfers per block
- Current location and ownership information
- Blessed and cursed inscriptions
- BRC-20 endpoints
- Full token deploy, mint and transfer history
- Activities per token and per address
- Address balances
- Satoshi ordinal notation endpoints
- ETag cache support
- Run modes for auto-scaling
See the Ordinals API Reference for more information.
The Ordinals API has hard dependencies on other systems. Before you start, you'll need to have access to:
- An Ordhook node with a fully indexed Ordinals database.
- A local writeable Postgres database for data storage.
- We recommended a 1TB volume size here.
-
Clone the repo.
-
Create an
.env
file and specify the appropriate values to configure the local API server, postgres DB and Ordhook node reachability. Seeenv.ts
for all available configuration options. -
Build the app (NodeJS v18+ is required)
npm install npm run build
-
Start the service
npm run start
To better support auto-scaling server configurations, this service supports
three run modes specified by the RUN_MODE
environment variable:
default
: Runs all background jobs and the API server. Use this when you're running this service only on one instance. This is the default mode.readonly
: Runs only the API server. Use this in an auto-scaled cluster when you have multiplereadonly
instances and just onewriteonly
instance. This mode needs awriteonly
instance to continue populating the DB.writeonly
: Use one of these in an auto-scaled environment so you can continue consuming new inscriptions. Use in conjunction with multiplereadonly
instances as explained above.
When shutting down, you should always prefer to send the SIGINT
signal instead
of SIGKILL
so the service has time to finish any pending background work and
all dependencies are gracefully disconnected.
If you encounter a bug or have a feature request, we encourage you to follow the steps below:
- Search for existing issues: Before submitting a new issue, please search existing and closed issues to check if a similar problem or feature request has already been reported.
- Open a new issue: If it hasn't been addressed, please open a new issue. Choose the appropriate issue template and provide as much detail as possible, including steps to reproduce the bug or a clear description of the requested feature.
- Evaluation SLA: Our team reads and evaluates all the issues and pull requests. We are avaliable Monday to Friday and we make a best effort to respond within 7 business days.
Please do not use the issue tracker for personal support requests or to ask for the status of a transaction. You'll find help at the #support Discord channel.
Development of this product happens in the open on GitHub, and we are grateful to the community for contributing bugfixes and improvements. Read below to learn how you can take part in improving the product.
Please read our Code of conduct since we expect project participants to adhere to it.
Read our contributing guide to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes.
Join our community and stay connected with the latest updates and discussions:
-
Join our Discord community chat to engage with other users, ask questions, and participate in discussions.
-
Visit hiro.so for updates and subcribing to the mailing list.
-
Follow Hiro on Twitter.