Read the blockchain - Algorand
Read the blockchain
post by Mister_Enzo on Jun 26, 2020
Hi everyone, I’m trying to read from the blockchain. I’m using the Purestake API to connect to the blockchain and read data from it. But I can’t execute more than one call for second with Purestake, and this is a problem for me because with the new Indexer 2 I can’t read all the data that I want but just one small part. There is a way to read all the data but without running a node (or sandbox)? I’m using inside a web site for a project and I need to show some statistics that I elaborate from data that i read from the blockchain.
Thanks, 🙂
post by pipaman on Jun 26, 2020
Hi Enzo,
You can use AlgoExplorer API, it is free and compatible with Algorand Node, you just need to change the url:
https://algoexplorer.io/api-dev
Best,
Pablo
post by Mister_Enzo on Jun 27, 2020
Thanks Pablo, I have only one question. In which way I can use Indexer with my site?
post by pipaman on Jun 27, 2020
what are you trying to do?
post by Mister_Enzo on Jun 28, 2020
I would like to show statistics through graphs that I create with recharts.
post by tsachi on Jun 29, 2020
without more details about the content of the graphs, there isn’t much help that I could provide, but maybe the indexer v2 is what you’re looking for ? it will take a while to set up, but after you’ll have it up and running, you’ll be able to create triggers to populate your own tables on the Postgres database with the charts-specific data, and then add some queries around these.
I know that it might not be the easiest thing to set up, but with the indexer running, you’ll have the flexibility of a full-featured database. The APIs, regardless of their flexibility, would always lag behind what you could achieve if you were to build your own data schema.
post by Mister_Enzo on Jun 29, 2020
The problem is that I want create a site not just for me, but for everyone. And for this goal I can’t install Indexer on every PC that want to read my site.
post by pipaman on Jun 29, 2020
If you use algoexplorer API you can retrieve the information in the way you want, but I don’t get what is exactly the information you need.
post by Mister_Enzo on Jul 1, 2020
I would like to know the number of transactions that a particular address have made during a specific amount of time. In which way I can take this data with the Indexer? Is mandatory to have the database on my computer? Is possible for a mobile phone to see this data on my website without have the Indexer installed on the device?
post by aojjazz on Jul 1, 2020
You can call the indexer API directly ( https://developer.algorand.org/docs/reference/rest-apis/indexer/) or use one of the SDKs which support it.
It accepts a number of optional parameters that let you specify a lot of search criteria, including time ranges.
The indexer needs to talk to a full node to populate itself. You could run your own indexer, or use a service that runs one. PureStake offers free developer access if the transaction rates are low.
See https://developer.purestake.io/
You definitely wouldn’t have an indexer on the phone itself, but it could obviously make a connection to any indexer on the internet.
post by Mister_Enzo on Jul 2, 2020
Thanks aojjazz,
the only problem is that I can’t use PureStake because they put a limit of 1 request at second. So my question is, in which way I can connect to a node and use the Indexer if I don’t have the Indexer installed on my device (computer, phone, tablet, …)?
post by pipaman on Jul 2, 2020
You will be able to use AlgoExplorer API with the indexer update soon.
post by rfustino on Jul 2, 2020
I believe that 1 request per second (actually 4 requests per second) constraint is for the free TestNet version. So a paid version should work there. And I am not sure that constraint applies to the indexer as it may be a node constraint, not indexer, but I am not 100 percent sure on that. If that does not work, they have support https://www.purestake.com/customer-support/ … bottom line, indexer v2 sounds like what you want to accomplish your task anyway. I have several examples on indexer done here: https://developer.algorand.org/docs/features/indexer/ with sample code here: https://github.com/algorand/docs/tree/master/examples/indexer. … you do not need to connect to a node to use indexer.
post by mmorselli on Dec 31, 2021
Hi Pablo, I am using the Indexer API in a public project. I’m already careful to ensure that it doesn’t execute too many requests, but I was wondering if there is a limit on requests or what is a fair use