onMarketDepthUpdate()

ICE Data Services -

onMarketDepthUpdate() Depth Functions

Call back function. Executes when the depth has changed.

 

Syntax

onMarketDepthUpdate(  DepthId )

 

Parameters

Parameter: Description: Default:
DepthId Required.  The depth ID that updated from the EFS engine. n/a

 

Notes

Only available in versions 11.7 or later.

 

Code Examples

var depthID = null;

function main(){
	var SourceList = MarketDepth.getSources();
	if (SourceList != null)	{
		depthID = MarketDepth.subscribe(SourceList[0]);
	}
}

function onMarketDepthUpdate(depthID){
	debugPrintln("DepthBid: " + MarketDepth.bid(depthID, 0));
	debugPrintln("DepthAsk: " + MarketDepth.ask(depthID, 0));
	debugPrintln("DepthBidCount: " + MarketDepth.bidCount(depthID));
	debugPrintln("DepthAskCount: " + MarketDepth.askCount(depthID));
	debugPrintln("DepthBidTime: " + MarketDepth.bidTime(depthID, 0));
	debugPrintln("DepthAskTime: " + MarketDepth.askTime(depthID, 0));
}
 

See Also