// CollateralReport message handler private void OnCollateralReport(CollateralReport collateralReport) { Console.WriteLine("OnCollateralReport()"); Console.WriteLine("\tRequestId = {0}", collateralReport.getRequestID()); Console.WriteLine("\tgetAccount() = " + collateralReport.getAccount()); Console.WriteLine("\tgetCashOutstanding() = " + collateralReport.getCashOutstanding()); Console.WriteLine("\tgetStartCash() = " + collateralReport.getStartCash()); Console.WriteLine("\tgetEndCash() = " + collateralReport.getEndCash()); Console.WriteLine("\tgetFXCMMarginCall() = " + collateralReport.getFXCMMarginCall()); Console.WriteLine("\tgetFXCMUsedMargin() = " + collateralReport.getFXCMUsedMargin()); Console.WriteLine("\tgetFXCMUsedMargin3() = " + collateralReport.getFXCMUsedMargin3()); Console.WriteLine("\tgetQuantity() = " + collateralReport.getQuantity()); Console.WriteLine("\tgetParties() = " + collateralReport.getParties()); Console.WriteLine(); // add the trading account to the account list _accounts[collateralReport.getAccount()] = collateralReport; if (collateralReport.getRequestID() == _currentRequest) { // set the state of the request to be completed only if this is the last collateral report requested if (collateralReport.isLastRptRequested()) { _requestAccountListEvent.Set(); } } }
/// <summary> /// CollateralReport message handler /// </summary> private void OnCollateralReport(CollateralReport message) { // add the trading account to the account list _accounts[message.getAccount()] = message; if (message.getRequestID() == _currentRequest) { // set the state of the request to be completed only if this is the last collateral report requested if (message.isLastRptRequested()) { _mapRequestsToAutoResetEvents[_currentRequest].Set(); _mapRequestsToAutoResetEvents.Remove(_currentRequest); } } }
// CollateralReport message handler private void OnCollateralReport(CollateralReport collateralReport) { Console.WriteLine("OnCollateralReport()"); Console.WriteLine("\tRequestId = {0}", collateralReport.getRequestID()); Console.WriteLine("\tgetAccount() = " + collateralReport.getAccount()); Console.WriteLine("\tgetCashOutstanding() = " + collateralReport.getCashOutstanding()); Console.WriteLine("\tgetStartCash() = " + collateralReport.getStartCash()); Console.WriteLine("\tgetEndCash() = " + collateralReport.getEndCash()); Console.WriteLine("\tgetFXCMMarginCall() = " + collateralReport.getFXCMMarginCall()); Console.WriteLine("\tgetFXCMUsedMargin() = " + collateralReport.getFXCMUsedMargin()); Console.WriteLine("\tgetFXCMUsedMargin3() = " + collateralReport.getFXCMUsedMargin3()); Console.WriteLine("\tgetQuantity() = " + collateralReport.getQuantity()); Console.WriteLine("\tgetParties() = " + collateralReport.getParties()); Console.WriteLine(); // add the trading account to the account list _accounts[collateralReport.getAccount()] = collateralReport; if (collateralReport.getRequestID() == _currentRequest) { // set the state of the request to be completed only if this is the last collateral report requested if (collateralReport.isLastRptRequested()) _requestAccountListEvent.Set(); } }