added dividend db table and insert by trade

This commit is contained in:
samantha42
2026-04-06 07:36:45 +02:00
parent 31108a16d0
commit 57ae3cfb06
7 changed files with 120 additions and 48 deletions

View File

@@ -19,7 +19,7 @@ func UpdatePositionByTradeList(db *sql.DB) error {
TradeSum := make(map[string]model.Position)
for _, trade := range trades {
if trade.Type == model.Buy {
if trade.Type == model.BuyType {
TradeSum[trade.Symbol] = model.Position{
Symbol: trade.Symbol,
CurrencyCode: trade.CurrencyCode,