Bitquery

Learn how to use Bitquery with Composio

Overview

Enum

BITQUERY

Description

Bitquery provides historical and real-time indexed data for over 40 blockchains through GraphQL APIs, Websockets, SQL, and cloud providers.

Authentication Details

api_key
stringRequired

Actions

Tool to query the combined database, which merges archive and real-time databases. use when you need both historical and up-to-the-second blockchain data in one request.

Action Parameters

operationName
string
query
stringRequired
variables
object

Action Response

data
object
error
string
errors
array
successful
boolean
Tool to use graphql aliases to rename fields in the response for clarity and disambiguation. use when you need to query multiple metrics with identical field names in one call.

Action Parameters

query
stringRequired
variables
object

Action Response

data
object
error
string
errors
array
successful
boolean
Tool to query the archive database. use when you need full historical blockchain data (delayed by tens of minutes to hours).

Action Parameters

operationName
string
query
stringRequired
variables
object

Action Response

data
object
error
string
errors
array
successful
boolean
Tool to generate a graphql metric snippet with conditional logic. use when you need to apply filters directly on metric calculations via the `if` attribute.

Action Parameters

alias
string
distinct_field
string
field
stringRequired
if
objectRequired
operation
stringRequired
select_where
object

Action Response

data
object
error
string
successful
boolean
Tool to use the count distinct metric to aggregate unique values for a field. use when you need to count the number of unique occurrences in a dataset.

Action Parameters

query
stringRequired
variables
object

Action Response

data
object
error
string
errors
array
successful
boolean
Tool to use the count metric to aggregate the number of records matching a graphql query. use when you need simple record counts.

Action Parameters

query
stringRequired
variables
object

Action Response

data
object
error
string
errors
array
successful
boolean
Tool to select the database (archive, realtime, combined) to query at the top level of a graphql request. use after determining whether you need live, historical, or combined blockchain data.

Action Parameters

dataset
stringRequired

Action Response

data
object
error
string
successful
boolean
Tool to access streaming data across various blockchain networks for evaluation purposes. use when querying chains not available via the v2 endpoint; limited to real-time data only.

Action Parameters

query
stringRequired
variables
object

Action Response

data
object
error
string
errors
array
successful
boolean
Tool to subscribe to real-time mempool updates for evm chains (ethereum, bnb, etc.). use after constructing your graphql subscription to stream pending transactions live.

Action Parameters

query
stringRequired
variables
object

Action Response

data
object
error
string
errors
array
successful
boolean
Tool to select the blockchain network for graphql queries. use before constructing dataset or metric queries to ensure the correct chain is targeted.

Action Parameters

network
stringRequired

Action Response

data
object
error
string
successful
boolean
Tool to fetch graphql dataset options via schema introspection. use when you need to discover root-level query fields and their arguments before building queries.

Action Parameters

Action Response

data
object
error
string
errors
array
successful
boolean
Tool to generate graphql priceasymmetry filter snippet. use when you need to filter trades based on price asymmetry metric.

Action Parameters

ge
number
gt
number
le
number
lt
number

Action Response

data
object
error
string
successful
boolean
Tool to calculate quantiles to understand the distribution of numerical data. use when you need percentile metrics (e.g., median or quartiles) of a numerical field in a dataset.

Action Parameters

query
stringRequired
variables
object

Action Response

data
object
error
string
errors
array
successful
boolean
Realtime database query

Action Parameters

operationName
string
query
stringRequired
variables
object

Action Response

data
object
error
string
errors
array
successful
boolean
Tool to generate a graphql metric snippet filtering by its value using selectwhere. use when you need to include only metrics meeting specific value conditions (e.g., only positive sums).

Action Parameters

alias
string
of
stringRequired
operation
stringRequired
selectWhere
objectRequired

Action Response

data
object
error
string
successful
boolean
Tool to compute statistical metrics (mean, median, etc.) over one variable in a dataset. use when you need precise summary statistics in your graphql query.

Action Parameters

query
stringRequired
variables
object

Action Response

data
object
error
string
errors
array
successful
boolean
Tool to calculate the sum of a specified field's values across defined dimensions. use when you need to aggregate total values in a dataset.

Action Parameters

query
stringRequired
variables
object

Action Response

data
object
error
string
errors
array
successful
boolean
Tool to estimate the count of unique values using the uniq metric. use when you need approximate or exact unique counts for analytics on blockchain datasets.

Action Parameters

query
stringRequired
variables
object

Action Response

data
object
error
string
errors
array
successful
boolean