Bitcoin Forum

Economy => Service Discussion => Topic started by: NotATether on June 22, 2023, 01:17:48 PM



Title: Does anyone know what this field in Blockchain.info API means?
Post by: NotATether on June 22, 2023, 01:17:48 PM
Have a look, on this page: https://www.blockchain.com/explorer/api/blockchain_api

In the example for single transaction, there is a "tx_index" field for each input of the transaction. What is not clear to me is how I'm supposed to get the transaction ID for this, since the txid is not returned in this API call. There is also no "tx_index" number in Bitcoin Core's RPC output as well. So how do I make sense of this parameter?


Title: Re: Does anyone know what this field in Blockchain.info API means?
Post by: OmegaStarScream on June 22, 2023, 01:29:35 PM
According to these answers[1] and assuming nothing has changed since then, it's just something they use internally, so you probably shouldn't be using that in your applications.

[1] https://bitcointalk.org/index.php?topic=1467979.0


Title: Re: Does anyone know what this field in Blockchain.info API means?
Post by: NotATether on June 23, 2023, 05:28:47 PM
According to these answers[1] and assuming nothing has changed since then, it's just something they use internally, so you probably shouldn't be using that in your applications.

[1] https://bitcointalk.org/index.php?topic=1467979.0

That's pretty weird, why would they return a value that has no practical use to users?

It's a shame though, the API seven only seems to support only Bitcoin mainnet, and legacy addresses at that (eg. It returns the size but not the vsize which uses vbytes).


Title: Re: Does anyone know what this field in Blockchain.info API means?
Post by: OmegaStarScream on June 23, 2023, 07:07:12 PM
That's pretty weird, why would they return a value that has no practical use to users?
-snip-

I would imagine it's because they also use that on their site.

It's a shame though, the API seven only seems to support only Bitcoin mainnet, and legacy addresses at that (eg. It returns the size but not the vsize which uses vbytes).

I know that Blockchair supports both testnet and segwit addresses but the limits may not be the best. Have you looked into these alternatives?[1]

[1] https://bitcointalk.org/index.php?topic=5386348.0


Title: Re: Does anyone know what this field in Blockchain.info API means?
Post by: nc50lc on June 24, 2023, 05:35:09 AM
It's a shame though, the API seven only seems to support only Bitcoin mainnet, and legacy addresses at that (eg. It returns the size but not the vsize which uses vbytes).
At the very least, they've updated it to include the "weight" value which can be divided by 4 to get the vSize.
It shows whether there's witness data or none.


Title: Re: Does anyone know what this field in Blockchain.info API means?
Post by: bitmover on June 24, 2023, 12:27:46 PM

It's a shame though, the API seven only seems to support only Bitcoin mainnet, and legacy addresses at that (eg. It returns the size but not the vsize which uses vbytes).

I know that Blockchair supports both testnet and segwit addresses but the limits may not be the best. Have you looked into these alternatives?[1]

[1] https://bitcointalk.org/index.php?topic=5386348.0

Have you tried mempool.space api? This is the one that I usee in all my projects.
The limits are ok imo
https://mempool.space/pt/docs/api/rest


Title: Re: Does anyone know what this field in Blockchain.info API means?
Post by: witcher_sense on June 28, 2023, 09:55:48 AM
That's pretty weird, why would they return a value that has no practical use to users?
They might be using this API endpoint for some internal purposes which require adding weirdly looking entries. "tx_index" may correspond to the index in a database table containing all transactions in the blockchain. As a side note, transaction indexing allows for faster and optimal database queries and correspondingly a faster response from a server. Including database indexes in JSON response allows for more efficient filtering, sorting, and pagination of data, which might be helpful when developing applications because it helps organize data and present it in a more user-friendly format. Another solution would be creating private endpoints with all the neccessary data for development, but it would contain a lot of repetitive and confusing information.


Title: Re: Does anyone know what this field in Blockchain.info API means?
Post by: NotATether on July 01, 2023, 05:50:02 AM
Have you tried mempool.space api? This is the one that I usee in all my projects.
The limits are ok imo
https://mempool.space/pt/docs/api/rest

Mempool.space API is actually just an Esplora instance, so I realized that I already have a client developed to access the Esplora API.

It's the same API that blockstream.info uses - that one has no rate limits, but I couldn't find any information about mempool.space's customized rate limits for anonymous usage - Do you happen to know about these limits by any chance?


Title: Re: Does anyone know what this field in Blockchain.info API means?
Post by: TryNinja on July 01, 2023, 11:31:57 AM
It's the same API that blockstream.info uses - that one has no rate limits, but I couldn't find any information about mempool.space's customized rate limits for anonymous usage - Do you happen to know about these limits by any chance?
Undisclosed: https://github.com/mempool/mempool/discussions/752#discussioncomment-1248907

Probably enough unless you are doing several simultaneous requests? I’ve never hit a limit, but I’m very conservative.


Title: Re: Does anyone know what this field in Blockchain.info API means?
Post by: bitmover on July 01, 2023, 01:16:48 PM
Have you tried mempool.space api? This is the one that I usee in all my projects.
The limits are ok imo
https://mempool.space/pt/docs/api/rest

Mempool.space API is actually just an Esplora instance, so I realized that I already have a client developed to access the Esplora API.

It's the same API that blockstream.info uses - that one has no rate limits, but I couldn't find any information about mempool.space's customized rate limits for anonymous usage - Do you happen to know about these limits by any chance?

I have hit the a few times using this tool:
https://bitcoindata.science/bitcoin-balance-check.html

Each address will make one request, and as they are nearly simultaneous you get the limit if you add many addresses (like dozens).

But you won`t get blocked, you will just receive a 429 error (too many requests). and it works again a few seconds later.

I just hit it now after 40+ requests in a minute