Browse Source

test

etomic
jl777 7 years ago
parent
commit
e1b972acce
  1. 6
      iguana/exchanges/LP_prices.c
  2. 2
      iguana/exchanges/stats.c

6
iguana/exchanges/LP_prices.c

@ -1116,12 +1116,14 @@ void LP_pricefeedupdate(bits256 pubkey,char *base,char *rel,double price,char *u
double LP_CMCbtcprice(char *symbol)
{
char *retstr; cJSON *ticker; double price_btc = 0.;
char *retstr; cJSON *ticker,*item; double price_btc = 0.;
if ( (retstr= cmc_ticker(symbol)) != 0 )
{
if ( (ticker= cJSON_Parse(retstr)) != 0 )
{
price_btc = jdouble(jitem(ticker,0),"price_btc");
item = jitem(ticker,0);
price_btc = jdouble(item,"price_btc");
printf("%.8f item.(%s)\n",price_btc,jprint(item,0));
free_json(ticker);
}
free(retstr);

2
iguana/exchanges/stats.c

@ -33,7 +33,7 @@ char *stats_JSON(void *ctx,char *myipaddr,int32_t mypubsock,cJSON *argjson,char
char *stats_validmethods[] =
{
"psock", "balances", "getprice", "notify", "getpeers", // from issue_ "uitem", "listunspent",
"orderbook", "statsdisp", "help", "getcoins", "pricearray", "balance", "tradesarray"
"orderbook", "statsdisp", "fundbalance", "help", "getcoins", "pricearray", "balance", "tradesarray"
};
int32_t LP_valid_remotemethod(cJSON *argjson)

Loading…
Cancel
Save