Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertItem ¶
type AlertItem struct {
ID string `json:"id"`
IndicatorID string `json:"indicator_id"`
Enabled bool `json:"enabled"`
Frequency int `json:"frequency"`
Scope int `json:"scope"`
Text string `json:"text"`
State []int `json:"state"`
ValueMap AlertValueMap `json:"value_map"`
}
AlertItem is a single price-alert configuration.
type AlertList ¶
type AlertList struct {
Lists []*AlertSymbolGroup `json:"lists"`
}
AlertList is the top-level response from GET /v1/notify/reminders.
type AlertSymbolGroup ¶
type AlertSymbolGroup struct {
// Symbol is the security identifier (e.g. "700.HK").
Symbol string `json:"symbol"`
Code string `json:"code"`
Market string `json:"market"`
Name string `json:"name"`
Price *decimal.Decimal `json:"price"`
Chg *decimal.Decimal `json:"chg"`
PChg *decimal.Decimal `json:"p_chg"`
Product string `json:"product"`
Indicators []*AlertItem `json:"indicators"`
}
AlertSymbolGroup holds all alert items for a single security.
type AlertValueMap ¶ added in v0.28.0
type AlertValueMap struct {
Price *string `json:"price,omitempty"`
Chg *string `json:"chg,omitempty"`
}
AlertValueMap is the raw wire type for an alert's trigger threshold. Both fields arrive as JSON strings; exactly one is populated depending on the condition.
Click to show internal directories.
Click to hide internal directories.