Documentation ¶
Index ¶
Constants ¶
View Source
const BOCBaseUrl string = "http://www.bankofcanada.ca/valet/observations/%s/csv"
View Source
const FredBaseUrl string = "https://fred.stlouisfed.org/graph/fredgraph.csv?id=%s"
View Source
const StooqBaseUrl string = "https://stooq.com/q/d/l"
View Source
const TIINGO_API_KEY = "TIINGO_API_KEY"
View Source
const TiingoBaseUrl string = "https://api.tiingo.com/tiingo/daily/%s/prices"
Variables ¶
View Source
var DefaultHeaders = map[string]string{
"Connection": "keep-alive",
"Expires": "-1",
"Upgrade-Insecure-Requests": "1",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
}
Functions ¶
func GetData ¶
func GetData(reader DataReader) dataframe.DataFrame
Types ¶
type BOCDataReader ¶
type BOCDataReader struct {
// contains filtered or unexported fields
}
func NewBOCDataReader ¶
func NewBOCDataReader(config BOCReaderConfig) (*BOCDataReader, error)
type BOCReaderConfig ¶
type DataReader ¶
type DataReader interface {
// contains filtered or unexported methods
}
type FredDataReader ¶
type FredDataReader struct {
// contains filtered or unexported fields
}
func NewFredDataReader ¶
func NewFredDataReader(config FredReaderConfig) (*FredDataReader, error)
type FredReaderConfig ¶
type MockReader ¶
type MockReader struct {
// contains filtered or unexported fields
}
type StooqDataReader ¶
type StooqDataReader struct {
// contains filtered or unexported fields
}
func NewStooqDataReader ¶
func NewStooqDataReader(config StooqReaderConfig) (*StooqDataReader, error)
type StooqReaderConfig ¶
type TiingoDailyReader ¶
type TiingoDailyReader struct {
// contains filtered or unexported fields
}
func NewTiingoDailyReader ¶
func NewTiingoDailyReader(config TiingoReaderConfig) (*TiingoDailyReader, error)
type TiingoReaderConfig ¶
type TiingoRecord ¶
type TiingoRecord struct { Date string `json:"Date"` Close float32 `json:"Close"` High float32 `json:"High"` Low float32 `json:"Low"` Open float32 `json:"Open"` Volume float32 `json:"Volume"` AdjClose float32 `json:"AdjClose"` AdjHigh float32 `json:"AdjHigh"` AdjLow float32 `json:"AdjLow"` AdjOpen float32 `json:"AdjOpen"` AdjVolume float32 `json:"AdjVolume"` DivCash float32 `json:"DivCash"` SplitFactor float32 `json:"SplitFactor"` }
Click to show internal directories.
Click to hide internal directories.