matic - make query fast
Returns transactions and transfers on Polygon, where transaction from is 0x6f4c…5d71, transfer receiver is 0x6f4c…5d71 and transfer sender is 0x6f4c…5d71: sum of fee sender fee, sum of fee sender fee in USD, count, chain ID, block time, unique of block date, sum of transfer amount and sum of transfer amount in USD.
What it returns
- sum of fee sender fee
- sum of fee sender fee in USD
- count
- chain ID
- block time
- unique of block date
- sum of transfer amount
- sum of transfer amount in USD
Filters
- transaction from is 0x6f4c…5d71
- transfer receiver is 0x6f4c…5d71
- transfer sender is 0x6f4c…5d71
The query
query ($network: evm_network, $address: String!) {
EVM(dataset: combined, network: $network) {
fee: Transactions(where: {Transaction: {From: {is: $address}}}) {
tx_fee: sum(of: Fee_SenderFee)
tx_fee_usd: sum(of: Fee_SenderFeeInUSD)
tx_count: count
}
currencies_reciiver: Transfers(where: {Transfer: {Receiver: {is: $address}}}) {
ChainId
r_currencies: count(distinct: Transfer_Currency_SmartContract)
Block {
r_from: Time(minimum: Block_Time)
r_to: Time(maximum: Block_Time)
}
r_days: uniq(of: Block_Date)
}
receiver: Transfers(
where: {Transfer: {Currency: {Native: true}, Receiver: {is: $address}}}
) {
r_amount: sum(of: Transfer_Amount)
r_amount_usd: sum(of: Transfer_AmountInUSD)
}
currencies_sender: Transfers(where: {Transfer: {Sender: {is: $address}}}) {
ChainId
s_currencies: count(distinct: Transfer_Currency_SmartContract)
Block {
s_from: Time(minimum: Block_Time)
s_to: Time(maximum: Block_Time)
}
s_days: uniq(of: Block_Date)
}
sender: Transfers(
where: {Transfer: {Currency: {Native: true}, Sender: {is: $address}}}
) {
s_amount: sum(of: Transfer_Amount)
s_amount_usd: sum(of: Transfer_AmountInUSD)
}
}
}
Variables
{
"network": "matic",
"address": "0x6f4c9a4870e23ee86f7ee4b3b2cd62ad784d5d71",
"mempool": false
}
Similar queries
- transactions · Ethereum · Transactions
- matic_tx_transaction · Polygon · Transactions
- Polygon txns with value 0 not in db · Polygon · Transactions
- FreshWalletCheck for prediction market · Polygon · Transactions
- matic not working · Polygon · Transactions