diff --git a/iguana/exchanges/LP_portfolio.c b/iguana/exchanges/LP_portfolio.c index c2a49ca16..5d5574b4a 100644 --- a/iguana/exchanges/LP_portfolio.c +++ b/iguana/exchanges/LP_portfolio.c @@ -533,12 +533,12 @@ void LP_autoprice_iter(void *ctx,struct LP_priceinfo *btcpp) { if ( (fundjson= LP_fundvalue(argjson)) != 0 ) { - printf("%s\n",jprint(fundjson,0)); + //printf("%s\n",jprint(fundjson,0)); if ( jint(fundjson,"missing") == 0 ) { if ( LP_autorefs[i].fundbid[0] != 0 && (price= jdouble(fundjson,LP_autorefs[i].fundbid)) > SMALLVAL ) { - printf("%s/%s %s %.8f -> ",base,rel,LP_autorefs[i].fundbid,price); + //printf("%s/%s %s %.8f -> ",base,rel,LP_autorefs[i].fundbid,price); if ( tickerjson != 0 && LP_autorefs[i].count == 0 ) price = LP_tickered_price(0,base,rel,price,tickerjson); newprice = (1. / price) * (1. + buymargin); @@ -548,11 +548,11 @@ void LP_autoprice_iter(void *ctx,struct LP_priceinfo *btcpp) newprice = LP_autorefs[i].lastbid; LP_mypriceset(&changed,rel,base,newprice); LP_pricepings(ctx,LP_myipaddr,LP_mypubsock,rel,base,newprice); - printf("fundbid %.8f margin %.8f newprice %.8f\n",price,buymargin,newprice); + //printf("fundbid %.8f margin %.8f newprice %.8f\n",price,buymargin,newprice); } if ( LP_autorefs[i].fundask[0] != 0 && (price= jdouble(fundjson,LP_autorefs[i].fundask)) > SMALLVAL ) { - printf("%s/%s %s %.8f -> ",base,rel,LP_autorefs[i].fundask,price); + //printf("%s/%s %s %.8f -> ",base,rel,LP_autorefs[i].fundask,price); if ( tickerjson != 0 && LP_autorefs[i].count == 0 ) price = LP_tickered_price(1,base,rel,price,tickerjson); newprice = (price * (1. + sellmargin)); @@ -562,7 +562,7 @@ void LP_autoprice_iter(void *ctx,struct LP_priceinfo *btcpp) newprice = LP_autorefs[i].lastask; LP_mypriceset(&changed,base,rel,newprice); LP_pricepings(ctx,LP_myipaddr,LP_mypubsock,base,rel,newprice); - printf("fundask %.8f margin %.8f newprice %.8f\n",price,sellmargin,newprice); + //printf("fundask %.8f margin %.8f newprice %.8f\n",price,sellmargin,newprice); } LP_autorefs[i].count++; } @@ -623,7 +623,7 @@ void LP_autoprices_update(char *method,char *base,double basevol,char *rel,doubl { if ( strcmp(LP_autorefs[i].rel,rel) == 0 && strcmp(base,LP_autorefs[i].base) == 0 ) { - newprice = (LP_autorefs[i].lastask * 0.99) + (0.01 * price); + newprice = (LP_autorefs[i].lastask * 0.9) + (0.1 * price); if ( LP_autorefs[i].lastask > 0 ) { //printf("%s: autoprice ask update %s/%s %.8f vs myprice %.8f/%.8f -> %.8f\n",method,base,rel,price,LP_autorefs[i].lastbid,LP_autorefs[i].lastask,newprice); @@ -632,7 +632,7 @@ void LP_autoprices_update(char *method,char *base,double basevol,char *rel,doubl } else if ( strcmp(LP_autorefs[i].rel,base) == 0 && strcmp(rel,LP_autorefs[i].base) == 0 ) { - newprice = (LP_autorefs[i].lastbid * 0.99) + (0.01 * price); + newprice = (LP_autorefs[i].lastbid * 0.9) + (0.1 * price); if ( LP_autorefs[i].lastbid > 0 ) { //printf("%s: autoprice bid update %s/%s %.8f vs myprice %.8f/%.8f -> %.8f\n",method,base,rel,price,LP_autorefs[i].lastbid,LP_autorefs[i].lastask,newprice); diff --git a/iguana/exchanges/prices/autoprice b/iguana/exchanges/prices/autoprice index 7c88deb6b..f11218d2b 100755 --- a/iguana/exchanges/prices/autoprice +++ b/iguana/exchanges/prices/autoprice @@ -12,7 +12,6 @@ curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\ curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"KMD\",\"rel\":\"BTCH\",\"offset\":0.0,\"refbase\":\"KMD\",\"refrel\":\"HUSH\",\"factor\":1.44,\"buymargin\":0.01,\"sellmargin\":0.01}" curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"BTCH\",\"rel\":\"KMD\",\"offset\":0.0,\"refbase\":\"HUSH\",\"refrel\":\"KMD\",\"factor\":0.7,\"buymargin\":0.01,\"sellmargin\":0.01}" - source crypto source trackbtc @@ -22,21 +21,12 @@ source trackbtc source pangea source trackbtc -source bots -source trackbtc - source bet source trackbtc source revs source trackbtc -source mgw -source trackbtc - -source revs -source trackbtc - sharkholdings="{\"coin\":\"iota\",\"balance\":1500000}, {\"coin\":\"bitcoin-cash\",\"balance\":1200}, {\"coin\":\"bitcoin\",\"balance\":145}" curl --url "http://127.0.0.1:7783" --data "{\"base\":\"MSHARK\",\"rel\":\"KMD\",\"fundvalue_bid\":\"NAV_KMD\",\"fundvalue_ask\":\"assetNAV_KMD\",\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"address\":\"RTu3JZZKLJTcfNwBa19dWRagEfQq49STqC\",\"holdings\":[$sharkholdings],\"divisor\":1400000}" @@ -47,3 +37,9 @@ curl --url "http://127.0.0.1:7783" --data "{\"margin\":$margin,\"base\":\"HODL\" dexholdings="{\"coin\":\"blocknet\",\"balance\":4975836}" curl --url "http://127.0.0.1:7783" --data "{\"base\":\"DEX\",\"rel\":\"KMD\",\"margin\":$margin,\"fundvalue_bid\":\"assetNAV_KMD\",\"fundvalue_ask\":\"assetNAV_KMD\",\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"address\":\"RThtXup6Zo7LZAi8kRWgjAyi1s4u6U9Cpf\",\"holdings\":[$dexholdings],\"divisor\":1000000}" + +curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"KMD\",\"rel\":\"BOTS\",\"offset\":0.0,\"refbase\":\"KMD\",\"refrel\":\"DEX\",\"factor\":3.33,\"buymargin\":0.05,\"sellmargin\":0.05}" +curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"BOTS\",\"rel\":\"KMD\",\"offset\":0.0,\"refbase\":\"DEX\",\"refrel\":\"KMD\",\"factor\":0.3,\"buymargin\":0.05,\"sellmargin\":0.05}" + +curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"KMD\",\"rel\":\"MGW\",\"offset\":0.0,\"refbase\":\"KMD\",\"refrel\":\"DEX\",\"factor\":10,\"buymargin\":0.05,\"sellmargin\":0.05}" +curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"MGW\",\"rel\":\"KMD\",\"offset\":0.0,\"refbase\":\"DEX\",\"refrel\":\"KMD\",\"factor\":0.1,\"buymargin\":0.05,\"sellmargin\":0.05}"