Browse Source

Test

etomic
jl777 8 years ago
parent
commit
3d65325f31
  1. 1
      basilisk/basilisk_DEX.c
  2. 3
      basilisk/basilisk_tradebot.c

1
basilisk/basilisk_DEX.c

@ -162,6 +162,7 @@ cJSON *basilisk_requestjson(struct basilisk_request *rp)
{
//jadd64bits(item,"destamount",rp->destamount);
jadd64bits(item,"destsatoshis",rp->destamount);
printf("DESTSATOSHIS.%llu\n",(long long)rp->destamount);
}
jaddnum(item,"quotetime",rp->quotetime);
jaddnum(item,"timestamp",rp->timestamp);

3
basilisk/basilisk_tradebot.c

@ -230,6 +230,7 @@ struct basilisk_request *basilisk_parsejson(struct basilisk_request *rp,cJSON *r
rp->minamount = j64bits(reqjson,"minamount");
//rp->destamount = j64bits(reqjson,"destamount");
rp->destamount = j64bits(reqjson,"destsatoshis");
printf("parse DESTSATOSHIS.%llu\n",(long long)rp->destamount);
requestid = juint(reqjson,"requestid");
quoteid = juint(reqjson,"quoteid");
//if ( jstr(reqjson,"relay") != 0 )
@ -326,7 +327,7 @@ double basilisk_request_listprocess(struct supernet_info *myinfo,struct basilisk
aveprice = instantdex_avehbla(myinfo,retvals,list[0].src,list[0].dest,1.3 * dstr(list[0].srcamount));
destvolume = aveprice * dstr(list[0].srcamount);
printf("set destvolume %.8f\n",destvolume);
}
} else printf("destvolume %.8f <- minamount\n",destvolume);
}
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.) )

Loading…
Cancel
Save