hi @phani.alampalli ,
In the case of daily data in the date range, the endpoint and request below can be used (please replace the authorization token with your valid one) and the date range can be set under the "Condition" property
POST /RestApi/v1/Extractions/ExtractWithNotes HTTP/1.1Host: selectapi.datascope.refinitiv.comPrefer: respond-asyncContent-Type: application/jsonAuthorization: Token XXXXXXXXXContent-Length: 1045{ "ExtractionRequest": { "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.ElektronTimeseriesExtractionRequest", "ContentFieldNames": [ "Trade Date", "Currency Code", "Universal Bid Price", "Universal Ask Price", "Universal Close Price" ], "IdentifierList": { "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList", "InstrumentIdentifiers": [ { "Identifier": "JPYUSD=R", "IdentifierType": "Ric" } ], "ValidationOptions": null, "UseUserPreferencesForValidationOptions": false }, "Condition": { "ReportDateRangeType": "Range", "QueryStartDate": "2022-01-01T00:00:00.000+07:00", "QueryEndDate": "2022-01-31T00:00:00.000+07:00", "LastEntityOnly": false } }}
The output is below
"Contents": [ { "IdentifierType": "Ric", "Identifier": "JPYUSD=R", "Trade Date": "2022-01-03", "Currency Code": "USD", "Universal Bid Price": 0.867, "Universal Ask Price": 0.8672, "Universal Close Price": 0.867 }, { "IdentifierType": "Ric", "Identifier": "JPYUSD=R", "Trade Date": "2022-01-04", "Currency Code": "USD", "Universal Bid Price": 0.8608, "Universal Ask Price": 0.8611, "Universal Close Price": 0.8608 }, ........... ...... { "IdentifierType": "Ric", "Identifier": "JPYUSD=R", "Trade Date": "2022-01-31", "Currency Code": "USD", "Universal Bid Price": 0.8686, "Universal Ask Price": 0.8688, "Universal Close Price": 0.8686 } ],
please let me know in case you have any further questions
hi @phani.alampalli
According to an answer in this question, my colleague mentioned the below
To retrieve real-time data via the IntradayPricing extraction, you need to use a RIC(i.e. JPY=) as an identifier.
The question#2 and #3 are directly related to content query. I have researched and found the following information. The "=E" suffix is Real-time price quoted by an European contributor, while the "=A" suffix is Real-time price quoted by an Asian contributor. This means that If you do not want rate in specific region, you should use the composite RIC (i.e. JPY=).
Regarding the cross rate, the "=R" suffix means that the rate calculated by TR, while, the "=X" suffix means the rate is 10 minutes snapshot, so you should use the RIC with "=R" suffix. (i.e. JPYUSD=R)
For the mid price, your understand is correct. There is the "Cross Scaling Factor" field providing scaling factor applied to raw data. You can use this field to calculate the actual value. For example, if the "Cross Scaling Factor" of the JPYUSD=R is 100 and Mid Price is 0.873. The actual raw data of Mid Price should be 0.873 / 100 = 0.00873.
An example request is
{ "ExtractionRequest": { "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.IntradayPricingExtractionRequest", "ContentFieldNames": [ "RIC", "Currency Code", "Base Currency Code", "Mid Price", "Cross Scaling Factor", "Price Decimals", "Trade Date", "Trade Time", "Last Update Time", "Instrument Snap Time", "Security Description" ], "IdentifierList": { "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList", "InstrumentIdentifiers": [ { "Identifier": "JPYUSD=R", "IdentifierType": "Ric" } ] }, "Condition": { "ScalableCurrency": true } }}
and the output is
"@odata.context": "https://selectapi.datascope.refinitiv.com/RestApi/v1/$metadata#DataScope.Select.Api.Extractions.ExtractionRequests.ExtractionResult", "Contents": [ { "IdentifierType": "Ric", "Identifier": "JPYUSD=R", "RIC": "JPYUSD=R", "Currency Code": "USD", "Base Currency Code": "JPY", "Mid Price": 0.7789, "Cross Scaling Factor": "100", "Price Decimals": 4, "Trade Date": "2022-04-19", "Trade Time": "09:22", "Last Update Time": "19/04/2022 16:22:02", "Instrument Snap Time": "19/04/2022 16:22:04", "Security Description": "Japanese Yen/US Dollar FX Cross Rate" }
Hope this helps, please let me know in case you have any question