class O2GRequest

Brief

A request to the server.

Details

Requests are sent to the server to perform operations, for example, create an order, get historic prices, or get the latest snapshot of the table.
An appropriate response will be sent back for each request. Request and response can be associated by request id.

To create a request, use the one of the methods of O2GRequestFactory.

To create an order use O2GRequestFactory.createValueMap and fill the result O2GValueMap with order parameters.
Then use O2GRequestFactory.createOrderRequest.

To get historic prices a helper function O2GRequestFactory.getTimeFrameCollection can be used to get supported timeframes.
Then use O2GRequestFactory.createMarketDataSnapshotRequestInstrument to create market data snapshot request.
Finally fill the date range with O2GRequestFactory.fillMarketDataSnapshotRequestTime.

To send a request, use the O2GSession.sendRequest method.

To get a request execution result, please implement the IO2GResponseListener and subscribe an object of implemented class to session's response.

The namespace is com.fxcore2.

Public Methods

getChildrenCount

Gets the number of child requests.

getChildRequest

Gets one child request.

getRequestId

Gets the unique request identifier.

back