Limit search results through API - DSS Rest API

limit-search-results.png
Hello Team,
Is there a way to limit results through API just like we can do in the GUI??
PFA screenshot -

Thank you,

Trisha Gehlot

Best Answer

  • Gurpreet
    Gurpreet admin
    Answer ✓

    Hello @trisha.gehlot,

    By default the DSS will limit the resultset. This is defined in the server driven paging mechanism. The user can change the number of results per page by passing in the appropriate header like this -

    POST https://selectapi.datascope.refinitiv.com/RestApi/v1/Search/FuturesAndOptionsSearch HTTP/1.1

    Authorization: Token <your_auth_token_goes_here>
    Prefer: odata.maxpagesize=10; respond-async
    Content-Type: application/json; odata=minimalmetadata
    {
    "SearchRequest": {
    "FileCodes": null,
    "CurrencyCodes": null,
    "ExchangeCodes": [
    "IMM"
    ],
    "StrikePrice": null,
    "ExpirationDate": null,
    "IdentifierType": "Ric",
    "Identifier": "ED*",
    "PreferredIdentifierType": "Ric"
    }
    }

Answers