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

Asset prices #1658

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vitorpamplona
Copy link
Collaborator

@vitorpamplona vitorpamplona commented Dec 24, 2024

Simple NIP to make $BTCUSD-like prices available on Nostr.

Read here

@kehiy
Copy link
Contributor

kehiy commented Dec 24, 2024

1 btc = 1 btc.

but this is a very cool feature to be replaced in bots which are using kind 1 in public feeds. it helps to make them organized! ack.

@v0l
Copy link
Member

v0l commented Dec 24, 2024

For reference I've been publishing BitcoinAverage prices for about a year under kind 1009

It has tags like this:
["d", "BTCUSD", <ask>, <bid>, <low>, <high>]

nak req -k 1009 -l 1 --stream wss://relay.snort.social

@vitorpamplona
Copy link
Collaborator Author

@v0l what time range do you use for the low and high?

Are those from book orders or from final sales?

@frbitten
Copy link
Contributor

@v0l what time range do you use for the low and high?

Are those from book orders or from final sales?

It depends on the candle's configured time. I think the simplest thing to do is to use a 1-minute period, which is the smallest and can be calculated later on. The Exchange saves all transactions for 1 minute and generates the candle with the values mentioned above.
You also need to know the Exchange where the candle was generated, as it can vary from Exchange to Exchange.

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

Successfully merging this pull request may close these issues.

4 participants