For a deeper look into our DataScope Select REST API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
1 1 1 1

Which REST API provides Daily Exchange Rate Data like From Currency, To Currency, Exchange Rate and Exchange Date

dss-rest-apiexchange-codes
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@phani.alampalli

Hi,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,
AHS

Upvotes
Accepted
14.2k 30 5 10

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

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
14.2k 30 5 10

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

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.