UNCX Network
  • 🚪Introduction
  • 👀Availability and Fees
  • 🪙UNCX token
  • 📖Guides
    • For Investors
      • Liquidity Lockers
        • How can I check if the project locked liquidity?
      • Token Vesting
        • How can I check if the project locked tokens?
      • Staking
        • How to stake?
        • How to withdraw my staked tokens?
        • How to boost my stake?
    • For Projects
      • Stealth Launch
        • Creating your launch
        • Managing your launch
      • Liquidity Lockers V2
        • How to lock your LP tokens?
        • Managing your lock/Withdrawal
      • Liquidity Lockers V3
        • How to lock your LP?
        • Managing your lock/Withdrawal
      • Liquidity Lockers V4
        • How to lock your LP?
        • Managing your lock/Withdrawal
      • Solana Lockers
        • How to lock your LP?
        • Managing your lock/Withdrawal
        • Squads Multisig
      • Token Vesting
        • How to lock your tokens?
        • Managing your lock/Withdrawal
      • Staking-as-a-service
        • Creating a farm
        • Reward Pools
        • Editing a farm page
      • New Token Minter
        • Mint your token
        • Edit your token
        • Verify your token
    • For Developers
      • Subgraphs
      • Liquidity Lockers
        • Lockers V2
          • Contracts
          • Technical Reference
            • UniswapV2Locker (2.1)
            • UniswapV2Locker
          • Subgraphs
            • Endpoints
            • Queries
            • Entities
        • Lockers V3
          • Contracts
          • Technical Reference
            • Locker V3.1
            • NFT Migrator V3
          • Subgraphs
            • Endpoints
            • Queries
            • Entities
      • Token Vesting
        • Contracts
        • Technical Reference
        • Subgraphs
  • 👥Whitelisted audit/KYC partners
  • 💸UNCX Referral Program
  • 🔗UNCX Related Links
  • 🖇️UNCX API Collaborations
  • 🤖UNCX Info Bot Manual
Powered by GitBook
On this page
  • Sample Queries
  • Try Out The Queries
  • Get First 10 Locks Where Locked Liquidity is Greater Than 0
  • Get All Locks After a Block
  • Get All Locks For a Pool
  1. Guides
  2. For Developers
  3. Liquidity Lockers
  4. Lockers V2
  5. Subgraphs

Queries

PreviousEndpointsNextEntities

Last updated 1 month ago

Sample Queries

GraphQL's flexible query structure allows you to explore various data fetching strategies (such as direct lookup, pagination, diffing, etc). This page will help you get started by providing examples using the most techniques.

Try Out The Queries

You can try out the Lockers V2 queries below using Graph Protocol's playground:

All of the examples can also be accessed from the preset dropdown.

Get First 10 Locks Where Locked Liquidity is Greater Than 0

This query returns all locks that currently exist on all AMMs for a given chain (regardless of their expiration).

The amount of locks returned might exceed the Subgraph return limit (currently at 1000 results per query). It is suggested to combine this query with various .

{  locks(first: 10, where: { lockedLiquidity_gt: 0 }) {    id    pool {      totalSupply      token0 {        id      }      token1 {        id      }    }    lockedPercent    lockedLiquidity    unlockDate    owner {      id    }    lockID  }}

Get All Locks After a Block

{  locks(where: { _change_block: { number_gte: 18200000 } }) {    id    pool {      totalSupply    }    unlockDate    amount0    amount1    lockedLiquidity  }}

Get All Locks For a Pool

{  lockedPools(    where: { pool_: { id: "0xf531ca1336663dfb6bd581b011c74482ee20f6d5" } }  ) {    pool {      totalSupply    }    locks {      id      unlockDate      liquidity    }  }}
📖
https://thegraph.com/explorer/subgraphs/5gByjbCu558gLVwzvWiYD8JPQC8KLk6PSe9AVFy8LC69?view=Playground&chain=arbitrum-one ↗(opens in a new tab)
Pagination Techniques(opens in a new tab)