IBarSubscriptionApiSubscribe Method

GF API Documentation
Subscribes to Bars. This could be a one-time request or a continuous feed, depending on Duration.

Namespace:  GF.Api.Subscriptions.Bars
Assembly:  GF.Api (in GF.Api.dll) Version: dd7171be68430789135ec75c4e9f4bbfeca31201
Syntax

IBarSubscription Subscribe(
	ContractID contractID,
	Duration duration,
	BarDescription description
)

Parameters

contractID
Type: GF.Api.ContractsContractID
duration
Type: GF.Api.SubscriptionsDuration
See Duration
description
Type: GF.Api.Subscriptions.BarsBarDescription
See Description

Return Value

Type: IBarSubscription
An object representing the subscription. Call Unsubscribe to stop the data feed.
Exceptions

ExceptionCondition
GFExceptionThrows on invalid subscription parameters
See Also

Reference