Note: the IEX api now requires a key for authentication, thus breaking this project.
A go interface for accessing IEX finanical information. Data provided for free by IEX. View IEX’s Terms of Use.
go get github.com/AndrewRPorter/goiex
package main
import (
"fmt"
"github.com/AndrewRPorter/goiex"
)
func main() {
s, err := goiex.Get("AAPL")
if err != nil {
fmt.Errorf("Unable to fetch ticker: %s", "AAPL")
}
fmt.Println(s.Price)
// fetch company information
c, err := s.GetCompany()
if err != nil {
fmt.Errorf("Unable to fetch company data for: %s", s.Symbol)
}
fmt.Println(c.Description)
}Available Methods
Get()GetCompany()
Available Fields
SymbolCompanyNameExchangeSectorOpenCloseHighLowVolumePriceChangeChangePercentAverageVolumeMarketCapPeRatioYearHighYearLowYtdChangeSymbolCompanyNameExchangeIndustryWebsiteDescriptionCEOSector