Browse Source

Test

etomic
jl777 7 years ago
parent
commit
5e7ff4fa3c
  1. 1
      iguana/exchanges/LP_commands.c
  2. 6
      iguana/exchanges/LP_ordermatch.c

1
iguana/exchanges/LP_commands.c

@ -121,6 +121,7 @@ forwardhex(pubkey,hex)\n\
{
if ( price > SMALLVAL )
{
printf("price set (%s/%s) <- %.8f\n",rel,base,1./price);
LP_mypriceset(rel,base,1./price);
return(LP_autotrade(myipaddr,pubsock,profitmargin,base,rel,price,jdouble(argjson,"volume"),jint(argjson,"timeout")));
} else return(clonestr("{\"error\":\"no price set\"}"));

6
iguana/exchanges/LP_ordermatch.c

@ -411,13 +411,13 @@ char *LP_connectedalice(cJSON *argjson) // alice
printf("quote validate error %.0f\n",qprice);
return(clonestr("{\"error\":\"quote validation error\"}"));
}
if ( (price= LP_myprice(&bid,&ask,Q.srccoin,Q.destcoin)) <= SMALLVAL || bid <= SMALLVAL )
if ( (price= LP_myprice(&bid,&ask,Q.destcoin,Q.srccoin)) <= SMALLVAL || bid <= SMALLVAL )
{
printf("this node has no price for %s/%s (%.8f %.8f)\n",Q.srccoin,Q.destcoin,bid,ask);
printf("this node has no price for %s/%s (%.8f %.8f)\n",Q.destcoin,Q.srccoin,bid,ask);
LP_availableset(autxo);
return(clonestr("{\"error\":\"no price set\"}"));
}
price = bid;
price = 1. / bid;
if ( qprice > price )
{
LP_availableset(autxo);

Loading…
Cancel
Save