Qredo API
Get started
Prerequisites
To use the Qredo API v1, you must have:
- A Qredo Account
- Access to the administration role in your Organization
- A Fund with a Wallet
Step 1: Generate an API Key and secret pair
To generate an API key and secret pair, you will need to use the Web UI. To do so, navigate to Account > Settings > API. From this tab you can create an API key and assign the relevant permisison.
You should have access to the administration role in your Organization
It is important to have at least one Fund managing a Wallet. Calls made using API keys generated for an Organization with no Funds or Wallets will return null
data.
To read more about API keys including their granular permissions model, check out Managing API keys and Secrets.
Step 2: Generate your request
Qredo API is a RESTful service. Generate your request using either the Web3 Wallet API or the Read-only API.
Step 3: Generate a valid signature for your requests
The signature is a way for the API server to ensure API calls are authorized. This signature must be attached to the request using the qredo-api-sig
header.
To generate it:
Construct the request to sign in the format:
[timestamp][method][URL][body]
.The timestamp used for signing must be the same one that is used in the header
qredo-api-ts
.For example, suppose I want to sign an API call to
GET /balance
, with an empty body. The parameters are as following:- timestamp:
1647356399
. This timestamp must be the same that is passed asqredo-api-ts
header - HTTP method:
GET
- URL:
https://api.qredo.network/qapi/v1/balance
- body: none
The resulting string that will need to be signed is:
1647356399GEThttps://api.qredo.network/qapi/v1/balance
- timestamp:
Using the decoded secret, sign the request as constructed in Step 1 with the HMAC-SHA256 algorithm. Note that if you are storing the secret as it is displayed in the web app, you will need to base64-decode it first.
Encode the signed payload with URL-safe Base64 encoding.
Assign the generated signature to the
qredo-api-sig
header.
Check out the relevant page for further examples and code snippets you can re-use.
Step 4: Test your integration
As you develop your integration, please use the sandbox environment, using as base URL for the endpoint:
https://sandbox-api.qredo.network/qapi/v1
You can also use the API testing tool to allow you to send valid requests directly from the CLI or from a basic web interface.
Step 5: Deploy your integration
To go live with your integration, simply switch your base endpoint to:
https://api.qredo.network/qapi/v1/
Congrats! 🎉
You are now using Qredo API v1.