Kodiak Finance
  • OVERVIEW
    • 🐻‍❄️Introducing Kodiak
    • 🐻Kodiak x Berachain
    • ✉️Contact Us
    • 🍯Kodiak Contracts
  • 🅱️Kodiak-Boyco
  • PROTOCOL
    • 🔃DEX
      • Swaps
      • Liquidity Provision
      • Trading Fees
    • 🏝️Islands
      • Island Liquidity Provision
      • Sweetened Islands
      • Auto-BGT
    • 🐼Panda Factory
  • 🪙Tokenomics
    • Kodiak Pre-TGE Rewards
  • 🧠User Guide
    • Launch a Token Launch on Panda Factory
    • Trading on Panda Factory
    • Swap
    • Create a V2 Position
    • Create a V3 Position
    • Add/Stake Islands Liquidity
    • Migrating to a Reward Vault
    • Deploying new Permissonless Islands
    • Deploying and Configuring a Kodiak Farm
    • Add your token
  • Add Your Project to the Ecosystem
  • 👨‍💻Developers
    • 🐼Panda
      • Technical Integration Guide
      • Subgraph
        • Entity Reference
        • Query Guide
        • Advanced Usage Guide
      • Smart Contract Reference
        • Panda Factory
        • Panda Pool
        • Panda Token
      • Api
    • Farms
      • Technical Integration Guide
      • Smart Contract Reference
    • 🌴Kodiak Islands
      • Technical Integration Guide
        • Understanding Token Deposit Ratio
      • Subgraph
        • Entity Reference
        • Query Guide
        • Advanced Usage Guide
      • Smart Contract Reference
        • Kodiak Island Factory
        • Kodiak Island
        • Kodiak Island Router
      • Api
    • 💰Pricing with Subgraph
    • 💱Quotes
    • Backend
  • 🛡️SECURITY
    • 🔍Audits
  • ℹ️Informational
    • 📜Terms of Use
    • 🔏Privacy Policy
    • TradingView Advanced License
Powered by GitBook
On this page
  • Overview
  • Understanding the Subgraph
  • When to Use the Subgraph
  • Accessing the Subgraph
  • Quick Example
  • Data Structure
  • Development Guides
  • Next Steps
  1. Developers
  2. Panda

Subgraph

PreviousTechnical Integration GuideNextEntity Reference

Last updated 1 month ago

Overview

The Panda Protocol subgraph indexes and provides structured access to protocol data through a GraphQL API. This documentation will help you integrate with our data layer effectively.

Understanding the Subgraph

The subgraph serves as the backbone for accessing Panda Protocol's on-chain data. It processes and indexes:

  • Pool deployments and configurations

  • Trading activities and price movements

  • Liquidity positions and migrations

  • Token holder balances and distributions

When to Use the Subgraph

Perfect For

  • Building trading interfaces requiring real-time pool data

  • Creating analytics dashboards with historical data

  • Tracking pool performance and market metrics

  • Monitoring token holder distributions

Accessing the Subgraph

https://api.goldsky.com/api/public/project_clpx84oel0al201r78jsl0r3i/subgraphs/kodiak-panda-berachain-mainnet/latest/gn

Quick Example

# Fetch active pools with their latest metrics
{
  pandaPools(
    where: { 
      graduated: false,
      volumeUSD_gt: "0"
    }
    orderBy: volumeUSD
    orderDirection: desc
  ) {
    id
    price
    volumeUSD
    swapsCount
  }
}

Data Structure

The subgraph maintains several core entities:

  • PandaPool: Pool state and metrics

  • Token: Token details and statistics

  • Swap: Trading activity records

  • Holder: Token holder information

For detailed entity definitions, see our Entities documentation.

Development Guides

  1. Entity Relationships

    • Understanding data models

    • Entity relationships

    • Field references

  2. Query Examples

    • Common queries

    • Filtering and sorting

    • Pagination patterns

  3. Advanced Usage

    • Performance optimization

    • Error handling

    • Edge cases

Next Steps

👨‍💻
🐼
→ Continue to Entity Documentation
Drawing