The amount of token0 removed from the pair, adjusted by the number of decimals in the token. For example, if amount0 is in WEI, amount0Shifted will be in ETH.
The amount of token0 added to the pair, adjusted by the number of decimals in the token. For example, if amount0 is in WEI, amount0Shifted will be in ETH.
The amount of quoteToken involved in the swap. For example, if quoteToken is USDC for a USDC/WETH pair, amountNonLiquidityToken would be the amount of USDC involved in the swap.
The price per quoteToken at the time of the swap in the network’s base token. For example, if quoteToken is USDC for a USDC/WETH pair on ETH network, priceBaseToken would the price of USDC in ETH.
The price per quoteToken at the time of the swap in USD. For example, if quoteToken is USDC for a USDC/WETH pair on ETH network, priceBaseToken would the price of USDC in USD ($1.00).
The amount of token0 added or removed from the pair, adjusted by the number of decimals in the token. For example, if amount0 is in WEI, amount0Shifted will be in ETH.
The amount of token1 added or removed from the pair, adjusted by the number of decimals in the token. For example, USDC amount1Shifted will be by 6 decimals.
Base fee portion of gas cost in native token smallest unit (wei for EVM, lamports for Solana). baseFeePerGas * gasUsed on EVM, 5000 lamports * signatures on Solana.
Use eventDisplayType instead of eventType. While eventType returns Swap for all swaps, eventDisplayType splits them into Buy or Sell based on the direction of the trade relative to the quote token.
Why am I getting Mint/Burn events when I only want swaps?
Add eventType: Swap to your query filters to exclude liquidity add/remove events. Alternatively, use eventDisplayType: [Buy, Sell] to get only buy and sell events.
How do I get events for a specific time range?
Use the timestamp filter with from and to unix timestamps. For example: timestamp: {from: 1704067200, to: 1704153600} for a 24-hour window.
What's the difference between priceUsd and priceUsdTotal?
priceUsd is the price per token at the time of the swap. priceUsdTotal is the total USD value of the swap (amountNonLiquidityToken x priceUsd). Use priceUsdTotal for filtering by trade size.
How can I identify sandwich attacks or wash trades?
Check the labels field on events. It contains sandwich labels (with types sandwiched, frontrun, backrun) and washtrade labels when detected.
I'm missing transaction data for a specific block — how can I find it?
getTokenEvents looks at the top pair when filtering for events, not all pairs. If the missing transactions occurred on a different pair, use listPairsWithMetadataForToken to find the correct pool (filter by volume) and pass that pair address to getTokenEvents.