API Authentication
While some endpoints are public and require no authentication, most interaction with the Coindirect API requires it.
How To Authenticate
In order to authenticate with the Coindirect API, you need to create a HAWK AUTH ID and HAWK AUTH KEY pair on your Coindirect account. You can do this by navigating to the Settings -> API Keys page. Once you have these, you may then proceed to integrate using the Holder-of-Key Authentication Scheme otherwise known as HAWK.
HAWK Authentication
It is best to read the guides available on the HAWK readme. The Coindirect API makes use of SHA256 for calculating the HMAC.
HAWK optionally supports payload validation (POST/PUT data payload) as well as response payload validation, these are not enabled on the Coindirect API so can be ignored.
Hints
Do not include your request body in your string to sign when calculating the HAWK signature
Do not include query parameters of your request in your string to sign when calculating the HAWK signature
Make sure that your nonce value is unique for each of your requests. Otherwise you get a 429 error
Example
Here's a piece of code in PHP that can give you an idea on how to buld your signature.
The above code calculates the following signature:
Some code lines
Last updated