TERNOA Documentation
Learn Build
  • What is Ternoa Chain ?
  • SPECS
    • Polygon CDK zkEVM
    • Polygon AggLayer
    • Avail DA
    • Trusted Execution Environments 
  • BUILD
    • Wallets
    • RPC
    • API
    • Explorer
  • Tools
    • Staking
    • Ternoa Safe
    • TIP
  • Community
    • Ternoa.com
    • Github
    • Discord
    • Twitter
    • Medium
Powered by GitBook
On this page
  • Query NFTs ordered by creation timestamp
  • Query NFTs ordered by creation timestamp and price
  1. Build
  2. Javascript SDK
  3. Indexer
  4. Global requests

Ordered queries

Last updated 1 year ago

In this section, you'll see how to order queries:

You can try this directly in our or our

Each field generates a sort option that you can apply on any request. For example:

Query NFTs ordered by creation timestamp

query {
  nftEntities(
    first: 10
    offset: 0
    orderBy: TIMESTAMP_CREATE_DESC
  ) {
    totalCount
    nodes {
      nftId
      owner
      collectionId
      offchainData
      timestampCreate
    }
  }
}

You can put as many sort fields as you need:

Query NFTs ordered by creation timestamp and price

query {
  nftEntities(
    first: 10
    offset: 0
    orderBy: [TIMESTAMP_CREATE_DESC, PRICE_ASC]
  ) {
    totalCount
    nodes {
      nftId
      owner
      price
      priceRounded
      timestampCreate
    }
  }
}

alphanet indexer's playground
mainnet indexer's playground