We want to download MBO/MM data for given column names only. Please help.
query:
curl -vk -X POST -H "Content-Type: application/json" -H "Prefer: respond-async" -H "Authorization: Token xxxx" 'https://10.192.6.221/RestApi/v1/Extractions/ExtractRaw' -d @AllRICSFile.txt
content of AllRICSFile.txt:
@{ "ExtractionRequest": {"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryMarketDepthExtractionRequest","ContentFieldNames": ["TRD_STATUS","BOOK_STATE","CURRENCY","DSPLY_NAME","MNEMONIC","ACTIV_DATE","TIMACT_MS","ORDER_SIZE","ORDER_PRC","ORDER_SIDE","OR_UDT_RSN","ORDER_TONE","PR_TIM_MS","PR_DATE","PR_TIM_MSP","OR_TIM_MS","OR_TIM_MSP","OR_DATE","QUOTIM_MS","ORDER_ID" ], "IdentifierList": {"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList","InstrumentIdentifiers": [ {"@odata.type": "#ThomsonReuters.Dss.Api.Search.HistoricalSearchResult","Identifier": "0001100000C8.HK","IdentifierType": "Ric"}, {"@odata.type": "#ThomsonReuters.Dss.Api.Search.HistoricalSearchResult","Identifier": "0001100000F8.HK","IdentifierType": "Ric"}, {"@odata.type": "#ThomsonReuters.Dss.Api.Search.HistoricalSearchResult","Identifier": "0001100000H7.HK","IdentifierType": "Ric"}, {"@odata.type": "#ThomsonReuters.Dss.Api.Search.HistoricalSearchResult","Identifier": "0001100000I7.HK","IdentifierType": "Ric"}, {"@odata.type": "#ThomsonReuters.Dss.Api.Search.HistoricalSearchResult","Identifier": "0001100000J7.HK","IdentifierType": "Ric"} ],"ValidationOptions":{"AllowHistoricalInstruments":true}},"Condition":{"View": "RawMarketByOrder","MessageTimeStampIn": "GmtUtc","ReportDateRangeType": "Range","QueryStartDate": "2017-08-18T00:00:00.000Z","QueryEndDate": "2017-08-18T23:59:59.000Z","DisplaySourceRIC": true}}}
Response:
HTTP/1.1 400 Bad Request
@Ayan, I am guessing you are making an On Demand extraction for a TickHistoryMarketDepthExtractionRequest, like what was discussed in this query, and would like to limit the output to a limited number of fields. If this assumption is wrong, then please correct me and give more details on what you are trying to achieve.
If you select in the condition section a view that is either "RawMarketByOrder" or "RawMarketMaker", then you cannot select the fields (because these are raw views).
If you select a view like NormalizedLL2 then you can select fields using the "ContentFieldNames" section. The chosen fields will be delivered for the number of levels you specify. These are the available fields: "Ask Price", "Ask Size", "Bid Price", "Bid Size", "Domain", "History End", "History Start", "Instrument ID", "Instrument ID Type", "Number of Buyers", "Number of Sellers", "Sample Data".
@Ayan, post your query inside Postman to see the error message, it clearly says all content field names are invalid:
{ "error": { "message": "Validation Error:\r\n\r\nInvalid content FieldName \"TRD_STATUS\"\r\nInvalid content FieldName \"BOOK_STATE\"\r\nInvalid content FieldName \"CURRENCY\"\r\nInvalid content FieldName ...
etc...
You cannot use FID names. You can retrieve the list of possible field names using a GET to endpoint:
Extractions/GetValidContentFieldTypes(ReportTemplateType=ThomsonReuters.Dss.Api.Extractions.ReportTemplates.ReportTemplateTypes'TickHistoryMarketDepth')
I found the below query in TRH website to get all valid column names.
https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/GetValidContentFieldTypes(ReportTemplateType=ThomsonReuters.Dss.Api.Extractions.ReportTemplates.ReportTemplateTypes'TickHistoryMarketDepth')
Can you please help me with the replacement of TickHistoryMarketDepth for MBO/MM and Raw files( such as RAWTAS,RAWMD etc)?
@Ayan,
Also, I would like to point out that you cannot choose the fields when you select "RawMarketByOrder" or "RawMarketMaker" view.
Hi @Ayan
As @Christiaan Meihsl already pointed out, you cannot choose fields of Raw files.