Browse Source

Test

etomic
jl777 7 years ago
parent
commit
8c1207b462
  1. 12
      iguana/exchanges/LP_portfolio.c

12
iguana/exchanges/LP_portfolio.c

@ -377,8 +377,8 @@ double LP_pricesparse(void *ctx,int32_t trexflag,char *retstr,struct LP_priceinf
//printf("have trex: iter.%d trexflag.%d %s %.8f %.8f\n",iter,trexflag,symbol,coinpp->bid[1],coinpp->ask[1]); //printf("have trex: iter.%d trexflag.%d %s %.8f %.8f\n",iter,trexflag,symbol,coinpp->bid[1],coinpp->ask[1]);
continue; continue;
} }
LP_autopriceset(ctx,1,refpp,coinpp,price,0,0); LP_autopriceset(ctx,1,coinpp,refpp,price,0,0);
LP_autopriceset(ctx,-1,coinpp,refpp,price,0,0); LP_autopriceset(ctx,-1,refpp,coinpp,price,0,0);
} }
} }
} }
@ -437,8 +437,8 @@ void LP_autoprice_iter(void *ctx,struct LP_priceinfo *btcpp)
{ {
//printf("(%s %.8f %.8f) ",CURRENCIES[i],jdouble(retjson,"price"),jdouble(retjson,"invprice")); //printf("(%s %.8f %.8f) ",CURRENCIES[i],jdouble(retjson,"price"),jdouble(retjson,"invprice"));
price = jdouble(retjson,"price"); price = jdouble(retjson,"price");
LP_autopriceset(ctx,1,kmdpp,fiatpp,price,0,0); LP_autopriceset(ctx,1,fiatpp,kmdpp,price,0,0);
LP_autopriceset(ctx,-1,fiatpp,kmdpp,price,0,0); LP_autopriceset(ctx,-1,kmdpp,fiatpp,price,0,0);
free_json(retjson); free_json(retjson);
} }
} }
@ -461,8 +461,8 @@ void LP_autoprice_iter(void *ctx,struct LP_priceinfo *btcpp)
if ( bidsatoshis != 0 && asksatoshis != 0 ) if ( bidsatoshis != 0 && asksatoshis != 0 )
price = 0.5 * dstr(bidsatoshis + asksatoshis) * nxtkmd; price = 0.5 * dstr(bidsatoshis + asksatoshis) * nxtkmd;
} }
LP_autopriceset(ctx,1,kmdpp,nxtpp,price,0,0); LP_autopriceset(ctx,1,nxtpp,kmdpp,price,0,0);
LP_autopriceset(ctx,-1,nxtpp,kmdpp,price,0,0); LP_autopriceset(ctx,-1,kmdpp,nxtpp,price,0,0);
//printf("%s %s -> (%s) nxtkmd %.8f %.8f %.8f\n",assetids[i][1],assetids[i][0],jprint(retjson,0),nxtkmd,0.5*dstr(bidsatoshis + asksatoshis),price); //printf("%s %s -> (%s) nxtkmd %.8f %.8f %.8f\n",assetids[i][1],assetids[i][0],jprint(retjson,0),nxtkmd,0.5*dstr(bidsatoshis + asksatoshis),price);
free_json(retjson); free_json(retjson);
} }

Loading…
Cancel
Save