diff --git a/iguana/exchanges/LP_prices.c b/iguana/exchanges/LP_prices.c index 434f6b57b..3f9cca7b1 100644 --- a/iguana/exchanges/LP_prices.c +++ b/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); diff --git a/iguana/exchanges/stats.c b/iguana/exchanges/stats.c index a8c5b1c08..cc5005c61 100644 --- a/iguana/exchanges/stats.c +++ b/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)