Browse Source

Test

etomic
jl777 7 years ago
parent
commit
f4b76a93cb
  1. 8
      iguana/exchanges/LP_ordermatch.c

8
iguana/exchanges/LP_ordermatch.c

@ -1057,6 +1057,14 @@ char *LP_autobuy(void *ctx,char *myipaddr,int32_t mypubsock,char *base,char *rel
duration = LP_ORDERBOOK_DURATION;
if ( timeout <= 0 )
timeout = LP_AUTOTRADE_TIMEOUT;
if ( time(NULL) < Alice_expiration )
return(clonestr("{\"error\":\"only one pending request at a time\"}"));
else
{
Alice_expiration = 0;
memset(&LP_Alicequery,0,sizeof(LP_Alicequery));
LP_Alicemaxprice = 0.;
}
if ( maxprice <= 0. || relvolume <= 0. || LP_priceinfofind(base) == 0 || LP_priceinfofind(rel) == 0 )
return(clonestr("{\"error\":\"invalid parameter\"}"));
//if ( strcmp("BTC",rel) == 0 )

Loading…
Cancel
Save