jl777 8 years ago
parent
commit
402814d0d5
  1. 4
      basilisk/basilisk_tradebot.c
  2. 2
      iguana/iguana_exchanges.c
  3. 2
      iguana/tests/LPinit

4
basilisk/basilisk_tradebot.c

@ -178,6 +178,10 @@ void basilisk_txlog(struct supernet_info *myinfo,struct basilisk_swap *swap,stru
if ( (jsonstr= OS_filestr(&filesize,fname)) != 0 )
{
jsonstr[strlen(jsonstr)-1] = ']';
if ( jsonstr[strlen(jsonstr)-2] == ',' )
jsonstr[strlen(jsonstr)-2] = ' ';
if ( jsonstr[strlen(jsonstr)-3] == ',' )
jsonstr[strlen(jsonstr)-3] = ' ';
if ( (dexobj= cJSON_Parse(jsonstr)) != 0 )
{
if ( is_cJSON_Array(dexobj) != 0 && (n= cJSON_GetArraySize(dexobj)) > 0 )

2
iguana/iguana_exchanges.c

@ -105,7 +105,7 @@ double instantdex_aveprice(struct supernet_info *myinfo,struct exchange_quote *s
{
pricesum += (quote.price * quote.volume);
totalvol += quote.volume;
//printf("i.%d of %d %12.8f vol %.8f %s | aveprice %.8f total vol %.8f\n",i,n,sortbuf[i].price,quote.volume,active[quote.val]->exchange->name,pricesum/totalvol,totalvol);
printf("i.%d of %d %12.8f vol %.8f %s | aveprice %.8f total vol %.8f\n",i,n,sortbuf[i].price,quote.volume,active[quote.val]->exchange->name,pricesum/totalvol,totalvol);
}
}
if ( totalvol > 0. )

2
iguana/tests/LPinit

@ -1 +1 @@
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"tradebot\",\"method\":\"liquidity\",\"targetcoin\":\"BTCD\",\"vals\":{\"profit\":0.005}}"
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"tradebot\",\"method\":\"liquidity\",\"targetcoin\":\"BTCD\",\"vals\":{\"profit\":0.01}}"

Loading…
Cancel
Save