This document explains how to create new buy and sell orders using Mostro CLI.
Creating an order involves:
- Specifying order parameters (type, amount, currency, etc.)
- Building a Mostro message
- Sending it to the Mostro coordinator via Nostr
- Receiving confirmation
- Waiting for someone to take the order
User wants to sell Bitcoin for fiat currency.
mostro-cli neworder -k sell -c USD -f 100 -a 50000 -m "PayPal"User wants to buy Bitcoin with fiat currency.
mostro-cli neworder -k buy -c EUR -f 200 -m "Bank Transfer" -i lnbc...| Parameter | Flag | Description | Example |
|---|---|---|---|
| Kind | -k, --kind |
"buy" or "sell" | sell |
| Fiat Code | -c, --fiat-code |
Currency code | USD, EUR, ARS |
| Fiat Amount | -f, --fiat-amount |
Amount in fiat | 100 or 100-500 (range) |
| Payment Method | -m, --payment-method |
How to pay | "PayPal", "Bank Transfer" |
| Parameter | Flag | Description | Default |
|---|---|---|---|
| Amount | -a, --amount |
Bitcoin in sats | 0 (market price) |
| Premium | -p, --premium |
Price premium % | 0 |
| Invoice | -i, --invoice |
Lightning invoice (buy orders) | None |
| Expiration Days | -e, --expiration-days |
Days until expired | 0 |
mostro-cli neworder -k sell -c USD -f 100 -m "PayPal"mostro-cli neworder -k sell -c USD -f 100-500 -m "PayPal,Venmo"mostro-cli neworder -k buy -c USD -f 50 -i lnbc500u1p3.... -m "Cash App"For technical details on the code flow and message structures, see ORDER_FLOW_TECHNICAL.md.