-
Notifications
You must be signed in to change notification settings - Fork 1
/
types_histdata.go
69 lines (64 loc) · 1.35 KB
/
types_histdata.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
package ibapi
import (
"time"
)
type MsgInHistDataItem struct {
Date string
Open float64
High float64
Low float64
Close float64
Volume int64
WAP float64
HasGaps string
BarCount int64 `minVer:"3"`
}
type MsgInHistData struct {
ReqId int64
StartDate string
EndDate string
Items []MsgInHistDataItem
}
type MsgOutReqHistData struct {
ReqId int64
Symbol string
SecurityType string
Expiry string
Strike float64
Right string
Multiplier string
Exchange string
PrimaryExchange string
Currency string
LocalSymbol string
IncludeExpired bool `minVer:"31"`
EndDateTime time.Time `minVer:"20"`
BarSizeSetting string `minVer:"20"`
Duration string // format is "x S|D|W|M|Y" where x is integer, sec/day/week/mon/year
UseRTH bool
WhatToShow string
FormatDate int64 `minVer:"16"`
}
const (
FormatDateString = 1
FormatDateSeconds = 2
WhatToShowTrades = "TRADES"
WhatToShowMidpoint = "MIDPOINT"
WhatToShowBid = "BID"
WhatToShowAsk = "ASK"
WhatToShowBidAsk = "BID_ASK"
WhatToShowHistVol = "HISTORICAL_VOLATILITY"
WhatToShowImpVol = "OPTION_IMPLIED_VOLATILITY"
BarSize1Sec = "1 sec"
BarSize5Sec = "5 secs"
BarSize15Sec = "15 secs"
BarSize30Sec = "30 secs"
BarSize1Min = "1 min"
BarSize2Min = "2 mins"
BarSize3Min = "3 mins"
BarSize5Min = "5 mins"
BarSize15Min = "15 mins"
BarSize30Min = "30 mins"
BarSize1Hour = "1 hour"
BarSize1Day = "1 day"
)