Skip to content

050id_verification

buyongji edited this page Jul 13, 2018 · 7 revisions

ID verification

1. Generate String To Sign

Use & match the sorted parameters as follows:

access_id=4DA36FFC61334695A66F8D29020EB589&tonce=1513746038205

Add secret_key to the last string to sign, supposing this is a secret_key: B51068CF10B34E7789C374AB932696A05E0A629BE7BFC62F:

access_id=4DA36FFC61334695A66F8D29020EB589&tonce=1513746038205&secret_key=B51068CF10B34E7789C374AB932696A05E0A629BE7BFC62F 

2.Use 32-bit MD5 Algorithm Signature

Use MD5 algorithm to encrypt the signature string, convert encrypted result to uppercase, get signature data and put signature data in params:

authorization: C6F0DDA352101C2258F992A277397F4A

Server Sign

#example

#Request
{
  "method":"server.sign",
  "params": [
    "4DA36FFC61334695A66F8D29020EB589",
    "C6F0DDA352101C2258F992A277397F4A", #sign data 
    1513746038205  #for milliseconds spent from Unix epoch to current time and error between tonce and server time can not exceed plus or minus 60s
  ],
  "id": 15,
 }

#Response
{
  "error": null,
  "result": {
    "status": "success"
  },
  "id": 15
}

HTTP API Introduction

Common API

Market API

Account API

Trading API

Margin API

Contract API

WebSocket API Introduction

Clone this wiki locally