query_long
Returns the latest transfer: transfer amount, smart contract, sum of trade buy amount in USD, sum of trade sell amount in USD, count and trade price.
What it returns
- transfer amount
- smart contract
- sum of trade buy amount in USD
- sum of trade sell amount in USD
- count
- trade price
The query
query PairData($pairAddress: String!, $network: evm_network!, $createdAt: DateTime!, $tokenAddress: String!, $weth: String!) {
EVM(dataset: combined, network: $network) {
initialLiquidity: Transfers(
limit: {count: 2}
orderBy: {ascending: Block_Time}
where: {Transfer: {Receiver: {is: $pairAddress}}}
) {
Transfer {
Amount
Currency {
SmartContract
}
}
}
volume: DEXTrades(
where: {Block: {Time: {since: $createdAt}}, Trade: {Dex: {Pair: {SmartContract: {is: $pairAddress}}}}}
) {
token1_vol: sum(of: Trade_Buy_AmountInUSD)
token2_vol: sum(of: Trade_Sell_AmountInUSD)
sellTrades: count(
if: {Trade: {Buy: {Currency: {SmartContract: {is: $tokenAddress}}}}}
)
buyTrades: count(if: {Trade: {Buy: {Currency: {SmartContract: {is: $weth}}}}})
}
price: DEXTradeByTokens(
where: {Trade: {Dex: {Pair: {SmartContract: {is: $pairAddress}}}, Currency: {SmartContract: {is: $tokenAddress}}}}
orderBy: {descending: Block_Time}
limit: {count: 1}
) {
Trade {
Price
}
}
}
}
Similar queries
- Ethereum Address Latest Transfers In and Out · Ethereum · Transfers
- Tornado Cash: ETH paid into the four ETH pools, Jan 1 to Sep 27 2026 · Ethereum · Transfers