How to Set Up Your Project to Use Tsunami API by PARSIQ
The Tsunami API, provided by the PARSIQ network, offers a rich suite of features designed to bring real-time blockchain data right to your fingertips. This guide will help you integrate the Tsunami API into your project.
- Basic understanding of how APIs work.
- Familiarity with the blockchain platform you are working with.
1. Sign Up & API Key Generation
Before you can start sending requests, you need to sign up with PARSIQ and generate your unique Tsunami API key.
2. Understand Computational Units (CUs)
To effectively use the Tsunami API, grasp the concept of Computational Units:
- Computational Units: Core units used for executing operations.
- Required Number of CUs: Ensure you provision for the required CUs depending on your usage pattern.
- CUs for Real-Time Streaming: Allocate sufficient CUs if your primary task revolves around real-time streaming.
3. Integrate Fundamental Data Endpoints
Use the following endpoints to retrieve basic blockchain data:
- Get Events (Method: GET)
- Get Calls (Method: GET)
4. Working with Blocks
Leverage these endpoints for accessing block information:
- Get Single Latest Block (Method: GET)
- Get Single Block (Method: GET)
- Get Block Range (Method: GET)
5. Handle Transactions
Integrate these endpoints to manage transactions:
- Get Wallet Transactions (Method: GET)
- Get Transaction (Method: GET)
- Get Transaction Logs (Method: GET)
6. Manage Transfers
For dealing with asset or token transfers, use:
- Get Wallet Transfers (Method: GET)
- Get Token Transfers (Method: GET)
7. Smart Contracts Integration
Smart contracts automation can be achieved with:
- Get Contract Self-Destructs (Method: GET)
- Get Contract Creates (Method: GET)
8. Decoded Data Retrieval
For deeper insights, decode blockchain data with:
- Get Decoded Events (Method: POST)
- Get Decoded Calls (Method: POST)
9. Integrate Real-Time Streaming
For real-time data access, employ:
- Create RTFs (Real-Time Filters) (Method: POST)
- List RTFs (Method: GET)
- Delete RTFs (Method: DELETE)
- Ensure your project handles both successful responses and errors correctly.
- Regularly update your project to accommodate any changes or updates in the Tsunami API.
- Always consult the official Tsunami API documentation for comprehensive details.
By following this guide, your project will be well-equipped to harness the power of the Tsunami API by PARSIQ, offering an enhanced blockchain data experience to your users.