| | |
| | | deals_month = trade_data_manager.AccountMoneyManager().get_deal_count_info(start_date, end_date) |
| | | cost_month = sum([round(0.1 * x[1], 2) for x in delegates_month]) |
| | | make_month = 0 |
| | | make_month += 5 * deals_month[0][1] + 1 * deals_month[1][1] + 0 * deals_month[2][1] |
| | | make_month += max(1 * deals_month[0][1], deals_month[0][2] * 1.854/10000) + 1 * deals_month[1][1] + 0 * deals_month[2][1] |
| | | fdata["month_commission"] = round(make_month - cost_month, 2) |
| | | # 计算当日手续费详情 |
| | | delegates = trade_data_manager.AccountMoneyManager().get_delegated_count_info() |
| | |
| | | fdata["delegates"]["sell"] = delegates[3] |
| | | deals = trade_data_manager.AccountMoneyManager().get_deal_count_info() |
| | | fdata["deals"] = {} |
| | | fdata["deals"]["stock"] = {"count": deals[0][1], "price": 5, "money": round(5 * deals[0][1], 2)} |
| | | fdata["deals"]["stock"] = {"count": deals[0][1], "price": 1, "money": round(1 * deals[0][1], 2)} |
| | | fdata["deals"]["sh_cb"] = {"count": deals[1][1], "price": 1, "money": round(1 * deals[1][1], 2)} |
| | | fdata["deals"]["sz_cb"] = {"count": deals[2][1], "price": 0, "money": round(0 * deals[2][1], 2)} |
| | | fdata["commission"] = trade_data_manager.AccountMoneyManager().get_commission_cache() |