Browse Source

Test

etomic
jl777 7 years ago
parent
commit
643907500b
  1. 3
      iguana/exchanges/LP_ordermatch.c

3
iguana/exchanges/LP_ordermatch.c

@ -545,7 +545,7 @@ char *LP_autotrade(char *myipaddr,int32_t mypubsock,double profitmargin,char *ba
vout = jint(item,"vout"); vout = jint(item,"vout");
vol = jdouble(item,"volume"); vol = jdouble(item,"volume");
metric = price / bestprice; metric = price / bestprice;
if ( (butxo= LP_utxofind(1,txid,vout)) != 0 && metric < 1.1 && vol*SATOSHIDEN == butxo->payment.value && LP_isavailable(butxo) > 0 && LP_ismine(butxo) == 0 ) if ( (butxo= LP_utxofind(1,txid,vout)) != 0 && metric < 1.2 && vol*SATOSHIDEN == butxo->payment.value && LP_isavailable(butxo) > 0 && LP_ismine(butxo) == 0 )
{ {
if ( (destsatoshis= (butxo->payment.value * price)) > autxo->payment.value-desttxfee && destsatoshis > 2*desttxfee ) if ( (destsatoshis= (butxo->payment.value * price)) > autxo->payment.value-desttxfee && destsatoshis > 2*desttxfee )
{ {
@ -560,6 +560,7 @@ char *LP_autotrade(char *myipaddr,int32_t mypubsock,double profitmargin,char *ba
ordermatchprice = price; ordermatchprice = price;
bestdestsatoshis = destsatoshis; bestdestsatoshis = destsatoshis;
bestmetric = metric; bestmetric = metric;
printf("set best!\n");
} }
} else printf("skip.(%d %d) destsatoshis %.8f value %.8f destvalue %.8f txfees %.8f %.8f\n",destsatoshis > (autxo->payment.value >> 1) ,destsatoshis/price > (butxo->payment.value >> 1),dstr(destsatoshis),dstr(butxo->payment.value),dstr(autxo->payment.value),dstr(txfee),dstr(desttxfee)); } else printf("skip.(%d %d) destsatoshis %.8f value %.8f destvalue %.8f txfees %.8f %.8f\n",destsatoshis > (autxo->payment.value >> 1) ,destsatoshis/price > (butxo->payment.value >> 1),dstr(destsatoshis),dstr(butxo->payment.value),dstr(autxo->payment.value),dstr(txfee),dstr(desttxfee));
} }

Loading…
Cancel
Save