Get started with API
Signing requests
First of all to use Calypso Public API you’ll need to contact Technical Support to generate a new pair of API keys (public and secret keys):
API keys are used for authorization in requests to the Calypso API. After receiving API keys from our Technical Support team you can start sending requests to Calypso Public API.
All requests must contain the following headers:
Sign
The HEX-encoded signature (see below).
Content-Type
All request bodies should have content type application/json and be valid JSON.
Sign — POST data (in the same format in which you want to send) encrypted with the method HMAC-SHA512 using secret key and the result object is converted to a HEX string.
The body is the request body string (in all cases this is JSON stringified request params object).
All the requests should also include the obligatory POST parameter timestamp
with current unix UTC timestamp in milliseconds. The value must not be less than 3 minutes in the past and not greater than 3 minutes in the future.
To create the sign:
Build the body of the request with correct
timestamp
Encrypt the request body with method HMAC-SHA512 using the body as a message and the secret key as a key.
Convert bytes to string of hexadecimal digits.
Examples of sign building:
Javascript
JSX
Python
Python
Example of api keys, body and correct sign for request:
Python
Examples of timestamp building:
Javascript
JavaScript
Python
Python
Last updated