Interface Description:
- My assets
Request URL:
https://apiv2.bitz.com/Assets/getUserAssets
Request Method:
POST
Parameters:
Parameter | Required | Type | Description |
---|---|---|---|
apiKey | true | string | ApiKey requested by the user |
timeStamp | true | string | current timeStamp |
nonce | true | string | random 6-character string |
sign | true | string | signature of the requested parameter |
How to sign for required parameter:
All parameters submitted by users except sign require signature.
First, sort signature strings in alphabetical order based on parameters (compare the first letter of all parameter, if they differ, then the string whose first letter comes earlier in the alphabet comes before the other string. If the first letters are the same, then the second letters are compared, and so on).
For example:Sign for the following parameter
apiKey=376892265asdad5d12726d8bbfbd8912b3&id=302221&timeStamp=1510235730&nonce=309127 and then add the requested secretKey(only needs value, parameter and ‘&” is not required.)
Example:secretKey=aQmE8U7bxj16KdJcSd3yX8F8Sakd8aO6LopnHXh27d4kWyb28PxcaTvGrajLDvAw
Signature string after splicing: apiKey=376892265asdad5d12726d8bbfbd8912b3&id=302221&timeStamp=1510235730&nonce=309127aQmE8U7bxj16KdJcSd3yX8F8Sakd8aO6LopnHXh27d4kWyb28PxcaTvGrajLDvAw
Note,"sign" is a required parameter
Last,use md5 32bit algorithm to apply signature algorithm to the parameter, and then generate final signature string (the string assigns value to parameter ‘sign’)).
Example of Return Result:
{
"status": 200, //status code Success
"msg": "", //message
"data": {
"cny": "0.00000000",
"usd": "0.00000000",
"btc_total": "0.00000000",
"info": [
{
"name": "zpr", //coin
"num": "37.49067275", //number
"over": "37.49067275", //available
"lock": "0.00000000", //frozen
"btc": "0.00000000", //convert into btc
"usd": "0.00000000", //convert into usd
"cny": "0.00000000" //convert into cny
}
]
},
"time":1532672546, //Second timestamp
"microtime": "0.94303600 1532672546", //Millisecond timestamp
"source": "api" //Source
}
}