About the GraphQL schema
The docs on the sidebar are auto-generated from the Luxor graphql schema and all calls are validated and executed against the schema.
- Allowed operations: query the different datasets.
The GraphQL endpoint
A GraphQL API has a single endpoint, so no matter what operation you perform the endpoint will remain constant
https://api.hashrateindex.com/graphql
API Keys
To get started, and get an API Key please reach out to [email protected].
Communicating with the API
The API uses a Relay (opens in a new tab) compatible spec but you can use it with cURL, any HTTP-speaking library or the Fetch API (opens in a new tab)
Available API Clients
- Python (opens in a new tab) Allows you to interact with the API either as a library or directly from command line.
API Queries
We provide complimentary access to certain queries. For expanded query access (and additional contents and mining insights), explore the additional features available with Hashrate Index Premium. : Learn more about Hashrate Index Premium (opens in a new tab)
Curl
For any operation you would provide a JSON encoded body whether you're doing a query
or a mutation
using the HTTP method POST
Example of query using cURL
curl \
-X POST \
-H "Content-Type: application/json" \
-H "x-hi-api-key: YOUR_API_KEY" \
--data '{"query": "{currentProfile {email}}"}' \
https://api.hashrateindex.com/graphql
Fetch API
const response = await fetch('https://api.hashrateindex.com/graphql', {
method: 'POST',
headers: {
'x-hi-api-key': 'YOUR_API_KEY'
'Content-Type': 'application/json',
},
body: JSON.stringify({
query: text,
variables,
}),
});