Closed wisfern closed 4 years ago
看了最新的文档,貌似现在没有查询资产标的所归属的板块api,只能直接查询domain中的BlockStock?
看了最新的文档,貌似现在没有查询资产标的所归属的板块api,只能直接查询domain中的BlockStock?
嗯 组合(BasePortfolio)目前有一个函数叫get_stocks,用于获取Block,Index,Etf里面包含的个股
反过来,个股属于哪些板块,目前只能从BlockStock里面查询。
1、模型升级的sql文件 2、migration脚本
目前最大的改动就是去掉之前 Stock 和 组合 的关系,需要删掉之前的meta库,重新更新一下。 其他的没有变。
好的
AttributeError: 'Stock' object has no attribute 'industries'
请问,是否有如下东西: 1、模型升级的sql文件 2、migration脚本?
如东财,有一段更数账务数据,会遇到判断这个票是什么类型的东西,更新后的代码就没有这个归属关系,导致跑数异常 def get_company_type(stock_domain: StockDetail): industries = stock_domain.industries.split(',') if ('银行' in industries) or ('信托' in industries): return CompanyType.yinhang if '保险' in industries: return CompanyType.baoxian if '证券' in industries: return CompanyType.quanshang return CompanyType.qiye
def company_type_flag(security_item): try: company_type = get_company_type(security_item)