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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
6 2 3 4

How to retrieve historical FX spot rates and forward rates using DataScope Select Rest API in Python?

I am using the following to get FX rates but I believe it gives spot rates, How can I get historical forward rates for currency exchanges ?

  "ExtractionRequest": {
    "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.ElektronTimeseriesExtractionRequest",
    "ContentFieldNames": [ "RIC", "Ask Price", "Bid Price", "Trade Date" ],
    "IdentifierList": {
      "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList", 
      "InstrumentIdentifiers": [
        { "Identifier": "EUR=", "IdentifierType": "Ric" },
        { "Identifier": "GBP=", "IdentifierType": "Ric" }
      ]
    },
    "Condition": { "ScalableCurrency": true }
  }
}
pythondss-rest-apidssdatascope-selectforexforwards
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
Accepted
32.2k 40 11 19

Hello @ravi_ranjan,

Forward RICs end with F, for example "EURF=",

They are not quote rics, but chains, try this:

{
   "ExtractionRequest": {
    "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.ElektronTimeseriesExtractionRequest",
    "ContentFieldNames": [ "RIC", "Ask", "Bid", "Trade Date" ],
    "IdentifierList": {
      "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList", 
      "InstrumentIdentifiers": [
        { "Identifier": "EURF=", "IdentifierType": "ChainRIC" },
        { "Identifier": "GBPF=", "IdentifierType": "ChainRIC" }
      ]
    },
   "Condition": {
            "ReportDateRangeType": "Range",
            "QueryStartDate": "2015-12-01T00:00:00.000Z",
            "QueryEndDate": "2015-12-02T00:00:00.000Z"
        }
  }
}
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.

Hello @zoya.farberov thank you for the help I tried the above ChainRIC and it gives all the forward rates but I am looking specifically at 1 month Forward rates. How can I identify it ?

Upvotes
32.2k 40 11 19

Hello @ravi_ranjan,

Please inspect the output from the chainRic request. It includes all the rics within the chain. Once you identify the ric you are looking for, next you can request it separately, for instance:

{
   "ExtractionRequest": {
    "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.ElektronTimeseriesExtractionRequest",
    "ContentFieldNames": [ "RIC", "Ask", "Bid", "Trade Date" ],
    "IdentifierList": {
      "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList", 
      "InstrumentIdentifiers": [
        { "Identifier": "EUR1M=", "IdentifierType": "Ric" },
        { "Identifier": "GBP1M=", "IdentifierType": "Ric" }
      ]
    },
   "Condition": {
            "ReportDateRangeType": "Range",
            "QueryStartDate": "2015-12-01T00:00:00.000Z",
            "QueryEndDate": "2015-12-02T00:00:00.000Z"
        }
  }
}
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.

Thanks @zoya.farberov EUR1M= gives the forward swap whereas EUR1MV= gives the forward outright.

The solution worked.