c_Str
This commit is contained in:
@@ -2017,7 +2017,7 @@ cJSON *get_urljson(char *url)
|
|||||||
int32_t get_stockprices(uint32_t now,uint32_t *prices,std::vector<std::string> symbols)
|
int32_t get_stockprices(uint32_t now,uint32_t *prices,std::vector<std::string> symbols)
|
||||||
{
|
{
|
||||||
char url[32768],*symbol; cJSON *json,*obj; int32_t i,n=0,retval=-1; uint32_t uprice,timestamp;
|
char url[32768],*symbol; cJSON *json,*obj; int32_t i,n=0,retval=-1; uint32_t uprice,timestamp;
|
||||||
sprintf(url,"https://api.iextrading.com/1.0/tops/last?symbols=%s",GetArg("-ac_stocks",""));
|
sprintf(url,"https://api.iextrading.com/1.0/tops/last?symbols=%s",GetArg("-ac_stocks","").c_str());
|
||||||
if ( (json= send_curl(url,(char *)"iex")) != 0 ) //if ( (json= get_urljson(url)) != 0 )
|
if ( (json= send_curl(url,(char *)"iex")) != 0 ) //if ( (json= get_urljson(url)) != 0 )
|
||||||
{
|
{
|
||||||
if ( (n= cJSON_GetArraySize(json)) > 0 )
|
if ( (n= cJSON_GetArraySize(json)) > 0 )
|
||||||
|
|||||||
Reference in New Issue
Block a user