Documentation
¶
Index ¶
- func Add(market Market)
- func Monitor() error
- type America
- type China
- type Company
- type CompanyList
- type HongKong
- type Market
- type ParseResult
- type Peroid60
- type YahooChart
- type YahooError
- type YahooIndicators
- type YahooJson
- type YahooMeta
- type YahooQuote
- type YahooResult
- type YahooTradingPeroid
- type YahooTradingPeroidSection
- type YahooTradingPeroids
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CompanyList ¶
type CompanyList []Company
公司列表
func (CompanyList) Len ¶
func (l CompanyList) Len() int
func (CompanyList) Less ¶
func (l CompanyList) Less(i, j int) bool
func (CompanyList) Swap ¶
func (l CompanyList) Swap(i, j int)
type Market ¶
type Market interface {
// 名称
Name() string
// 时区
Timezone() string
// 获取上市公司列表
Companies() ([]Company, error)
// 抓取任务(每日)
Crawl(companyCode string, day time.Time) (string, error)
}
市场更新
type ParseResult ¶
type Peroid60 ¶
type YahooChart ¶
type YahooChart struct {
Result []YahooResult `json:"result"`
Err *YahooError `json:"error"`
}
type YahooError ¶
type YahooIndicators ¶
type YahooIndicators struct {
Quotes []YahooQuote `json:"quote"`
}
type YahooJson ¶
type YahooJson struct {
Chart YahooChart `json:"chart"`
}
type YahooMeta ¶
type YahooMeta struct {
Currency string `json:"currency"`
Symbol string `json:"symbol"`
ExchangeName string `json:"exchangeName"`
InstrumentType string `json:"instrumentType"`
FirstTradeDate int64 `json:"firstTradeDate"`
GMTOffset int `json:"gmtoffset"`
Timezone string `json:"timezone"`
PreviousClose float32 `json:"previousClose"`
Scale int `json:"scale"`
CurrentTradingPeriod YahooTradingPeroid `json:"currentTradingPeriod"`
TradingPeriods YahooTradingPeroids `json:"tradingPeriods"`
DataGranularity string `json:"dataGranularity"`
ValidRanges []string `json:"validRanges"`
}
type YahooQuote ¶
type YahooResult ¶
type YahooResult struct {
Meta YahooMeta `json:"meta"`
Timestamp []int64 `json:"timestamp"`
Indicators YahooIndicators `json:"indicators"`
}
type YahooTradingPeroid ¶
type YahooTradingPeroid struct {
Pre YahooTradingPeroidSection `json:"pre"`
Regular YahooTradingPeroidSection `json:"regular"`
Post YahooTradingPeroidSection `json:"post"`
}
type YahooTradingPeroids ¶
type YahooTradingPeroids struct {
Pres [][]YahooTradingPeroidSection `json:"pre"`
Regulars [][]YahooTradingPeroidSection `json:"regular"`
Posts [][]YahooTradingPeroidSection `json:"post"`
}
Click to show internal directories.
Click to hide internal directories.