This commit is contained in:
jl777
2019-03-29 01:27:32 -11:00
parent aee4b6ec2b
commit df6f9171dd

View File

@@ -1741,10 +1741,10 @@ uint32_t get_stockprice(char *symbol)
sprintf(url,"https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol=%s&interval=15min&apikey=%s",symbol,NOTARY_PUBKEY.data()+50);
if ( (json= get_urljson(url)) != 0 )
{
if ( (obj= jobj(jitem(json,"Time Series (15min)"),0)) != 0 )
if ( (obj= jobj(jitem(json,(char *)"Time Series (15min)"),0)) != 0 )
{
high = jdouble(jitem(obj,0),"2. high")*10000 + 0.000049;
low = jdouble(jitem(obj,0),"3. low")*10000 + 0.000049;
high = jdouble(jitem(obj,0),(char *)"2. high")*10000 + 0.000049;
low = jdouble(jitem(obj,0),(char *)"3. low")*10000 + 0.000049;
price = (high + low) / 2;
}
free_json(json);
@@ -1759,7 +1759,7 @@ uint32_t get_currencyprice(char *symbol)
if ( (json= get_urljson(url)) != 0 )
{
if ( (obj= jobj(jitem(json,0),0)) != 0 )
price = jdouble(obj,"5. Exchange Rate")*10000 + 0.000049;
price = jdouble(obj,(char *)"5. Exchange Rate")*10000 + 0.000049;
free_json(json);
}
return(price);
@@ -1839,6 +1839,7 @@ void komodo_cbopretupdate()
// fprintf(stderr,"%02x",Mineropret[i]);
//fprintf(stderr," <- set Mineropret[%d]\n",(int32_t)Mineropret.size());
}
ASSETCHAINS_CBOPRET = 0xff;
if ( (ASSETCHAINS_CBOPRET & 2) != 0 )
{
get_currencies(Cryptos,(int32_t)(sizeof(Cryptos)/sizeof(*Cryptos)));