question

Upvotes
Accepted
22 3 3 2

Can we download un-adjusted stock price under DEX2 COM API

Hi team, using Excel VBA and DEX2 COM API, is it possible to download un-adjusted historical stock price?

I am trying "Adjusted:0" in either "Request Parameters" and "Display Parameters" and no luck. Any thoughts?

eikoneikon-com-apivba
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvotes
Accepted
39.4k 77 11 27

I suspect you're using TR.PriceClose field, which does not provide unadjusted price history. Use TR.CLOSEPRICE instead:

Public Sub GetUnadjustedPriceHistory()
    If oDEX2Mgr Is Nothing Then
        Set oDEX2Mgr = CreateReutersObject("Dex2.Dex2Mgr")
        Set oDEX2MgrADC = oDEX2Mgr
        lCookie = oDEX2MgrADC.Initialize(DE_MC_ADC_POWERLINK)
    End If
    
    Set oRData = oDEX2Mgr.CreateRData(lCookie)
    oRData.InstrumentIDList = "AAPL.O"
    oRData.FieldList = Array("TR.CLOSEPRICE(Adjusted=0)")
    oRData.RequestParam = "SDate=0 EDate=-1Y Frq=D"
    oRData.DisplayParam = "CH:Fd RH:Date"
    oRData.Subscribe False
End Sub
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Alex, thanks. That works!

Curious, what's the exact difference between TR.PriceClose and TR.ClosePrice, in the context of DEX2 COM API. Say I have a few dozen stock tickers and I am downloading their historical prices, which field is preferred? Many thanks.

See the explanation in the accepted answer on this thread.

Thank you. You answered all my questions. Appreciated.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.