Exemplo n.º 1
0
Arquivo: tob.go Projeto: 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
}
Exemplo n.º 2
0
Arquivo: efh.go Projeto: 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)
	}
}