alert service
This commit is contained in:
parent
0e73841b3e
commit
608561ab38
8 changed files with 283 additions and 8 deletions
|
|
@ -4,9 +4,17 @@ import "github.com/shopspring/decimal"
|
|||
|
||||
type AlertID string
|
||||
|
||||
type AlertCondition string
|
||||
|
||||
const (
|
||||
AlertConditionAbove AlertCondition = "above" // trigger when price rises to target
|
||||
AlertConditionBelow AlertCondition = "below" // trigger when price drops to target
|
||||
)
|
||||
|
||||
type Alert struct {
|
||||
ID AlertID
|
||||
UserID UserID
|
||||
Price decimal.Decimal
|
||||
Condition AlertCondition
|
||||
Instrument Instrument
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue