From 2f2ceea2506d1193fb4de51f3483889f50d4cf7f Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 15 Jun 2017 12:04:00 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_prices.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/LP_prices.c b/iguana/exchanges/LP_prices.c index bd771857e..68e1de8bf 100644 --- a/iguana/exchanges/LP_prices.c +++ b/iguana/exchanges/LP_prices.c @@ -272,11 +272,17 @@ double LP_myprice(double *bidp,double *askp,char *base,char *rel) int32_t LP_mypriceset(char *base,char *rel,double price) { - struct LP_priceinfo *basepp,*relpp; + struct LP_priceinfo *basepp,*relpp; struct LP_pubkeyinfo *pubp; if ( base != 0 && rel != 0 && price > SMALLVAL && (basepp= LP_priceinfofind(base)) != 0 && (relpp= LP_priceinfofind(rel)) != 0 ) { basepp->myprices[relpp->ind] = price; // ask - relpp->myprices[basepp->ind] = (1. / price); // bid + //relpp->myprices[basepp->ind] = (1. / price); // bid + if ( (pubp= LP_pubkeyadd(LP_mypubkey)) != 0 ) + { + pubp->matrix[basepp->ind][relpp->ind] = price; + //pubp->matrix[relpp->ind][basepp->ind] = (1. / price); + pubp->timestamp = (uint32_t)time(NULL); + } return(0); } else return(-1); }