raresats.net API
Market data View as Markdown

Market overview

GET/api/market

The homepage's market over a window: totals against the window before, rows by volume, the dearest and the latest sales (each with seller and buyer). Covers sales on every marketplace the index knows. Cacheable 30 s. pending lists the latest sales still in the mempool, in no total.

Query parameters #

ParameterTypeRequiredDescription
windowstringnoThe window. One of: 24h, 7d, 30d, 90d, 1y, all. Default: 30d.
inscribedstringno1 counts inscribed sales too. One of: 0, 1. Default: 0.
outliersstringno1 counts statistical outliers too. One of: 0, 1. Default: 0.

Example request #

cURL
curl 'https://raresats.net/api/market?window=30d'
JavaScript
const response = await fetch('https://raresats.net/api/market?window=30d');
const data = await response.json();
Python
import requests

data = requests.get("https://raresats.net/api/market", params={"window": "30d"}).json()

Response 200 #

FieldTypeDescription
availablebooleanWhether the sales index is available.
generationintegerSales generation (changes on a reorg).
seqintegerThe newest sale's sequence number.
as_ofobject | nullThe block the sales are as of: {height, time}.
windowstringThe window. One of: 24h, 7d, 30d, 90d, 1y, all.
inscribedbooleanInscribed sales counted.
outliersbooleanOutliers counted.
sinceinteger | nullWindow start, unix seconds (null for all).
untilinteger | nullWindow end, unix seconds.
totalsobjectThe window's totals.
totals.volumeintegerSats traded.
totals.salesintegerSales.
totals.satsintegerSats sold.
previousobject | nullThe window before's totals (null for all).
rowsarray of objectRows by volume, largest first.
rows[].rowstringRow id.
rows[].volumeintegerSats traded.
rows[].salesintegerSales.
rows[].satsintegerSats sold.
rows[].median_unitnumber | nullMedian unit price.
rows[].last_timeinteger | nullLast sale, unix seconds.
rows[].last_unitnumber | nullLast unit price.
rows[].last_priceinteger | nullLast price.
rows[].prev_volumeinteger | nullVolume in the window before.
rows[].prev_salesinteger | nullSales in the window before.
toparray of objectThe window's dearest sales (up to 24).
top[].seqintegerThe sale's sequence number (for /api/sales/parties and /api/sales/{seq}/tx).
top[].tintegerSale time, unix seconds.
top[].hintegerBlock height.
top[].rowstringThe sale's own row.
top[].unumber | nullUnit price: premium per sat of the row.
top[].cintegerSats of the row sold.
top[].pinteger | nullPrice in sats.
top[].nintegerTracked sats the sale sold.
top[].sinteger | nullThe first special sat sold.
top[].shinteger | nullThe block that mined it.
top[].sdinteger | nullThe day it was mined (UTC days since 1970).
top[].mstringMarketplace id (magisat, magic_eden, unknown, …).
top[].xstring | nullThe txid's first 8 and last 4 hex digits.
top[].insbooleanAn inscription was on a sold sat.
top[].outbooleanA statistical outlier.
top[].secondarymap of integerA sale's secondary rows: the market rows of the other sats it sold (not its own row, a row it is a sub-category of, or a label row), each with its sats, primary-first: {"black_omega": 1} for a black omega sold with an alpha uncommon; {} for none. A sale never counts in its secondary rows' markets (the primary-sat rule, in Concepts).
top[].sellerstring | nullThe seller's address.
top[].buyerstring | nullThe buyer's address.
latestarray of objectThe latest sales (up to 10).
latest[].seqintegerThe sale's sequence number (for /api/sales/parties and /api/sales/{seq}/tx).
latest[].tintegerSale time, unix seconds.
latest[].hintegerBlock height.
latest[].rowstringThe sale's own row.
latest[].unumber | nullUnit price: premium per sat of the row.
latest[].cintegerSats of the row sold.
latest[].pinteger | nullPrice in sats.
latest[].nintegerTracked sats the sale sold.
latest[].sinteger | nullThe first special sat sold.
latest[].shinteger | nullThe block that mined it.
latest[].sdinteger | nullThe day it was mined (UTC days since 1970).
latest[].mstringMarketplace id (magisat, magic_eden, unknown, …).
latest[].xstring | nullThe txid's first 8 and last 4 hex digits.
latest[].insbooleanAn inscription was on a sold sat.
latest[].outbooleanA statistical outlier.
latest[].secondarymap of integerA sale's secondary rows: the market rows of the other sats it sold (not its own row, a row it is a sub-category of, or a label row), each with its sats, primary-first: {"black_omega": 1} for a black omega sold with an alpha uncommon; {} for none. A sale never counts in its secondary rows' markets (the primary-sat rule, in Concepts).
latest[].sellerstring | nullThe seller's address.
latest[].buyerstring | nullThe buyer's address.
errorstring | nullThe sales index's last error, if any.
pendingarray of objectThe latest sales still in the mempool (at most 10), newest first: beside latest, in no total, row or top.
pending[].seqnullNo sequence number until it confirms.
pending[].tinteger | nullfirst_seen: sorted by time, it leads the confirmed sales.
pending[].hnullNo block yet.
pending[].rowstringThe sale's own row.
pending[].unumber | nullUnit price: premium per sat of the row.
pending[].cintegerSats of the row sold.
pending[].pinteger | nullPrice in sats.
pending[].nintegerTracked sats the sale sold.
pending[].sinteger | nullThe first special sat sold.
pending[].shinteger | nullThe block that mined it.
pending[].sdinteger | nullThe day it was mined (UTC days since 1970).
pending[].mstringMarketplace id (magisat, magic_eden, unknown, …).
pending[].xstring | nullThe txid's first 8 and last 4 hex digits.
pending[].insbooleanAn inscription was on a sold sat.
pending[].outbooleanAlways false: a pending sale is judged by no median.
pending[].secondarymap of integerA sale's secondary rows: the market rows of the other sats it sold (not its own row, a row it is a sub-category of, or a label row), each with its sats, primary-first: {"black_omega": 1} for a black omega sold with an alpha uncommon; {} for none. A sale never counts in its secondary rows' markets (the primary-sat rule, in Concepts).
pending[].sellerstring | nullThe seller's address.
pending[].buyerstring | nullThe buyer's address.
pending[].keystringtxid:vin: its identity. The confirmed sale has the same txid and vin and replaces it.
pending[].pendingtrueAlways true: the sale is still in the mempool.
pending[].first_seeninteger | nullWhen the transaction was first seen in the mempool (bitcoind's entry time), unix seconds.
pending[].fee_ratenumber | nullIts fee rate, sat/vB (one decimal).
pending[].txidstringThe sale transaction, whole.
pending[].vininteger | nullThe seller's input.
pending[].seller_outpointstring | nullThe output it sells.
pending[].buyer_outpointstring | nullThe output the sold sats go to.
pending[].rowsarray of stringIts own row, then the rows of which it is a rarer sub-category.
pending[].led_rowsarray of stringThe rows of its other sats (it is led by row there).
pending[].labelsarray of stringThe label rows it lies in.
pending[].kindstring | nullThe fork's sale kind (listing, offer, …).

Errors #

{error} (a message, no code):

StatusWhen
400An unknown window, or a flag that is not 0 or 1.

Each sale counts once, as its own row, so the rows add up to the totals: a bundle counts under its primary row only, and names the rest of what it sold in secondary ({"black_omega": 1}). Inscribed sales and statistical outliers are left out unless asked for. previous and the rows' prev_* fields compare with the window before.

pending lists the latest sales still in the mempool (at most 10, newest first, marked pending: true with first_seen and fee_rate). They count in no total, row, top list or latest until they confirm.