Browse Source

Fix

pull/4/head
jl777 6 years ago
parent
commit
2435962f20
  1. 4
      src/cc/dapps/oraclefeed.c

4
src/cc/dapps/oraclefeed.c

@ -123,11 +123,11 @@ int32_t main(int32_t argc,char **argv)
{
cJSON *pjson,*bpi,*usd;
printf("Powered by CoinDesk (%s)\n","https://www.coindesk.com/price/");
if ( (pjson= get_urljson("http://api.coindesk.com/v1/bpi/currentprice.json","")) != 0 )
if ( (pjson= get_urljson("http://api.coindesk.com/v1/bpi/currentprice.json")) != 0 )
{
if ( (bpi= jobj(pjson,"bpi")) != 0 && (usd= jobj(bpi,"USD")) != 0 )
printf("BTC/USD %.4f\n",jdouble(usd,"rate_float"));
json_free(pjson);
free_json(pjson);
}
return(0);
}

Loading…
Cancel
Save