getCallsAndTradeByHashes

Returns 10000 calls and DEX trades on Ethereum, where transaction hash is 0xa657…27a2, block date since 2023-10-17 and block date till 2023-10-18, sorted by block number: integer, string, value address, big integer, hex, bool, arguments name and 30 more fields.

By Xi Cheng · saved 19 October 2023 · run 4 times · Bitquery API v2

What it returns

Filters

The query

query ($network: evm_network, $limit: Int!, $offset: Int!, $txHashes: [String!]!, $callSince: String, $callTill: String, $tradeSince: DateTime, $tradeTill: DateTime, $fromHeight: String = "0") {
  EVM(dataset: combined, network: $network) {
    calls: Calls(
      limit: {offset: $offset, count: $limit}
      orderBy: {ascending: Block_Number}
      where: {Transaction: {Hash: {in: $txHashes}}, Block: {Date: {since: $callSince, till: $callTill}, Number: {gt: $fromHeight}}}
    ) {
      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_BigInt_Value_Arg {
            bigInteger
          }
          ... on EVM_ABI_Bytes_Value_Arg {
            hex
          }
          ... on EVM_ABI_Boolean_Value_Arg {
            bool
          }
        }
        Name
        Type
      }
      Transaction {
        Hash
      }
      Block {
        Number
        Time
      }
      Call {
        Success
        Depth
        From
        InternalCalls
        Opcode {
          Name
        }
        Signature {
          Name
          Signature
          SignatureHash
          SignatureType
        }
      }
    }
    trade: DEXTrades(
      limit: {offset: $offset, count: $limit}
      orderBy: {ascending: Block_Number}
      where: {Transaction: {Hash: {in: $txHashes}}, Block: {Time: {since: $tradeSince, till: $tradeTill}, Number: {gt: $fromHeight}}}
    ) {
      Trade {
        Dex {
          ProtocolName
        }
        Sender
        Buy {
          Amount
          Buyer
          Currency {
            Decimals
            Fungible
            Name
            SmartContract
            ProtocolName
            Symbol
          }
        }
        Sell {
          Amount
          Currency {
            Fungible
            Decimals
            Name
            SmartContract
            ProtocolName
            Symbol
          }
        }
      }
    }
  }
}

Variables

{
  "network": "eth",
  "limit": 10000,
  "offset": 0,
  "txHashes": ["0xa657a2d45781e4953c4a9ea4597aeaa9bb576e4632f6077d82df7b8ade2027a2"],
"tradeSince": "2023-10-17T01:00:00Z",
  "tradeTill": "2023-10-18T01:00:00Z",
"callSince": "2023-10-17",
"callTill": "2023-10-18"
}

Similar queries