question

Upvotes
Accepted
23 1 0 3

Invalid name of display parameter

I'm using the COM API to get market cap for a stock. I want weekly data rather than daily data.

When I make the following call, I can get all of the daily data.

Step3_CreateRData("MSFT.O", "TR.CompanyMarketCap(Scale=6)", "SDate=0 EDate=-100", "RH:Date CH:Fd");

Step4_RequestDex2Data();

But, if I change it to the following in order to get a weekly data series. I get the error "Invalid name of display parameter"

Step3_CreateRData("MSFT.O", "TR.CompanyMarketCap(Scale=6)", "SDate=0 EDate=-100", "FRQ:W RH:Date CH:Fd");

Step4_RequestDex2Data();

Also note that the following works in Excel just fine

=@TR("MSFT.O","TR.CompanyMarketCap","SDate=0 EDate=-100 Frq=W CH=Fd RH=Date",L22)


How do I get weekly market cap data instead of daily?

Many thanks in advance!

Robby


Here is the code for my two methods. It fails on the call to Step4_RequestDex2Data()

public void Step4_RequestDex2Data()

{

//Send the RData request to Dex2

if (MyRData != null)

MyRData.Subscribe(); // FAILS HERE

}

public void Step3_CreateRData(String instrumentsList, String fieldsList, String requestParametersList, String displayParametersList)

{

returnedText = "";

CreateRData(instrumentsList, fieldsList, requestParametersList, displayParametersList);

}


private void CreateRData(string InstrumentIDList,

string FieldList,

string RequestParam,

string DisplayParam)

{

// Create a RData

MyRData = MyDex2Mgr.CreateRData(MyDex2Cookie);

MyRData.OnUpdate += OnUpdate;

// Initialize the RData to request

if (MyRData != null)

{

MyRData.InstrumentIDList = InstrumentIDList;

MyRData.FieldList = FieldList;

MyRData.RequestParam = RequestParam;

MyRData.DisplayParam = DisplayParam;

}

}




eikoneikon-com-apiapi
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.

Upvotes
Accepted
39.2k 75 11 27

FRQ is a request parameter, not a display parameter. You can use

Step3_CreateRData("MSFT.O", "TR.CompanyMarketCap(Scale=6)", "SDate=0 EDate=-100 FRQ:W", "RH:Date CH:Fd");
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.

Upvotes
23 1 0 3

That just makes way too much sense... Clearly a user error! :) Thank you very much!

Robby

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