public method O2GSession.setTradingSession

Brief

Sets the trading session if a trading session is requested.

Declaration
C#
void  setTradingSession (string sessionId, string pin)

Parameters
sessionId

The identifier of the trading session. Must be one of the values returned by O2GSessionDescriptor.Id property of one of the objects returned by getTradingSessionDescriptors method.

pin

The pin code. If no pin is required, specify an empty string ("").

Details

The method can be used only after the TradingSessionRequested session status is received. The subsession identifier must be one of the sub-session identifiers returned by the getTradingSessionDescriptors method.

The login process is suspended between receiving of the IO2GSessionStatusCode.TradingSessionRequested session status and calling of the setTradingSession method, so you can, for example, show the dialog to choose the trading session to the user.

When the trading session is specified using the setTradingSession method, the login process is resumed.

back