Documentation
¶
Index ¶
- Constants
- func CompleteUrl(partial string) string
- func StandardSecDateFormatParse(date string) (time.Time, error)
- type CompanyFacts
- type Fact
- type Facts
- type PersistenceLayer
- type SecClient
- func (client *SecClient) GetAllFactsForTicker(ticker Ticker) (CompanyFacts, error)
- func (client *SecClient) GetAllTickers() ([]Ticker, error)
- func (client *SecClient) GetHttpGetRequestWithProperHeaders(endpoint string) (*http.Request, error)
- func (client *SecClient) GetTickerForCIK(cik uint64) (Ticker, error)
- func (client *SecClient) GetTickerForSymbol(symbol string) (Ticker, error)
- func (client *SecClient) WaitForToken()
- type Ticker
- type Unit
Constants ¶
View Source
const AllCompanyFactsEndpoint string = Protocol + SecUrl + CompanyFactsZip
View Source
const CompanyFactsEndpoint string = Protocol + SecDataUrl + "/api/xbrl/companyfacts"
View Source
const CompanyFactsZip string = "/Archives/edgar/daily-index/xbrl/companyfacts.zip"
View Source
const FilingsUrlEndpoint string = Protocol + SecReportUrl + "/Senate-Stock-Disclosures/Filings"
View Source
const Protocol string = "https://"
View Source
const SECDateFormat = "2006-01-02"
View Source
const SecDataUrl string = "data.sec.gov"
View Source
const SecReportUrl string = "www.sec.report"
View Source
const SecUrl string = "www.sec.gov"
View Source
const TickerEndpoint string = Protocol + SecUrl + "/files/company_tickers.json"
Variables ¶
This section is empty.
Functions ¶
func CompleteUrl ¶
Types ¶
type CompanyFacts ¶
type PersistenceLayer ¶ added in v0.1.0
type PersistenceLayer interface { SaveFacts(Ticker, *CompanyFacts) error LoadFacts(Ticker) (*CompanyFacts, error) }
type SecClient ¶
type SecClient struct {
// contains filtered or unexported fields
}
func NewSecClient ¶
func NewSecClient() *SecClient
func NewSecClientWithPersistence ¶ added in v0.1.0
func NewSecClientWithPersistence(persistenceLayer PersistenceLayer) *SecClient
func (*SecClient) GetAllFactsForTicker ¶
func (client *SecClient) GetAllFactsForTicker(ticker Ticker) (CompanyFacts, error)
func (*SecClient) GetAllTickers ¶
Fetches all current tickers from the sec.gov api
func (*SecClient) GetHttpGetRequestWithProperHeaders ¶
func (*SecClient) GetTickerForCIK ¶ added in v0.2.0
func (*SecClient) GetTickerForSymbol ¶
func (*SecClient) WaitForToken ¶ added in v0.2.0
func (client *SecClient) WaitForToken()
type Ticker ¶
type Ticker struct { // Central Index Key (CIK) is used on the SEC's computer systems to identify corporations // and individual people who have filed disclosure with the SEC CIK uint64 `json:"cik_str"` // The symbol of the company for exampel NDAQ Symbol string `json:"ticker"` // The name of the company Name string `json:"title"` }
Represents a ticker in the given SEC format
Click to show internal directories.
Click to hide internal directories.