Skip to main content

Signature

Request Headers

All private API requests must include the following headers:

HeaderTypeRequiredDescription
ACCESS-KEYstringYesYour API Key
ACCESS-SIGNstringYesSignature (Base64 encoded HMAC SHA256)
ACCESS-TIMESTAMPstringYesRequest timestamp in milliseconds since Epoch
ACCESS-PASSPHRASEstringYesThe passphrase you set when creating the API key
Content-TypestringYesapplication/json

Signature

The ACCESS-SIGN header is generated by creating an HMAC SHA256 signature and encoding it with Base64.

Signature String Format

timestamp + method + requestPath + queryString + body
ComponentDescription
timestampSame as ACCESS-TIMESTAMP header (milliseconds since Epoch)
methodHTTP request method in uppercase (GET, POST )
requestPathAPI endpoint path (e.g., /api/v1/spot/trade/place-order)
queryStringQuery parameters for GET requests (e.g., ?symbol=BTCUSDT&limit=10)
bodyRequest body for POST requests (JSON string). Empty for GET requests

Signature Examples

GET Request:

1659076670000GET/api/v1/spot/account/assets?coin=USDT

POST Request:

1659076670000POST/api/v1/spot/trade/place-order{"symbol":"BTCUSDT","side":"BUY","orderType":"LIMIT","price":"30000","size":"0.01"}

Steps to generate the final signature

HMAC

Step 1. Use the private key secretkey to encrypt the string to be signed with hmac sha256
String payload = hmac_sha256(secretkey, Message);
Step 2. Base64 encoding for Signature
String signature = base64.encode(payload);

RSA

Step 1. Use the RSA privateKey privateKey to encrypt the string to be signed with SHA-256

Step 2. Base64 encoding for Signature.