Introduction
Looking to simple yet efficient queries for Stellar data? That's the correct part of the docs.
Mercury allows users to get any contract event and Stellar transactions, and to create personalized queries to filter the output. We ingest and store all this data for both Testnet and Mainnet, and provide access for both through our GraphQL API. Users have also access to the GraphiQL playground endpoint to craft and test out their queries first. Find those in endpoints.
Authentication
All queries require an authentication header. You’ll need to provide the JWT token, which for the moment will be given by the Mercury team.
Example Authentication Header
Include the JWT in the request header as follows:
Authorization: Bearer YOUR_JWT_TOKEN
For example, using curl
:
curl 'https://mainnet.mercurydata.app/graphql' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_JWT_TOKEN' \
--data '{"query":"{ eventByContractId(searchedContractId: \"CONTRACT_ID\") { nodes { contractId } } }"}'
Let's now learn how to performe these queries.
Last updated