Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API endpoint with all offers #569

Open
orangefren opened this issue Aug 19, 2024 · 2 comments
Open

Add API endpoint with all offers #569

orangefren opened this issue Aug 19, 2024 · 2 comments

Comments

@orangefren
Copy link

Is your feature request related to a problem? Please describe.
We'd like to integrate offers from lnp2pBot into our service - OrangeFren.com, but without an API there's no elegant way of doing this

Describe the solution you'd like
An API endpoint that returns a JSON with an array of all the offers. Each offer being an object of some sort within the array.

Describe alternatives you've considered
N/A

Additional context
N/A

@grunch
Copy link
Member

grunch commented Sep 2, 2024

We have an api but this API is not showing order details but totals, here an example of successful orders in august 2024:

https://api.lnp2pbot.com/orders_stats?status=SUCCESS&date_from=2024-08-01&date_to=2024-08-31

More info here:

https://github.com/lnp2pBot/rust-api

But we are publishing all new orders on nostr, you get this data of some nostr relays:

wss://relay.mostro.network
wss://nos.lol
wss://relay.damus.io
wss://nostr-pub.wellorder.net
wss://relay.nostr.band

Here an example how to get all orders on a linux terminal, you need to have installed nostreq and nostcat:

nostreq --kinds 38383 --limit 5 | nostcat --stream wss://relay.mostro.network | jq

You can use nostr libraries on any language

And finally here you have more info about that nostr event

https://mostro.network/messages/order-event.html

@orangefren
Copy link
Author

We have an api but this API is not showing order details but totals, here an example of successful orders in august 2024:

https://api.lnp2pbot.com/orders_stats?status=SUCCESS&date_from=2024-08-01&date_to=2024-08-31

More info here:

https://github.com/lnp2pBot/rust-api

But we are publishing all new orders on nostr, you get this data of some nostr relays:

wss://relay.mostro.network
wss://nos.lol
wss://relay.damus.io
wss://nostr-pub.wellorder.net
wss://relay.nostr.band

Here an example how to get all orders on a linux terminal, you need to have installed nostreq and nostcat:

nostreq --kinds 38383 --limit 5 | nostcat --stream wss://relay.mostro.network | jq

You can use nostr libraries on any language

And finally here you have more info about that nostr event

https://mostro.network/messages/order-event.html

Are the events on nostr only of orders that already found a counter-party? I'm interested only in ones that have yet to find one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants