-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconcrete.go
87 lines (77 loc) · 2.01 KB
/
concrete.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
package fmpgo
/**
* Concrete types for data returned by the fmpcloud API.
*/
import (
"time"
)
// Ticker represents a stock ticker
type Ticker struct {
Symbol string
Name string
Currency string
StockExchange string
ExchangeShortName string
}
// OHLCV represents open, high, low, close, volume data.
type OHLCV struct {
open float64 // 136.94000000,
low float64 // 136.91000000,
high float64 // 137.20000000,
close float64 // 137.01000000,
volume float64 // 776219
}
// Chart represents chart data for a ticker. Returns OHLCV with date.
type Chart struct {
OHLCV
date time.Time
}
// DailyPriceSummary only return daily price data.
type DailyPriceSummary struct {
OHLCV
date time.Time
adjClose float64
unadjustedVolume float64
change float64
changePercent float64
vwap float64
label time.Time // | *may need a string here?* | March 12, 19,
changeOverTime float64
}
// HistoricalDailyPriceData represents historical daily price data returned
// from fmpcloud API.
type HistoricalDailyPriceData struct {
Symbol string
Historical []DailyPriceSummary
}
// Dividend represents dividend metadata
type Dividend struct {
}
// Split represents stock split metadata (when, how much, etc..)
type Split struct {
}
// Quote represents a stock quote
type Quote struct {
Symbol string
Name string
Price float64
ChangesPercentage float64
Change float64
DayLow float64
DayHigh float64
YearHigh float64
YearLow float64
MarketCap float64
PriceAvg50 float64
PriceAvg200 float64
Volume float64
AvgVolume float64
Exchange string
Open float64
PreviousClose float64
Eps float64
PE float64
EarningsAnnouncement time.Time
SharesOutstanding float64
Timestamp time.Time
}