tron miss address

Returns 100 DEX trades by token on Tron, where block time after 2024-09-19, sorted by USD, highest first: currency symbol, currency name, smart contract, side asset ID, side currency symbol, side currency name, side smart contract and 7 more fields.

By Nadia · saved 19 September 2024 · run 7 times · Bitquery API v2

What it returns

Filters

The query

query ($time_10min_ago: DateTime, $time_1h_ago: DateTime, $time_3h_ago: DateTime) {
  Tron {
    DEXTradeByTokens(
 where: {Transaction: {Result: {Success: true}}, Block: {Time: {after: $time_3h_ago}}, 
  any: [{Trade: {Side: {Currency: {SmartContract: {is: "TNUC9Qb1rRpS5CbWLmNMxXBjyFoydXjWFR"}}}}},
    {Trade: {Currency: {SmartContract: {not: "TNUC9Qb1rRpS5CbWLmNMxXBjyFoydXjWFR"}}, Side: {Currency: {SmartContract: {is: "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"}}}}},

    {Trade: {Currency: {SmartContract: {notIn: ["TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t", "TNUC9Qb1rRpS5CbWLmNMxXBjyFoydXjWFR"]}},
      Side: {Currency: {SmartContract: {notIn: ["TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t", "TNUC9Qb1rRpS5CbWLmNMxXBjyFoydXjWFR"]}}}}}]}
    
      
      orderBy: {descendingByField: "usd"}
      limit: {count: 100}
    ) {
      Trade {
        Currency {
          Symbol
          Name
          SmartContract
        }
        Side {
          
          Currency {
            AssetId
            Symbol
            Name
            SmartContract
          }
        }
        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: "100"})
    }
  }
}

Variables

{
  "time_10min_ago": "2024-09-19T06:14:15Z",
  "time_1h_ago": "2024-09-19T05:24:15Z",
  "time_3h_ago": "2024-09-19T03:24:15Z"
}

Similar queries