# 221Bravo - A fully on-chain explorer for ICP tokens

**URL:** <https://forum.dfinity.org/t/221bravo-a-fully-on-chain-explorer-for-icp-tokens/27586>\
**Category:** Showcase\
**Created:** [February 14, 2024, 8:44pm UTC](https://forum.dfinity.org/t/221bravo-a-fully-on-chain-explorer-for-icp-tokens/27586 "2024-02-14T20:44:29Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![NS01](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ns01/32/9816_2.png) [@NS01](https://forum.dfinity.org/u/NS01)\
**Post date:** [February 23, 2024, 1:15pm UTC](https://forum.dfinity.org/t/221bravo-a-fully-on-chain-explorer-for-icp-tokens/27586/5 "2024-02-23T13:15:48Z")

</div>

There are a couple of ways to fetch transaction data. Which one you use depends on how you want to fetch it.

**Manually**  
You can fetch transactions by calling your desired ledger canister via Dfinity’s IC Dashboard. For example [ICP Ledger Here](https://dashboard.internetcomputer.org/canister/ryjl3-tyaaa-aaaaa-aaaba-cai) or [ckBTC Ledger Here](https://dashboard.internetcomputer.org/canister/mxzaz-hqaaa-aaaar-qaada-cai). To get transactions you can call the ‘query\_blocks’ method the first parameter is the starting block and the last parameter is the number to return - try 10562420 and 10 for example.

If you start at a low number eg block 0 it will return the archive canister ID for where that transaction is stored.

**Via Javascript Agent**  
You can use [Dfinity’s JS Agent](https://github.com/dfinity/agent-js) to call any smart contract using javascript/ node etc. You could use this to call each ICP/ ICRC ledger canister and fetch the data you want.

**Via Inter-canister Calls**  
If you are building a smart contract on IC and want to fetch data from the canister you are building, you can use an inter-canister call to fetch the data from the ICP/ ICRC ledgers. For example the 221Bravo Indexer fetches the data [here](https://github.com/SaorsaLabs/221BravoApp_v3/blob/f8bfbc9e643ef64ed4bdff0b935e39e8f864738a/src/super_indexer_v3/indexer/fetch_data/dfinity_icrc2.rs#L99C14-L99C38)

**Via Rosetta API**  
At the moment I think that only ICP transactions can be downloaded via the Rosetta API (ICRC is being worked on IIRC). You don’t need to run a Rosetta node to do this. I’ve used [this code](https://github.com/Toniq-Labs/stoic-wallet/blob/main/src/ic/RosettaApi.js) before in node to pull ICP transaction data.

Hope that helps!

---

_[View the full topic](https://forum.dfinity.org/t/221bravo-a-fully-on-chain-explorer-for-icp-tokens/27586)._
