Message: TimeBarRequest

File: WebAPI/historical_2.proto

Description

Historical data request for time bars with optional subscription.

Prerequisites: client must have permission to specified bar data.

Note: In the case of subscription, updates are sent when a bar opens, closes or when it is corrected. Corrected bars are sent even if they are outside of the requested time bounds. Range can be expanded with another request if needed.

If specified contract is a synthetic strategy, the request provides Spread Bars. This request is not supported for aggregation strategies.

Limits:

1.  The number of simultaneous historical requests in processing is 10 by default (including all types of historical requests).

2.  The number of simultaneous historical requests with a subscription for updates is 50 by default (including all types of historical requests).

Responses: TimeBarReport.

Used in

ClientMsg

Fields

request_id

Type: uint32

Description: Request or subscription ID.

time_bar_parameters

Type: TimeBarParameters

Description: Parameters of a request, ignored for a REQUEST_TYPE_DROP operation.

request_type

Type: uint32

Description: Note: REQUEST_TYPE_GET operation is processed by default.

Source: TimeBarRequest.RequestType.

Enum RequestType

Description: Type of a bar request.

Values

      REQUEST_TYPE_GET = 1

     Request bars without subscription.

      REQUEST_TYPE_SUBSCRIBE = 2

     Request bars with subscription for updates.

     Note: To_utc_time parameter must not be specified to subscribe. Subscription requests for deleted instruments (ContractMetadata.deleted=True) are rejected.

      REQUEST_TYPE_DROP = 3

     Drop request before server completes it and/or unsubscribe if already subscribed for updates.