Browse Source

Test

etomic
jl777 7 years ago
parent
commit
16d6184994
  1. 2
      iguana/exchanges/LP_nativeDEX.c
  2. 3
      iguana/exchanges/LP_tradebots.c

2
iguana/exchanges/LP_nativeDEX.c

@ -585,7 +585,7 @@ void LP_coinsloop(void *_coins)
continue; continue;
} }
nonz++; nonz++;
//if ( (coin->lastscanht % 1000) == 0 ) if ( coin->lastscanht < coin->longestchain-3 )
printf("[%s]: %s ref.%d scan.%d to %d, longest.%d\n",coins,coin->symbol,coin->firstrefht,coin->firstscanht,coin->lastscanht,coin->longestchain); printf("[%s]: %s ref.%d scan.%d to %d, longest.%d\n",coins,coin->symbol,coin->firstrefht,coin->firstscanht,coin->lastscanht,coin->longestchain);
for (j=0; j<100; j++) for (j=0; j<100; j++)
{ {

3
iguana/exchanges/LP_tradebots.c

@ -262,6 +262,8 @@ double LP_orderbook_maxrel(char *base,char *rel,double maxprice)
char *retstr; int32_t i,numasks; cJSON *retjson,*asks,*item; double maxvol,maxrel = 0.; char *retstr; int32_t i,numasks; cJSON *retjson,*asks,*item; double maxvol,maxrel = 0.;
if ( (retstr= LP_orderbook(base,rel,0)) != 0 ) if ( (retstr= LP_orderbook(base,rel,0)) != 0 )
{ {
printf("maxprice %.8f %s/%s obook.(%s)\n",maxprice,base,rel,retstr);
if ( (retjson= cJSON_Parse(retstr)) != 0 ) if ( (retjson= cJSON_Parse(retstr)) != 0 )
{ {
if ( (asks= jarray(&numasks,retjson,"asks")) != 0 ) if ( (asks= jarray(&numasks,retjson,"asks")) != 0 )
@ -272,6 +274,7 @@ double LP_orderbook_maxrel(char *base,char *rel,double maxprice)
if ( jdouble(item,"price") > maxprice ) if ( jdouble(item,"price") > maxprice )
break; break;
maxvol = jdouble(item,"maxvolume"); maxvol = jdouble(item,"maxvolume");
printf("%.8f ",maxvol);
if ( maxvol > maxrel ) if ( maxvol > maxrel )
maxrel = maxvol; maxrel = maxvol;
} }

Loading…
Cancel
Save