How to get all the transactions for a given group id?
Found this issue but it is still open
How to get all the transactions for a given group id?
Found this issue but it is still open
Hi!
The Rand Labs Indexer has an extension for this use case.
Example (curl):
$ curl -s 'https://indexer.testnet.algoexplorerapi.io/v2/transactions?group-id=gLxPgPd6gsfrOkn0O5UA%2BWK%2B10CFL7vLrFPOrXfYuMs%3D' | jq '.transactions[] .id'
"2JEZV4LK7FNJGGGAHMPRZ7CNMBUDS4KTIVY3SLFJGPJGCVBKHT2A"
"KTXYEIGI6IB4ABRWHU2HEVXX4WXZP4EOYT2JORS6LNDGJMPUPKRA"
"W3ZSWRBR722BOY3UKIJPBGQJNNXRHWR4SRK67UDEQR2AOU2KO53A"
Example (js algosdk):
const algosdk = require('algosdk');
let indexerClient = new algosdk.Indexer("", "https://indexer.testnet.algoexplorerapi.io", "443");
(async()=> {
let response = await indexerClient
.searchForTransactions()
.do({'X-Param-Group-ID': 'gLxPgPd6gsfrOkn0O5UA+WK+10CFL7vLrFPOrXfYuMs='}) // pass a custom parameter via HTTP request headers
for (let i = 0; i < response['transactions'].length; i++) {
console.log(response['transactions'][i]['id'])
}
})().catch(e => {
console.log(e);
});
Documentation: https://indexer.algoexplorerapi.io/swagger.json
Thanks, @agodnic, But this works only with algoexplorer indexer right?
What Iām looking for is out of the box indexer.