The Coinstash API lets you connect to your account programmatically, for example to pull your account data into your own tools. This guide explains how the API works and how to send your first test query.
Before you start
An API key: You'll need a Coinstash API key to authenticate your requests. See How to create an API key in Coinstash.
Some technical knowledge: The API is intended for developers and users comfortable working with APIs and query languages.
What kind of API is it?
The Coinstash API is a GraphQL server.
A GraphQL server is a backend server that implements the GraphQL query language to handle and respond to client requests for data. Unlike traditional REST APIs, where each endpoint is responsible for a specific resource (e.g. /users, /posts), GraphQL allows clients to request exactly the data they need and nothing more, often from a single endpoint.
How to explore the API
Step 1 – Open Apollo GraphQL Studio
Go to the Apollo GraphQL Studio: https://studio.apollographql.com/sandbox/explorer
Step 2 – Switch to the Coinstash endpoint
Switch to the Coinstash GraphQL endpoint: https://graph.coinstash.com.au/graphql
Step 3 – Set the Authorization header
In the bottom right corner, set the Authorization header to:
Header key:
AuthorizationValue:
Bearer {{YOUR-API-KEY}}, replacing the placeholder with your own API key. Don't forget the space afterBearer.
Step 4 – Run a sample query
Now you can test the API with a sample query. This one returns the email address on your account:
query UserProfile {
userProfile {
email
}
}If the query returns your email address, your key and header are set up correctly.
⚠️ Keep your API key safe
Treat your API key like a password. Never share it or paste it into tools you don't trust.
Coinstash staff will never ask for your API key.
Use read-only permissions where possible, and revoke any key you no longer use or think may be compromised. See How to create an API key in Coinstash.
Troubleshooting
I get an authentication or unauthorised error. Check the header key is exactly Authorization, the value starts with Bearer followed by a space, and your key hasn't been revoked.
My query returns an error about a field. GraphQL only accepts fields that exist in the schema. Use the schema explorer in Apollo Studio to browse the available queries and fields.
I've lost my API secret. The secret is only shown once. Delete the key and create a new one.
Need a hand? Our Brisbane-based support team is here to help — tap the chat icon in the app or on the website to get in touch.
