Countries

class saxo_openapi.endpoints.referencedata.countries.Countries

Retrieve a list all the countries supported by Saxo Bank.

ENDPOINT = 'openapi/ref/v1/countries/'
EXPECTED_STATUS = 200
METHOD = 'GET'
__init__()

Instantiate a Countries request.

>>> import json
>>> import saxo_openapi
>>> import saxo_openapi.endpoints.referencedata as rd
>>> client = saxo_openapi.API(access_token=...)
>>> r = rd.countries.Countries()
>>> client.request(r)
>>> print(json.dumps(r.response, indent=4))
{
  "Data": [
    {
      "A3": "AFG",
      "CountryCode": "AF",
      "Name": "Afghanistan",
      "Numeric": 4
    },
    {
      "A3": "ALA",
      "CountryCode": "AX",
      "Name": "Aland Islands",
      "Numeric": 248
    },
    {
      "A3": "ALB",
      "CountryCode": "AL",
      "Name": "Albania",
      "Numeric": 8
    },
    {
      "A3": "..."
    },
    {
      "A3": "VNM",
      "CountryCode": "VN",
      "Name": "Vietnam",
      "Numeric": 704
    },
    {
      "A3": "VIR",
      "CountryCode": "VI",
      "Name": "Virgin Islands (U.S.)",
      "Numeric": 850
    },
    {
      "A3": "WLF",
      "CountryCode": "WF",
      "Name": "Wallis and Futuna Islands",
      "Numeric": 876
    },
    {
      "A3": "ESH",
      "CountryCode": "EH",
      "Name": "Western Sahara",
      "Numeric": 732
    },
    {
      "A3": "YEM",
      "CountryCode": "YE",
      "Name": "Yemen",
      "Numeric": 887
    },
    {
      "A3": "ZMB",
      "CountryCode": "ZM",
      "Name": "Zambia",
      "Numeric": 894
    },
    {
      "A3": "ZWE",
      "CountryCode": "ZW",
      "Name": "Zimbabwe",
      "Numeric": 716
    }
  ]
}
expected_status
response

response - get the response of the request.

status_code