How to query transactions based on block height

SQL Query

select 
 block_number, 
 transaction_hash,
 from_address,
 to_address,
 value 
from ethereum.transaction
where block_number=(select max(number) from ethereum.blocks);
curl -X "POST" "https://api.chainbase.online/v1/dw/query" \
     -H 'X-API-KEY: <YOUR-API-KEY> ' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d '{"query": "select block_number, transaction_hash, from_address,to_address,value from ethereum.transaction where block_number=(select max(number) from ethereum.blocks);"}'

API Reference

If you want to know more details on the endpoint and optional parameters, check out:

Support

If you meet any trouble following the tutorial, feel free to reach out to us in our Discord to get 24/7 community support.