Post
Topic
Board Development & Technical Discussion
Re: How Grab 100 Latest Bitcoin Trasactions | Confimmed or Not Confirmmed
by
bitmover
on 02/08/2021, 14:40:39 UTC
For example, blockchair API have a limit of 1440 requests per day for free

It's actually 1000 requests per day.

Well, it doesn't make much difference, but they stated it here:
Quote
https://blockchair.com/api/docs#link_M05
While we do allow to perform some amount of requests free of charge, generally our API is not free to use.

Here's our policy:

If you use our API occasionally for personal use or testing up to 1440 requests a day (1 request a minute in average) — a key is not required
Non-commercial and academic projects which require up to 1440 requests a day — a key is not required
Non-commercial and academic projects requiring more than 1440 requests a day should apply for a Premium API key, and are subject to a discount up to 50%
Non-commercial and academic projects requiring more than 1440 requests a day which are also Blockchair partners are subject to a discount up to 100%

1000 or 1440 is a really nice free limit for basically most kind of projects. This is exactly 1 request per minute for 24hours:

24x60=1440.

It has occurred to me that this can be accomplished using just https://api.blockchair.com/bitcoin/transactions?s=time(desc) which will give you a JSON result but it will limit you to 10 results at a time ( insert &offset=10 or 20 or 30 etc. into the query to get the next recent records).

Also, since there can be several hundred transactions in a block, none of them having a timestamp, it becomes ambiguous what the most recent 100 transactions are within a block.

For example, blockchair API have a limit of 1440 requests per day for free

It's actually 1000 requests per day.

It looks like all those API use this "standard" of 10 recent transactions. OP will have to make 10 requests and merge them together to get 100. He might need more than 1 request per minute to get more precision...