class O2GSession

Parents
System.IDisposable

Brief

A session object. This object should be disposed after disconnecting.

Details

A session is an object which can be connected to the trade server. Only one connection can be established from one session object, but multiple connections can be created at the same time.

Use the O2GTransport.createSession method to get a session instance.

The type defined in the fxcore2.dll assembly. The namespace is fxcore2.

Public Methods

Dispose

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Important: always call this function after disconnecting of the session object.

getLoginRules

Gets the rules used for the currently established session.

getPriceUpdateMode

Gets the current price update mode.

getReportURL

Gets the URL for receiving the combo account statement report.

getRequestFactory

Gets an instance of the request factory.

getResponseReaderFactory

Gets an instance of the response reader factory.

getServerTime

Gets the current server time.

getSessionStatus

Gets the current session status.

getTableManager

Gets an instance of the table manager.

getTableManagerByAccount

Gets an instance of the table manager for specific account.

getTimeConverter

Gets an instance of the date/time converter.

getTradingSessionDescriptors

Returns the list of trading station descriptors.

login

Starts the connection with the specified trade server.

logout

Starts to close the existing connection with the trade server.

sendRequest

Sends a request to the trade server.

setPriceUpdateMode

Sets the price update mode.

setTradingSession

Sets the trading session if a trading session is requested.

subscribeResponse

Subscribes a session response listener.

subscribeSessionStatus

Subscribes a session status listener.

unsubscribeResponse

Unsubscribes a response listener.

unsubscribeSessionStatus

Unsubscribes a session status listener.

useTableManager

Defines usage of the table manager.

Events

LoginFailed

This event occurs when the login procedure is failed.

RequestCompleted

This event occurs when a request is completed.

RequestFailed

This event occurs when a request is failed.

SessionStatusChanged

This event occurs when the session status is changed.

TableManagerStatusChanged

This event occurs when a table manager status (tables readiness) changes.

TablesUpdates

This event occurs when a table update appears.

back