Skip to main content

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
Set up your development environment, confiugure API access, and connect to the peaq network.
  • Core data interfaces
Learn how to query balances, transactions, and asset metadata

Quick Start

1. Get API Key

You will need an API from the Sim dashboard to get started.
  1. Go to the Sim dashboard
  2. Click on your username in the top right corner (or create an account)
  3. Click on Keys
  4. Click on New
  5. Enter a name for your API Key
  6. Click on Create Key
  7. 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:
Create .env file:

3. API Call

Create a new file called sim.js and add the following code:
Execute with:

Additional API Examples

Get Token Balances

Monitor Wallet Transactions

Get Token Metadata

Can see exhaustive list of token addresses on peaq’s token list

Find Top Holders

Track Swaps and Transfers

Get NFT Collections

Advanced Operations

Portfolio Analytics

Token Analysis Tool:

Can see exhaustive list of token addresses on peaq’s token list

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
These building blocks are sufficient for most production use cases, including dashboards, analytics services, DePIN backends, and automated agents.

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.
For deeper architectural concepts and advanced integrations, refer to the official peaq developer documentation and the Sim by Dune docs.