|
|
@ -515,7 +515,7 @@ int32_t LP_mypriceset(int32_t *changedp,char *base,char *rel,double price) |
|
|
|
struct LP_priceinfo *basepp=0,*relpp=0; struct LP_pubkey_info *pubp; double minprice,maxprice; |
|
|
|
*changedp = 0; |
|
|
|
//if ( strcmp("DEX",base) == 0 || strcmp("DEX",rel) == 0 )
|
|
|
|
printf("%s/%s setprice %.8f\n",base,rel,price); |
|
|
|
// printf("%s/%s setprice %.8f\n",base,rel,price);
|
|
|
|
if ( base != 0 && rel != 0 && (basepp= LP_priceinfofind(base)) != 0 && (relpp= LP_priceinfofind(rel)) != 0 ) |
|
|
|
{ |
|
|
|
|
|
|
@ -548,8 +548,8 @@ int32_t LP_mypriceset(int32_t *changedp,char *base,char *rel,double price) |
|
|
|
price = (basepp->myprices[relpp->ind] * 0.9) + (0.1 * price); |
|
|
|
}*/ |
|
|
|
basepp->myprices[relpp->ind] = price; // ask
|
|
|
|
printf("LP_mypriceset base.%s rel.%s <- price %.8f\n",base,rel,price); |
|
|
|
//relpp->myprices[basepp->ind] = (1. / price); // bid
|
|
|
|
//printf("LP_mypriceset base.%s rel.%s <- price %.8f\n",base,rel,price);
|
|
|
|
//relpp->myprices[basepp->ind] = (1. / price); // bid, but best to do one dir at a time
|
|
|
|
if ( (pubp= LP_pubkeyadd(G.LP_mypub25519)) != 0 ) |
|
|
|
{ |
|
|
|
pubp->timestamp = (uint32_t)time(NULL); |
|
|
|