Required valid request body for F&O search to filter by Strike(from value, to value) Maturity(fro...

Options

...m date,to date)

{
"SearchRequest": {
"FileCodes": null,
"CurrencyCodes": null,
"ExchangeCodes": null,
"StrikePrice": {
"@odata.type": "#ThomsonReuters.Dss.Api.Search.NumericRangeComparison",
"From":2000,
"To": 2200
},
"ExpirationDate": {
"@odata.type": "#ThomsonReuters.Dss.Api.Search.DateValueComparison",
"ComparisonOperator": "GreaterThanEquals",
"Value": "2019-12-31"
},
"IdentifierType": "Ric",
"Identifier": "SPX*",
"PreferredIdentifierType": "Ric",
"UnderlyingRic": ".SPX"
}
}

Best Answer

  • Hi @jay416505,

    Below is the sample of specifying range of expiration date.

    {
    "SearchRequest": {
    "FileCodes": null,
    "CurrencyCodes": null,
    "ExchangeCodes": null,
    "StrikePrice": {
    "@odata.type": "#ThomsonReuters.Dss.Api.Search.NumericRangeComparison",
    "From":2000,
    "To": 2200
    },
    "ExpirationDate": {
            "@odata.type": "#ThomsonReuters.Dss.Api.Search.DateRangeComparison",
            "From": "2019-12-31T00:00:00.000Z",
            "To": "2020-02-21T00:00:00.000Z"
        },
    "IdentifierType": "Ric",
    "Identifier": "SPX*",
    "PreferredIdentifierType": "Ric",
    "UnderlyingRic": ".SPX"
    }
    }

    You can also use the REST API Reference Tree to help you create sample of request body. In the document, you configure the required parameters and then click "JSON Model" to generate JSON request body.

    image

Answers