FxSpotExposureMe

class saxo_openapi.endpoints.portfolio.exposure.FxSpotExposureMe

Returns a list of currencies and net exposures.

ENDPOINT = 'openapi/port/v1/exposure/fxspot/me'
EXPECTED_STATUS = 200
METHOD = 'GET'
__init__()

Instantiate a FxSpotExposureMe request.

Parameters:None
>>> import saxo_openapi
>>> import saxo_openapi.endpoints.portfolio as pf
>>> import json
>>> client = saxo_openapi.API(access_token=...)
>>> r = pf.exposure.FxSpotExposureMe()
>>> client.request(r)
>>> print(json.dumps(r.response, indent=2))

Output:

[
  {
    "Amount": 431950,
    "AmountInCalculationEntityCurrency": 57878,
    "Currency": "DKK"
  },
  {
    "Amount": 60000,
    "AmountInCalculationEntityCurrency": 60000,
    "Currency": "EUR"
  },
  {
    "Amount": -50000,
    "AmountInCalculationEntityCurrency": -57878,
    "Currency": "GBP"
  },
  {
    "Amount": -67402.2,
    "AmountInCalculationEntityCurrency": -60000,
    "Currency": "USD"
  }
]
expected_status
response

response - get the response of the request.

status_code