Skip to main content

Indexer Installation

Sequence Indexer is a simple API to query any blockchain token and NFT data. Below are instructions on how to integrate the Sequence Indexer API into your Webapps, Games, and backends. In case you missed it, please also see the Indexer Overview.

Installation

The Sequence Indexer is built as a HTTP API with RPC endpoints that you may call directly from your Webapp, Game or server backend. Below you'll find information on the RPC endpoint schema with sample curl commands, along with examples in both Javascript/Typescript and Go.

We provide SDKs for Web / node.js and Go. Or if you'd like to integrate the Indexer with another language target, simply follow the API reference below to implement the HTTP requests. Additionally, read the Typescript client source code as reference implementation of the Indexer API client as well.

Sequence Indexer endpoints

Sequence Indexer offers the same API across a variety of EVM networks. Make sure to check the Indexer endpoints and use the corresponding host for your dapp/game. For example, on Ethereum mainnet the Sequence Indexer endpoint is https://mainnet-indexer.sequence.app and Polygon is https://polygon-indexer.sequence.app.

🌄 View the full list of supported networks and Indexer endpoints here


Web / node.js Installation

npm install 0xsequence ethers

or

pnpm install 0xsequence ethers

or

yarn add 0xsequence ethers

then in your app,

import { SequenceIndexerClient } from '@0xsequence/indexer'

// see https://docs.sequence.xyz/indexer#supported-networks--endpoints for list of
// indexer hosts for the chain you'd like to query
const indexer = new SequenceIndexerClient('https://mainnet-indexer.sequence.app')

// see examples below for the kinds of queries you can make
const tokenBalances = await indexer.getTokenBalances(...)

NOTE: if you're using @0xsequence/indexer from node.js, we recommend using node v18.x or newer.


Go Installation

go get -u github.com/0xsequence/[email protected]

then in your app,

import (
"github.com/0xsequence/go-sequence/indexer"
)

// see https://docs.sequence.xyz/indexer#supported-networks--endpoints for list of
// indexer hosts for the chain you'd like to query
seqIndexer := indexer.NewIndexerClient("https://mainnet-indexer.sequence.app", http.DefaultClient)

// see examples below for the kinds of queries you can make
tokenBalances, err := seqIndexer.GetTokenBalances(...)

Unity or Unreal Installation

The Sequence Indexer is integrated directly inside of the respective Sequence Web3 Unity and Sequence Web3 Unreal SDKs.