forked from Nitecon/iqfeed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
levelII.go
32 lines (27 loc) · 961 Bytes
/
levelII.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
package iqfeed
import (
//"strings"
"time"
)
// RegionalMsg A regional update message. See complete message definition in Regional Messages. (http://www.iqfeed.net/dev/api/docs/RegionalMessageFormat.cfm).
type LevelII struct {
// Raw []string
Raw string
}
// UnMarshall sends the data into the usable struct for consumption by the application.
func (r *LevelII) UnMarshall(d []byte, loc *time.Location) {
// items := strings.Split(string(d), ",")
// copy(r.Raw, d)
r.Raw = string(d)
//r.Symbol = items[0]
//r.Exchange = items[1]
//r.RegBid = GetFloatFromStr(items[2])
//r.RegBidSize = GetIntFromStr(items[3])
//r.RegBidTime = GetTimeInHMS(items[4], loc)
//r.RegAsk = GetFloatFromStr(items[5])
//r.RegAskSize = GetIntFromStr(items[6])
//r.RegAskTime = GetTimeInHMS(items[7], loc)
//r.FractionDispCode = GetIntFromStr(items[8])
//r.DecPrecision = GetIntFromStr(items[9])
//r.MarketCenter = GetIntFromStr(items[10])
}