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 'https://raresats.net/api/market/config'const response = await fetch('https://raresats.net/api/market/config');
const data = await response.json();import requests
data = requests.get("https://raresats.net/api/market/config").json()Response 200 #
When the marketplace is on
| Field | Type | Description |
|---|---|---|
enabled | true | The marketplace is on. |
network | string | The one network it trades on (mainnet in production). |
fee_bps | integer | Buyer fee in basis points of the summed prices (250 = 2.5%). |
min_fee | integer | The platform fee's floor in sats (546). |
fee_address | string | The address of the platform fee output. |
op_return | string | The OP_RETURN marker payload every purchase carries (raresats.net). |
max_bulk | integer | Most listings one purchase may buy (20). |
padding_value | integer | Value of each padding output in sats (600). |
max_listing_items | integer | Most UTXOs one listing PSBT may list (50). |
cancel_prefix | string | The start of a cancel message: raresats.net cancel. |
affiliate_share_bps | integer | A referring affiliate's part of the platform fee, in basis points (5000 = half). |
affiliate_prefix | string | The start of an affiliate's registration message: raresats.net affiliate <address> <unix seconds>. |
affiliate_cookie_seconds | integer | How long a referral link counts: the rs_ref cookie's lifetime (86400 = 24 hours). |
offer_cancel_prefix | string | The start of an offer's cancel message: raresats.net cancel-offer. |
offer_expiries | array of integer | The offer lifetimes a bidder may choose, in seconds (1, 3, 7 and 30 days); an offer may also have none. |
offer_default_expiry | integer | An offer's lifetime when expires_in is absent, in seconds (7 days). |
tools | object | The wallet tools (Extract rare sats). |
tools.fee_sats | integer | The flat tools fee per transfer, in sats (0 = none). |
tools.max_items | integer | Most UTXOs one transfer moves (50). |
tools.max_outputs | integer | Most outputs of one transfer (100). |
tools.max_sends | integer | Most recipients of a multisend (50). |
tools.kinds | array of string | The kinds prepare takes. |
tools.pad | object | Sats per extracted output: default (330), legacy (546, P2SH and P2PKH destinations). |
tools.pad.default | integer | |
tools.pad.legacy | integer | |
ready | boolean | Whether 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
| Field | Type | Description |
|---|---|---|
enabled | false | The marketplace is off. |
{
"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: falsemeans the marketplace is closed for now (its backends are unreachable or disagree on the network): reads work, trades answer 503market_unavailable.- A purchase is finalized only under the settings it was prepared with: if
fee_bps,min_fee,fee_address,op_returnorpadding_valuechange in between, submit answers 409config_changedand you prepare again.
affiliate_share_bpsandaffiliate_cookie_secondsare the affiliate programme's terms (affiliate_share_bpsis part of submit'sconfig_changedcheck too);affiliate_prefixstarts the optional affiliate registration message.