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

Was this helpful?

  1. Tech Guides
  2. Subgraphs

Fetch all active intervals

PreviousFetch all tokensNextFetch positions by address

Last updated 2 years ago

Was this helpful?

Execution

You can execute this query on our Optimism subgraph, .

Query

Get all tokens present at least in one of our listed pairs with their ids (also their addresses), token names, decimals and symbols.

{
  swapIntervals(where: { active: true }) {
    interval
   	active 
  }
}

Response

{
  data {
    swapIntervals: [
      {
        active: boolean
        interval: BigInt
      }
    ]
  }
}
here