Interface Description:
  • Get Current Position
Request URL:
Request Mode:
  • POST
Parameter Required Type Comment
apiKey true string Application apiKey
timeStamp true string Current timestamp
nonce true string Random 6-character string
sign true string signature for requesting parameters
contractId true int Contract ID
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&timeStamp=1510235730&nonce=309127&contractId=101 and add application secretKey (only needs value, parameter and ‘&” is not required.)

For example:


Signature after splicing: apiKey=376892265asdad5d12726d8bbfbd8912b3&timeStamp=1510235730&nonce=309127&contractId=1aQmE8U7bxj16KdJcSd3yX8F8Sakd8aO6LopnHXh27d4kWyb28PxcaTvGrajLDvAw

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:
            "positionId":"9",/position ID
            "contractId":"101",//contract ID
            "price":"7980.74",//average opening price
            "amount":"1500",//contracts of position
            "liquidationPrice":"7287.98",//liquidation price
            "rlzPnl":"0.00010170",//realized profits and losses
            "unrlzPnl":"0.00044862",// unrealized profits and losses
            "margin":"0.01930883",//position margin
            "isCross":"-1",//Cross Margin or not   1: Cross Margin,-1:Isolated Margin
            "pair":"BTC_USD"//trading pair
    "microtime":"0.41892000 1533035297",

results matching ""

    No results matching ""