Transaction: y76P93OBW86g_i54k29BgebEAEJYMNj9G6TKpjBujDE

HashBlockUserFee
y76P93OBW86g_i54k29BgebEAEJYMNj9G6TKpjBujDEVWfQ6y0BMCyR8OiFkSc5Mr0DwmBD1OsCYDEnPbku4vK7HIptBEHLkmwAFhFfPTndb4a0aIuyfscjsI9wEX7QBWvizp12YXKTUWUpIuKilFM0.000012 AR
Data:

For a user in Discord I developed a JavaScript snippet that loops through all transactions and searches for transactions that have a positive `quantity` value.

### Live on JsBin

[https://jsbin.com/tipexuwemi/edit?js,console](https://jsbin.com/tipexuwemi/edit?js,console)

### Code snippet

```

const getNetworkInfo = async () => {

const response = await fetch('https://arweave.net/info');

return response.json();

}

const getLastBlock = async () => {

const info = await getNetworkInfo();

return info['current'];

}

const getTxQuantity = async id => {

const response = await fetch(`https://arweave.net/tx/${id}/quantity`);

return response.json();

}

const getBlock = async (hash) => {

const response = await fetch(`https://arweave.net/block/hash/${hash}`);

return response.json();

}

const getTxsFromBlock = block => {

return block["txs"];

}

const getPreviousBlock = block => {

return block["previous_block"];

}

const analyzeBlockTxs = async hash => {

const block = await getBlock(hash);

const txs = getTxsFromBlock(block);

if (txs.length) {

txs.forEach(async tx => {

const quantity = await getTxQuantity(tx);

if (quantity) {

console.log(tx, quantity * 0.000000000001, 'AR');

}

});

}

analyzeBlockTxs(getPreviousBlock(block));

}

getLastBlock().then(hash => analyzeBlockTxs(hash));

```

Tags:
App-Name:ArBoard
App-Version:1.0.1
Node-Parent:W4VPppgsk96m2wzzWwp6BXhe15CIV7Q9MxuxTUMHIqs
Node-Title:Snippet: Search for Arweave transactions with quantity greater null
Node-Type:post
Node-Created:1570264443
Node-Invalidate:B2zw2nXkktWtdgc9NTMAOphkaPZrErxqH1Qf5JELc20