Interface Description:
  • Get my trading history
Request URL:
  • https://apiv2.bitz.com/Contract/getContractMyTrades
Request Mode:
  • GET
Parameter:
Parameter Required Type Comment
apiKey Yes string User application apiKey
timeStamp Yes string Current timestamp
nonce Yes string Random 6-character string
sign Yes string Request signature
contractId Yes int Contract ID
page No int Default 1 rang:1-10
pageSize No int Default 50 rang:1-50

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

timeStamp=1552641715&nonce=ue8jAx&apiKey=17919e05dc57d5d44dccdda03bdd6e2e&coin=usdt&address=1AG1gZvQAYu3WBvgg7p4BvvfNQD2gE693k&number=1000&sign=6932efc6aa44f7605e808bfaa98fd630 and add application secretKey (only needs value, parameter and ‘&” is not required.)

For example:secretKey=aQmE8U7bxj16KdJcSd3yX8F8Sakd8aO6LopnHXh27d4kWyb28PxcaTvGrajLDvAw

Signature string after splicing: timeStamp=1552641715&nonce=ue8jAx&apiKey=17919e05dc57d5d44dccdda03bdd6e2e&coin=usdt&address=1AG1gZvQAYu3WBvJJ7p4BMMfNQD2gE693k&number=1000aQmE8U7bxj16KdJcSd3yX8F8Sakd8aO6LopnHXh27d4kWyb28PxcaTvGrajLDvAw

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 Result:
{
    "status":200,
    "msg":"",
    "data":{
            {
            "tradeId":"6534702673362395142",//Deal ID
            "contractId":"1",//Contract ID
            "pair":"BTC_USD",//Contract Market
            "price":"8000.00",//Transaction Price
            "num":"500",//Number of transactions
            "type":"buy",//Type of transaction
            "tradeFee":"0.00001250",//Transaction charges
            "leverage":"10",//Gearing
            "isCross":"-1",//Whether the warehouse is full or not,1:Yes,-1:No
            "time":1557994526//Dealing time
        }
    },
    "time":1533035297,
    "microtime":"0.41892000 1533035297",
    "source":"api"
}

results matching ""

    No results matching ""