crypto_alert_bot/internal/entities/alert.go

21 lines
425 B
Go
Raw Normal View History

2026-02-25 22:48:23 +03:00
package entities
import "github.com/shopspring/decimal"
type AlertID string
2026-02-25 23:52:21 +03:00
type AlertCondition string
const (
AlertConditionAbove AlertCondition = "above" // trigger when price rises to target
AlertConditionBelow AlertCondition = "below" // trigger when price drops to target
)
2026-02-25 22:48:23 +03:00
type Alert struct {
ID AlertID
UserID UserID
Price decimal.Decimal
2026-02-25 23:52:21 +03:00
Condition AlertCondition
2026-02-25 22:48:23 +03:00
Instrument Instrument
}