|
|
@ -545,7 +545,7 @@ char *LP_autotrade(char *myipaddr,int32_t mypubsock,double profitmargin,char *ba |
|
|
|
vout = jint(item,"vout"); |
|
|
|
vol = jdouble(item,"volume"); |
|
|
|
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 ) |
|
|
|
{ |
|
|
@ -560,6 +560,7 @@ char *LP_autotrade(char *myipaddr,int32_t mypubsock,double profitmargin,char *ba |
|
|
|
ordermatchprice = price; |
|
|
|
bestdestsatoshis = destsatoshis; |
|
|
|
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)); |
|
|
|
} |
|
|
|