Blockchair / Blockchair.Support

Public repository for issues and feature requests. Submit your favorite bug!
444 stars 321 forks source link

[API] Chain block transactions limited to 1000? #189

Open Vimiso opened 5 years ago

Vimiso commented 5 years ago

Take the given API call:

https://api.blockchair.com/bitcoin-cash/dashboards/blocks/000000000000000001718b994a20bdd3abdacd8ff8f2257c7a2056f23ef94290

The transaction count: transaction_count": 1510 - yet the query only returns 1000 transactions in the transactions array.

Is there a way to get all of them? Thanks!

Har01d commented 5 years ago

As of now, the only way to do that is to extract height from https://api.blockchair.com/bitcoin-cash/dashboards/blocks/000000000000000001718b994a20bdd3abdacd8ff8f2257c7a2056f23ef94290, and then query https://api.blockchair.com/bitcoin-cash/transactions?q=block_id(582363) for transaction hashes (use limit=100 and offset=N to iterate).

To have a more consistent API, we’ll add offset=N to the block dashboard call in one of the next updates to API (for example, it’s possible to iterate the transaction list in the dashboards/address/{:address} call this way)

Admivo commented 5 years ago

https://api.blockchair.com/bitcoin-cash/dashboards/blocks/000000000000000001718b994a20bdd3abdacd8ff8f2257c7a2056f23ef94290

Har01d commented 5 years ago

This feature is now available, please see the changelog for v.2.0.26: https://github.com/Blockchair/Blockchair.Support/blob/master/API.md

CC @Vimiso @Admivo

Vimiso commented 5 years ago

It works!

Example: https://api.blockchair.com/bitcoin-cash/dashboards/block/588027?limit=10000