Thirdweb Insight
Insight is a powerful tool that lets you retrieve blockchain data from any EVM chain, enrich it with metadata, and transform it using custom logic. Whether you're building a gaming inventory system, tracking DeFi metrics, or analyzing NFT collections, Insight makes it easy to get the data you need with simple API calls.
-
Rate Limiting: The API has rate limits based on your authentication tier. Monitor your usage and implement appropriate retry logic.
-
Pagination: When retrieving large datasets, use pagination parameters (
page
andlimit
) to avoid timeouts and manage response sizes effectively. -
Chain Selection: Always verify you're querying the correct chain ID. Using an incorrect chain ID will return a 404 error.
-
Data Freshness: There may be a slight delay between on-chain events and their availability in the API due to block confirmation times.
-
Error Handling: Implement proper error handling for both HTTP errors (400/500) and network issues. Consider implementing retries for transient failures.
-
Query Optimization:
- Use specific filters to reduce response size and improve performance
- Avoid overly broad date ranges when possible
- Consider using aggregations for large datasets
-
Authentication: Keep your authentication credentials secure and don't expose them in client-side code.
-
Response Processing: Some numeric values are returned as strings to maintain precision. Convert them appropriately in your application.
Insight supports various aggregation functions that can be used to analyze blockchain data. Here are some common examples:
The API supports three authentication methods:
The API supports chain IDs in the following formats:
- As a subdomain:
- As a query parameter (this is useful if you want to query multiple chains):
We won't duplicate multichain examples for each endpoint, but you can pass multiple chains in the query parameters pretty much everywhere!
Webhooks allow you to receive notifications when specific blockchain events or transactions occur. This enables you to build event-driven AI agents that can react to on-chain activity in real-time.
- Real-time Monitoring: An agent can monitor for specific events (e.g., a large transfer to a whale wallet) and trigger alerts or other actions.
- Automated Workflows: When a specific on-chain action occurs (e.g., a new NFT is minted), an agent can automatically kick off a downstream process, like updating a database or sending a notification.
- Data Aggregation: Use webhooks to feed on-chain data into a vector database or other data store for later analysis by an LLM.
Webhooks are created and managed via the Insight API. You can find more details in the Managing Webhooks documentation.
You can create powerful filters to specify exactly which events or transactions you want to be notified about.
For example, to receive a notification for both ERC-20 and ERC-721 Transfer
events, you can use a filter like this:
This allows an agent to monitor multiple token standards with a single webhook. For more on filtering, see the Filtering documentation.
The webhook payload contains the event or transaction data. Your agent will need to parse this payload to extract the relevant information. See the Payload documentation for details on the payload structure.
- Get All Events
or
- Get Contract Events
- Get Specific Event Type
- Get All Transactions
- Get Contract Transactions
- Get Specific Transaction Type
- ERC20 Balances
- ERC721 & ERC1155 Balances
- Block Filters
- Time Filters
- Transaction Filters
All endpoints return standard error responses for 400 and 500 status codes: