Multiple searches with Indexer problem - General - Algorand

Multiple searches with Indexer problem

post by AndC on Jan 27, 2021

In my system I need to search the blockchain more with the algoindexer. The main problem is that if I go to make several consecutive requests I get the following error:

        algosdk.error.IndexerHTTPError: {“message”:“Too Many Requests”}

that’s my code:

        myIndexer = self.instanceAlgoIndexer()
        responseStruct = myIndexer.search_assets(name="tiger1")
        structHash = responseStruct['assets'][0]['params']['metadata-hash']

myIndexer = self.instanceAlgoIndexer()
        responseWeight = myIndexer.search_assets(name="tiger2")
        weightHash = responseWeight['assets'][0]['params']['metadata-hash']

How can I avoid this?

830 views

post by Tim on Jan 27, 2021

Depends on the throughput limits the provider has - for instance PureStake’s free plan restricts Indexer calls to 1 per second, so you’d have to ensure some separation between requests in order to successfully use it.

Related topics

Topic Replies Views Activity
Get assets using Algorand’s Indexer REST API 2.0 4 663 Jun 2022
Algoexplorer Indexer apis 2 883 Jan 2022
Maximum indexer result limit 2 324 Feb 2021
Read the blockchain 13 1.4k Dec 2021
Indexer _ expected string or bytes-like object 1 487 Oct 2021