add trade and position service

This commit is contained in:
zipfriis
2026-03-27 10:14:43 +01:00
parent 2c24ee48b0
commit d0cb9af746
7 changed files with 35 additions and 22 deletions

View File

@@ -16,7 +16,7 @@ func UpdatePositionByTradeList(db *sql.DB) error {
fmt.Printf("Failed to get the trades from db: %s", err)
}
var TradeSum map[string]model.Position
TradeSum := make(map[string]model.Position)
for _, trade := range trades {
if trade.Type == model.Buy {