public method TradeDeskAut.GetPriceHistoryUTC, GetPriceHistoryUTCAsync

Brief

Gets the historical prices (UTC).

NOTE: Use TimeZoneCoverterAut to convert UTC dates to format you want it in.
Example can found in method TimeZoneConverterAut.Convert

Declaration
Visual Basic
Function GetPriceHistoryUTC (sInstrument as String, sPeriod as String, dtStart as DateTime, dtEnd as DateTime, iMaxNumber as Integer, bBid as Boolean, bAsk as Boolean) As Object
IDL
[id(330)] HRESULT GetPriceHistoryUTC( [in]BSTR sInstrument, [in]BSTR sPeriod, [in]DATE dtStart, [in]DATE dtEnd, [in]int iMaxNumber, [in]VARIANT_BOOL bBid, [in]VARIANT_BOOL bAsk, [out, retval] IDispatch* retVal)
Visual Basic
Function GetPriceHistoryUTCAsync (sInstrument as String, sPeriod as String, dtStart as DateTime, dtEnd as DateTime, iMaxNumber as Integer, bBid as Boolean, bAsk as Boolean) As String
IDL
[id(426)] HRESULT GetPriceHistoryUTCAsync( [in]BSTR sInstrument, [in]BSTR sPeriod, [in]DATE dtStart, [in]DATE dtEnd, [in]int iMaxNumber, [in]VARIANT_BOOL bBid, [in]VARIANT_BOOL bAsk, [out, retval] BSTR* retVal)

Parameters
sInstrument

The name of the instrument. The value can be obtained in the Instrument column of the Offers table.

sPeriod

The identifier of the period.

Specify any period supported by the server. To get a list of available periods, use the PriceHistoryHelperAut.GetPeriods method.

dtStart

The start data of the period. Please, note that periods except ticks always start from the good round data/time. Therefore the periods of prices can start from the date after the date specified.

See MarketRateAut.StartDate for explanation.

The date and time are recognized as UTC date/time.

dtEnd

The end data of the period.

You can specify the date which corresponds to the zero ole date in order to get the history "up to now". Use 0 in C++, DateTime.FromOADate(0) in .NET and CDate(0) in the VB/VBScript.

The date and time are recognized as UTC date/time.

iMaxNumber

The maximum number of periods to receive. In case the number is less than zero the default maximum number of periods on the server is used. If the specified value exceeds the the default maximum number of periods on the server, the server value is used.

NOTE: If the requested history exceeds the maximum number of periods, then the latest data, the data nearest the dtEnd date for the maximum number of periods will be returned. To retrieve the entire desired history, you will need to request the each successive set of periods adjusting the dtEnd toward the dtStart until having requested all the sets of periods contained in the desired history range.

bBid

The flag indicating whether the bid prices must be returned.

bAsk

The flag indicating whether the ask prices must be returned.

Returns

The GetPriceHistoryUTC method returns an instance of the MarketRateEnumAut class.

The GetPriceHistoryUTCAsync method is implemented for asynchronous execution. The method returns RequestID. To get a result of method execution, use the events of TradeDeskEventsSink.OnPriceHistoryCompleted or pending events of the kind KIND_PRICEHISTORYCOMPLETED.

Details

Date and time in the result market rates will be also in the UTC time zone. In order to get date and time in EST time zone use GetPriceHistory

The GetPriceHistoryUTC and GetPriceHistoryUTCAsync methods are defined in the TradeDeskAut class.

back