Is there a way we can know what type of ask and bid order is? Like is it market or limit order? Also can you explain what is the difference between last, ask and bid and volume we get with it.
I have this script i want to know can from this thing, i can filter out what type was of last order was it bid or was it ask?
if(marketDataUpdate.MarketDataType == MarketDataType.Last)
{
if(marketDataUpdate.Price >= marketDataUpdate.Ask)
{Print($"Last-ASK, {marketDataUpdate.Last}, Vol, {marketDataUpdate.Volume}, Time, {currentTime:hh:mm:ss.fff}");}
if(marketDataUpdate.Price <= marketDataUpdate.Bid)
{Print($"Last-BID, {marketDataUpdate.Last}, Vol, {marketDataUpdate.Volume}, Time, {currentTime:hh:mm:ss.fff}");}
}
if(marketDataUpdate.MarketDataType == MarketDataType.Ask)
{
Print($"ASK,{marketDataUpdate.Ask}, Vol,{marketDataUpdate.Volume}, Time, {currentTime:hh:mm:ss.fff}");
}
if(marketDataUpdate.MarketDataType == MarketDataType.Bid)
{
Print($"BID,{marketDataUpdate.Bid}, Vol, {marketDataUpdate.Volume}, Time, {currentTime:hh:mm:ss.fff}");
}

Comment