Handle Spin-off events as buys #35

Merged
natercio merged 3 commits from handle-spin-off into main 2026-10-27 22:08:19 +00:00
Showing only changes of commit 4681a34933 - Show all commits
+1 -8
View File
@@ -139,7 +139,7 @@ func (rr RecordReader) ReadRecord(ctx context.Context) (internal.Record, error)
var kind internal.Kind var kind internal.Kind
switch strings.ToLower(raw[0]) { switch strings.ToLower(raw[0]) {
case MarketBuy, LimitBuy: case MarketBuy, LimitBuy, SpinOff:
kind = internal.KindBuy kind = internal.KindBuy
case MarketSell, LimitSell: case MarketSell, LimitSell:
kind = internal.KindSell kind = internal.KindSell
@@ -177,13 +177,6 @@ func (rr RecordReader) ReadRecord(ctx context.Context) (internal.Record, error)
) )
continue continue
case SpinOff:
slog.Warn("Skipping 'spin off' event!",
slog.Any("ISIN", symbol),
slog.Any("Quantity", qant),
)
continue
default: default:
return Record{}, fmt.Errorf("parse record type: %s", raw[0]) return Record{}, fmt.Errorf("parse record type: %s", raw[0])
} }