node package manager

btcc-signed-request

install

npm install git@github.com:wenqingyu/btcc-signed-request.git --save

How to use

This package is used for sign most of BTCC Request trough and websocket request.

import

const BTCCSignedRequest = require('btcc-signed-request');

initialize

let msgType = "CancelOrderRequest";
let yields = {
    Symbol: "XBTCNY",
    OID: "YourCancelOrderID"
}
let operatorAccount = "23892";
let operatorAccountKey = "2324sx-23sd-23sd-2sdfsgf-23r2";
// Try to get your account info in browser inspect element

create request json data

// Generate DepositRequest
let reqData = BTCCSignedRequest.createSignedRequest(msgType, fields,
  {account: operatorAccount, accountKey: operatorAccountKey}
);
console.log(reqData);
// send request by websocket or restful request depends on your project