Giter Site home page Giter Site logo

itch's Introduction

Itch 4.1 Implementation

This is a C# implementation of the Itch 4.1 protocol decribed here: http://nasdaqtrader.com/content/technicalsupport/specifications/dataproducts/NQTV-ITCH-V4_1.pdf

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: ftp://emi.nasdaq.com/ITCH/

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 ftp://emi.nasdaq.com/ITCH/ 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.

Publisher

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: https://github.com/rday/ITCH41

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.

Consumer

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.

Requirements

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.

itch's People

Contributors

rexmorgan avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.