LUNA trades

Returns the latest 50 DEX trades by token on Base, where side currency smart contract is 0x55cd…7ee4, currency smart contract is 0x0b3e…7e1b and block time since 2024-10-23: block time, transaction hash, smart contract, protocol family, protocol name, currency symbol, currency name and 11 more fields.

By Aleksey · saved 26 October 2024 · run 2 times · Bitquery API v2

What it returns

Filters

The query

query LatestTrades($network: evm_network, $token: String, $base: String, $time_ago: DateTime) {
  EVM(network: $network) {
    DEXTradeByTokens(
      orderBy: {descending: Block_Time}
      limit: {count: 50}
      where: {Trade: {Side: {Amount: {gt: "0"}, Currency: {SmartContract: {is: $token}}}, Currency: {SmartContract: {is: $base}}}, Block: {Time: {since: $time_ago}}}
    ) {
      Block {
        allTime: Time
      }
      Transaction {
        Hash
      }
      Trade {
        Dex {
          SmartContract
          ProtocolFamily
          ProtocolName
        }
        Currency {
          Symbol
          SmartContract
          Name
          Decimals
        }
        PriceInUSD
        AmountInUSD
        Amount
        Side {
          Type
          Currency {
            Symbol
            SmartContract
            Name
            Decimals
          }
          AmountInUSD
          Amount
        }
      }
    }
  }
}

Variables

{
  "network": "base",
  "base": "0x0b3e328455c4059eeb9e3f84b5543f74e24e7e1b",
  "token": "0x55cd6469f597452b5a7536e2cd98fde4c1247ee4",
  "time_ago": "2024-10-23T07:16:21Z"
}

Similar queries