|
using System;
namespace SparkAPI.Data
{
/// <summary>
/// Event arguments supplied when an event feed provides a Spark event update
/// </summary>
internal class EventFeedArgs : EventArgs
{
/// <summary>Security symbol</summary>
internal string Symbol { get; private set; }
/// <summary>Security exchange</summary>
internal string Exchange { get; private set; }
/// <summary>Spark event</summary>
internal Spark.Event Event { get; private set; }
/// <summary>Observation time</summary>
internal DateTime TimeStamp { get; private set; }
/// <summary>
/// EventFeedArgs constructor
/// </summary>
/// <param name="eventItem">Spark event</param>
/// <param name="timestamp">Observation timestamp</param>
internal EventFeedArgs(Spark.Event eventItem, DateTime timestamp)
{
Event = eventItem;
TimeStamp = timestamp;
var adjustedValues = ApiFunctions.GetSymbolExchange(eventItem.Code, eventItem.Exchange);
Symbol = adjustedValues.Item1;
Exchange = adjustedValues.Item2;
}
}
}
|
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.
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.