XMR721
Market

Build on XMR721

HTTP API

Every reader serves the same routes. The XMR20 project runs one at https://api.xmr20.org/xmr721/, and you can run your own.

#Basics

Text
https://api.xmr20.org/xmr721          the public reader
http://127.0.0.1:18951                your own reader
  • JSON everywhere. Errors are {"error": "plain text"} with a 4xx or 5xx status.
  • Amounts are strings of atomic units: 1 XMR = 1,000,000,000,000.
  • height in an answer is the last block the reader has processed.
  • Lists page with from and limit, or before and next for activity.
Terminal
curl https://api.xmr20.org/xmr721/info

#The ledger

RouteAnswer
GET /infoThe ledger's settings: network, domain, fee address, start block and hash, owner-list hash, mint, opening, burn and spend blocks, relay limits and fees, and the trading rules
GET /statsHeight, Mordinals, claimed, for sale, sales, volume, fees, records, refused, counts by kind, burns, and the latest checkpoint
GET /checkpointThe checkpoint at the current block
GET /checkpointsEvery checkpoint the reader has written
GET /owners?from=&limit=The owner list in pieces: for each Mordinal, its registration and owner transactions and the owner output's key, view tag and transaction public keys
GET /claimedEvery claimed Mordinal number

A wallet downloads the whole owner list and looks for its own coins itself, so the reader never learns which unclaimed Mordinals a wallet holds.

#Mordinals

RouteAnswer
GET /mordinal/<number or registration txid>One Mordinal: claimed, owner, counter, listing, registration and owner transactions, size and hash; its full history from the 2023 inscription on; records waiting for a block. This is the public “is it claimed?” answer
GET /gallery?filter=all|claimed|unclaimed|listed&from=&limit=Cards: number, claimed, owner, size, listing
GET /address/<address>What one address owns, what it is buying, and its waiting records
GET /content/<number>The inscribed picture, if it is an allowed picture type and matches the owner list's hash. Headers x-mordinal-sha256, x-mordinal-sensitive
GET /text/<number>The inscription as plain text, when it is a short plain text
GET /names and /groupsDisplay names and collection groups of Mordinals
Terminal
curl https://api.xmr20.org/xmr721/mordinal/2177

#Minted NFTs and collections

RouteAnswer
GET /nfts?from=&limit=&collection=Minted NFTs, newest first: id, collection, edition, creator, name, type, size, SHA-256, owner, burned, counter, listing
GET /nft/<id>One NFT with its mint record, its collection's record and its history
GET /nft/<id>/contentIts bytes, when they are a picture or plain text
GET /nft-collectionsCollections made on the ledger
GET /nft-collection/<id>One collection with its record and its minted NFTs
GET /collections, /collections/<key>The GENESIS collection of earlier XMR20 NFTs

#The market

RouteAnswer
GET /listingsOpen listings that have not run out
GET /lot/<listing id>One listing: seller, price, last block, status (open, sold, cancelled), the list record, the reservation and buyer
GET /activity?kind=&number=&address=&before=&limit=Events, newest first; pass next as before for the next page
GET /sales?…The same, sales only
GET /tx/<txid>A Monero transaction cut to the parts the rules read. A buyer's wallet uses it to make payment proofs

Every event has height, pos, txid, id, time, kind, number and confirmations, and by kind:

KindAlso
claimto, proof (burn, spent coin, one-time key, payment proof and message)
movefrom, to
listlot, seller, price, until
cancellot, seller
reservelot, buyer, payBy
salelot, seller, buyer, price, fee, payments
collection, mint, burnthe collection, NFT and owner fields

#Records and the relay

RouteAnswer
POST /records {"record": "<hex>"}Hands a signed record to the relay. Needs content-type: application/json. Returns the job: id, state, op, number, txid, error, note
GET /status/<record id>Where a record is: unpaid (a relay fee has not arrived), queued, held, built, sent, waiting (a claim waiting for its fee), done, refused, stuck, unknown
GET /entry/<txid>What became of the record, burn or fee payment a transaction carried
GET /pendingRecords waiting for a block
GET /records?from=&limit=Every accepted record in order, as hex
GET /log?from=&limit=The full log: records, burns and fee payments, accepted and refused, with block and place
GET /burns?from=&limit=Burn claims and fee payments in ledger order
GET /waitingClaims that wait for their fee, burns and claims by a spent coin, with kind, due, paid and missing
Terminal
curl -X POST https://api.xmr20.org/xmr721/records \
  -H 'content-type: application/json' \
  -d '{"record":"4d4431fe02…"}'

Posting the same record again returns the same job. A 400 means the rules refuse it now; 429 means a limit was reached; 503 means the relay cannot work right now.

The relay's limits: three waiting records per signing address, one per Mordinal, a total and a daily cap, and a request rate per network address. Claims, moves, listings, reservations and purchases are carried free. Collections and mints cost the fee in GET /info under relay.fees.

#XMR20 tokens

RouteAnswer
GET /xmr20/open?from=&limit=Open tokens, newest first: id, deploy fields, creator, label, block
GET /xmr20/open/<id or first 16 characters>One open token with its deploy record and text
GET /xmr20/tokensTokens deployed by the launchpad's inscriber
GET /xmr20/token/<id>One of them
GET /xmr20/deploys/<Solana mint>The deploy of a launchpad token by its mint
GET /xmr20/earlier, /xmr20/earlier/<txid, mint or number>Tokens of the first XMR20 format
POST /xmr20/open/deploy-text, /xmr20/open/deploys, /xmr20/open/mintsDeploy and mint open tokens through the relay
GET /xmr20/open-mint/<id>What became of a mint the relay was asked to carry

Balances of tokens are kept by the token ledger in the XMR20 wallet engine, not by this reader. See XMR20 tokens.

The full reference, with every field, is reader/README.md.