diff --git a/types.go b/types.go index 5194ac4..edddd4e 100644 --- a/types.go +++ b/types.go @@ -147,3 +147,34 @@ type MarketClockResponse struct { Message string `xml:"message"` UnixTime time.Time `xml:"unixtime"` } + +type MarketQuotesResponse struct { + XMLName xml.Name `xml:"response"` + Quotes []Quote `xml:"quotes"'` +} + +/** +TODO: Finish this page https://www.ally.com/api/invest/documentation/market-ext-quotes-get-post/ +*/ +type Quote struct { + XMLName xml.Name `xml:"quote"` + AverageDailyPrice100 float64 `xml:"adp_100"` + AverageDailyPrice200 float64 `xml:"adp_200"` + AverageDailyPrice50 float64 `xml:"adp_50"` + AverageDailyVolume21 float64 `xml:"adv_21"` + AverageDailyVolume30 float64 `xml:"adv_30"` + AverageDailyVolume90 float64 `xml:"adv_90"` + AskPrice float64 `xml:"ask"` + AskTime time.Time `xml:"ask_time"` + AskSize int `xml:"asksz"` + Basis float64 `xml:"basis"` + Beta float64 `xml:"beta"` + Bid float64 `xml:"bid"` + BidTime time.Time `xml:"bid_time"` + BidSize int `xml:"bidsz"` + BidTick int `xml:"bidtick"` + Change float64 `xml:"chg"` + ChangeSign string `xml:"chg_sign"` + ChangeText string `xml:"chg_t"` + Close float64 `xml:"cl"` +}