Documentation ¶
Index ¶
- func CreateWatchlist(db *pgxpool.Pool, userId int, watchlistName string, stockIds []int) (watchlistId int, err error)
- func DeleteWatchlistById(db *pgxpool.Pool, watchlistId int) error
- func GetNewsSourceIdsByUserId(db *pgxpool.Pool, userId int) (newsSourceIds []string, err error)
- func HasWatchlistWithIdAndUserId(db *pgxpool.Pool, watchlistId int, userId int) (bool, error)
- func IsWithinNATradingHours(moment time.Time) bool
- func UpdateWatchlistById(db *pgxpool.Pool, watchlistId int, watchlistName string, stockIds []int) error
- type Candle
- type NewsSource
- type Stock
- type Watchlist
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateWatchlist ¶
func IsWithinNATradingHours ¶
Assuming location = "America/New_York"
Types ¶
type Candle ¶
type Candle struct { OpenedAt time.Time OpenMicros int64 HighMicros int64 LowMicros int64 CloseMicros int64 Volume int64 }
type NewsSource ¶
func GetNewsSourcesByUserId ¶
func GetNewsSourcesByUserId(db *pgxpool.Pool, userId int) (newsSources []NewsSource, err error)
type Stock ¶
Click to show internal directories.
Click to hide internal directories.