Interface Description
  • Get Contract Account Equity (Asset)
Request URL:
  • https://apiv2.bitz.com/Contract/getContractAccountInfo
Request Mode:
  • POST
Parameter:
Parameter Required Type Comment
apiKey Yes string Application apiKey
timeStamp Yes string Current timestamp
nonce Yes string Random 6-character string
sign Yes string Request signature
How to sign for required parameter:

All parameter submitted by users except sign requires signature.

Firstly, 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&timeStamp=1510235730&nonce=309127 and add application secretKey (only needs value, parameter and ‘&” is not required.)) For example: secretKey=aQmE8U7bxj16KdJcSd3yX8F8Sakd8aO6LopnHXh27d4kWyb28PxcaTvGrajLDvAw Signature string after splicing: apiKey=376892265asdad5d12726d8bbfbd8912b3&timeStamp=1510235730&nonce=309127aQmE8U7bxj16KdJcSd3yX8F8Sakd8aO6LopnHXh27d4kWyb28PxcaTvGrajLDvAw

Note,"sign" is a required parameter.

Lastly,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 Resul:
{
    "status":200,
    "msg":"",
    "data":{
         "time":1557928650,//time
        "estimate_BTC":"8.00667445",//Total Equity(BTC)
        "estimate_USDT":"17000.00",//Total Equity(USDT)
        "estimate_CNY":"0.00"// Total Equity (CNY)
        "balances":[
            {
                "coin":"BTC",//coin
                "balance":"8.00000000",//balance
                "positionMargin":"0.00635670",//position margin
                "orderMargin":"0.00000000",//order margin
                "unrlzPnl":"0.00031774",//unrealized  profits and losses
                "total":"8.00667445",//total evaluation of the coin
                "estimate_BTC":"8.00667445",//total evaluation(BTC)
                "estimate_USDT":"0.00",//total evaluation(USDT)
                "estimate_CNY":"0.00"//total evaluation (CNY)
            },
            ...
        ]
    },
    "time":1533035297,
    "microtime":"0.41892000 1533035297",
    "source":"api"
}

results matching ""

    No results matching ""