Author

Topic: How Grab 100 Latest Bitcoin Trasactions | Confimmed or Not Confirmmed (Read 182 times)

legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
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...

It's not like the paid API is unavailable, an API key to get a few thousand unlimited calls is dirt cheap (we're talking like $10), the only problem with it is that their payment processor only takes Paypal which excludes pretty much everyone who doesn't have it.
legendary
Activity: 2212
Merit: 5622
Non-custodial BTC Wallet
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:
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...
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
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.
legendary
Activity: 2212
Merit: 5622
Non-custodial BTC Wallet
I believe most of cryptocurrency projects survive on donations. Unless OP is going to make a commercial project which has a good potential, he can just use free API...
What cryptocurrency projects are you talking about that survive from donations? What projects earns more than $20-30 per month from the donators despite masterpieces like Electrum?
I didn't expressed myself well.

I  was talking about small projects like mine, LoyceV's, bitcoiner, mempool.observer, (maybe even mempool.space?) and among many others that you find out there that doesn't display any traffic ads in their websites...
I think this is OP's situation, as he is still learning to use API.

Ofc there are many big projects which makes a lot of money in the ecosystem. Those should really use a cloud server/full node and everything.

You can use other good free api as well. Personally, I have used in my website mempool.space, sochain, blockchair.com, and others over the last year. Recently, I have been using only mempool.space, bitcoiner.live and Coindesk API and never had any problems. I have about 45k visitors per month, which is more than 1500 requests per day on those API (as sometimes I make about 1 request per minute or 30secs depending on the page).
Thanks for the recommendations. I'm thinking to start a website that will need API, but I generally love doing things back endly (like setting up my own node etc). For testing, these sites are your best choice, though. As for the 45k visitors per month, is it the bitcoindata.science? Quite nice site, it totally deserves it.

Thank you.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
I believe most of cryptocurrency projects survive on donations. Unless OP is going to make a commercial project which has a good potential, he can just use free API...
What cryptocurrency projects are you talking about that survive from donations? What project earns more than $20-30 per month from the donators despite masterpieces like Electrum?

You can use other good free api as well. Personally, I have used in my website mempool.space, sochain, blockchair.com, and others over the last year. Recently, I have been using only mempool.space, bitcoiner.live and Coindesk API and never had any problems. I have about 45k visitors per month, which is more than 1500 requests per day on those API (as sometimes I make about 1 request per minute or 30secs depending on the page).
Thanks for the recommendations. I'm thinking to start a website that will need API, but I generally love doing things back endly (like setting up my own node etc). For testing, these sites are your best choice, though. As for the 45k visitors per month, is it the bitcoindata.science? Quite nice site, it totally deserves it.
legendary
Activity: 2212
Merit: 5622
Non-custodial BTC Wallet
But, why using a free service if you're planning to work on a project? Why having to be dependent from quick and rough solutions such as blockchain.com's API? By setting up a node it'll come cheaper than you may think. Then you could install a script like mempool.space's and enjoy the development with no third parties needed to trust. (The open-source project “mempool” comes with its API, if I'm not mistaken)

It depends on your budget. Ofc it is much better for privacy, trust, etc to run your own full node in a cloud server and create your own API. But this requires a deeper knowledge (to set up the backend and the server) and budget.

Using free API is free. If you are doing all that, I think you may spend about 20-30 USD per month at least.

I believe most of cryptocurrency projects survive on donations. Unless OP is going to make a commercial project which has a good potential, he can just use free API...


For example, blockchair API have a limit of 1440 requests per day for free
Blockchair was free all that time? I thought you could only use if you paid. (which also comes with the premium features)

As far as I know, they always had a free version.
You can use other good free api as well. Personally, I have used in my website mempool.space, sochain, blockchair.com, and others over the last year. Recently, I have been using only mempool.space, bitcoiner.live and Coindesk API and never had any problems. I have about 45k visitors per month, which is more than 1500 requests per day on those API (as sometimes I make about 1 request per minute or 30secs depending on the page).
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
I have been making a few tests recently in a new project, and even in my old portal i have never faced ban issues in free api.
But, why using a free service if you're planning to work on a project? Why having to be dependent from quick and rough solutions such as blockchain.com's API? By setting up a node it'll come cheaper than you may think. Then you could install a script like mempool.space's and enjoy the development with no third parties needed to trust. (The open-source project “mempool” comes with its API, if I'm not mistaken)

For example, blockchair API have a limit of 1440 requests per day for free
Blockchair was free all that time? I thought you could only use if you paid. (which also comes with the premium features)
legendary
Activity: 2212
Merit: 5622
Non-custodial BTC Wallet
So which api or url can i use without ban issue?
Hmm, to be honest, any free service won't assist you after a while. You should consider temporary anything that is free. Would you find it better if you ran your own node just for the mempool?

I have been making a few tests recently in a new project, and even in my old portal i have never faced ban issues in free api.

Most of those exchanges and blockexplorers API have very big limits, such as more than 1 per minute.

He has facing issues because he was basically attacking websites, refreshing webpages that were not created for that purpose. Using free API is totally fine based in my experience.

For example, blockchair API have a limit of 1440 requests per day for free:
https://blockchair.com/api/docs#link_M05
jr. member
Activity: 47
Merit: 11
You can make 1 request per minute and stack all those 10 results. When you merge all of them you will have the lastest 100 transactions.
bitmover. Thanks a million. You saved me totally on this.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
Take it easy.

Firs of all i need 100 latest TXs
That's a falsely formulation. There's no such thing as the “latest transactions”; at least not the way you probably mean it. Each node receives some transactions and keeps it in its mempool. The node doesn't know which one came first in terms of our time zone, anyone can sign a transaction with fake human time zone. The timestamp server essentially works with blocks. The transactions in the memory pool are the ones that happened now. The transactions with one confirmation are 1 block ago, with two confirmations two blocks ago and it goes on.

Thus, each API will return you different transactions, because each node keeps its own version of the mempool and surely the transactions aren't in the same order as every other node. You can't know the latest transactions that were broadcasted for sure.

So which api or url can i use without ban issue?
Hmm, to be honest, any free service won't assist you after a while. You should consider temporary anything that is free. Would you find it better if you ran your own node just for the mempool?
legendary
Activity: 2212
Merit: 5622
Non-custodial BTC Wallet
I am looking for a free api to grab 100 latest bitcoin trasactions in the blockchain network | Confimmed or Not Confirmmed!   

I think this makes no sense.

What is "latest" transaction?

Once it is confirmed, all transactions in the block were confirmed together, and there are much more than 100 transactions in a block.

So, you have to decide: 100 last unconfirmed transactions or 100 transactions from last block.

If you go here (https://blockstream.info/tx/recent) you will see latest unconfirmed transactions.
This is the blockstream.info API:
https://blockstream.info/api/mempool/recent
Code:
[{"txid":"fb12d5232caa25f4f7095da9081769a01abea16205b58a2b8690cefef572ed8e","fee":135,"vsize":133,"value":250000},
{"txid":"6173f6db9ac33b2cfd0e35f9a2dd31c9ac1dbd5c29478faa3a9e7f11431eb07a","fee":730,"vsize":141,"value":4406611},
{"txid":"3366118803610c704e914a412f34a0efb4b8af9a40d2cd8edad4d07079394746","fee":3075,"vsize":204,"value":5393179},
{"txid":"5cca0efff9874d015da6e1730b87a43ec3afa12129003c8d02b04a82838c6fba","fee":1283,"vsize":255,"value":1606971},
{"txid":"63bd3377185bb6190833359c8a5f1d73e00987bec21b9872862638b9fe978cc6","fee":3500,"vsize":318,"value":83757352},
{"txid":"80c36123503583815d541ccdbc26887f2efca3930a162ec564d64c01bd4d2a2f","fee":774,"vsize":165,"value":151578},
{"txid":"b423302588f53567dabfe2a212fe3a8a095bdaa6f3e88187ccd6c109e4ff1fa6","fee":420,"vsize":143,"value":250600},
{"txid":"60b8d475e2f589b732383a7eb62d8bbf26738c1a40398abe1503f10acce82e6b","fee":678,"vsize":225,"value":3417972},
{"txid":"7dd7c60457d13101b8205a5a898ca473eb572e6f41f0187b148585c45b0d8cfc","fee":500,"vsize":449,"value":2685500},
{"txid":"c9478778ef5f7112261c5687ee3887efdc16ed04905cf4abea7285c10415ae5a","fee":146,"vsize":143,"value":6093366}]

Here you can find mempool.space API which return the last 10 unconfirmed transactions:
https://mempool.space/api/mempool/recent
Code:
[{"txid":"32f03d4886f3de1a7120b854ddcf0fd71bb53dce2f76c8de0e2d8bdd30dbfd00","fee":1120,"vsize":141,"value":2712357},
{"txid":"52e8346ae9f34be796d47efafca30270d1e4427a377c1acbe891508d3f6e5122","fee":1260,"vsize":143,"value":268270},
{"txid":"8abba43105981f92a50172f828473d64095c4deccfc915a8752c9fce83c0a68f","fee":28351,"vsize":318,"value":145511203},
{"txid":"b25314e53c283370d2310145d692d277bb4dee0bfcef1e21c30104dfb9282c77","fee":513,"vsize":110,"value":2804800},
{"txid":"03c34e86ff73bd2460a8956c7399c34e5b0895279e350318e6f997eb01408481","fee":327,"vsize":140,"value":458703},
{"txid":"e8b383a7b17366bb50598d9e450de4edd65453c0fcf2d656aacf4a614bd85aaf","fee":639,"vsize":211,"value":265440},
{"txid":"90a272785d798d63011a9d76403d69ef64c0324dd8d2f9c9ec359745b60bd412","fee":568,"vsize":141,"value":265400},
{"txid":"2ce2cae3b56278179676428acddb4054be5d8c0b21e7c97000f440b11b5ed170","fee":1050,"vsize":346,"value":26638786},
{"txid":"76fee533e8ecb5ed73753e7b335895356e83cf11f90543e15ff2ba79a1fc0c71","fee":6274,"vsize":209,"value":1234189},
{"txid":"c4ec915ee0726bfd9548ef05aba801a894e2df568accb7c29c1bf54b9f90c850","fee":498,"vsize":165,"value":458924}]




If you want to go down to latest confirmed transactions path, you will need to use this API. But you will need to use it with another API to get the latest block ID.

https://mempool.space/api/block/:hash/txids
Code:
[
  "cfe624ccdd8010cf78dbedd1b25e1ff601b470c4d7d90fa9fc8c1bcc5cdc6e0e",
  "a5ef89881bd5103f223a0fa285dfc75f4718974cb792cf85e623a7de05801bc9",
  "94e8c35414db17cd10efa0ac4115e086edb168ba7bd86e737e5b8cab96821580",
  ...
]

and the use it with other API to get the details of each transaction ID.




When i send a request with HttpWebRequest to https://www.blockchain.com/explorer several times this site blocks my ip.
Also when i send a request with HttpWebRequest to https://mempool.space it returns nothing as response.
...
So which api or url can i use without ban issue?

You were being blocked because you were not using API, but URL.
You can use those API i sent you (especially mempool.space) and you won't get blocked. However, only the last 10 transactions are available.

You can make 1 request per minute and stack all those 10 results. When you merge all of them you will have the lastest 100 transactions.
jr. member
Activity: 47
Merit: 11
I need a simple url to grab json or html from it.
Form the other thread no body introduce such this url.
Confirmed | Not Confirmed transactions is not important.
I am c# developer.
When i send a request with HttpWebRequest to https://www.blockchain.com/explorer several times this site blocks my ip.
Also when i send a request with HttpWebRequest to https://mempool.space it returns nothing as response.

Quote
If you need confirmed transactions, then go grab the latest block and check the order of it. The order is almost always arbitrary and is irrelevant of the timestamp that it was first seen by the miner.
Would you please show me urls for that?
I want to repeat this job every 10 minutes and grab new 100 TXs.
Here is the process :
1- Firs of all i need 100 latest TXs > Confirmed | Not Confirmed with details - Details mean i need btc amount + output bitcoin address related to that tx.
So imagine how many requests should i send to that api or url for garb details.
2- Repeat level 1 after 10 minutes again for new 100 TXs.

So which api or url can i use without ban issue?
legendary
Activity: 2954
Merit: 4158
What's the purpose of it? Your previous thread answers the information for your unconfirmed TXes: https://bitcointalksearch.org/topic/how-grab-100-daily-transactions-with-details-using-an-api-5330783.

If you need confirmed transactions, then go grab the latest block and check the order of it. The order is almost always arbitrary and is irrelevant of the timestamp that it was first seen by the miner.
jr. member
Activity: 47
Merit: 11
Please take a look at these two links :   

Blockchain Explorer | Latest Transactions

mempool.space | Latest transactions

I am looking for a free api to grab 100 latest bitcoin trasactions in the blockchain network | Confimmed or Not Confirmmed!   
Which api should i use for this purpose?   
Jump to: