Ordering of blocks

When I try to extract data according to block numbers using the following:
options: {desc: “block.height”, limit: 10000, offset: 0}
And specify block height using the following:
height: {gteq: 100, lteq: 101}
The data API returns list block number 101 first, after which is the data from block 100.

Is there a way to reverse this order, so that I can see data from block 100 first, then 101?

Thanks in advance!

Can you share the entire GraphQL query here?

{
ethereum(network: bsc) {
transactions(
options: {desc: “block.height”, limit:10000000
, offset: 0}
amount: {gteq: 0}
height: {gteq: 8000000
, lteq: 8000001
}
) {
block {
timestamp {
time(format: “%Y-%m-%d %H:%M:%S”)
}
height
}
amount
address: sender {
address
annotation
}
hash
gasValue
gas
gasPrice
currency{
name
address
symbol
}
}
}
}

You just need to alter the options attribute

options: {asc: "block.height", limit: 10000000, offset: 0}

The GraphQL query should look like this

{
  ethereum(network: bsc) {
    transactions(
      options: {asc: "block.height", limit: 10000000, offset: 0}
      amount: {gteq: 0}
      height: {gteq: 8000000, lteq: 8000001}
    ) {
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      amount
      address: sender {
        address
        annotation
      }
      hash
      gasValue
      gas
      gasPrice
      currency {
        name
        address
        symbol
      }
    }
  }
}

Thanks for the response!

1 Like