NetInstrumentsExposureMe¶
-
class
saxo_openapi.endpoints.portfolio.exposure.
NetInstrumentsExposureMe
¶ Returns a list instruments and net exposures.
-
ENDPOINT
= 'openapi/port/v1/exposure/instruments/me'¶
-
EXPECTED_STATUS
= 200¶
-
METHOD
= 'GET'¶
-
__init__
()¶ Instantiate a NetInstrumentsExposureMe request.
Parameters: None – >>> import saxo_openapi >>> import saxo_openapi.endpoints.portfolio as pf >>> import json >>> client = saxo_openapi.API(access_token=...) >>> r = pf.exposure.NetInstrumentsExposureMe() >>> client.request(r) >>> print(json.dumps(r.response, indent=2))
Output:
[ { "Amount": 60000, "AssetType": "FxSpot", "AverageOpenPrice": 1.13071, "CalculationReliability": "Ok", "CanBeClosed": true, "DisplayAndFormat": { "Currency": "USD", "Decimals": 4, "Description": "Euro/US Dollar", "Format": "AllowDecimalPips", "Symbol": "EURUSD" }, "InstrumentPriceDayPercentChange": 0.42, "NetPositionId": "EURUSD__FxSpot", "ProfitLossOnTrade": -408.6, "Uic": 21 }, { "Amount": -50000, "AssetType": "FxSpot", "AverageOpenPrice": 8.6839, "CalculationReliability": "Ok", "CanBeClosed": true, "DisplayAndFormat": { "Currency": "DKK", "Decimals": 4, "Description": "British Pound/Danish Krone", "Format": "Normal", "Symbol": "GBPDKK" }, "InstrumentPriceDayPercentChange": -1, "NetPositionId": "GBPDKK__FxSpot", "ProfitLossOnTrade": 2530, "Uic": 25 } ]
-
expected_status
¶
-
response
¶ response - get the response of the request.
-
status_code
¶
-