LogoLogo
  • ☠️Introduction
    • What is Clipper?
    • How Clipper Makes Money for LPs
    • How LPs Earn from Arbitrage
    • Clipper's Benchmark: No Impermanent Loss
      • Clipper vs. CPMMs vs. HODLing
      • Appendix: Math
    • Why Clipper Has Better Trading Prices
    • DAO Protocol Fees
    • DAO Governance
  • ⚔️How to Use Clipper
    • Liquidity Pools
      • Depositing & Withdrawing
      • Farming Pools
    • Trading
    • Community Adventures
    • FAQs
  • 🪙Governance Token
    • Community Governance
    • ⛵SAIL Primer
      • Clipper Fundamentals
      • DEX Market Structure
      • SAIL Supply & Circulation
      • SAIL Farming
      • veSAIL
      • Token Listings
  • 🏴‍☠️Disclaimers & Technical
    • Audits
    • Smart Contracts
      • Subgraph
        • Entities
        • Queries
    • Integrating with Clipper RFQ
      • Introduction
      • Guides
        • How to use clipper RFQ API?
        • Estimate Clipper Prices
        • Interacting with the Clipper Exchange contracts
        • Integration Examples
          • Swap Native token → Shorttail
          • Swap Shorttail → Native token
          • Swap Shorttail → Shorttail
          • Complete Swap Flow
      • API Reference
        • API v2
          • Overview
          • Pool v2
          • Quote v2
        • API v1
          • Overview
          • Pool
          • Quote
          • Sign
      • Troubleshooting & FAQs
    • Terms of Service
    • Privacy Policy
  • ⛵Come Aboard
    • Discord
    • Twitter
    • Github
Powered by GitBook
On this page
  • Get Swaps
  • Get Deposits to Clipper pool
  • Get txs by pair
  • Swap Count

Was this helpful?

  1. Disclaimers & Technical
  2. Smart Contracts
  3. Subgraph

Queries

PreviousEntitiesNextIntegrating with Clipper RFQ

Last updated 2 years ago

Was this helpful?

Below are some sample queries you can use to gather information from the Clipper contracts.

You can build your own queries using a and enter your endpoint to limit the data to exactly what you need.

Get Swaps

{
  swaps {
    id
    inToken {
      name
      symbol
    }
    outToken {
      name
      symbol
    }
    transaction {
      id
    }
    amountIn
    amountOut
    origin
    sender {
      id
    }
    timestamp
    transactionSource {
      id
    }
  }
}

Get Deposits to Clipper pool

{
  deposits(orderBy: timestamp, orderDirection: desc) {
    amount
    usdValue
    token {
      symbol
    }
    amount
  }
}

Get txs by pair

{
  pairs {
    txCount
    asset0 {
      symbol
    }
    asset1 {
      symbol
    }
  }
}

Swap Count

{
  pools {
    id
    txCount
  }
}
🏴‍☠️
GraphQL Explorer