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

  • @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

  • @joneliu

    Thank you for reaching out to us.

    If I remove the ContractMonthYear property from the filter string, I can get results.

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

    1702883074198.png

    You need to contact the helpdesk team via MyRefinitiv to verify the content.

  • 1702951797419.png

    we want to get this commodities info by IF2403

    we try using your code to get info,but return new york exchange info,we want china financial futures exchange info

    1702951910342.png