Currency conversion rate using DSS Rest API (Direct Http)
- We want to get live(Real time) conversion rate for various currencies is it possible to get the conversion rate from DSS API just by passing the ISO currency code ( something like for example using "Currency Code" and "Base Currency Code" to get USD to JPY and JPY to USD conversion rate) or the identifier(IdentifierType, Identifier) is the mandatory input param that needs to be added to the instrument list to get the conversion rate for each currency.
- If identifier is the mandatory input param which identifier we need to use to get the latest live conversion rate for specific currency For example: To get USD to JPY currency conversion which one of the following identifier we should use(there are more than 40 identifiers to choose from) JPY=, JPY=E, JPY=A.Similarly which one to use for JPY to USD conversion JPYUSD=R, JPYUSD=X
- While sending request for some of the currencies conversions(like JPY,INR To USD) the MidPrice response doesn't reflect the exact conversion rate. For example: Below request returns the Mid Price value for JPY to USD conversion as 0.8833 where as the exact conversion rate is 0.008833(as per xe.com).(Looks like mismatch in decimal place .Is there any field we can use to get the exact decimal place? ).Price Decimals field doesn't give exact decimal place.Similar case with INR.
Request :
curl -X POST -H "Authorization: Token <our_auth_token_goes_here>" -H "Prefer: respond-async; wait= 60" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "Postman-Token: 9eb68938-629a-74ca-f010-5417821ad443" -d '{
"ExtractionRequest": {
"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.IntradayPricingExtractionRequest",
"ContentFieldNames": [
"Currency Code",
"Base Currency Code",
"Mid Price",
"Price Decimals",
"Trade Date",
"Trade Time",
"Last Update Time",
"Instrument Snap Time",
"Security Description"
],
"IdentifierList": {
"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
"InstrumentIdentifiers": [
{
"Identifier": "JPYUSD=R",
"IdentifierType": "Ric",
"UserDefinedIdentifier" : "JPY To USD Conversion"
},
{
"Identifier": "INRUSD=R",
"IdentifierType": "Ric",
"UserDefinedIdentifier" : "JPY To USD Conversion"
}
]
},
"Condition": {
"ScalableCurrency" : "true"
}
}
}
' "https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/ExtractWithNotes"
Response :
{
"@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.ExtractionResult",
"Contents": [
{
"IdentifierType": "Ric",
"Identifier": "JPYUSD=R",
"UserDefinedIdentifier": "JPY To USD Conversion",
"Currency Code": "USD",
"Base Currency Code": "JPY",
"Mid Price": 0.8833,
"Price Decimals": 4,
"Trade Date": "2017-02-10",
"Trade Time": "21:59",
"Last Update Time": "02/10/2017 15:00:01",
"Instrument Snap Time": "02/10/2017 16:02:47",
"Security Description": "Japanese Yen/US Dollar FX Cross Rate"
},
{
"IdentifierType": "Ric",
"Identifier": "INRUSD=R",
"UserDefinedIdentifier": "JPY To USD Conversion",
"Currency Code": "USD",
"Base Currency Code": "INR",
"Mid Price": 1.4958,
"Price Decimals": 4,
"Trade Date": "2017-02-10",
"Trade Time": "20:42",
"Last Update Time": "02/10/2017 15:00:01",
"Instrument Snap Time": "02/10/2017 16:02:47",
"Security Description": "Indian Rupee/US Dollar FX Cross Rate"
}
],
"Notes": [
"Extraction Services Version 10.8.36127 (95fc12628942), Built Jan 13 2017 03:26:24\r\nProcessing started at 02/10/2017 16:02:47.\r\nUser ID: 9010934\r\nExtraction ID: 247060640\r\nSchedule: _OnD_0x0599e569542b2f96 (ID = 0x0599e569e37b2f96)\r\nInput List (2 items): _OnD_0x0599e569542b2f96 (ID = 0599e569a80b2f96) Created: 02/10/2017 16:02:45 Last Modified: 02/10/2017 16:02:45\r\nSchedule Time: 02/10/2017 16:02:46\r\nReport Template (15 fields): _OnD_0x0599e569542b2f96 (ID = 0x0599e56983eb2f96) Created: 02/10/2017 16:02:45 Last Modified: 02/10/2017 16:02:45\r\nNo prices needed currency scaling.\r\nReal-time data was snapped at 02/10/2017 16:02:47, it was scheduled to snap at 02/10/2017 16:02:46.\r\nNo embargo required for this report.\r\nProcessing completed successfully at 02/10/2017 16:02:47, taking 0.320 Secs.\r\nExtraction finished at 02/10/2017 23:02:47 UTC, with servers: x09i02, QSHA02 (0.1 secs), QSHC08 (0.0 secs)\r\nUsage Summary for User 9010934, Client 105455, Template Type Intraday Pricing\r\nBase Usage\r\n Instrument Instrument Terms Price\r\n Count Type Subtype Source Source\r\n------- ----------------------------------- ---------------------------- -------------- ----------------------------------------\r\n 2 Money Market N/A N/A\r\n-------\r\n 2 Total instruments charged.\r\n 0 Instruments with no reported data.\r\n=======\r\n 2 Instruments in the input list.\r\nNo TRPS complex usage to report -- 2 Instruments in the input list had no reported data.\r\n"
]
}
Best Answer
-
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.
Hope this helps.
"@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.ExtractionResult",
"Contents": [
{
"IdentifierType": "Ric",
"Identifier": "JPYUSD=R",
"Currency Code": "USD",
"Base Currency Code": "JPY",
"Mid Price": 0.873,
"Cross Scaling Factor": "100",
"Price Decimals": 4,
"Trade Date": "2017-02-15",
"Trade Time": "08:40",
"Last Update Time": "02/15/2017 15:40:09",
"Instrument Snap Time": "02/15/2017 15:40:10",
"Security Description": "Japanese Yen/US Dollar FX Cross Rate"
}0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 690 Datastream
- 1.4K DSS
- 629 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 559 WebSocket API
- 39 FX Venues
- 15 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 25 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 280 Open PermID
- 45 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 720 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
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 106 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 95 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛