行情 API

获取持仓记录

接口 描述
CONTRACT_X_Y_POSITIONRECORD 订阅持仓记录

websocket.send("{'event':'addChannel','channel':'CONTRACT_POSITIONRECORD'}"); X的值为apiKey等 Y的值为签名

签名方式:生成待签名的字符串 apiKey&secretKey,利用32位MD5算法,对最终待签名字符串进行签名运算, 从而得到签名结果字符串(该字符串赋值于参数sign),MD5计算结果中字母全部大写。

示例

# Request
{'event':'addChannel','channel':'CONTRACT_POSITIONRECORD'}            
# Response
{"channel":"vnbig_tickerlist","data"[["1528128000000","CONTRACT_USD_BTC","1.00000000","1.00000000","1.00000000","1.00000000","1.00000000","1.00000000","0.00000000","0.00000000","1.00000000","1.00000000","1.00000000"],["1528128000000","CONTRACT_USD_ETC","1.00000000","1.00000000","1.00000000","1.00000000","1.00000000","1.00000000","0.00000000","0.00000000","1.00000000","1.00000000","1.00000000"],["1528128000000","CONTRACT_USD_BCH","1.00000000","1.00000000","1.00000000","1.00000000","1.00000000","1.00000000","0.00000000","0.00000000","1.00000000","1.00000000","1.00000000"]]}

返回值说明

[时间戳,合约对,开仓价格,数量,持仓生成id,方向,合约价值,占用保证金,杠杆倍数,强平价格,未实现盈亏,已实现盈亏]
[string, string, string, string, string, string, string, string, string, string, string, string]

results matching ""

    No results matching ""