Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including btcc-signed-request with all npm packages installed. Try it out:

var btccSignedRequest = require("btcc-signed-request")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

btcc-signed-request v1.0.0

BTCC Signed Request Generator

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
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free