GraphQL (deprecated)

Explore the Avalanche platform easily using Avascan's API endpoints. Docs will be updated weekly as we approach Avalanche mainnet. API is still under development.

API version 0.3

Avascan API

Avascan is the most complete, fast and privacy-focused explorer for the Avalanche network. With Avascan API developers can build apps and tools. You can start queries by accessing the GraphQL Avascan API Playground.

Blockchains

Avalanche is the 'internet of blockchains', and as such, you can browse and extract info about a given blockchain. Currently, there are only three permissionless blockchains nicknamed P-Chain, X-Chain and C-Chain. There are also permissioned blockchains, and both permissionless and permissioned will likely increase in number when the mainnet is launched. You can browse blockchains with a simple query: you will get the number of blockchains in the Avalanche network.

query {
  blockchains {
    count
  }
}

You can also get more specific information about a single blockchain.

query {
  blockchains(limit: 5, offset: 0) {
    count
    results {
      id
      name
      subnet
      vm

Transactions

If you want more info on a specific blockchain, query its transactions. Do it by passing the assetID and you can order it by any attribute, desc or asc. You need to specify the attributes you want to get in the result response, as shown below:

You can also filter the transactions to obtain the ones that are specific to a certain asset filtering by assetID:

Or you can filter by address:

Address outputs

Get a series of UTXO-related info for a specific address by including a redeemingTransactionID that shows if the output related to that address has already been spent.

Get the list of validators

Get a complete list of validators, both active and pending. You can order the result by startTime, endTime, weight, address, subnet or id.

Get the list of delegators

The Avascan API Platform is still under heavy development, and many more endpoints will become available soon.

Join our Discord chat to stay updated and connect with the team, ask for new features or give feedback.

Last updated

Was this helpful?