V12 Docs
Launch Spark
  • Overview
  • Trade
    • 🚀 Getting Started as a Trader
      • Wallet Setup
        • Fuel Wallet
        • Fuelet Wallet
        • Ethereum Wallets
      • Bridging Assets Using the Fuel Bridge
      • Deposit Assets using Testnet Faucet
      • Creating Orders
        • Order Book
          • Limit Order
          • Market Order
          • Cancelling an order
        • Swap
      • Fee Structure
  • Provide Liquidity
    • 📈 Getting Started as a Market Maker
      • Market Maker Incentive Program
      • Fee Structure
      • SLAs for Market Makers
  • Build
    • 👩‍💻 Getting Started as a Developer
      • Rust Integration Guide
        • Fuel and V12 Market Setup Tutorial
        • V12 Rust SDK
      • TypeScript SDK
      • Data Indexing
        • Envio Indexer Setup Guide
        • Indexer Queries
        • Connecting to the indexer via WebSocket
      • Order Book Technical Reference
  • Security
    • 🔐 Audit Report
  • More
    • 🏗️ V12 Architecture Overview
    • 🏆 Point Rewards Program
    • ⚖️ Terms
  • Community
    • Twitter
    • Telegram
    • Discord
    • GitHub
Powered by GitBook
On this page
  • Step 1: Install Docker
  • Step 2: Clone the Envio Indexer Repository
  • Step 3: Set Up the Project
  • Step 4: Run the Envio Indexer
  • Step 5: Run a sample Query of the Orderbook
  1. Build
  2. 👩‍💻 Getting Started as a Developer
  3. Data Indexing

Envio Indexer Setup Guide

PreviousData IndexingNextIndexer Queries

Last updated 7 months ago

Follow these steps to set up and run the Envio Indexer for querying the orderbook:

Step 1: Install Docker

Make sure Docker is installed on your machine. You can download and install Docker from for your operating system.

Step 2: Clone the Envio Indexer Repository

Open your terminal and clone the repository using the following command:

git clone [email protected]:compolabs/spark-envio-indexer.git

Step 3: Set Up the Project

Navigate to the cloned repository and install the necessary dependencies.

cd spark-envio-indexer
pnpm i

Make sure you are using Node.js version 20. If needed, you can switch versions using a version manager like nvm:

nvm install 20
nvm use 20

Step 4: Run the Envio Indexer

pnpm dev

Step 5: Run a sample Query of the Orderbook

To test the orderbook indexer, you can run a sample query. For example, to retrieve active buy orders, you can use the following query:

query ActiveBuyQuery {
  ActiveBuyOrder {
    price
  }
}

Once it's running, verify that the service is working correctly by opening your browser and navigating to:

Docker's official website
spark-envio-indexer
http://localhost:8080