Browse Source

Test

etomic
jl777 8 years ago
parent
commit
65bbdc6c5f
  1. 2
      basilisk/basilisk_tradebot.c
  2. 4
      basilisk/jumblr.c

2
basilisk/basilisk_tradebot.c

@ -332,7 +332,7 @@ double basilisk_request_listprocess(struct supernet_info *myinfo,struct basilisk
printf("%s -> %s myrequest.%d pendingid.%u noquoteflag.%d havequoteflag.%d maxi.%d %.8f destvol %f\n",list[0].src,list[0].dest,myrequest,pendingid,noquoteflag,havequoteflag,maxi,dstr(maxamount),destvolume);
if ( myinfo->IAMLP != 0 && myrequest == 0 && pendingid == 0 && noquoteflag != 0 && ((profitmargin= tradebot_liquidity_active(myinfo,&refprice,"DEX",list[0].src,list[0].dest,destvolume)) > 0. || refprice != 0.) )
{
if ( profitmargin == 0. || (aveprice= instantdex_avehbla(myinfo,retvals,list[0].src,list[0].dest,.3 * dstr(list[0].srcamount))) == 0. || refprice > aveprice )
if ( profitmargin == 0. || (aveprice= instantdex_avehbla(myinfo,retvals,list[0].src,list[0].dest,.1 * dstr(list[0].srcamount))) == 0. || refprice > aveprice )
aveprice = refprice;
if ( fabs(aveprice) < SMALLVAL )
return(0);

4
basilisk/jumblr.c

@ -727,7 +727,7 @@ void jumblr_DEXcheck(struct supernet_info *myinfo,struct iguana_info *coin)
double minbtc,btcavail; char *retstr; cJSON *vals; bits256 hash;
minbtc = (kmdcoin->DEXinfo.btcprice * 1.2) * (JUMBLR_INCR + 3*(JUMBLR_INCR * JUMBLR_FEE + JUMBLR_TXFEE));
btcavail = dstr(jumblr_balance(myinfo,coinbtc,kmdcoin->DEXinfo.depositaddr));
if ( 0 && coinbtc != 0 && btcavail > (minbtc + kmdcoin->DEXinfo.DEXpending) )
if ( coinbtc != 0 && btcavail > (minbtc + kmdcoin->DEXinfo.DEXpending) )
{
avail = (btcavail - kmdcoin->DEXinfo.DEXpending);
printf("BTC deposits %.8f, min %.8f avail %.8f\n",btcavail,minbtc,avail);
@ -757,7 +757,7 @@ void jumblr_DEXcheck(struct supernet_info *myinfo,struct iguana_info *coin)
// curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"InstantDEX\",\"method\":\"request\",\"vals\":{\"source\":\"KMD\",\"amount\":20,\"dest\":\"USD\",\"minprice\":0.08}}"
}
} //else printf("btcavail %.8f pending %.8f\n",btcavail,pending);
if ( coinbtc != 0 && kmdcoin->DEXinfo.KMDavail > (100. + kmdcoin->DEXinfo.KMDpending) )
if ( 0 && coinbtc != 0 && kmdcoin->DEXinfo.KMDavail > (100. + kmdcoin->DEXinfo.KMDpending) )
{
avail = (kmdcoin->DEXinfo.KMDavail - kmdcoin->DEXinfo.KMDpending);
printf("KMD deposits %.8f, min %.8f, avail %.8f\n",kmdcoin->DEXinfo.KMDavail,JUMBLR_INCR,avail);

Loading…
Cancel
Save