weth prices filtered

Returns 10 DEX trades by token on Ethereum, where side currency smart contract is 0xC02a…6Cc2, DEX smart contract is 0x88e6…5640 or 0xB4e1…C9Dc and block time after 2021-06-05, sorted by block time: block time and trade price.

By gaurav · saved 26 January 2024 · run 2 times · Bitquery API v2

What it returns

Filters

The query

query ($network: evm_network, $baseAddress: String!, $limit: Int!, $offset: Int!, $time: DateTime!, $intervalUnit: OLAP_DateTimeIntervalUnits!, $interval: Int!, $pairs: [String!]) {
  EVM(dataset: combined, network: $network) {
    DEXTradeByTokens(
      orderBy: {ascendingByField: "Block_Time"}
      where: {Trade: {Side: {Currency: {SmartContract: {is: $baseAddress}}}, Amount: {gt: "10"}, Dex: {SmartContract: {in: $pairs}}}, Block: {Time: {after: $time}}}
      limit: {count: $limit, offset: $offset}
    ) {
      Block {
        Time(interval: {in: $intervalUnit, count: $interval})
      }
      Trade {
        close: Price(maximum: Block_Number)
      }
    }
  }
}

Variables

{
  "network": "eth",
  "baseAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
  "time": "2021-06-05T14:15:00Z",
  "limit": 10,
  "offset": 0,
  "intervalUnit": "minutes",
  "interval": 5,
  "pairs": [
    "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
    "0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc"
  ]
}

Similar queries