Prepare for signing

All parameters except for "sign" must be signed. The parameters must be re-ordered according to the initials of the parameter name, alphabetically.

For example, if the request parameters are

websocket.send("{'event':'addChannel','channel':'channel','parameters':{'api_key':'c821db84-6fbd-11e4-a9e3-c86000d26d7c','sign':'4CBB1D1518F8BEE4040CE6B14F225C82','symbol':'btc_usd','type':'buy','price':'50','amount':'0.02'}}")
amount=1.0&api_key=c821db84-6fbd-11e4-a9e3-c86000d26d7c&price=680&symbol=btc_usd&type=buy
The result string is:
amount=1.0&api_key=c821db84-6fbd-11e4-a9e3-c86000d26d7c&price=680&symbol=btc_usd&type=buy

MD5 signature

'secretKey' is required to generate MD5 signature. Add the 'secret_Key' to the above string to generate the final string to be signed, such as: amount=1.0&api_key=c821db84-6fbd-11e4-a9e3-c86000d26d7c&price=680&symbol=btc_usd&type=buy&secret_key=secretKey
Note: '&secret_key=secretKey' is a must. Use 32 bit MD5 encryption function to sign the string. Pass the encrypted string to 'sign' parameter. Letters of the encrypted string must be in upper case.

提示

请先登录

客服+852 5808 5768
在线咨询 在线咨询
在线留言 发起提问
聊天室
OKCoin聊天室
请遵守聊天室规则!详情>>
客服+852 5808 5768
聊天室规则 X