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

API endpoint with latest block hash #1093

Open
cpuchainorg opened this issue May 23, 2024 · 2 comments
Open

API endpoint with latest block hash #1093

cpuchainorg opened this issue May 23, 2024 · 2 comments

Comments

@cpuchainorg
Copy link

Would be great if we have an additional API endpoint that would return recent block hashes only ( about 100 or 1000 would be good ).

This should be useful for http endpoints to detect reorgs without using websockets

@cpuchainorg cpuchainorg changed the title API endpoint with latest block hashes API endpoint with latest block hashe Jul 6, 2024
@cpuchainorg cpuchainorg changed the title API endpoint with latest block hashe API endpoint with latest block hash Jul 6, 2024
@cryptosystems6300
Copy link

You dont need blockbook for this. Just ask the node directly: https://developer.bitcoin.org/reference/rpc/getbestblockhash.html

e.g.

curl --location '<nod url>'  --header 'Content-Type: application/json' --data '{
    "jsonrpc": "2.0",
    "id": "somedummyid",
    "method": "getbestblockhash",
    "params": []
}'

@cpuchainorg
Copy link
Author

@cryptosystems6300 You can search on their github why you shouldn't expose your bitcoin rpc to public... they aren't redundant to serve data in public...

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