Page cover

ord (inscriptions/runes)

Inscriptions and runes data surfaced by SANDSHREW

SANDSHREW hosts a cluster of ord instances running in server mode with a consistent scheme to map a JSON-RPC method call to a REST query on the underlying ord service.

The scheme to map JSON-RPC to an ord server endpoint is consistent throughout the RPC.

For a JSON-RPC payload such as

{
  "method": "ord_inscriptions:block",
  "params": [
    "780286"
  ],
  "jsonrpc": "2.0",
  "id": 0
}

The component of the JSON-RPC method following the ord_namespace prefix is a colon-delimited list of components to the full REST path which is forwarded to the ord HTTP server. The list of parameters in the JSON-RPC payload are appended as additional components to construct the complete REST query.

Thus, the JSON-RPC method ord_inscriptions:block with parameters set to ["780286"] maps to GET /inscriptions/block/780286 on the ord service.

The complete schema for the ord server is available on the canonical ord repository. The exact line of code where this section begins is linked below:

Responses from the ord REST server are forwarded back as a JSON-RPC response object with the exception of ord_content which will first base64 encode the data

The methods are enumerated in greater detail in the sections below, but they can be ascertained using the aforementioned scheme and the list of REST endpoints supported by ord.

Inscriptions

Get Inscriptions

ord_inscriptions returns a specified number of inscription IDs, ordered by their inscription number.

Params

insc_num: string (optional) - Sets the starting point for the query based on the inscription number, a unique identifier assigned to each individual inscription, serving as a sequential reference point within the Bitcoin blockchain's ordinals space. The insc_num parameter represents the starting inscription number from which the query will begin fetching inscriptions. If left blank it returns the latest 100 inscriptions.

Response

Inscription by Block Hash

ord_block retrieves all inscriptions associated with a specified block hash.

Params

block_hash: string (required) - The hash of the block for which inscriptions are to be returned.

Response

Inscription by Block Height

ord_inscriptions:block fetches all inscriptions associated with a block at a specified block height. This endpoint supports pagination.

Params

block_height: string (required) - Specifies the height of the block from which inscriptions are to be retrieved.

page: string (optional) - Determines the page number of results, enabling paged viewing of inscriptions.

Response

Inscription by Tx Output

Returns inscription and Sat information from a transaction output

Params

txid:vout: string (required) - Output transaction ID : The number of the transaction output

Response

Inscription by ID

Returns inscription information based on an inscription ID.

Params

inscription_id: string (required) - The inscription ID

Response

Inscription by Number

Returns inscription information based on an inscription number.

Params

insc_num: string (required) - The inscription number

Response

Inscription Children

Returns the first 100 child inscription IDs for the specified inscription.

With the page parameter, it returns the set of 100 child inscriptions on page.

Params

inscription_id: string (required) - The inscription ID

page: string (optional) - Return inscriptions from this page

Response

Inscription by Sat

Returns the inscription IDs for a specific Sat number.

Params

sat_number: string (required) - Position number of Sat

Response

Inscription by Sat with Index

Returns the inscription ID at index from all inscriptions on the Sat.

Params

sat_number: string (required) - Position number of sat

index: string (optional) - The index of the inscription. index may be a negative number to index from the back (0 being the first and -1 being the most recent).

Response

Sats

Sat by Number

Returns a Sat by its integer position number within the entire bitcoin supply.

Params

sat_number: string (required) - Position number of Sat

Response

Sat by Decimal

Returns a Sat by decimal: its block and offset within that block.

Params

block.offset: string (required) - Block and offset of Sat

Response

Sat by Degree

Returns a Sat by degree: its cycle, blocks since the last halving, blocks since the last difficulty adjustment, and offset within their block.

Params

cycle°blocks_since_halvingblocks_since_adjustmentoffset: string (required) - Cycle, blocks since the last halving, blocks since the last difficulty adjustment, and offset within block

Response

Sat by Name

Returns a Sat by its base 26 representation using the letters "a" through "z".

Params

base26_name: string (required) - Base 26 representation of Sat

Response

Sat by Percentile

Returns a Sat by its percentile: the percentage of bitcoin's supply that has been or will have been issued when they are mined

Params

percentile: string (required) - Sat percentile

Response

Ordinals

Ord Content

Returns the Base-64 content of an ordinals inscription.

Params

insc_num: string (required) - The inscription number

Response

Ord Preview

Returns HTML for displaying ordinal content.

Params

inscription_id: string (required) - The inscription ID

Response

Recursive Methods

Recursive inscriptions facilitate the access and incorporation of existing inscription data into new inscriptions. By leveraging recursive inscriptions, users can effectively 'daisy-chain' data, pulling information from a series of interconnected inscriptions

More information can be found in our Inscription Guide.

Child Inscriptions

ord_r:children returns the first 100 child inscription IDs. If called with the optional page parameter, the set of 100 child inscriptions on page will be returned.

Params

inscription_id: string (required) - The inscription ID

page: string (optional) - The page number of the child inscriptions.

Response

Sat Inscriptions

ord_r:sat returns the first 100 inscriptions at sat_number. If called with the optional page parameter, the set of 100 inscriptions on page will be returned.

<sat_number> only allows the actual number of a sat no other sat notations like degree, percentile or decimal.

Params

sat_number: string (required) - The inscription ID

page: string (optional) - The page number of the child inscriptions.

Response

Last updated