2000字范文,分享全网优秀范文,学习好帮手!
2000字范文 > pytdx 获取板块指数_能否增加一个通过股票代码 板块指数代码获得中文名称的接口?...

pytdx 获取板块指数_能否增加一个通过股票代码 板块指数代码获得中文名称的接口?...

时间:2021-12-15 08:39:32

相关推荐

pytdx 获取板块指数_能否增加一个通过股票代码 板块指数代码获得中文名称的接口?...

T0002/hq_cache/shex.tnf

T0002/hq_cache/szex.tnf

这个解码就是。

/***************************************************

股票代码列表和股票名称

T0002/hq_cache/shex.tnf

T0002/hq_cache/szex.tnf

***************************************************/

struct TdxSymbolMap {

char symbol[6]; // 6 digits

char dummy1[18]

char name[8]; // 4 characters in GB2312

char dummy2[218];

}

void tdx_read_symbols(const char *file){

FILE *fp=fopen(file.c_str(),"rb");

fseek(fp, 50, SEEK_SET);

char buf[250];

while(250 == fread(buf,1,250,fp)){

std::string symbol(buf,0,6);

std::string name(buf+24,8);

}

fclose(fp);

}

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。