# Common

# REST API

REST API: https://www.xyt.com/api

Request header: Content-Type: application/json

# Signature

The signature generation rules are as follows:

The fields participating in the signature include valid token (Token, please refer to the help center for details), time (current timestamp generated by the developer), nonce (random number), for all parameters to be signed according to the ASCII code of the field name as small as possible After the large sort (lexicographic order), use the key-value pair format (ie key1value1key2value2...) to splice into a string str. Note: If the value in the request parameter is NULL, the signature character will not be counted when splicing the string String, the parameter names are all lowercase characters, and then the str + KEY (key) is encrypted with `MD5, the field name and field value are both the original value, and str is not escaped. That is, sign=Md5(str + KEY).

The parameters are as follows:

{
  "symbol": "btcusdt",
  "id": "20200120",
  "time": 1585885434629,
  "nonce": "123123",
  "token": "r4er3r423vfr342543f.53uhj4g34g"
}
KEY:"oi678k78km5j675i766"

After the splicing is completed:

String1 = "id20200120nonce123123symbolbtcusdttime1585885434629tokenr4er3r423vfr342543f.53uhj4g34goi678k78km5j675i766"
sign = "F5DB0F896659467AC527BD01C07EE692"

# Common response value

Examples of response values:

{
  "type": "SUCCESS",
  "data": "response data",
  "arguments": null,
  "msg": "suc"
}

The response data is described as follows:

Node name(keyword) Parent node Description Type
type None Response code string
data None Response data Any type
arguments None Internationalization parameters (return null on success) array
success None true / false boolean

Get a list of type: https://www.xyt.com/api/common/findLocale/{language}

language: de_DE、en_US、fr_FR、ja_JP、ko_KR、ru_RU、th_TH、zh_CN、zh_TW