Request signing
You need to specify your secret key, apply SHA256
encryption to your payload and convert the result to HEX
format
Nonce usage
You should pass nonce
parameter in the payload of every request to this API. nonce
can be a number or a string, each request must be accompanied by a unique value. Otherwise the request will fail.
We will use Unix TimeStamp as the nonce
value for sending requests in this document.
Example of creating request signature NodeJS
NodeJS
Let's say we want to get price rate of ETH
/USDT
(method /price-rate
)
1. Build request payload
2. Add nonce
parameter to the payload in order to avoid request duplication.
By using unix timestamp as nonce
parameter we will meet the requirements of using number and its incrementing for every new request.
3. Create string from payload and used it in a process of creating signature.
4. Create signature:
Example with crypto-js
module:
Example with crypto
module:
5. Send request with required headers:
6. Response:
Last updated