Skip to content

Commit 23d7501

Browse files
committed
Add order expiration support to NIP-69
1. Added expires_at tag to track when pending orders should expire 2. Added expired as a new order status 3. Clarified the distinction between expires_at (for order expiration) and expiration (for relay deletion per NIP-40)
1 parent ae4d7ed commit 23d7501

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/order_event.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ Events are [addressable events](https://github.com/nostr-protocol/nips/blob/mast
3535
["name", "Nakamoto"],
3636
["g", "<geohash>"],
3737
["bond", "0"],
38-
["expiration", "1719391096"],
38+
["expires_at", "1719391096"],
39+
["expiration", "1719995896"],
3940
["y", "lnp2pbot"],
4041
["z", "order"]
4142
],
@@ -49,7 +50,7 @@ Events are [addressable events](https://github.com/nostr-protocol/nips/blob/mast
4950
- `d` < Order ID >: A unique identifier for the order.
5051
- `k` < Order type >: `sell` or `buy`. This specifies the type of transaction in terms of bitcoin. "sell" means selling bitcoin, while "buy" indicates buying bitcoin.
5152
- `f` < Currency >: The fiat asset being traded, using the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) standard.
52-
- `s` < Status >: `pending`, `canceled`, `in-progress`, `success`.
53+
- `s` < Status >: `pending`, `canceled`, `in-progress`, `success`, `expired`.
5354
- `amt` < Amount >: The amount of Bitcoin to be traded, the amount is defined in satoshis, if `0` means that the amount of satoshis will be obtained from a public API after the taker accepts the order.
5455
- `fa` < Fiat amount >: The fiat amount being traded, for range orders two values are expected, the minimum and maximum amount.
5556
- `pm` < Payment method >: The payment method used for the trade, if the order has multiple payment methods, they should be separated by a comma.
@@ -61,7 +62,8 @@ Events are [addressable events](https://github.com/nostr-protocol/nips/blob/mast
6162
- `name` [Name]: The name of the maker.
6263
- `g` [Geohash]: The geohash of the operation, it can be useful in a face to face trade.
6364
- `bond` [Bond]: The bond amount, the bond is a security deposit that both parties must pay.
64-
- `expiration` < Expiration\>: The expiration date of the order ([NIP-40](https://github.com/nostr-protocol/nips/blob/master/40.md)).
65+
- `expires_at` < Expires At\>: The expiration date of the event being published in `pending` status, after this time the event status SHOULD be changed to `expired`.
66+
- `expiration` < Expiration\>: The expiration date of the event, after this time the relay SHOULD delete it ([NIP-40](40.md)).
6567
- `y` < Platform >: The platform that created the order.
6668
- `z` < Document >: `order`.
6769

@@ -74,6 +76,8 @@ Currently implemented on the following platforms:
7476
- [Mostro](https://github.com/MostroP2P/mostro)
7577
- [@lnp2pBot](https://github.com/lnp2pBot/bot)
7678
- [Robosats](https://github.com/RoboSats/robosats/pull/1362)
79+
- Peach
80+
- Hodlhodl
7781

7882
## This document is inspired on
7983

0 commit comments

Comments
 (0)