escape character in rdp.search

I am trying to look for some data on the option chain root 0#WM*.U.

I used both the query "0#WM*.U" as well as the filter "RIC eq 0#WM*.U". However this * is taken as an arbitrary character in stead of only returning "0#WM*.U" . Is there a way to only return "0#WM*.U" with * taking only the value * ?

1642153121519.png



Best Answer

  • raksina.samasiri
    Answer ✓

    hi @laurens

    Please use 'xeq' instead of 'eq' for the exact attribute as 'xeq' cannot be used with wild cards and is case-sensitive.

    for example

    rdp.search(
    view = rdp.SearchViews.EquityQuotes,
    filter = "RIC xeq '0#WM*.U'",
    select = 'DTSubjectName, ExchangeName, RIC, RCSAssetCategoryLeaf, Currency, AssetState, UnderlyingQuoteRIC',
    top = 1000
    )

    1642154349281.png

    For more detail about RDP search, you may check this article