Click here to Skip to main content
15,886,639 members
Articles / Programming Languages / C# 4.0

An Introduction to Real-Time Stock Market Data Processing

Rate me:
Please Sign up or sign in to vote.
4.96/5 (64 votes)
20 May 2013CPOL24 min read 332.6K   57.7K   202  
Discusses how stock market trading works, the different types of market data available, and provides a code example with sample data that processes a market data feed
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SparkAPI.Market
{

    /// <summary>
    /// Market order side enumeration
    /// </summary>
    public enum MarketSide
    {
        Bid = 0,
        Ask = 1
    }

    /// <summary>
    /// Security market state type
    /// </summary>
    public enum MarketState
    {
        Unknown = -1,
        None = 0,
        PreOpen = 1,
        OpenAuction = 2,        //Assigned when market state switches to Open but limit order book is still crossed
        Open = 3,
        PreCSPA = 4,
        CSPA = 5,
        Adjust = 6,
        AdjustOn = 7,
        Enquire = 8,
        PurgeOrders = 9,
        SystemMaintenance = 10,
        LateTrading = 11,
        PreNightTrading = 12,
        OpenNightTrading = 13,
        Close = 14,
        Suspend = 15,
        WaitVMB = 16,
        ABBAuction = 17,
        TradingHalt = 18,
        OpenVMB = 19
    }

}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Australia Australia
Paul Francis currently works as a senior engineer at The Trade Desk.

He holds an undergraduate Honours degree in Finance, and is near completion of a Ph.D. in Market Microstructure, specialising in order flow modelling, and market data processing, reconstruction and analytics.

He is also the creator of Sharp Spark (Spark API SDK), an open source component designed to facilitate the processing of real-time market data from the Spark API: http://sourceforge.net/projects/sparkapi

Paul lives in Sydney, Australia.

Comments and Discussions