From 0a97eed5d739b00196d7da2574f9b6c0bb5c8601 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 9 Dec 2017 18:17:06 +0400 Subject: [PATCH] Test --- iguana/exchanges/LP_portfolio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/iguana/exchanges/LP_portfolio.c b/iguana/exchanges/LP_portfolio.c index e57bd8371..dd5c9de7c 100644 --- a/iguana/exchanges/LP_portfolio.c +++ b/iguana/exchanges/LP_portfolio.c @@ -445,15 +445,15 @@ void LP_autoprice_iter(void *ctx,struct LP_priceinfo *btcpp) if ( LP_autorefs[i].fundbid[0] != 0 && (price= jdouble(fundjson,LP_autorefs[i].fundbid)) > SMALLVAL ) { newprice = (1. / price) * (1. + margin); - LP_mypriceset(&changed,base,rel,newprice); - LP_pricepings(ctx,LP_myipaddr,LP_mypubsock,base,rel,newprice); + 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,margin,newprice); } if ( LP_autorefs[i].fundask[0] != 0 && (price= jdouble(fundjson,LP_autorefs[i].fundask)) > SMALLVAL ) { newprice = (price * (1. + margin)); - LP_mypriceset(&changed,rel,base,price); - LP_pricepings(ctx,LP_myipaddr,LP_mypubsock,rel,base,newprice); + LP_mypriceset(&changed,base,rel,price); + LP_pricepings(ctx,LP_myipaddr,LP_mypubsock,base,rel,newprice); printf("fundask %.8f margin %.8f newprice %.8f\n",price,margin,newprice); } }