Which REST API provides Daily Exchange Rate Data like From Currency, To Currency, Exchange Rate a...

Best Answer
-
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.1
Host: selectapi.datascope.refinitiv.com
Prefer: respond-async
Content-Type: application/json
Authorization: Token XXXXXXXXX
Content-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
0
Answers
-
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
0
Categories
- All Categories
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 684 Datastream
- 1.4K DSS
- 613 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 248 ETA
- 552 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 629 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 191 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 86 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛