Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var bitbank = require("node-bitbankcc");
var async = require("async");
// *****************
// 設定 / Settings
// *****************
var api = bitbank.privateApi("your api key", "your private key");
var publicApi = bitbank.publicApi();
var orderAmout = 100; // 注文数量 / order amount
var maxHoldXrp = 10000.0; // XRPの最大保有量 / Max BTC holding amount
var spreadPercentage = 0.01; // スプレッド設定値 1% / Spread
// 例) 1XRP=50円の場合、売り注文と買い注文を中央値から0.5円離した価格に提示する
var pair = "xrp_jpy";
module.exports.trade = function() {
console.log("--- prepare to trade ---");
async.waterfall([
function(callback) {
// アセット取得
api.getAsset().then(function(res){
callback(null, res);
});
},