Overview
The following guide introduces how to work with peaq’s developer tooling to access live onchain data, interact with machine accounts, and build production-ready applications without managing your own indexing or infrastructure. It is achieved through Sim by Dune. To understand more please refer to the Sim By Dune Documentation.What you’ll learn
This guide walks through the core building blocks required to develop on peaq:- Getting Started
- Core data interfaces
Quick Start
1. Get API Key
You will need an API from the Sim dashboard to get started.- Go to the Sim dashboard
- Click on your username in the top right corner (or create an account)
- Click on
Keys - Click on
New - Enter a name for your API Key
- Click on
Create Key - Copy the API Key
Save the API Key in a secure location and never share in public repositories or in your code. You will need it to access the Sim API.
2. Set up your development environment
You will need to set up your development environment to get started. We will be using JavaScript to interact with the Sim API. Open a new terminal and run the following command to create a new project:.env file:
3. API Call
Create a new file calledsim.js and add the following code:
Additional API Examples
Get Token Balances
Monitor Wallet Transactions
Get Token Metadata
Find Top Holders
Track Swaps and Transfers
Get NFT Collections
Advanced Operations
Portfolio Analytics
Token Analysis Tool:
Conclusion
You now have a complete, working foundation for accessing peaq onchain data using Sim by Dune. This guide demonstrated how to:- Connect to the peaq network without running your own indexers
- Query balances, transactions, token metadata, and NFT holdings
- Track wallet and token activity at scale
- Build higher-level analytics such as portfolio view and token distribution insights
Where to go next
From here, you can extend this setup in several directions:- Integrate machine identities - Combine onchain data with machine DIDs to build identity-aware applications.
- Build persistent analytics - Store queried data in a database to support historical analysis, alerting, or reporting.
- Add automation - Trigger workflows based on onchain activity, such as rewards distribution or machine state changes.
- Harden for production - Implement caching, request batching, rate limiting, and monitoring to support higher throughput.
- Explore the broader peaq stack - Pair Sim by Dune with peaq-native smart contracts, Machine Accounts, and DePIN primitives to build end-to-end systems.

