jl777 8 years ago
parent
commit
fb5edc1729
  1. 3
      basilisk/basilisk_tradebot.c
  2. 2
      iguana/iguana_exchanges.c

3
basilisk/basilisk_tradebot.c

@ -405,7 +405,8 @@ double basilisk_request_listprocess(struct supernet_info *myinfo,struct basilisk
aveprice = refprice;
if ( fabs(aveprice) < SMALLVAL )
return(0);
destamount = (1.0 - profitmargin) * aveprice * list[0].srcamount;
//retvals[0] = avebid, retvals[1] = bidvol, retvals[2] = aveask, retvals[3] = askvol;
destamount = (1.0 - profitmargin) * retvals[0] * list[0].srcamount;
if ( (retstr= InstantDEX_available(myinfo,iguana_coinfind(list[0].dest),0,0,list[0].dest)) != 0 )
{
if ( (retjson= cJSON_Parse(retstr)) != 0 )

2
iguana/iguana_exchanges.c

@ -105,7 +105,7 @@ double instantdex_aveprice(struct supernet_info *myinfo,struct exchange_quote *s
{
pricesum += (quote.price * quote.volume);
totalvol += quote.volume;
printf("i.%d of %d %12.8f vol %.8f %s | aveprice %.8f total vol %.8f\n",i,n,sortbuf[i].price,quote.volume,active[quote.val]->exchange->name,pricesum/totalvol,totalvol);
//printf("i.%d of %d %12.8f vol %.8f %s | aveprice %.8f total vol %.8f\n",i,n,sortbuf[i].price,quote.volume,active[quote.val]->exchange->name,pricesum/totalvol,totalvol);
}
}
if ( totalvol > 0. )

Loading…
Cancel
Save