AvaCloud Data API

Retrieve blockchain data across Avalanche L1s and the C-Chain — balances (native, ERC-20/721/1155), tokens, transactions, blocks, NFTs, UTXOs, Primary Network data, Teleporter/Interchain Messaging, and webhook management. Secured with an x-glacier-api-key header.

OpenAPI Specification

ava-labs-data-api-openapi.yml Raw ↑
openapi: 3.1.0
paths:
  /v1/health-check:
    get:
      operationId: data-health-check
      x-speakeasy-name-override: healthCheck
      x-speakeasy-group: data
      summary: Get the health of the service
      description: Check the health of the service.
      responses:
        '200':
          description: The health of the service
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthCheckResultDto'
        '400':
          description: |-
            Bad requests generally mean the client has passed invalid 
                or malformed parameters. Error messages in the response could help in 
                evaluating the error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
        '401':
          description: |-
            When a client attempts to access resources that require 
                authorization credentials but the client lacks proper authentication 
                in the request, the server responds with 401.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: |-
            When a client attempts to access resources with valid
                credentials but doesn't have the privilege to perform that action, 
                the server responds with 403.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: |-
            The error is mostly returned when the client requests
                with either mistyped URL, or the passed resource is moved or deleted, 
                or the resource doesn't exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
        '429':
          description: |-
            This error is returned when the client has sent too many,
                and has hit the rate limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequests'
        '500':
          description: |-
            The error is a generic server side error that is 
                returned for any uncaught and unexpected issues on the server side. 
                This should be very rare, and you may reach out to us if the problem 
                persists for a longer duration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
        '502':
          description: |-
            This is an internal error indicating invalid response 
                  received by the client-facing proxy or gateway from the upstream server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadGateway'
        '503':
          description: |-
            The error is returned for certain routes on a particular
                Subnet. This indicates an internal problem with our Subnet node, and may 
                not necessarily mean the Subnet is down or affected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailable'
      tags:
        - Health Check
      x-codeSamples:
        - lang: javascript
          label: JavaScript
          source: |-
            import { Avalanche } from "@avalanche-sdk/chainkit";

            const avalanche = new Avalanche();

            async function run() {
              const result = await avalanche.data.healthCheck();

              console.log(result);
            }

            run();
  /v1/address/{address}/chains:
    get:
      operationId: listAddressChains
      x-speakeasy-group: data.evm.address.chains
      x-speakeasy-name-override: list
      summary: List all chains associated with a given address
      description: >-
        Lists the chains where the specified address has  participated in
        transactions or ERC token transfers,  either as a sender or receiver.
        The data is refreshed every 15  minutes.
      parameters:
        - name: address
          required: true
          in: path
          description: A wallet address.
          example: '0x71C7656EC7ab88b098defB751B7401B5f6d8976F'
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListAddressChainsResponse'
        '400':
          description: |-
            Bad requests generally mean the client has passed invalid 
                or malformed parameters. Error messages in the response could help in 
                evaluating the error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
        '401':
          description: |-
            When a client attempts to access resources that require 
                authorization credentials but the client lacks proper authentication 
                in the request, the server responds with 401.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: |-
            When a client attempts to access resources with valid
                credentials but doesn't have the privilege to perform that action, 
                the server responds with 403.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: |-
            The error is mostly returned when the client requests
                with either mistyped URL, or the passed resource is moved or deleted, 
                or the resource doesn't exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
        '429':
          description: |-
            This error is returned when the client has sent too many,
                and has hit the rate limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequests'
        '500':
          description: |-
            The error is a generic server side error that is 
                returned for any uncaught and unexpected issues on the server side. 
                This should be very rare, and you may reach out to us if the problem 
                persists for a longer duration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
        '502':
          description: |-
            This is an internal error indicating invalid response 
                  received by the client-facing proxy or gateway from the upstream server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadGateway'
        '503':
          description: |-
            The error is returned for certain routes on a particular
                Subnet. This indicates an internal problem with our Subnet node, and may 
                not necessarily mean the Subnet is down or affected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailable'
      tags:
        - EVM Chains
      x-codeSamples:
        - lang: javascript
          label: JavaScript
          source: |-
            import { Avalanche } from "@avalanche-sdk/chainkit";

            const avalanche = new Avalanche();

            async function run() {
              const result = await avalanche.data.evm.address.chains.list({
                address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
              });

              console.log(result);
            }

            run();
  /v1/transactions:
    get:
      operationId: listLatestTransactionsAllChains
      x-speakeasy-group: data.evm.transactions
      x-speakeasy-name-override: listLatestAllChains
      x-speakeasy-pagination:
        type: cursor
        inputs:
          - name: pageToken
            in: parameters
            type: cursor
        outputs:
          nextCursor: $.nextPageToken
      summary: List the latest transactions across all supported EVM chains
      description: >-
        Lists the most recent transactions from all supported EVM-compatible 
        chains. The results can be filtered based on transaction status.
      parameters:
        - name: pageToken
          required: false
          in: query
          description: >-
            A page token, received from a previous list call. Provide this to
            retrieve the subsequent page.
          schema:
            type: string
        - name: pageSize
          required: false
          in: query
          description: >-
            The maximum number of items to return. The minimum page size is 1.
            The maximum pageSize is 100.
          schema:
            type: integer
            default: 10
            minimum: 1
            maximum: 100
          example: '10'
        - name: network
          required: false
          in: query
          description: Either mainnet or testnet/fuji.
          example: mainnet
          schema:
            $ref: '#/components/schemas/Network'
        - name: status
          required: false
          in: query
          description: A status filter for listed transactions.
          schema:
            $ref: '#/components/schemas/TransactionStatus'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListNativeTransactionsResponse'
        '400':
          description: |-
            Bad requests generally mean the client has passed invalid 
                or malformed parameters. Error messages in the response could help in 
                evaluating the error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
        '401':
          description: |-
            When a client attempts to access resources that require 
                authorization credentials but the client lacks proper authentication 
                in the request, the server responds with 401.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: |-
            When a client attempts to access resources with valid
                credentials but doesn't have the privilege to perform that action, 
                the server responds with 403.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: |-
            The error is mostly returned when the client requests
                with either mistyped URL, or the passed resource is moved or deleted, 
                or the resource doesn't exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
        '429':
          description: |-
            This error is returned when the client has sent too many,
                and has hit the rate limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequests'
        '500':
          description: |-
            The error is a generic server side error that is 
                returned for any uncaught and unexpected issues on the server side. 
                This should be very rare, and you may reach out to us if the problem 
                persists for a longer duration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
        '502':
          description: |-
            This is an internal error indicating invalid response 
                  received by the client-facing proxy or gateway from the upstream server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadGateway'
        '503':
          description: |-
            The error is returned for certain routes on a particular
                Subnet. This indicates an internal problem with our Subnet node, and may 
                not necessarily mean the Subnet is down or affected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailable'
      tags:
        - EVM Transactions
      x-codeSamples:
        - lang: javascript
          label: JavaScript
          source: |-
            import { Avalanche } from "@avalanche-sdk/chainkit";

            const avalanche = new Avalanche();

            async function run() {
              const result = await avalanche.data.evm.transactions.listLatestAllChains({
                pageSize: 10,
                network: "mainnet",
              });

              for await (const page of result) {
                console.log(page);
              }
            }

            run();
  /v1/blocks:
    get:
      operationId: listLatestBlocksAllChains
      x-speakeasy-group: data.evm.blocks
      x-speakeasy-name-override: listLatestAllChains
      x-speakeasy-pagination:
        type: cursor
        inputs:
          - name: pageToken
            in: parameters
            type: cursor
        outputs:
          nextCursor: $.nextPageToken
      summary: List latest blocks across all supported EVM chains
      description: >-
        Lists the most recent blocks from all supported  EVM-compatible chains.
        The results can be filtered by network.
      parameters:
        - name: pageToken
          required: false
          in: query
          description: >-
            A page token, received from a previous list call. Provide this to
            retrieve the subsequent page.
          schema:
            type: string
        - name: pageSize
          required: false
          in: query
          description: >-
            The maximum number of items to return. The minimum page size is 1.
            The maximum pageSize is 100.
          schema:
            type: integer
            default: 10
            minimum: 1
            maximum: 100
          example: '10'
        - name: network
          required: false
          in: query
          description: Either mainnet or testnet/fuji.
          example: mainnet
          schema:
            $ref: '#/components/schemas/Network'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListEvmBlocksResponse'
        '400':
          description: |-
            Bad requests generally mean the client has passed invalid 
                or malformed parameters. Error messages in the response could help in 
                evaluating the error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
        '401':
          description: |-
            When a client attempts to access resources that require 
                authorization credentials but the client lacks proper authentication 
                in the request, the server responds with 401.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: |-
            When a client attempts to access resources with valid
                credentials but doesn't have the privilege to perform that action, 
                the server responds with 403.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: |-
            The error is mostly returned when the client requests
                with either mistyped URL, or the passed resource is moved or deleted, 
                or the resource doesn't exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
        '429':
          description: |-
            This error is returned when the client has sent too many,
                and has hit the rate limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequests'
        '500':
          description: |-
            The error is a generic server side error that is 
                returned for any uncaught and unexpected issues on the server side. 
                This should be very rare, and you may reach out to us if the problem 
                persists for a longer duration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
        '502':
          description: |-
            This is an internal error indicating invalid response 
                  received by the client-facing proxy or gateway from the upstream server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadGateway'
        '503':
          description: |-
            The error is returned for certain routes on a particular
                Subnet. This indicates an internal problem with our Subnet node, and may 
                not necessarily mean the Subnet is down or affected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailable'
      tags:
        - EVM Blocks
      x-codeSamples:
        - lang: javascript
          label: JavaScript
          source: |-
            import { Avalanche } from "@avalanche-sdk/chainkit";

            const avalanche = new Avalanche();

            async function run() {
              const result = await avalanche.data.evm.blocks.listLatestAllChains({
                pageSize: 10,
                network: "mainnet",
              });

              for await (const page of result) {
                console.log(page);
              }
            }

            run();
  /v1/chains/{chainId}/nfts/collections/{address}/tokens/{tokenId}:reindex:
    post:
      operationId: reindexNft
      x-execution-weight: small
      x-speakeasy-name-override: reindex
      x-speakeasy-usage-example:
        description: Specified example for error responses
        tags:
          - errors
      x-speakeasy-group: data.nfts
      summary: Reindex NFT metadata
      description: >-
        Triggers reindexing of token metadata for an NFT token. Reindexing can
        only be called once per hour for each NFT token.
      parameters:
        - name: chainId
          required: true
          in: path
          description: >-
            A supported evm chain id or blockchain id. Use the `/chains`
            endpoint to get a list of supported chain ids.
          example: '43114'
          schema:
            type: string
        - name: address
          required: true
          in: path
          description: Contract address on the relevant chain.
          example: '0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E'
          schema:
            type: string
        - name: tokenId
          required: true
          in: path
          description: TokenId on the contract
          example: '145'
          schema:
            type: string
      responses:
        '201':
          description: Successful response
        '400':
          description: |-
            Bad requests generally mean the client has passed invalid 
                or malformed parameters. Error messages in the response could help in 
                evaluating the error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
        '401':
          description: |-
            When a client attempts to access resources that require 
                authorization credentials but the client lacks proper authentication 
                in the request, the server responds with 401.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: |-
            When a client attempts to access resources with valid
                credentials but doesn't have the privilege to perform that action, 
                the server responds with 403.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: |-
            The error is mostly returned when the client requests
                with either mistyped URL, or the passed resource is moved or deleted, 
                or the resource doesn't exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
        '429':
          description: |-
            This error is returned when the client has sent too many,
                and has hit the rate limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequests'
        '500':
          description: |-
            The error is a generic server side error that is 
                returned for any uncaught and unexpected issues on the server side. 
                This should be very rare, and you may reach out to us if the problem 
                persists for a longer duration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
        '502':
          description: |-
            This is an internal error indicating invalid response 
                  received by the client-facing proxy or gateway from the upstream server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadGateway'
        '503':
          description: |-
            The error is returned for certain routes on a particular
                Subnet. This indicates an internal problem with our Subnet node, and may 
                not necessarily mean the Subnet is down or affected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailable'
      tags:
        - NFTs
      x-codeSamples:
        - lang: javascript
          label: JavaScript
          source: |-
            import { Avalanche } from "@avalanche-sdk/chainkit";

            const avalanche = new Avalanche({
              chainId: "43114",
            });

            async function run() {
              await avalanche.data.nfts.reindex({
                address: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
                tokenId: "145",
              });


            }

            run();
  /v1/chains/{chainId}/nfts/collections/{address}/tokens:
    get:
      operationId: listTokens
      x-speakeasy-name-override: list
      x-speakeasy-pagination:
        type: cursor
        inputs:
          - name: pageToken
            in: parameters
            type: cursor
        outputs:
          nextCursor: $.nextPageToken
      x-speakeasy-group: data.nfts
      x-execution-weight: medium
      summary: List tokens
      description: Lists tokens for an NFT contract.
      parameters:
        - name: pageToken
          required: false
          in: query
          description: >-
            A page token, received from a previous list call. Provide this to
            retrieve the subsequent page.
          schema:
            type: string
        - name: pageSize
          required: false
          in: query
          description: >-
            The maximum number of items to return. The minimum page size is 1.
            The maximum pageSize is 100.
          schema:
            type: integer
            default: 10
            minimum: 1
            maximum: 100
          example: '10'
        - name: chainId
          required: true
          in: path
          description: >-
            A supported evm chain id or blockchain id. Use the `/chains`
            endpoint to get a list of supported chain ids.
          example: '43114'
          schema:
            type: string
        - name: address
          required: true
          in: path
          description: Contract address on the relevant chain.
          example: '0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E'
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListNftTokens'
        '400':
          description: |-
            Bad requests generally mean the client has passed invalid 
                or malformed parameters. Error messages in the response could help in 
                evaluating the error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
        '401':
          description: |-
            When a client attempts to access resources that require 
                authorization credentials but the client lacks proper authentication 
                in the request, the server responds with 401.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: |-
            When a client attempts to access resources with valid
                credentials but doesn't have the privilege to perform that action, 
                the server responds with 403.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: |-
            The error is mostly returned when the client requests
                with either mistyped URL, or the passed resource is moved or deleted, 
                or the resource doesn't exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
        '429':
          description: |-
            This error is returned when the client has sent too many,
                and has hit the rate limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequests'
        '500':
          description: |-
            The error is a generic server side error that is 
                returned for any uncaught and unexpected issues on the server side. 
                This should be very rare, and you may reach out to us if the problem 
                persists for a longer duration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
        '502':
          description: |-
            This is an internal error indicating invalid response 
                  received by the client-facing proxy or gateway from the upstream server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadGateway'
        '503':
          description: |-
            The error is returned for certain routes on a particular
                Subnet. This indicates an internal problem with our Subnet node, and may 
                not necessarily mean the Subnet is down or affected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailable'
      tags:
        - NFTs
      x-codeSamples:
        - lang: javascript
          label: JavaScript
          source: |-
            import { Avalanche } from "@avalanche-sdk/chainkit";

            const avalanche = new Avalanche({
              chainId: "43114",
            });

            async function run() {
              const result = await avalanche.data.nfts.list({
                pageSize: 10,
                address: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
              });

              for await (const page of result) {
                console.log(page);
              }
            }

            run();
  /v1/chains/{chainId}/nfts/collections/{address}/tokens/{tokenId}:
    get:
      operationId: getTokenDetails
      x-speakeasy-name-override: get
      x-speakeasy-group: data.nfts
      x-execution-weight: medium
      summary: Get token details
      description: Gets token details for a specific token of an NFT contract.
      parameters:
        - name: chainId
          required: true
          in: path
          description: >-
            A supported evm chain id or blockchain id. Use the `/chains`
            endpoint to get a list of supported chain ids.
          example: '43114'
          schema:
            type: string
        - name: address
          required: true
          in: path
          description: Contract address on the relevant chain.
          example: '0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E'
          schema:
            type: string
        - name: tokenId
          required: true
          in: path
          description: TokenId on the contract
          example: '145'
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/Erc721Token'
                  - $ref: '#/components/schemas/Erc1155Token'
                discriminator:
                  propertyName: ercType
                  mapping:
                    ERC-721: '#/components/schemas/Erc721Token'
                    ERC-1155: '#/components/schemas/Erc1155Token'
        '400':
          description: |-
            Bad requests generally mean the client has passed invalid 
                or malformed parameters. Error messages in the response could help in 
                evaluating the error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
        '401':
          description: |-
            When a client attempts to access resources that require 
                authorization credentials but the client lacks proper authentication 
                in the request, the server responds with 401.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: |-
            When a client attempts to access resources with valid
                credentials but doesn't have the privilege to perform that action, 
                the server responds with 403.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: |-
            The error is mostly returned when the client requests
                with either mistyped URL, or the passed resource is moved or deleted, 
                or the resource doesn't exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
        '429':
          description: |-
            This error is returned when the client has sent too many,
                and has hit the rate limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequests'
        '500':
          description: |-
            The error is a generic server side error that is 
                returned for any uncaught and unexpected issues on the server side. 
                This should be very rare, and you may reach out to us if 

# --- truncated at 32 KB (658 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/ava-labs/refs/heads/main/openapi/ava-labs-data-api-openapi.yml