Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • DSS /
avatar image
Question by lei.cheng · May 07, 2018 at 11:49 PM · dss rest api

how to use the FuturesAndOptionsSearchRequest in the python

now, the http code is 405. can u provide an example in the python

requestUrl='https://hosted.datascopeapi.reuters.com/RestApi/v1/Search'

requestHeaders={
                
"Prefer":"respond-async",
"Content-Type":"application/json",
"Authorization": "token " + token
}
requestBody={
"SearchRequest": {
"@odata.type": "#ThomsonReuters.Dss.Api.Search.FuturesAndOptionsSearchRequest",
"FuturesAndOptionsType": "Options",
"PutCall": "Call",
"FileCodes": [
"7130"],
"ExpirationDate": {
"@odata.type": "#ThomsonReuters.Dss.Api.Search.DateRangeComparison",
"From": "2018-05-08T00:00:00.000Z",
"To": "2018-08-08T00:00:00.000Z"},
"IdentifierType": "Ric",
"AssetStatus": "Active",
"UnderlyingRic": ".KS200"}
}
r2 = requests.post(requestUrl, json=requestBody,headers=requestHeaders,verify=False)
print (r2.status_code)

People who like this

0 Show 1
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
wasin.waeosri ♦♦ · May 16, 2018 at 05:22 AM 0
Share

Hello @lei.cheng

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query? If so please can you click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question.

Thanks,

AHS

1 Reply

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by jirapongse.phuriphanvichai · May 08, 2018 at 12:12 AM

The URL for FuturesAndOptionsSearchRequest is:

Therefore, the code must be:

requestUrl='https://hosted.datascopeapi.reuters.com/RestApi/v1/Search/FuturesAndOptionsSearch'

Please refer to the API Reference Tree for the URLs of other requests.


search.png (9.0 KiB)
Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
lei.cheng · May 08, 2018 at 03:16 AM 0
Share

that's ok, and thank u very much

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
12 People are following this question.

Related Questions

DSS REST API python sample of user preferences change

Requesting entity details for TR OrgIDs does not return data for some OrgIDs

TickHistoryTimeAndSalesExtractionRequest - Getting last price nearest to a date

Get content for a specific date (or date range)

Could you please let me know, Will API return only positive rate values or negative rate values also ?

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges