raresats.net API
Listings API View as Markdown

Get settings

GET/api/market/config

The marketplace's live settings: fee, fee address, marker, limits, and whether it is ready to trade. Read it before trading; the purchase is checked against the settings it was prepared with.

Example request #

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

data = requests.get("https://raresats.net/api/market/config").json()

Response 200 #

When the marketplace is on

FieldTypeDescription
enabledtrueThe marketplace is on.
networkstringThe one network it trades on (mainnet in production).
fee_bpsintegerBuyer fee in basis points of the summed prices (250 = 2.5%).
min_feeintegerThe platform fee's floor in sats (546).
fee_addressstringThe address of the platform fee output.
op_returnstringThe OP_RETURN marker payload every purchase carries (raresats.net).
max_bulkintegerMost listings one purchase may buy (20).
padding_valueintegerValue of each padding output in sats (600).
max_listing_itemsintegerMost UTXOs one listing PSBT may list (50).
cancel_prefixstringThe start of a cancel message: raresats.net cancel.
affiliate_share_bpsintegerA referring affiliate's part of the platform fee, in basis points (5000 = half).
affiliate_prefixstringThe start of an affiliate's registration message: raresats.net affiliate <address> <unix seconds>.
affiliate_cookie_secondsintegerHow long a referral link counts: the rs_ref cookie's lifetime (86400 = 24 hours).
offer_cancel_prefixstringThe start of an offer's cancel message: raresats.net cancel-offer.
offer_expiriesarray of integerThe offer lifetimes a bidder may choose, in seconds (1, 3, 7 and 30 days); an offer may also have none.
offer_default_expiryintegerAn offer's lifetime when expires_in is absent, in seconds (7 days).
toolsobjectThe wallet tools (Extract rare sats).
tools.fee_satsintegerThe flat tools fee per transfer, in sats (0 = none).
tools.max_itemsintegerMost UTXOs one transfer moves (50).
tools.max_outputsintegerMost outputs of one transfer (100).
tools.max_sendsintegerMost recipients of a multisend (50).
tools.kindsarray of stringThe kinds prepare takes.
tools.padobjectSats per extracted output: default (330), legacy (546, P2SH and P2PKH destinations).
tools.pad.defaultinteger
tools.pad.legacyinteger
readybooleanWhether bitcoind, the rare-sat index and the ord indexer all follow network right now. While false, trading answers 503 market_unavailable.

When it is off

FieldTypeDescription
enabledfalseThe marketplace is off.
Response
{
  "enabled": true,
  "network": "mainnet",
  "fee_bps": 250,
  "min_fee": 546,
  "fee_address": "bc1qycdj49gt04zvc07xyzzgsvgglc7qyhz8r3sfs6",
  "op_return": "raresats.net",
  "max_bulk": 20,
  "padding_value": 600,
  "max_listing_items": 50,
  "cancel_prefix": "raresats.net cancel",
  "affiliate_share_bps": 5000,
  "affiliate_prefix": "raresats.net affiliate",
  "affiliate_cookie_seconds": 86400,
  "offer_cancel_prefix": "raresats.net cancel-offer",
  "offer_expiries": [86400, 259200, 604800, 2592000],
  "offer_default_expiry": 604800,
  "tools": {
    "fee_sats": 1000,
    "max_items": 50,
    "max_outputs": 100,
    "max_sends": 50,
    "kinds": [
      "extract",
      "send",
      "send_n",
      "chop",
      "consolidate",
      "multisend",
      "speedup",
      "cancel"
    ],
    "pad": {"default": 330, "legacy": 546}
  },
  "ready": true
}

Errors #

None of its own (only transport errors such as 404 no_endpoint or 429 at the edge).

  • When the marketplace is off the answer is {"enabled": false} and no other /api/market/* route is served (404, or 405 for a POST).
  • ready: false means the marketplace is closed for now (its backends are unreachable or disagree on the network): reads work, trades answer 503 market_unavailable.
  • A purchase is finalized only under the settings it was prepared with: if fee_bps, min_fee, fee_address, op_return or padding_value change in between, submit answers 409 config_changed and you prepare again.
  • affiliate_share_bps and affiliate_cookie_seconds are the affiliate programme's terms (affiliate_share_bps is part of submit's config_changed check too); affiliate_prefix starts the optional affiliate registration message.