Commit fe21fa89 authored by 吕先亚's avatar 吕先亚

update股债比

parent 93275f6c
......@@ -96,7 +96,7 @@ async def recommend():
data['note'] = json.dumps(note)
# 计算股债比
stock_weight = int(
sum(weight * 100 for key, weight in funds.items() if id_ticker_map[key]['category'] == 'STOCK'))
sum(weight * 100 for key, weight in funds.items() if id_ticker_map[key]['assetType'] == 'STOCK'))
data["p_note"] = f"{stock_weight}:{100 - stock_weight}"
portfolios['data'] = data
rec_list.append(portfolios)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment