Skip to content

Conversation

@Horlabrainmoore
Copy link

@Horlabrainmoore Horlabrainmoore commented Dec 16, 2025

curl --location 'https://streaming.bitquery.io/graphql' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ory_at_5rIcvPSi1ZtIUI-RUS1Uu4lHWP4IMI12-ZG26Pw8IGs.Sy2zqxHBj93VDnEFD0gSSKWK3rskm-Sb4Oq1C7LwdkA' \
--data '{"query":"query ($network: evm_network, $hash: String) {\n  EVM(dataset: realtime, network: $network) {\n    Transactions(where: {Transaction: {Hash: {is: $hash}}}) {\n      ChainId\n      Block {\n        Number\n        Time\n        GasUsed\n        GasLimit\n        ParentHash\n      }\n      sum(of: Fee_SenderFee)\n      sum_usd: sum(of: Fee_SenderFeeInUSD)\n      Transaction {\n        Hash\n        From\n        To\n        Value\n        ValueInUSD\n        Gas\n        GasPrice\n        GasPriceInUSD\n        Protected\n        CallCount\n        Cost\n        CostInUSD\n      }\n    }\n    Transfers(where: {Transaction: {Hash: {is: $hash}}}) {\n      t_count: count\n      t_sum: sum(of: Transfer_Amount)\n      t_sum_usd: sum(of: Transfer_AmountInUSD)\n      Transfer {\n        Success\n      }\n    }\n  }\n}\n","variables":"{\"network\":\"base\",\"hash\":\"0xcd28b37da3fdea7f5a6f88ec25324c8e57b0e9879a982f301f8d0cd5dba92158\",\"mempool\":false}"}'
import { fetchBitcoinTransaction } from "./bitqueryTx.js";

const data = await fetchBitcoinTransaction({
  apiKey: process.env.BITQUERY_API_KEY,
  txHash: "30ecf3a9e06ee0ae220f42bfe6799c0bcd9ef99927308a0bf934bd4192f53968",
  limit: 10,
  offset: 0
});

console.log(JSON.stringify(data, null, 2));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant