Queries

Contract events and transactions queries.

Note that currently there are only a few queries, and new ones can be added on request. If you cannot find the appropriate query for what you need, ask on our Discord server.

Authentication

All queries require an authentication header. You’ll need to provide a JWT token, which will be provided to users that have access to Mercury (get access).

Example Authentication Header

Include the JWT in the request header as follows:

Authorization: Bearer YOUR_JWT_TOKEN

For example, using curl:

curl 'https://MERCURY_ENDPOINT/graphql' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_JWT_TOKEN' \
  --data '{"query":"{ eventByContractId(searchedContractId: \"CONTRACT_ID\") { nodes { contractId } } }"}'

Last updated