Skip to content

Sign

Interface Signature Description

Signing public request parameters

Headers:

Name Type Required Notes
api-key string Y requested api-key
nonce string Y Random string, 32 bits
timestamp string Y Current timestamp, unit:milliseconds
sign string Y Signature string

Signature steps:

  1. All queryParams are sorted in ascending ASCII order by Key, for example: String queryParams = "id=1uid=200"
  2. parameters in body, are compressed to a string, example: String body = {"uid": "2899", " arr":[{"id":1, "name": "maple"},{"id":2, "name": "lily"}]}
  3. Signature, need to encrypt 2 times.
    • String digest = SHA256(nonce + timestamp + api-key + queryParams + body)
    • String sign = SHA256(digest + secretKey)
    • Note: secretKey is the one that comes together when you apply for api-key. Please keep it wisely, and do not disclose it to anyone