diff --git a/iguana/exchanges/LP_ordermatch.c b/iguana/exchanges/LP_ordermatch.c index 0e45eebaf..df64f59e1 100644 --- a/iguana/exchanges/LP_ordermatch.c +++ b/iguana/exchanges/LP_ordermatch.c @@ -1395,6 +1395,8 @@ char *LP_autobuy(void *ctx,char *myipaddr,int32_t mypubsock,char *base,char *rel if ( LP_quotedestinfo(&Q,autxo->payment.txid,autxo->payment.vout,autxo->fee.txid,autxo->fee.vout,G.LP_mypub25519,autxo->coinaddr) < 0 ) return(clonestr("{\"error\":\"cant set ordermatch quote info\"}")); int32_t changed; + if ( strcmp(base,"BTC") == 0 || strcmp("BTC",rel) == 0 ) + printf("%s/%s maxprice %.8f qprice %.8f txfee %.8f desttxfee %.8f\n",base,rel,maxprice,(double)destsatoshis/bestsatoshis,dstr(txfee),dstr(desttxfee)); LP_mypriceset(&changed,autxo->coin,base,1. / maxprice); LP_mypriceset(&changed,base,autxo->coin,0.); return(LP_trade(ctx,myipaddr,mypubsock,&Q,maxprice,timeout,duration,tradeid,destpubkey)); diff --git a/iguana/exchanges/LP_rpc.c b/iguana/exchanges/LP_rpc.c index 97d8b7a4b..72c036b59 100644 --- a/iguana/exchanges/LP_rpc.c +++ b/iguana/exchanges/LP_rpc.c @@ -602,7 +602,7 @@ cJSON *LP_importprivkey(char *symbol,char *wifstr,char *label,int32_t flag) double _LP_getestimatedrate(struct iguana_info *coin) { - char buf[512],*retstr=0; int32_t numblocks,err=0; cJSON *errjson,*retjson; double rate = 0.00000020; + char buf[512],*retstr=0; int32_t numblocks,err=0; cJSON *errjson,*retjson; double rate = 0.00000010; if ( coin->rate < 0. || time(NULL) > coin->ratetime+30 ) { if ( coin->estimatefeestr[0] == 0 ) @@ -639,13 +639,8 @@ again: rate = atof(retstr) / 1024.; if ( rate != 0. ) { - if ( strcmp("BTC",coin->symbol) == 0 ) - { - if ( rate < 0.00000100 ) - rate = 0.00000100; - } - else if ( rate < 0.00000020 ) - rate = 0.00000020; + if ( rate < 0.00000010 ) + rate = 0.00000010; rate *= 1.5; if ( coin->electrum != 0 ) rate *= 1.5;