Skip to Content
Learn Algorithmic Trading
book

Learn Algorithmic Trading

by Sebastien Donadio, Sourav Ghosh
November 2019
Beginner content levelBeginner
394 pages
10h 31m
English
Packt Publishing
Content preview from Learn Algorithmic Trading

Market Data request handling

Market Data request handling allows the acceptor (the exchange) to register the request from an initiator who's willing to trade a given symbol. Once this request is received, the acceptor starts streaming the price updates to the initiator. Let's have a look at the following code:

def onMarketDataRequest(self, message, sessionID): requestID = quickfix.MDReqID() try: message.getField(requestID) except Exception as e: raise quickfix.IncorrectTagValue(requestID) try: relatedSym = self.fixVersion.MarketDataRequest.NoRelatedSym() symbolFix = quickfix.Symbol() product = quickfix.Product() message.getGroup(1, relatedSym) relatedSym.getField(symbolFix) relatedSym.getField(product) if product.getValue() != quickfix.Product_CURRENCY: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

High-Frequency Trading: A Practical Guide to Algorithmic Strategies and Trading Systems

High-Frequency Trading: A Practical Guide to Algorithmic Strategies and Trading Systems

Irene Aldridge
Developing High-Frequency Trading Systems

Developing High-Frequency Trading Systems

Sebastien Donadio, Sourav Ghosh, Romain Rossier

Publisher Resources

ISBN: 9781789348347Supplemental Content