question

Upvotes
Accepted
1 0 0 3

Cannot load rates with AdxRtHistory

Hello,

I have the bellow code but it does not work.

Do you have any idea why ?

If oRtHist Is Nothing Then Set oRtHist = CreateReutersObject("AdfinXRtLib.AdxRtHistory")
    
     With oRtHist
        .FlushData
        .ErrorMode = EXCEPTION
        .Source = "IDN"
        .itemName = "USONFFE0D=RR"
        .Mode = "START:" & Format(sttDt, "ddmmmyy") & _
            " END:" & Format(endDt, "ddmmmyy") & _
            " SORT:DES" & _
            " ZERO:SKIP" & _
            " NULL:SKIP" & _
            " FRQ:D"
        .RequestHistory "NDA_RAW.Nda_date;NDA_RAW.Nda_latest_trade_yield"
    End With

The formula in Excel is the following:

=RHistory("USONFFE0D=RR","NDA_RAW.Nda_date;NDA_RAW.Nda_latest_trade_yield","INTERVAL:1D",,"CH:IN;Fd",M19)

Thanks a lot,

Hamza

eikoneikon-com-api
icon clock
10 |1500

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

1 Answer

Upvotes
Accepted
966 11 19 26

AdFinXRtLib is an API that has real-time data and some end of day historical data. Intra-day historical data is available in Eikon via RHistory. These are two different APIs though so you will not be able to use the arguments from RHistory Excel function to populate the arguments of AdxRtHistory VBA API.

You will find an RHistory API tutorial here. Plug the function arguments into that API and it should work.

icon clock
10 |1500

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

Click below to post an Idea Post Idea