diff --git a/iguana/exchanges/LP_include.h b/iguana/exchanges/LP_include.h index 18eef0634..ad95be0d9 100644 --- a/iguana/exchanges/LP_include.h +++ b/iguana/exchanges/LP_include.h @@ -556,6 +556,7 @@ uint16_t LP_randpeer(char *destip); void LP_tradebot_pauseall(); int32_t LP_etomic_pub2addr(char *coinaddr,uint8_t pub64[64]); void LP_portfolio_reset(); +int32_t LP_autoref_clear(char *base,char *rel); int32_t bitcoin_addr2rmd160(char *symbol,uint8_t taddr,uint8_t *addrtypep,uint8_t rmd160[20],char *coinaddr); struct LP_pubkey_info *LP_pubkeyadd(bits256 pubkey); uint32_t LP_atomic_locktime(char *base,char *rel); diff --git a/iguana/exchanges/LP_portfolio.c b/iguana/exchanges/LP_portfolio.c index c7c32cdef..49c1ca1ef 100644 --- a/iguana/exchanges/LP_portfolio.c +++ b/iguana/exchanges/LP_portfolio.c @@ -455,6 +455,23 @@ double LP_tickered_price(int32_t bidask,char *base,char *rel,double price,cJSON return(price); } +int32_t LP_autoref_clear(char *base,char *rel) +{ + int32_t i; char *base,*rel; + for (i=0; isellmargins[basepp->ind] = 0.; relpp->offsets[basepp->ind] = 0.; relpp->factors[basepp->ind] = 0.; + LP_autoref_clear(base,rel); margin = 0.; } else if ( (minprice= basepp->minprices[relpp->ind]) > SMALLVAL && price < minprice )