📜 ⬆️ ⬇️

How to organize the transfer of financial data on the American stock exchange Nasdaq: ITCH and OUCH protocols



In our blog, we have already talked about the financial information transfer protocols used on world exchanges . These were protocols such as FIX and FAST , which are widely used by stock markets around the world, as well as the proprietary protocols Plaza II and ASTS Bridge , which were created by specialists from the Russian stock exchanges RTS and MICEX, which later merged into the Moscow Exchange.

Today we will continue the cycle of materials and talk about the proprietary protocols of the Nasdaq ITCH and OUCH exchange.
')

Introduction: Two Sides of a Transaction


When making each transaction on the exchange during electronic trading, the process always involves two types of data - incoming and outgoing. Each has its own protocols for transmitting information. Today we will talk about the two most popular of them, which are used, for example, on the Nasdaq - these are protocols and ITCH and OUCH.

The ITCH protocol is a data transfer protocol through which information related to an order sent to the exchange, as well as service messages, is transmitted. With this protocol, you can only exchange information, and not to make trades.

ITCH was created in the late 90s of the last century - at that time it was one of the most advanced financial data transfer protocols. Since then, he has established himself as a standard in the financial industry.

In turn, the OUCH protocol allows traders on the Nasdaq to conduct operations on the market — with its help, it is possible to place, execute or cancel trading orders. Since its inception, the protocol has been refined several times and has become a truly powerful tool.

OUCH was created in 1997 so that traders can quickly integrate their trading software with Nasdaq and trade at high speeds. For the sake of the increase, some flexibility of the protocol had to be sacrificed.

How does ouch work


The OUCH protocol transmits messages of a specific length between the trader and the exchange, in addition, there is the possibility of re-sending data in case of software or hardware failure. In this case, messages from customers are processed by the exchange engine in the sequence in which they were received - the priority in time of receipt is strictly observed.

OUCH messages do not have a delivery guarantee - this is precisely why the re-sending functionality was introduced; however, to obtain such a guarantee, you can use lower-level protocols like SoupBinTCP and UFO. There are several types of data transmitted using a protocol for which digital or alphanumeric representations are used.

To create a trade order, use the Enter Order Message message - each order must have a token that is unique for each day. Below is an example of the message format - in this case for entering a trade order:

Enter Order Message
NameOffsetLenValueNotes
Type of0one"O"Message Type Identifier Enter Order Message
Order tokenone14TokenAny information can act as a token, but every day for each OUCH account it must be unique.
Buy / sell indicator15oneCharacters“B” - an order to buy
“S” - an order to sell
“T” is a short sale, the client confirms the possibility of borrowing shares for their sale and subsequent repurchase within three business days
Number of sharessixteenfourIntegerThe total number of shares to be sold or bought must be greater than 1 and less than 1,000,000
Stock20eightCharactersFinancial instrument ticker
Price28fourIntegerThe price at which to conduct a transaction.
Lifetime32fourIntegerThe number of seconds that the order must "live" before automatic cancellation.
Trader ID36fourCharactersThe field must contain only capital letters. Trader ID under which account the order was sent. One logical OUCH account can be used to enter orders from multiple traders.
Display40oneCharactersThis field displays the order display settings (Attributalbe-Price to Display, Anonymous-Price to Comply, etc.)
Capacity41oneCharactersThere are 4 possible field values:
“A” = agency
“P” = principal
“R” = riskless
“O” = other
The possibility of transferring the application between the markets Nasdaq (intermarket sweep eligibility)42oneCharacters“Y” - yes
“N” - no
Minimal amount43fourIntegerMinimum acceptable number of shares to buy or sell
Type of cross application47oneCharactersDescribes the types of cross-applications (Opening cross, Closing cross, Supplemental Order, etc.)
Client type48oneCharactersAn optional field indicating that the order is intended for execution in the common market.

There are also messages for:


In addition, there are a number of system messages. Here are some of them:


On the Nasdaq, there are more flexible protocols, like FIX, but alternatives lose OUCH in performance and speed.

How ITCH works


In turn, ITCH displays quotes and order information for all price levels for all securities and financial instruments traded on the Nasdaq. In addition, ITCH messages contain data on which financial instruments will be traded on the current day, trading in which shares are suspended and other important proprietary information.

In addition to the transfer of dynamic information about the queue of requests and quotations, ITCH contains information on the opening and closing prices of the market, and even data on applications for participation in the IPO - for such orders, the message Net Order Imbalance Indicator is used.

Among the existing types of ITCH messages:


Below is an example of a message about the addition of new anonymous orders to the general queue of applications:



In addition, ITCH also transfers data about canceling, modifying, or replacing orders.

There is an ITCH implementation specifically for FPGA-based trading systems - this data stream is distributed from a dedicated Nasdaq data center in New Jersey. In this case, the requirements for client connections are 10 or 40 gigabits, otherwise the data feed is not provided.

As in the case of OUCH, Nasdaq offers alternatives to ITCH — for example, TotalView Aggregate, but other protocols do not allow such a wide range of data to be obtained.

Conclusion


ITCH and OUCH protocols were created for use in the Nasdaq-OMX markets, but even this exchange provides other options for connecting customers. For example, the implementation of FIX and FAST protocols is used to obtain market information (Market Data) and transfer trade data. At the same time, the ITCH and OUCH protocols are applied on other exchange platforms, for example, stock exchanges in Austria , Turkey and Switzerland .

In our next articles we will continue to talk about existing exchange technologies, in particular, we will discuss the protocol Simple Binary Encoding, which, to a certain extent, is the successor of the FIX case.

PS ITinvest allows its customers to organize a connection not only to Russian, but also to foreign exchange platforms (for example, CME Group).

Other materials about exchange technologies:

Source: https://habr.com/ru/post/278811/


All Articles