Browse Source

Test

etomic
jl777 8 years ago
parent
commit
1002b9ec20
  1. 2
      .gitignore
  2. 2
      basilisk/basilisk_tradebot.c
  3. 4
      basilisk/jumblr.c

2
.gitignore

@ -244,3 +244,5 @@ iguana/DB/SWAPS/2311778512-3235676199
iguana/DB/SWAPS/3385048746-2109923340
iguana/DB/SWAPS/1739581643-2099619754
iguana/DB/SWAPS/2247429570-1367058185

2
basilisk/basilisk_tradebot.c

@ -340,6 +340,8 @@ double basilisk_request_listprocess(struct supernet_info *myinfo,struct basilisk
aveprice = (1. / aveprice);
//retvals[0] = avebid, retvals[1] = bidvol, retvals[2] = aveask, retvals[3] = askvol;
destamount = (1.0 - profitmargin) * aveprice * list[0].srcamount;
if ( destamount > minamount )
destamount = minamount;
printf("%s/%s pm %f aveprice %f src %.8f dest %.8f avebid %f bidvol %f, aveask %f askvol %f\n",list[0].src,list[0].dest,profitmargin,aveprice,dstr(list[0].srcamount),dstr(destamount),retvals[0],retvals[1],retvals[2],retvals[3]);
if ( (retstr= InstantDEX_available(myinfo,iguana_coinfind(list[0].dest),0,0,list[0].dest)) != 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 ( coinbtc != 0 && btcavail > minbtc+kmdcoin->DEXinfo.DEXpending )
if ( 0 && coinbtc != 0 && btcavail > minbtc+kmdcoin->DEXinfo.DEXpending )
{
printf("BTC deposits %.8f, min %.8f\n",btcavail,minbtc);
@ -747,7 +747,7 @@ void jumblr_DEXcheck(struct supernet_info *myinfo,struct iguana_info *coin)
free_json(vals);
// 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 ( 0 && coinbtc != 0 && kmdcoin->DEXinfo.KMDavail > JUMBLR_INCR+kmdcoin->DEXinfo.DEXpending )
if ( coinbtc != 0 && kmdcoin->DEXinfo.KMDavail > JUMBLR_INCR+kmdcoin->DEXinfo.DEXpending )
{
printf("KMD deposits %.8f, min %.8f\n",kmdcoin->DEXinfo.KMDavail,JUMBLR_INCR);
vals = cJSON_CreateObject();

Loading…
Cancel
Save