Handle Spin-off events as buys
This commit is contained in:
1 parent
41b287c804
commit
4681a34933
1 file changed
+1
-8
@@ -139,7 +139,7 @@ func (rr RecordReader) ReadRecord(ctx context.Context) (internal.Record, error)
|
||||
|
||||
var kind internal.Kind
|
||||
switch strings.ToLower(raw[0]) {
|
||||
case MarketBuy, LimitBuy:
|
||||
case MarketBuy, LimitBuy, SpinOff:
|
||||
kind = internal.KindBuy
|
||||
case MarketSell, LimitSell:
|
||||
kind = internal.KindSell
|
||||
@@ -177,13 +177,6 @@ func (rr RecordReader) ReadRecord(ctx context.Context) (internal.Record, error)
|
||||
)
|
||||
continue
|
||||
|
||||
case SpinOff:
|
||||
slog.Warn("Skipping 'spin off' event!",
|
||||
slog.Any("ISIN", symbol),
|
||||
slog.Any("Quantity", qant),
|
||||
)
|
||||
continue
|
||||
|
||||
default:
|
||||
return Record{}, fmt.Errorf("parse record type: %s", raw[0])
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user