raresats.net API
Listings API View as Markdown

Query listings

Active listings and marketplace activity, filtered by row, rarer sub-category, mint years, a mint day or a month-day, and sat luck: the marketplace counterpart of Query sales. How the filters combine: Filtering & birthday sats.

Each listing of the query also names its lead sat with its block, mint day and luck (lead), and the block that created its UTXO (utxo): the columns of the site's listings grid.

Listings #

GET/api/listings/query

Active marketplace listings filtered like /api/sales/query, sorted like /api/market/listings, with facets. Not cached. 404 {enabled: false} while the marketplace is off.

Query parameters #

ParameterTypeRequiredDescription
rowstringnoOnly this row (collection). None: every row.
substringnoA rarer sub-category of row (e.g. pizza_uncommon under uncommon): only items holding sats of it. Implies subs=1.
subsstringno1 includes the row's sub-category items (sold or listed under their own rows). One of: 0, 1. Default: 0.
containsstringnoWith row: 1 also answers, apart, the listings holding only some sats of the row among others (in bundle: a Block 9 chunk holding one Block 9 palindrome under block9_palindrome) as contains (the first limit, in the asked sort and order; sort=unit orders them by total price, a bundle having no unit price of this row) and contains_total; only answers those alone as listings/total, paged by limit and offset. They are priced as the whole UTXO, never in the row's floor. One of: 0, 1, only. Default: 0.
yearsstringnoMint years, comma-separated (2009,2010; up to 40): items holding a sat mined in one of them. Each must be a year sats were mined in, 2009 to this one (400 otherwise); repeats and order do not matter. year is accepted too.
monthstringnoA mint month, YYYY-MM (UTC, by each block's own time): items holding a sat mined that month. Combines with the other filters.
blocksstringnoA block range: heights from-to, inclusive (1000-5000), or one block (9): items holding a sat mined in those blocks. Up to the tip (400 past it or for a malformed or reversed range). Combines with the other filters.
datestringnoA mint day, YYYY-MM-DD (UTC), 2009 to this year: items holding a sat mined that day. Exclusive with md.
mdstringnoA month-day, MM-DD: items holding a sat mined that day of any year (with years, of those years). Birthday sats.
luckstringnoSat luck, a minimum (8: luck 8 or more) or an inclusive range (8-12), 0 to 254: items holding a sat of that luck. A sat's luck is its block's: the leading zero bits of the block hash less those of the block's target. Combines with the other filters (the matched sat passes them all). 503 for the few seconds after a first start while the luck of every block is read.
sortstringnounit, price or new. One of: unit, price, new. Default: unit.
orderstringnoasc or desc. Default: asc, except desc for sort=new. One of: asc, desc.
limitintegernoPage size, 1-200. Default: 50. (min 1, max 200)
offsetintegernoListings to skip, 0-100,000. Default: 0. (min 0, max 100000)

Example request #

cURL
curl 'https://raresats.net/api/listings/query?row=uncommon&years=2009&month=2017-12&blocks=1000-5000&luck=8'
JavaScript
const response = await fetch('https://raresats.net/api/listings/query?row=uncommon&years=2009&month=2017-12&blocks=1000-5000&luck=8');
const data = await response.json();
Python
import requests

data = requests.get("https://raresats.net/api/listings/query", params={"row": "uncommon", "years": "2009", "month": "2017-12", "blocks": "1000-5000", "luck": "8"}).json()

Response 200 #

FieldTypeDescription
rowstring | nullThe row asked for.
filterobjectThe filter as the server understood it.
filter.yearsarray of integerThe years asked for (ascending), [] for none.
filter.monthstring | nullThe month asked for (YYYY-MM), null for none.
filter.datestring | nullThe day asked for.
filter.mdstring | nullThe month-day asked for.
filter.blocksobject | nullThe blocks asked for: {from, to}, heights inclusive (one block: from = to), null for none.
filter.blocks.frominteger
filter.blocks.tointeger
filter.luckobject | nullThe luck asked for: {min, max} (max null for a minimum alone), null for none.
filter.luck.mininteger
filter.luck.maxinteger | null
filter.substring | nullThe sub-category asked for.
filter.subsbooleanWhether sub-category items are included (absent on events and counts).
filter.ledbooleanWhether sales led by another row are included (led=1; sales only).
totalintegerMatching active listings.
facetsobject | nullCounts for refining the filter; null with contains=only.
listingsarray of objectOne page, in the requested order.
listings[].idstringThe listing id: 16 lowercase hex characters.
listings[].outpointstringThe listed UTXO, txid:vout.
listings[].valueintegerThe UTXO's own value in sats (it moves to the buyer whole).
listings[].priceintegerThe listing price in sats: exactly what the seller receives. The buyer pays this plus the platform fee and the network fee.
listings[].unit_pricenumberPrice per sat of the listing's own row: (price - value) / count, to the hundredth of a sat. Floors and the unit sort use it.
listings[].rowstringThe listing's own row (collection): the rarest market row holding every tracked sat of the UTXO, else the rarest market row present. Never a label row.
listings[].countintegerHow many sats of row the UTXO holds (the "×N" of a bulk listing).
listings[].rowsmap of integerEvery row the UTXO's tracked sats count toward, with their counts (label rows included).
listings[].typesarray of TypeGroup | nullThe UTXO's sats grouped by exact type combination, rarest first.
listings[].satsinteger | nullTracked sats in the UTXO (all rows).
listings[].rangesarray of array of integer | nullThe tracked sats as inclusive [first, last] ranges, ascending.
listings[].yearsmap of integer | nullTracked sats per mint year (UTC year of the block that mined them).
listings[].seller_addressstringThe address that holds the UTXO and signed the listing.
listings[].payout_addressstringWhere the price is paid (the seller's payment output).
listings[].statusstringactive (for sale), pending (a purchase is in the mempool), sold, cancelled (or replaced by a newer listing of the same UTXO), moved (spent elsewhere).
listings[].created_atintegerUnix seconds.
listings[].updated_atintegerUnix seconds of the last status change.
listings[].txidstring | nullThe purchase transaction, while pending and once sold; otherwise null.
listings[].signature_publicbooleantrue once a broadcast purchase put the seller's signature on the network: the listing can then be bought at this price anywhere until the UTXO moves, even after a cancel here.
listings[].sold_viastring | nulloffer when the listing ended sold through an accepted offer of its UTXO: price and unit_price are then the offer's (what was paid), offer_id names it. null otherwise.
listings[].offer_idstring | nullThe accepted offer it was sold through (sold_via: "offer"), else null.
listings[].matchobject | nullThe sat that made the item pass a date or luck filter: its number, block, mint day (UTC) and luck. null without such a filter.
listings[].match.satintegerThe sat.
listings[].match.heightintegerThe block that mined it.
listings[].match.datestring | nullIts mint day, YYYY-MM-DD.
listings[].match.luckinteger | nullIts luck (its block's: the leading zero bits of the block hash less the target's); null while the luck table is being read.
listings[].best_offerBestOffer | nullThe best active offer on the UTXO, or null.
listings[].leadobject | nullThe listing's lead sat: the sat that matched a date or luck filter, else the first sat of its rarest combination of types; its number, block, mint day (UTC) and luck (the grid's Luck column). null when the listing names no sat.
listings[].lead.satintegerThe sat.
listings[].lead.heightintegerThe block that mined it.
listings[].lead.datestring | nullIts mint day, YYYY-MM-DD (UTC); null while the day table is being read.
listings[].lead.luckinteger | nullIts luck (its block's: the leading zero bits of the block hash less the target's); null while the luck table is being read.
listings[].utxoobject | nullThe block that created the listed UTXO and that block's day (UTC), as the marketplace's last check of its listings saw it. null before the first check after the listing, or while the UTXO is unconfirmed.
listings[].utxo.heightintegerThe block height.
listings[].utxo.datestring | nullIts day, YYYY-MM-DD (UTC); null while the day table is being read.
listings[].in_bundlebooleanOnly on a listing read for a row it holds some sats of among others (in bundle: contains=1's contains, or a row's activity): true. Its price is the whole UTXO's and its unit_price its own row's, never the row asked for.
listings[].contains_countinteger | nullWith in_bundle: how many sats of the row asked for it holds.
as_ofobject | nullWhen the marketplace last checked every live listing against the chain: the block height and unix seconds. null until the first check.
as_of.heightinteger | nullBlock height
as_of.checked_atintegerUnix seconds
msintegerServer time spent, ms.
containsarray of objectOnly with contains=1: the first limit listings passing the filter that hold some sats of the row among others (in bundle, each in_bundle: true, its lead its first sat of the row), by total price, the cheapest first. Never in listings, total or facets.
contains[].idstringThe listing id: 16 lowercase hex characters.
contains[].outpointstringThe listed UTXO, txid:vout.
contains[].valueintegerThe UTXO's own value in sats (it moves to the buyer whole).
contains[].priceintegerThe listing price in sats: exactly what the seller receives. The buyer pays this plus the platform fee and the network fee.
contains[].unit_pricenumberPrice per sat of the listing's own row: (price - value) / count, to the hundredth of a sat. Floors and the unit sort use it.
contains[].rowstringThe listing's own row (collection): the rarest market row holding every tracked sat of the UTXO, else the rarest market row present. Never a label row.
contains[].countintegerHow many sats of row the UTXO holds (the "×N" of a bulk listing).
contains[].rowsmap of integerEvery row the UTXO's tracked sats count toward, with their counts (label rows included).
contains[].typesarray of TypeGroup | nullThe UTXO's sats grouped by exact type combination, rarest first.
contains[].satsinteger | nullTracked sats in the UTXO (all rows).
contains[].rangesarray of array of integer | nullThe tracked sats as inclusive [first, last] ranges, ascending.
contains[].yearsmap of integer | nullTracked sats per mint year (UTC year of the block that mined them).
contains[].seller_addressstringThe address that holds the UTXO and signed the listing.
contains[].payout_addressstringWhere the price is paid (the seller's payment output).
contains[].statusstringactive (for sale), pending (a purchase is in the mempool), sold, cancelled (or replaced by a newer listing of the same UTXO), moved (spent elsewhere).
contains[].created_atintegerUnix seconds.
contains[].updated_atintegerUnix seconds of the last status change.
contains[].txidstring | nullThe purchase transaction, while pending and once sold; otherwise null.
contains[].signature_publicbooleantrue once a broadcast purchase put the seller's signature on the network: the listing can then be bought at this price anywhere until the UTXO moves, even after a cancel here.
contains[].sold_viastring | nulloffer when the listing ended sold through an accepted offer of its UTXO: price and unit_price are then the offer's (what was paid), offer_id names it. null otherwise.
contains[].offer_idstring | nullThe accepted offer it was sold through (sold_via: "offer"), else null.
contains[].matchobject | nullThe sat that made the item pass a date or luck filter: its number, block, mint day (UTC) and luck. null without such a filter.
contains[].match.satintegerThe sat.
contains[].match.heightintegerThe block that mined it.
contains[].match.datestring | nullIts mint day, YYYY-MM-DD.
contains[].match.luckinteger | nullIts luck (its block's: the leading zero bits of the block hash less the target's); null while the luck table is being read.
contains[].best_offerBestOffer | nullThe best active offer on the UTXO, or null.
contains[].leadobject | nullThe listing's lead sat: the sat that matched a date or luck filter, else the first sat of its rarest combination of types; its number, block, mint day (UTC) and luck (the grid's Luck column). null when the listing names no sat.
contains[].lead.satintegerThe sat.
contains[].lead.heightintegerThe block that mined it.
contains[].lead.datestring | nullIts mint day, YYYY-MM-DD (UTC); null while the day table is being read.
contains[].lead.luckinteger | nullIts luck (its block's: the leading zero bits of the block hash less the target's); null while the luck table is being read.
contains[].utxoobject | nullThe block that created the listed UTXO and that block's day (UTC), as the marketplace's last check of its listings saw it. null before the first check after the listing, or while the UTXO is unconfirmed.
contains[].utxo.heightintegerThe block height.
contains[].utxo.datestring | nullIts day, YYYY-MM-DD (UTC); null while the day table is being read.
contains[].in_bundlebooleanOnly on a listing read for a row it holds some sats of among others (in bundle: contains=1's contains, or a row's activity): true. Its price is the whole UTXO's and its unit_price its own row's, never the row asked for.
contains[].contains_countinteger | nullWith in_bundle: how many sats of the row asked for it holds.
contains_totalintegerOnly with contains=1: how many such listings pass (all pages; contains=only pages them).

Errors #

{error} (a message, no code):

StatusWhen
400A malformed parameter (e.g. a date that is no date, date with md).
404An unknown row or sub, or the marketplace is off (enabled: false). A retired row (uncommon_2009, rare_2009) answers 404 too, its retired field naming the row and years to ask for instead.
503Mint dates or sat luck are still being read (retry: true): try again in a few seconds. Without retry: this server has no sat luck for its chain.

Activity #

GET/api/listings/events

The marketplace's listed, cancelled and sold events of listings that pass the filter, newest first (the newest 2,000 events searched). Not cached. 404 while the marketplace is off.

Query parameters #

ParameterTypeRequiredDescription
rowstringnoOnly this row (collection). None: every row. Events of every listing under the row, any kind (marked sub or in_bundle when its own row is another).
substringnoA rarer sub-category of row (e.g. pizza_uncommon under uncommon): only items holding sats of it. Implies subs=1.
yearsstringnoMint years, comma-separated (2009,2010; up to 40): items holding a sat mined in one of them. Each must be a year sats were mined in, 2009 to this one (400 otherwise); repeats and order do not matter. year is accepted too.
monthstringnoA mint month, YYYY-MM (UTC, by each block's own time): items holding a sat mined that month. Combines with the other filters.
blocksstringnoA block range: heights from-to, inclusive (1000-5000), or one block (9): items holding a sat mined in those blocks. Up to the tip (400 past it or for a malformed or reversed range). Combines with the other filters.
datestringnoA mint day, YYYY-MM-DD (UTC), 2009 to this year: items holding a sat mined that day. Exclusive with md.
mdstringnoA month-day, MM-DD: items holding a sat mined that day of any year (with years, of those years). Birthday sats.
luckstringnoSat luck, a minimum (8: luck 8 or more) or an inclusive range (8-12), 0 to 254: items holding a sat of that luck. A sat's luck is its block's: the leading zero bits of the block hash less those of the block's target. Combines with the other filters (the matched sat passes them all). 503 for the few seconds after a first start while the luck of every block is read.
limitintegernoEvents, 1-200. Default: 60. (min 1, max 200)

Example request #

cURL
curl 'https://raresats.net/api/listings/events?row=uncommon&years=2009&month=2017-12&blocks=1000-5000&luck=8&limit=5'
JavaScript
const response = await fetch('https://raresats.net/api/listings/events?row=uncommon&years=2009&month=2017-12&blocks=1000-5000&luck=8&limit=5');
const data = await response.json();
Python
import requests

data = requests.get("https://raresats.net/api/listings/events", params={"row": "uncommon", "years": "2009", "month": "2017-12", "blocks": "1000-5000", "luck": "8", "limit": 5}).json()

Response 200 #

FieldTypeDescription
rowstring | nullThe row asked for.
filterobjectThe filter as the server understood it.
filter.yearsarray of integerThe years asked for (ascending), [] for none.
filter.monthstring | nullThe month asked for (YYYY-MM), null for none.
filter.datestring | nullThe day asked for.
filter.mdstring | nullThe month-day asked for.
filter.blocksobject | nullThe blocks asked for: {from, to}, heights inclusive (one block: from = to), null for none.
filter.blocks.frominteger
filter.blocks.tointeger
filter.luckobject | nullThe luck asked for: {min, max} (max null for a minimum alone), null for none.
filter.luck.mininteger
filter.luck.maxinteger | null
filter.substring | nullThe sub-category asked for.
filter.subsbooleanWhether sub-category items are included (absent on events and counts).
filter.ledbooleanWhether sales led by another row are included (led=1; sales only).
eventsarray of objectNewest first.
events[].seqintegerEvent sequence number (rising).
events[].typestringWhat happened. One of: listed, cancelled, sold.
events[].listing_idstringThe listing.
events[].outpointstringThe listed UTXO.
events[].rowstringThe listing's own row.
events[].countintegerSats of that row.
events[].priceintegerThe listing price in sats.
events[].unit_pricenumberThe listing's unit price.
events[].seller_addressstringThe seller (same as seller).
events[].txidstring | nullThe purchase transaction of a sold event; null otherwise.
events[].timeintegerUnix seconds.
events[].sellerstring | nullThe seller's address.
events[].buyerstring | nullA sale's buyer: the address the sats went to. null for other events, or when unknown.
events[].affiliatestring | nullA sale bought here with an applied referral: the affiliate it paid. null otherwise.
events[].satintegerThe sat that matched (absent without one).
events[].matchobject | nullThe sat that made the item pass a date or luck filter: its number, block, mint day (UTC) and luck. null without such a filter.
events[].match.satintegerThe sat.
events[].match.heightintegerThe block that mined it.
events[].match.datestring | nullIts mint day, YYYY-MM-DD.
events[].match.luckinteger | nullIts luck (its block's: the leading zero bits of the block hash less the target's); null while the luck table is being read.
events[].offer_idstring | nullThe offer, on an offer event; null otherwise.
events[].bidderstring | nullThe bidder's payment address, on an offer event; null otherwise.
events[].subbooleanOnly on an event read for a row (row=) that is not its own row but holds every tracked sat of the item (a sub-category or a label row): true.
events[].in_bundlebooleanOnly on an event read for a row (row=) whose listing or offer holds some sats of that row among others (in bundle, e.g. a Block 9 chunk under block9_palindrome): true. Its price and unit price are those of its own row.
events[].contains_countinteger | nullWith in_bundle: how many sats of the row asked for the item holds.

Errors #

{error} (a message, no code):

StatusWhen
400A malformed parameter (e.g. a date that is no date, date with md).
404An unknown row or sub, or the marketplace is off (enabled: false). A retired row (uncommon_2009, rare_2009) answers 404 too, its retired field naming the row and years to ask for instead.
503Mint dates or sat luck are still being read (retry: true): try again in a few seconds. Without retry: this server has no sat luck for its chain.