first commit

This commit is contained in:
Matthias Hinrichs
2025-07-05 03:10:41 +02:00
commit 9b7bdcbc53
39 changed files with 5109 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
package model
type StockMeta struct {
Symbol string `json:"symbol"`
RegularMarketPrice float64 `json:"regularMarketPrice"`
Exchange string `json:"exchangeName"`
Currency string `json:"currency"`
Instrument string `json:"instrumentType"`
FirstTrade int64 `json:"firstTradeDate"`
GMTOffset int64 `json:"gmtoffset"`
Timezone string `json:"exchangeTimezoneName"`
ShortName string `json:"shortName"`
LongName string `json:"longName"`
}
// Struct to represent a single dividend event
type DividendEvent struct {
Amount float64 `json:"amount"`
Date int64 `json:"date"`
}
// Struct to represent the events object, specifically dividends
type Events struct {
Dividends map[string]DividendEvent `json:"dividends"`
}
// Struct for the Yahoo Chart Response containing events (like dividends)
type YahooDividendChartResponse struct {
Chart struct {
Result []struct {
Events Events `json:"events"`
} `json:"result"`
} `json:"chart"`
}
// Existing struct for general Yahoo Chart Response
type YahooChartResponse struct {
Chart struct {
Result []struct {
Meta StockMeta `json:"meta"`
// ... weitere Felder wie Timestamp, Indicators etc.
} `json:"result"`
} `json:"chart"`
}