For a deeper look into our DataScope Select REST API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
1 0 2 3

Required valid request body for F&O search to filter by Strike(from value, to value) Maturity(from 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"
}
}

dss-rest-apidatascope-selectdss
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.

@jay416505

Hi,

Thank you for your participation in the forum.

Is the reply below satisfactory in answering your question?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
11.3k 25 9 14

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.


1582268861317.png (88.3 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.

In addition want filter by Put/Call and

AssetStatus=="Active"

How will request Body

The parameters are "AssetStatus" and "PutCall" accordingly.


Below is the sample.

{
"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",
"AssetStatus": "Active",
"PutCall": "Call"
}
}
1582275541749.png (70.6 KiB)

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.