raresats.net API
Wallet tools API View as Markdown

Get a wallet transfer

GET/api/market/transfers/{txid}

One transfer built with the wallet tools, by its transaction id, whatever its status, with both owner addresses and whether it can be sped up or cancelled.

Path parameters #

ParameterTypeRequiredDescription
txidstringyesThe transfer's transaction id.

Example request #

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

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

Response 200 #

FieldTypeDescription
idstringThe prepared transfer's id.
txidstringIts transaction id (what /tx/{txid} shows).
kindstringOne of: extract, send, send_n, chop, consolidate, multisend, speedup, cancel.
statusstringpending in the mempool; confirmed in a block; replaced by a speed-up or cancel built here (replaced_by); conflicted: a block spent its inputs and it was provably not mined (its own outputs never appeared within six blocks); dropped: in no mempool and its inputs unspent (it may still resurface until voided); unknown: the broadcast's outcome is not known yet; rejected: bitcoind refused it, so it was never sent and cannot resurface.
created_atintegerUnix seconds.
updated_atintegerUnix seconds.
ownerobjectThe owner's addresses (one transfer's read).
owner.payment_addressstringPaid the fees.
owner.ordinals_addressstringThe ordinals address.
owner_rolestringThe queried address's part in it (a list read). One of: payment, ordinals, both.
destinationstring | nullWhere the moved sats went (null for a multisend).
fee_ratenumbersat/vB.
network_feeintegerSats.
tools_feeintegerThe flat raresats.net fee it paid, in sats.
vsizeintegerIts size in vbytes.
replacesstring | nullThe transfer it replaced (speed-up, cancel).
replaced_bystring | nullThe transaction that replaced it.
block_heightinteger | nullThe block it confirmed in.
outputsarray of objectIts outputs.
outputs[].indexintegervout.
outputs[].addressstring | nullWho it pays.
outputs[].valueintegerSats.
outputs[].rolestringdest, return, plain_return, tools_fee or change.
actionsobjectWhat its owner can do now.
actions.speedupbooleanIt is pending: a speed-up can replace it.
actions.cancelbooleanIt could still confirm (pending, unknown, dropped) and its chain of replacements pays someone else: a cancel (or a void) sends its sources back. It never hides a cancel the prepare would allow; the prepare decides with the mempool (409 nothing_to_cancel).
Response
{
  "id": "6baec47455bf8df8",
  "txid": "a1edadb9e3b45097d272621ea8adcbee697281bd4d611462db134292d4e1cf9c",
  "kind": "extract",
  "status": "pending",
  "created_at": 1791428236,
  "updated_at": 1791428236,
  "owner": {
    "payment_address": "37VucYSaXLCAsxYyAPfbSi9eh4iEcbShgf",
    "ordinals_address": "bc1p5cyxnuxmeuwuvkwfem96lqzszd02n6xdcjrs20cac6yqjjwudpxqkedrcr"
  },
  "destination": "bc1p5cyxnuxmeuwuvkwfem96lqzszd02n6xdcjrs20cac6yqjjwudpxqkedrcr",
  "fee_rate": 3,
  "network_fee": 1059,
  "tools_fee": 1000,
  "vsize": 352,
  "replaces": null,
  "replaced_by": null,
  "block_height": null,
  "outputs": [
    {
      "index": 0,
      "address": "bc1p5cyxnuxmeuwuvkwfem96lqzszd02n6xdcjrs20cac6yqjjwudpxqkedrcr",
      "value": 388,
      "role": "return"
    },
    {
      "index": 1,
      "address": "bc1p5cyxnuxmeuwuvkwfem96lqzszd02n6xdcjrs20cac6yqjjwudpxqkedrcr",
      "value": 330,
      "role": "dest"
    },
    {
      "index": 2,
      "address": "37VucYSaXLCAsxYyAPfbSi9eh4iEcbShgf",
      "value": 9282,
      "role": "plain_return"
    },
    {
      "index": 3,
      "address": "bc1p4hefchfnn06cn2xmk6fq6xcw5ew260q2dptc4c35fcazgedmzlcqkxf057",
      "value": 1000,
      "role": "tools_fee"
    },
    {
      "index": 4,
      "address": "37VucYSaXLCAsxYyAPfbSi9eh4iEcbShgf",
      "value": 22941,
      "role": "change"
    }
  ],
  "actions": {"speedup": true, "cancel": false}
}

Errors #

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

StatusCodeMeaning
404unknown_transferNo such transfer: an unknown or forgotten prepared id, or a txid the wallet tools did not build.
503market_unavailableThe marketplace is closed right now (its backends disagree on the network, or are unreachable).
Error (404)
{"error": "no such transfer", "code": "unknown_transfer"}

status follows the transaction: pending in the mempool, confirmed once mined (with block_height), replaced by a speed-up or cancel (replaced_by; followed until a block settles it: if the original itself is mined it turns confirmed and its replacement conflicted; block_height is the block that settled it), conflicted when a block spent its inputs and it was provably not mined (none of its own outputs appeared within six blocks; a transfer spent only in the mempool by someone else stays dropped, voidable), a transfer is confirmed on its own outputs' evidence even when the node's transaction index lags, a replaced transfer whose inputs nothing spends any more goes back to dropped (it could resurface), dropped when it left the mempool unmined (not final: it is checked again every 10 minutes, and turns pending, confirmed, replaced or conflicted if it resurfaces), unknown while a broadcast's outcome is not known, and rejected when bitcoind refused it (never sent: it cannot resurface, and nothing is left to do). actions.cancel never hides a cancel the prepare would allow: it is shown for a transfer that could still confirm (pending, unknown, dropped) whose replacement chain pays someone else, and the prepare decides with the mempool (Speed up or cancel). actions says whether speed up and cancel are offered.

To follow changes live, listen for the transfer event of Live events: it names the addresses whose transfers changed, then read this again.