BSC Query
Returns DEX trades and events on BNB Chain, where DEX smart contract is 0x5347…F08e, log smart contract is 0x5347…F08e and signature name is Mint or Burn, sorted by block time: sum of trade buy amount, sum of trade sell amount, sum of trade buy amount in USD, sum of trade sell amount in USD, buy amount, buy amount in USD, buy price and 30 more fields.
What it returns
- sum of trade buy amount
- sum of trade sell amount
- sum of trade buy amount in USD
- sum of trade sell amount in USD
- buy amount
- buy amount in USD
- buy price
- buy price in USD
- buy buyer
- buy seller
- buy currency name
- buy smart contract
- sell amount in USD
- sell price in USD
- sell price
- sell amount
- sell buyer
- sell seller
- sell currency name
- sell smart contract
- smart contract
- transaction hash
- block time
- block number
- signature name
- from
- to
- transaction type
- log header address
- log header index
- integer
- string
- value address
- bool
- hex
- big integer
- arguments name
Filters
- DEX smart contract is 0x5347…F08e
- log smart contract is 0x5347…F08e
- signature name is Mint or Burn
- block number is at least 43969490
- block number is at most 43969915
The query
query GetTrades($pools: [String!], $fromBlock: String!, $toBlock: String!) {
EVM(dataset: combined, network: bsc) {
DEXTrades(
where: {Block: {Number: {ge: $fromBlock, le: $toBlock}}, Trade: {Dex: {SmartContract: {in: $pools}}}}
orderBy: {ascending: Block_Time}
) {
buy_vol: sum(of: Trade_Buy_Amount)
sell_vol: sum(of: Trade_Sell_Amount)
buy_vol_usd: sum(of: Trade_Buy_AmountInUSD)
sell_vol_usd: sum(of: Trade_Sell_AmountInUSD)
Trade {
Buy {
Amount
AmountInUSD
Price
PriceInUSD
Buyer
Seller
Currency {
Name
SmartContract
}
}
Sell {
AmountInUSD
PriceInUSD
Price
Amount
Buyer
Seller
Currency {
Name
SmartContract
}
}
Dex {
SmartContract
}
}
Transaction {
Hash
}
Block {
Time
Number
}
Log {
Signature {
Name
}
}
}
Events(
where: {Block: {Number: {ge: $fromBlock, le: $toBlock}}, Log: {SmartContract: {in: $pools}, Signature: {Name: {in: ["Mint", "Burn"]}}}}
orderBy: {ascending: Block_Time}
) {
Transaction {
Hash
From
To
}
Block {
Number
Time
}
Log {
Signature {
Name
}
SmartContract
}
Transaction {
From
To
Type
}
LogHeader {
Address
Index
}
Arguments {
Value {
... on EVM_ABI_Integer_Value_Arg {
integer
}
... on EVM_ABI_String_Value_Arg {
string
}
... on EVM_ABI_Address_Value_Arg {
address
}
... on EVM_ABI_Boolean_Value_Arg {
bool
}
... on EVM_ABI_Bytes_Value_Arg {
hex
}
... on EVM_ABI_BigInt_Value_Arg {
bigInteger
}
}
Name
}
}
}
}
Variables
{
"pools": [
"0x53475Cb1769C24239A393321926b29e2a1B4F08e"
],
"fromBlock": "43969490",
"toBlock": "43969915"
}
Similar queries
- Latest DODO DEX swaps on BSC · BNB Chain · DEXTrades
- Top DODO liquidity pools by 24h volume on BSC · BNB Chain · DEXTrades
- trades · Ethereum · DEXTrades
- metric_v1_bsc · BNB Chain · DEXTrades
- bsc_tessera · BNB Chain · DEXTrades