可转债行情接口cb_daily返回的可转债价格数据仅精确到小数点后两位
justin745 opened this issue · 1 comments
justin745 commented
调用可转债行情接口cb_daily时,如果传入TS代码ts_code,返回的可转债价格数据仅精确到小数点后两位。相比现实中的可转债价格数据都是精确到小数点后三位,Tushare的数据精准度就不够了。
举例:
df1 = pro.cb_daily(ts_code='110063.SH')
df1[['close', 'open', 'high', 'low']]
close | open | high | low | |
---|---|---|---|---|
0 | 107.72 | 108.28 | 108.28 | 107.21 |
1 | 108.28 | 108.90 | 108.98 | 108.06 |
2 | 108.90 | 110.24 | 110.39 | 108.88 |
3 | 110.22 | 111.19 | 111.19 | 110.12 |
4 | 110.90 | 110.33 | 111.23 | 110.30 |
... | ... | ... | ... | ... |
914 | 122.61 | 122.31 | 123.22 | 122.30 |
915 | 122.40 | 122.07 | 122.77 | 120.51 |
916 | 122.32 | 121.70 | 122.36 | 121.67 |
917 | 122.05 | 121.61 | 122.41 | 120.22 |
918 | 122.34 | 123.39 | 124.20 | 122.05 |
另外,如果不传入TS代码ts_code,只传入trade_date参数,返回的数据好像没问题。
df2 = pro.cb_daily(trade_date='20190719')
df2[['close', 'open', 'high', 'low']]
close | open | high | low | |
---|---|---|---|---|
0 | 92.262 | 92.256 | 92.450 | 92.256 |
1 | 92.748 | 93.012 | 93.170 | 92.670 |
2 | 92.920 | 92.799 | 93.060 | 92.790 |
3 | 93.000 | 93.220 | 93.399 | 93.000 |
4 | 94.010 | 94.000 | 94.195 | 93.910 |
... | ... | ... | ... | ... |
164 | 137.710 | 137.001 | 140.300 | 136.800 |
165 | 149.001 | 149.880 | 152.101 | 148.262 |
166 | 162.340 | 163.990 | 164.680 | 161.820 |
167 | 174.496 | 177.000 | 184.300 | 173.507 |
168 | 194.240 | 194.870 | 198.000 | 192.010 |
justin745 commented
已修复,非常感谢!