Instead of using the main OnMessage handler, you can also track changes in the position list by using an OnPositionChange handler. If defined, this is called by the framework for each change in a position:
Framework.OnPositionChange = function(position) {
// position is an FXB.Position update describing the change
};