bought and sold currencies today with price

Returns 10 DEX trades on Solana, where buy currency mint address is not So1111…1112, buy currency mint address is So1111…1112 and block time after 2024-06-17, sorted by buy, highest first: sum of trade buy amount, sum of trade sell amount, buy account address, buy currency mint address, buy currency name, buy currency symbol, buy price and 4 more fields.

By gaurav · saved 18 June 2024 · Bitquery API v2

What it returns

Filters

The query

{
  Solana {
    bought: DEXTrades(
      limit: {count: 10}
      orderBy: {descendingByField: "buy"}
      where: {Trade: {Buy: {Currency: {MintAddress: {not: "So11111111111111111111111111111111111111112"}}}}, any: [{Trade: {Buy: {Account: {Address: {is: "6fpLW6YbiTjVDqUzZsDdSXvcSk4JkzFHFabqrp8xbszH"}}}}}, {Trade: {Sell: {Account: {Address: {is: "6fpLW6YbiTjVDqUzZsDdSXvcSk4JkzFHFabqrp8xbszH"}}}}}], Block: {Time: {after: "2024-06-17T11:00:00Z"}}}
    ) {
      buy: sum(of: Trade_Buy_Amount)
      sell: sum(of: Trade_Sell_Amount)
      Trade {
        Buy {
          Account {
            Address
          }
          Currency {
            MintAddress
            Name
            Symbol
          }
          boughtprice: Price
          currentprice: Price(maximum: Block_Time)
        }
        Sell {
          Account {
            Address
          }
          Currency {
            MintAddress
            Name
            Symbol
          }
        }
      }
    }
    sold: DEXTrades(
      limit: {count: 10}
      orderBy: {descendingByField: "buy"}
      where: {Trade: {Buy: {Currency: {MintAddress: {is: "So11111111111111111111111111111111111111112"}}}}, any: [{Trade: {Buy: {Account: {Address: {is: "6fpLW6YbiTjVDqUzZsDdSXvcSk4JkzFHFabqrp8xbszH"}}}}}, {Trade: {Sell: {Account: {Address: {is: "6fpLW6YbiTjVDqUzZsDdSXvcSk4JkzFHFabqrp8xbszH"}}}}}], Block: {Time: {after: "2024-06-17T11:00:00Z"}}}
    ) {
      buy: sum(of: Trade_Buy_Amount)
      sell: sum(of: Trade_Sell_Amount)
      Trade {
        Buy {
          Account {
            Address
          }
          Currency {
            MintAddress
            Name
            Symbol
          }
        }
        Sell {
          Account {
            Address
          }
          Currency {
            MintAddress
            Name
            Symbol
          }
        }
      }
    }
  }
}

Similar queries