Introducing Avascan’s Enhanced API v2

An In-Depth Look at the New Features and Endpoints

Avascan
Avascan
3 min readMar 24, 2023

--

As the world of blockchain technology continues to expand and evolve, Avascan remains committed to providing the most reliable and comprehensive data on the Avalanche network. To that end, we are excited to announce the deployment of our new and improved API v2 in beta. This updated API offers a more efficient and user-friendly experience while retaining the core functionalities that our users have come to rely on.

To help you understand the changes and improvements we’ve made in this new release, we’ve put together this detailed overview of the updated endpoints and their functionalities.

Dedicated Endpoints per Chain

In API v2, we have organized endpoints into dedicated sets for each chain (X, P, and C). This helps streamline your access to specific chain data while maintaining a consistent structure across all chains.

Cursor-based Pagination

To enhance the user experience, we have implemented cursor-based pagination for all endpoints that require it. This approach offers a more intuitive navigation experience, as the cursor for the subsequent page is included within the response.

Embedded Asset Information

To simplify the process of obtaining asset information, we have embedded this data directly within transaction responses. This eliminates the need for separate asset fetches, making it quicker and easier to access the information you need.

X and P Chain Endpoints

The X and P chain endpoints for addresses and transactions have been updated with more detailed information and filtering options. Transactions can now be sorted by timestamp and filtered based on specific parameters, such as inputs and outputs limits and counts. This enables a more granular view of transaction data, giving you greater insight into the activity on these chains.

C Chain Endpoints

For the C chain, we have made several changes to accommodate the unique requirements of EVM transactions. The updated C chain endpoints now support both regular EVM transactions and atomic transactions, with hybrid formatting to accommodate both types. Additionally, we have introduced specific input and output shapes for the C chain, providing a more comprehensive view of transaction data.

It’s important to note that the value amount in C chain transactions is expressed with 18 decimals, while the amount property of the transaction outputs (TXOs) has 9 decimals. This design accommodates the differing decimal formats for AVAX on the C chain (18 decimals) and X and P Chains (9 decimals).

Final Thoughts

We hope this overview has provided you with a clear understanding of the enhancements and updates we’ve made in Avascan’s API v2. Our goal is to continue refining and expanding our offerings to better serve the Avalanche community.

As always, we appreciate your feedback and welcome any questions or suggestions you may have. We’re excited to see how these updates will enhance your experience with Avascan, and we look forward to continuing our mission of providing reliable and comprehensive data on the Avalanche network.

API Documentation via: https://docs.avascan.info/api/documentation

The Avascan Team

--

--