question

Upvotes
119 6 8 19

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


search
1729853304843.png (23.9 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
19.1k 86 39 63

Hi @anass.yazane.1

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


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

1729868548210.png (24.0 KiB)
1729868584131.png (20.9 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
119 6 8 19

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

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.