Esempio n. 1
0
File: tob.go Progetto: ikravets/ev
func (l *TobLogger) MessageArrived(idm *sim.SimMessage) {
	l.consumeOps = idm.BookUpdates()
	if idm.BookSides() == 2 {
		// XXX why do we need this?
		l.bid.Check, l.ask.Check = true, true
	} else {
		l.bid.Check, l.ask.Check = false, false
	}
	l.curOps = 0
	l.hasOldTob = false
}
Esempio n. 2
0
File: efh.go Progetto: ikravets/ev
func (l *EfhLogger) MessageArrived(idm *sim.SimMessage) {
	l.stream.MessageArrived(idm)
	l.tobLogger.MessageArrived(idm)
	if oid, price, size, err := idm.TradeInfo(); err == nil {
		l.genUpdateTrades(oid, price, size)
		return
	}
	switch m := l.stream.getExchangeMessage().(type) {
	case *nasdaq.IttoMessageOptionDirectory:
		l.genUpdateDefinitionsNom(m)
	case *bats.PitchMessageSymbolMapping:
		l.genUpdateDefinitionsBats(m)
	case *miax.TomMessageSeriesUpdate:
		l.genUpdateDefinitionsMiax(m)
	}
}