auto fill buy amount for coin and calc relvolume

This commit is contained in:
satindergrewal 2017-11-20 17:04:14 +13:00
parent 15eba55828
commit 37ecd8b7a9
2 changed files with 6 additions and 6 deletions

View File

@ -2363,9 +2363,9 @@ function setOrderPrice(trade_data) {
}
if(bot_or_manual == 'trademanual') {
//pair_volume = trade_data.maxbuy;
//$('.trading_pair_coin_volume').val(pair_volume.toFixed(8));
//$('.relvol_basevol').html(trade_data.maxvolume);
pair_volume = trade_data.maxbuy;
$('.trading_pair_coin_volume').val(pair_volume.toFixed(8));
$('.relvol_basevol').html(trade_data.maxvolume);
$('.trading_pair_destpubkey').val(trade_data.pubkey);
}
@ -2478,7 +2478,7 @@ function CheckOrderBookFn(sig) {
row_trade_data.avevolume = val.avevolume;
row_trade_data.numutxos = val.numutxos;
row_trade_data.depth = val.depth;
//row_trade_data.maxbuy = val.maxvolume / val.price;
row_trade_data.maxbuy = val.avevolume / val.price;
row_trade_data.pubkey = val.pubkey;
//row_trade_data.totalbuy = (val.maxvolume / val.price) * val.numutxos;
var orderbook_asks_tr = '';

View File

@ -168,14 +168,14 @@ ExecMarketMaker = function(data) {
if (!!params.coins) { // if not undefined and true
delete params.coins; // for Windows we should use coins.json file, and don't pass coins in command line
}
console.log('[Decker] BarterDEXBin = '+BarterDEXBin+', BarterDEXDir = '+BarterDEXDir);
//console.log('[Decker] BarterDEXBin = '+BarterDEXBin+', BarterDEXDir = '+BarterDEXDir);
params = JSON.stringify(_customParam);
params = params.replace(/"/g, '\\"');
params = '"' + params +'"';
}
console.log(`[Decker] exec ${BarterDEXBin} ${params}`);
//console.log(`[Decker] exec ${BarterDEXBin} ${params}`);
/*var out = fs.openSync(`${BarterDEXDir}/out.log`, 'a');
var err = fs.openSync(`${BarterDEXDir}/out.log`, 'a');