why don't get commodities ricCode by IF2403?

this is my code to get commodities ricCode

filter="TickerSymbol eq '" + code + "' and ContractMonthYear eq '" + date + "' and AssetStateName eq 'Active' and RCSAssetCategoryLeaf xeq 'Commodity Future' and ExpiryDateString ne null",

I use below param to get code , it will return error messges.

"code":"IF","date":"Mar 24"

but I use below params , it's right

"code":"TF","date":"Mar 24"

They are all commodities codes I found on the Internet, I can see price info in other web by IF2403,TF2403,

Why is using the first code problematic(IF2403)?

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @joneliu

    I found this RIC in the EQUITY_QUOTES view.

    The query looks like this:


    df = rd.discovery.search(
        view=rd.discovery.Views.EQUITY_QUOTES,
        filter="TickerSymbol eq 'IF' and ExpiryDateString eq 'Mar 2024' and DerivedCategory eq 'Future'",
        top=10,
        select="RIC,DocumentTitle,TickerSymbol,ExpiryDateString"
    )
    df

    To search for other items, you can use the SEARCH_ALL view.

Answers