This repository has been archived by the owner. It is now read-only.
Itch 4.1 Implementation in C#
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Itch 4.1 Implementation

This is a C# implementation of the Itch 4.1 protocol decribed here:

Please note that this is for educational purposes and probably isn't fast enough to be used in any type of a production environment. I've noticed that I'm able to publish about 3,000 messages/second and consume 1,200 messages per second, which is way too slow to actually use.

For test data, you can download data from past days of trading directly from Nasdaq at:

This project is setup as a publisher and a consumer.

How to Run

  1. Install RabbitMQ and make sure it's running.
  2. Check your app.config for publisher and make sure your DataFile setting is pointing to the datafile that you've downloaded from and that your server is pointed to RabbitMQ.
  3. Check your app.config for the consumer and ensure the server is pointed to RabbitMQ.
  4. Open the solution and set the consumer as your startup project, then hit F5.
  5. Once the consumer is up and running, go back to Visual Studio and right click on the Publisher project. Goto Debug, then Start New Instance.
  6. Let the publisher start up and watch the messages flow.


First and foremost, the code for reading the file was a direct port from the ITCH 4.1 implementation written in python by Ryan Day:

This console application reads through the data file defined in the app.config and publishes them to our message queue. It does this as fast as it can. The code can parse about 450k messages/second, however publishing them to the queue reduces the speed to about 3,000/second.


The consumer listens for messages from the queue and keeps track of how many of each type of messages have come in.

For every SecondMessage that we get, we clear out all the counts and print them out to the console. This SecondMessage is sent about every second and marks the number of seconds since midnight.


RabbitMQ is required to be setup. You can point your publisher/consumer to the proper server by editing the Server key in each of the app.config files. However, they are defaulted to localhost.