Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Selling as a maker

You publish a sell order: you give sats and receive fiat. The node holds your sats in a Lightning hold invoice until you release them.

How to observe a trade

Two read commands tell you where a trade is:

  • message list — what the node told you, with next_step when it asks for something. Poll it; deduplicate by event_id.
  • order info — the order’s current status, authoritative.

A robust program drives the trade from order info status and uses message list to pick up invoices to pay (payment_request payloads) and requests (next_step).

Steps

order new --side sell ──► pending ──(buyer takes)──► waiting-payment ──(you pay hold invoice)──►
waiting-buyer-invoice / active ──(buyer: fiat-sent)──► fiat-sent ──(you: release)──► settled-hold-invoice ──► success
  1. Create the order.

    mostro-cli --output json order new --side sell --currency EUR --fiat-amount 100 \
      --payment-method "SEPA" --premium 1 --yes
    

    data.next_step is wait_for_taker (on a bonded node, pay_bond_invoice first: pay data.payment_request). Keep data.order.id.

  2. Wait for a taker. Poll message list --order <id>. When a buyer takes the order the node sends a message with next_step: pay_hold_invoice and a payment_request payload:

    {"action": "pay-invoice", "next_step": "pay_hold_invoice",
     "payload": {"kind": "payment_request", "invoice": "lnbc...", "amount": "100000", "order": {...}}}
    
  3. Lock the sats by paying payload.invoice with your Lightning wallet. The payment stays pending (held); it is not lost if the trade is canceled.

  4. Wait for the fiat. The buyer provides an invoice (if needed) and pays you in fiat through the payment method. When they report it, the order status becomes fiat-sent and you receive a fiat-sent-ok message (payload peer).

  5. Check your bank account. fiat-sent is the buyer’s claim, not a proof. Only when the money is really there:

    mostro-cli --output json order release --order <id> --yes
    

    data.result is released. This is irreversible.

  6. Rate the buyer (human-only today: mostro-cli rate).

If something goes wrong

SituationWhat to do
Nobody takes the orderorder cancel --order <id> --yes → canceled
The buyer does not payCancel cooperatively or open a dispute (human-only today)
release returned uncertainorder info --order <id>; see Recovering
It was a range orderAfter release, next_step: sync_child_order: see Range orders