3

I was looking at the etherscan API and I did not find a request that would simply list the latest transactions done on the blockchain (so not dependent of an address).

Ideally I'd like to see the 1000 first transactions available here: https://etherscan.io/txs

Everything I looked for was assuming I know the address sending/receiving the tokens. But here I just want to get all the latest transactions.

Alternatively is there something that would give me all the transactions done in a particular block? In that case I could just say give me all the transactions for the last 10 blocks and do my analysis afterwards.

PS: My end goal would be to monitor at a given time where is the trading activity concentrated. For example if I see that lots of ETHER is send to a specific address, I could look at this address to see what's going on: ICO or other.

Thanks

1 Answer 1

2

There is a web3 library that is available in several programming languages. For instance, you may use python implementation (web3.py). Here is a link where you may find more details.

this is an example:

web3 = Web3(HTTPProvider('link to the node')) recent_block_number = web3.eth.blockNumber for i in range(recent_block_number - 3, recent_block_number +1): block = web3.eth.getBlock(block_hash, full_transactions=True) transactions = block['transactions'] 

But you will need a local node. For testing reason Ganache would be appropriate. Hope this will help!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.