Balmy
DCA
DCA
  • Introduction to the protocol
  • FAQ
  • Concepts
    • Positions
      • Actions
      • NFT/Permissions
      • Swap Intervals
    • Fees
    • Swaps
    • Token Integration
    • Yield Sources
  • Architecture
    • Core
      • Hub
      • Permission Manager
      • NFT Descriptor
    • Periphery
      • Companion
      • Libraries
  • Tech Guides
    • Interacting with the protocol
    • Smart Contract Registry
    • Swaps
      • Next Swap
      • Executing a Flash Swap
    • Position Management
      • Creating a Position
      • Modifying a Position
      • Withdrawing from a Position
      • Terminating a Position
    • Permission Management
    • Subgraphs
      • Playground
      • Fetch all pairs
      • Fetch all tokens
      • Fetch all active intervals
      • Fetch positions by address
    • Github
  • Mean explained by friends
    • By Perpetual Protocol
    • By Ceazor's Snack Sandwich
  • Other
    • Bug Reports
Powered by GitBook
On this page
  • Execution
  • Query
  • Response Type

Was this helpful?

  1. Tech Guides
  2. Subgraphs

Fetch all pairs

PreviousPlaygroundNextFetch all tokens

Last updated 2 years ago

Was this helpful?

Execution

You can execute this query on our Optimism subgraph, .

Query

Get all pairs with their token names, block number and the timestamp they were created at.

{
  pairs {
    tokenA {
      name
    }
    tokenB {
      name
    }
    createdAtBlock
    createdAtTimestamp
  }
}

Response Type

{
  data {
    pairs: [
      {
        tokenA {
          name: string
        }
        tokenB {
          name: string
        }
        createdAtBlock: BigInt
        createdAtTimestamp: BigInt
      }
    ]
  }
}
here