Error query
Returns 100 DEX trades by token on opBNB, where block time after 2025-02-16, sorted by USD, highest first: currency symbol, currency name, smart contract, protocol name, side currency symbol, side currency name, side smart contract and 8 more fields.
What it returns
- currency symbol
- currency name
- smart contract
- protocol name
- side currency symbol
- side currency name
- side smart contract
- side protocol name
- price in USD
- unique of trade DEX owner address
- sum of trade side amount
- sum of trade side amount in USD
- unique of trade seller
- unique of trade buyer
- count
Filters
- block time after 2025-02-16
The query
query pairs($min_count: String, $network: evm_network, $time_10min_ago: DateTime, $time_1h_ago: DateTime, $time_3h_ago: DateTime, $time_ago: DateTime, $wbnb: String!, $bnb: String!, $usdt: String!, $usdc: String!) {
EVM(network: $network) {
DEXTradeByTokens(
where: {TransactionStatus: {Success: true}, Block: {Time: {after: $time_ago}}, any: [{Trade: {Side: {Currency: {SmartContract: {is: $usdt}}}}}, {Trade: {Side: {Currency: {SmartContract: {is: $usdc}}}, Currency: {SmartContract: {notIn: [$usdt]}}}}, {Trade: {Side: {Currency: {SmartContract: {is: $wbnb}}}, Currency: {SmartContract: {notIn: [$usdc, $usdt]}}}}, {Trade: {Side: {Currency: {SmartContract: {is: $bnb}}}, Currency: {SmartContract: {notIn: [$usdc, $usdt]}}}}, {Trade: {Side: {Currency: {SmartContract: {notIn: [$usdt, $wbnb]}}}, Currency: {SmartContract: {notIn: [$usdt, $wbnb, $bnb]}}}}]}
orderBy: {descendingByField: "usd"}
limit: {count: 100}
) {
Trade {
Currency {
Symbol
Name
SmartContract
ProtocolName
}
Side {
Currency {
Symbol
Name
SmartContract
ProtocolName
}
}
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(
maximum: Block_Number
if: {Block: {Time: {before: $time_3h_ago}}}
)
}
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: $min_count})
}
}
}
Variables
{
"network": "opbnb",
"time_10min_ago": "2025-02-19T05:47:51Z",
"time_1h_ago": "2025-02-19T04:57:51Z",
"time_3h_ago": "2025-02-19T02:57:51Z",
"time_ago": "2025-02-16T05:57:51Z",
"usdt": "0x9e5aac1ba1a2e6aed6b32689dfcf62a509ca96f3",
"usdc": "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d",
"wbnb": "0x4200000000000000000000000000000000000006",
"bnb": "0x",
"min_count": "1"
}
Similar queries
- opBnB top tokens · opBNB · DEXTradeByTokens
- Copy don Donald · opBNB · DEXTradeByTokens
- Latest OHLC info · opBNB · DEXTradeByTokens
- Price of a USDT token in terms of WBNB on opBNB · opBNB · DEXTradeByTokens
- opbnb avg, sum & sum in usd fees · opBNB · Transactions