Search API not case sensitive

Dear Developer Community

i'm sharing with you an issue facing with Search API.

Indeed, using Sraech API, i want to find Options matching criteria below (given for example purpose):

- ExpiryDate:15/11/2024

- StrikePrice: 5200

- Ric starts with SPXw


the issue is that the Search Module (and also Search API) is not case sensitive and give me 2 options :

1- 1st one starts with SPXw

2- 2nd Option Starts with SPXWw

to resolve this, i'm wondering if is it possible to force a case sensitive match using Rsearch API

or if it's possible to use regex (for instance define search criteria as SPXw[0-9] to be able toi exclude option starting with SPXWw.


many thanks for you help and suggestion.

1729853304843.png


Answers

  • Hi @anass.yazane.1

    According to the documentation, the search API is case sensitive:

    image
    For example:

    1729868584131.png

    response=search.Definition(
    view = search.Views.EQUITY_DERIVATIVE_QUOTES,
    filter = "ExpiryDateString xeq '15 Nov 2024' and startswith(RIC, 'SPXw') and StrikePrice eq 5200",
    select = "_, ExpiryDate, StrikePrice",
    top = 10000
    ).get_data()
    response.data.d
  • dear @nick.zincone

    tanhk u for your help, it's the solution i have found to deal with case sensitive issue. there was an issue with server i wasn't able to connect to LSEG devlopers to share the solution found

    such options are not shown in SRCH App, when i specify search criteria using start with filter, SRCH App define it as below (usint RIC eq 'SPXw*') that's is not case sensitive

    response = search.Definition(

    view = search.Views.EQUITY_QUOTES,

    top = 10,

    filter = "( SearchAllCategoryv2 eq 'Options' and RIC eq 'SPXw*' and ExpiryDate eq 2024-11-15 and StrikePrice eq 5200 and CallPutOption xeq 'Put')",

    select = "DTSubjectName,AssetState,BusinessEntity,PI,SearchAllCategoryv3,SearchAllCategoryv2,SearchAllCategory,ExchangeName,CallPutOption,StrikePrice,ExpiryDate,RIC,UnderlyingQuoteRIC,UnderlyingIssuerName,UnderlyingRCSAssetCategoryLeaf"

    ).get_data()

    response.data.df

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.