ForwardTenorDates

class saxo_openapi.endpoints.referencedata.standarddates.ForwardTenorDates(Uic, params=None)

Get a list of forward tenor dates for an UIC.

ENDPOINT = 'openapi/ref/v1/standarddates/forwardtenor/{Uic}'
EXPECTED_STATUS = 200
METHOD = 'GET'
__init__(Uic, params=None)

Instantiate a ForwardTenorDates request.

Parameters:
  • Uic (int (required)) – the Uic code of the instrument
  • params (dict (required)) – dict with parameters representing the querystring
>>> import json
>>> import saxo_openapi
>>> import saxo_openapi.endpoints.referencedata as rd
>>> client = saxo_openapi.API(access_token=...)
>>> params =
        {
          "AccountKey": "Cf4xZWiYL6W1nMKpygBLLA=="
        }
>>> Uic = 22
>>> r = rd.ForwardTenorDates(Uic=Uic, params=params)
>>> client.request(r)
>>> print(json.dumps(r.response, indent=4))

Output:

{
  "Data": [
    {
      "Date": "2019-03-06",
      "Unit": "Days",
      "Value": 0
    },
    {
      "Date": "2019-03-13",
      "Unit": "Weeks",
      "Value": 1
    },
    {
      "Date": "2019-03-20",
      "Unit": "Weeks",
      "Value": 2
    },
    {
      "Date": "2019-03-27",
      "Unit": "Weeks",
      "Value": 3
    },
    {
      "Date": "2019-04-08",
      "Unit": "Months",
      "Value": 1
    },
    {
      "Date": "2019-05-07",
      "Unit": "Months",
      "Value": 2
    },
    {
      "Date": "2019-06-06",
      "Unit": "Months",
      "Value": 3
    },
    {
      "Date": "2019-09-06",
      "Unit": "Months",
      "Value": 6
    },
    {
      "Date": "2019-12-06",
      "Unit": "Months",
      "Value": 9
    },
    {
      "Date": "2020-03-06",
      "Unit": "Years",
      "Value": 1
    }
  ]
}
expected_status
response

response - get the response of the request.

status_code