raresats.net API
Listings API View as Markdown

Get fee rates

GET/api/market/fees

Network fee rates in sat/vB for a purchase: bitcoind's estimates for 6, 3 and 1 blocks, else mempool.space's; cached 30 seconds. minimum is the lowest fee_rate purchase/prepare accepts.

Example request #

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

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

Response 200 #

FieldTypeDescription
slownumberAbout 6 blocks, sat/vB.
normalnumberAbout 3 blocks, sat/vB.
fastnumberNext block, sat/vB.
minimumnumberThe lowest rate a purchase may use, sat/vB (never below 1).
sourcestringWhere the estimates came from. One of: bitcoind, mempool.space.
Response
{"slow": 2, "normal": 4, "fast": 8, "minimum": 1, "source": "bitcoind"}

Errors #

{error, code}; see Errors for every code.

StatusCodeMeaning
503fees_unavailableNo fee estimate is available.
Error (503)
{"error": "no fee estimate is available", "code": "fees_unavailable"}

Pass one of these (or any rate from minimum to 5000) as fee_rate to Prepare a purchase. A rate below minimum is refused with 422 fee_rate_too_low; minimum is never below 1 sat/vB, which some nodes require to relay.