Which REST API provides Daily Exchange Rate Data like From Currency, To Currency, Exchange Rate and
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
- 39 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛