# 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

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `txid` | string | yes | The transfer's transaction id. |

#### Example request

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

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

#### Response `200`

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | The prepared transfer's id. |
| `txid` | string | Its transaction id (what `/tx/{txid}` shows). |
| `kind` | string | One of: `extract`, `send`, `send_n`, `chop`, `consolidate`, `multisend`, `speedup`, `cancel`. |
| `status` | string | `pending` 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_at` | integer | Unix seconds. |
| `updated_at` | integer | Unix seconds. |
| `owner` | object | The owner's addresses (one transfer's read). |
| `owner.payment_address` | string | Paid the fees. |
| `owner.ordinals_address` | string | The ordinals address. |
| `owner_role` | string | The queried address's part in it (a list read). One of: `payment`, `ordinals`, `both`. |
| `destination` | string \| null | Where the moved sats went (`null` for a multisend). |
| `fee_rate` | number | sat/vB. |
| `network_fee` | integer | Sats. |
| `tools_fee` | integer | The flat raresats.net fee it paid, in sats. |
| `vsize` | integer | Its size in vbytes. |
| `replaces` | string \| null | The transfer it replaced (speed-up, cancel). |
| `replaced_by` | string \| null | The transaction that replaced it. |
| `block_height` | integer \| null | The block it confirmed in. |
| `outputs` | array of object | Its outputs. |
| `outputs[].index` | integer | vout. |
| `outputs[].address` | string \| null | Who it pays. |
| `outputs[].value` | integer | Sats. |
| `outputs[].role` | string | `dest`, `return`, `plain_return`, `tools_fee` or `change`. |
| `actions` | object | What its owner can do now. |
| `actions.speedup` | boolean | It is pending: a speed-up can replace it. |
| `actions.cancel` | boolean | It 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). |

```json title="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](https://raresats.net/docs/errors.md) for every code.

| Status | Code | Meaning |
| --- | --- | --- |
| 404 | `unknown_transfer` | No such transfer: an unknown or forgotten prepared id, or a txid the wallet tools did not build. |
| 503 | `market_unavailable` | The marketplace is closed right now (its backends disagree on the network, or are unreachable). |

```json title="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](https://raresats.net/docs/guide-speed-up.md)). `actions` says whether [speed up and cancel](https://raresats.net/docs/guide-speed-up.md) are offered.

To follow changes live, listen for the `transfer` event of [Live events](https://raresats.net/docs/live-events.md#transfer-events): it names the addresses whose transfers changed, then read this again.
