forked from gofinance/ib
-
Notifications
You must be signed in to change notification settings - Fork 1
/
historical_data.go
45 lines (40 loc) · 1.23 KB
/
historical_data.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
package ib
import "time"
// HistDataBarSize .
type HistDataBarSize string
// HistDataToShow .
type HistDataToShow string
// HistBar enum
const (
HistBarSize1Sec HistDataBarSize = "1 secs"
HistBarSize5Sec = "5 secs"
HistBarSize15Sec = "15 secs"
HistBarSize30Sec = "30 secs"
HistBarSize1Min = "1 min"
HistBarSize2Min = "2 mins"
HistBarSize3Min = "3 mins"
HistBarSize5Min = "5 mins"
HistBarSize15Min = "15 mins"
HistBarSize30Min = "30 mins"
HistBarSize1Hour = "1 hour"
HistBarSize1Day = "1 day"
HistTrades HistDataToShow = "TRADES"
HistMidpoint = "MIDPOINT"
HistBid = "BID"
HistAsk = "ASK"
HistBidAsk = "BID_ASK"
HistVolatility = "HISTORICAL_VOLATILITY"
HistOptionIV = "OPTION_IMPLIED_VOLATILITY"
)
// HistoricalDataItem .
type HistoricalDataItem struct {
Date time.Time
Open float64
High float64
Low float64
Close float64
Volume int64
WAP float64
HasGaps bool
BarCount int64
}