Documentation ¶
Overview ¶
Package calendar provides market calendar, with which you can check if the market is open at specific point of time. Though the package is generalized to support different market calendars, only the NASDAQ is implemented at this moment. You can create your own calendar if you provide the calendar json string. See nasdaq.go for the format.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NasdaqJson = `` /* 10869-byte string literal not displayed */
Functions ¶
This section is empty.
Types ¶
type Calendar ¶
type Calendar struct {
// contains filtered or unexported fields
}
var Nasdaq *Calendar = New(NasdaqJson)
Nasdaq implements market calendar for the NASDAQ.
func (*Calendar) EpochIsMarketOpen ¶
EpochIsMarketOpen returns true if epoch in calendar's timezone is in the market hours
func (*Calendar) IsMarketDay ¶
IsMarketDay check if today is a trading day or not.
func (*Calendar) IsMarketOpen ¶
IsMarketOpen returns true if t is in the market hours
Click to show internal directories.
Click to hide internal directories.