trezor / blockbook

:blue_book: Trezor address/account balance backend
https://trezor.io
GNU Affero General Public License v3.0
640 stars 635 forks source link

Added /blocks and /block-height API method #1110

Open cpuchainorg opened 2 weeks ago

cpuchainorg commented 2 weeks ago

Closes #1094

Useful to draw statistics from blockbook endpoint without requiring any additional databases or backends.

Also this PR allows to parse queryString for /block method to reduce amount of transactions that could be returned ( which saves CPU resources and additional time to load resource )

Example for the new API:

https://blockbook.cpuchain.org/api/v2/blocks https://blockbook.cpuchain.org/api/v2/block-height