Matic pair list

Returns 100 DEX trades by token on Polygon, where block time after 2024-09-30, sorted by USD, highest first: currency symbol, currency name, smart contract, protocol name, side currency symbol, side currency name, side smart contract and 8 more fields.

By Aleksey · saved 30 September 2024 · Bitquery API v2

What it returns

Filters

The query

query pairs($min_count: String, $network: evm_network, $time_10min_ago: DateTime, $time_1h_ago: DateTime, $time_3h_ago: DateTime, 
  $wmatic: String!, $weth: String!, $usdc: String!, $usdt: String!, $usdcpos: String!) {
  EVM(network: $network) {
    DEXTradeByTokens(
      where: {Block: {Time: {after: $time_3h_ago}}, any: [
        {Trade: {Side: {Currency: {SmartContract: {is: $usdt}}}}}, 
        {Trade: {Side: {Currency: {SmartContract: {is: $usdc}}}, Currency: {SmartContract: {notIn: [$usdt]}}}}, 
        {Trade: {Side: {Currency: {SmartContract: {is: $usdcpos}}}, Currency: {SmartContract: {notIn: [$usdt, $usdc]}}}}, 
        {Trade: {Side: {Currency: {SmartContract: {is: $weth}}}, Currency: {SmartContract: {notIn: [$usdc, $usdt, $usdcpos]}}}}, 
        {Trade: {Side: {Currency: {SmartContract: {is: $wmatic}}}, Currency: {SmartContract: {notIn: [$weth, $usdc, $usdt, $usdcpos]}}}}, 
        {Trade: {Side: {Currency: {SmartContract: {notIn: [$usdc, $usdt, $weth, $wmatic]}}}, Currency: {SmartContract: {notIn: [$usdc, $usdt, $weth, $wmatic, $usdcpos]}}}}]}
      orderBy: {descendingByField: "usd"}
      limit: {count: 100}
    ) {
      Trade {
        Currency {
          Symbol
          Name
          SmartContract
          ProtocolName
        }
        Side {
          Currency {
            Symbol
            Name
            SmartContract
            ProtocolName
          }
        }
        price_last: PriceInUSD(maximum: Block_Number)
        price_10min_ago: PriceInUSD(
          maximum: Block_Number
          if: {Block: {Time: {before: $time_10min_ago}}}
        )
        price_1h_ago: PriceInUSD(
          maximum: Block_Number
          if: {Block: {Time: {before: $time_1h_ago}}}
        )
        price_3h_ago: PriceInUSD(minimum: Block_Number)
      }
      dexes: uniq(of: Trade_Dex_OwnerAddress)
      amount: sum(of: Trade_Side_Amount)
      usd: sum(of: Trade_Side_AmountInUSD)
      sellers: uniq(of: Trade_Seller)
      buyers: uniq(of: Trade_Buyer)
      count(selectWhere: {ge: $min_count})
    }
  }
}

Variables

{
  "network": "matic",
  "time_10min_ago": "2024-09-30T05:01:54Z",
  "time_1h_ago": "2024-09-30T04:11:54Z",
  "time_3h_ago": "2024-09-30T02:11:54Z",
  "usdc": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
  "usdcpos": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
  "usdt": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f",
  "weth": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",
  "wmatic": "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",
  "min_count": "100"
}

Similar queries