Browse Source

Test

patch-3
jl777 7 years ago
parent
commit
4e0cd2fb99
  1. 2
      iguana/exchanges/LP_include.h
  2. 2
      iguana/exchanges/LP_ordermatch.c

2
iguana/exchanges/LP_include.h

@ -58,7 +58,7 @@ void emscripten_usleep(int32_t x); // returns immediate, no sense for sleeping
#define LP_MAXVINS 64
#define LP_HTTP_TIMEOUT 3 // 1 is too small due to edge cases of time(NULL)
#define LP_AUTOTRADE_TIMEOUT 180
#define LP_AUTOTRADE_TIMEOUT 30
#define LP_RESERVETIME 600 //(LP_AUTOTRADE_TIMEOUT * 2)
#define ELECTRUM_TIMEOUT 13
#define LP_ELECTRUM_KEEPALIVE 60

2
iguana/exchanges/LP_ordermatch.c

@ -1401,7 +1401,7 @@ char *LP_autobuy(void *ctx,char *myipaddr,int32_t mypubsock,char *base,char *rel
return(clonestr("{\"error\":\"cant set ordermatch quote info\"}"));
int32_t changed;
if ( strcmp(base,"BTC") == 0 || strcmp("BTC",rel) == 0 )
printf("%s/%s maxprice %.8f qprice %.8f txfee %.8f desttxfee %.8f\n",base,rel,maxprice,(double)destsatoshis/bestsatoshis,dstr(txfee),dstr(desttxfee));
printf("%s/%s maxprice %.8f qprice %.8f txfee %.8f desttxfee %.8f\n",base,rel,maxprice,(double)destsatoshis/(bestsatoshis - txfee),dstr(txfee),dstr(desttxfee));
LP_mypriceset(&changed,autxo->coin,base,1. / maxprice);
LP_mypriceset(&changed,base,autxo->coin,0.);
return(LP_trade(ctx,myipaddr,mypubsock,&Q,maxprice,timeout,duration,tradeid,destpubkey));

Loading…
Cancel
Save