Endpoint Parameters
-
Request parameters
Name Type Origin Description $skip Int Query-String Optional number of elements to skip. $top Int Query-String Optional number of elements to retrieve. FieldGroups NetPositionFieldGroup [] Query-String Specifies which data to return. Default is [NetPositionBase, NetPositionView]. PriceMode PriceMode Query-String Optional. Specifies the prices to be used when returning price dependent values. Default is “RegularTradingHours”. -
Response Parameters
View Response CodesName Type Description DisplayAndFormat InstrumentDisplayAndFormat [Community] Information about the instrument of the net position and how to display it. Exchange InstrumentExchangeDetails Information about the exchange where this instrument or the underlying instrument is traded. Greeks Greeks Greeks for option(s) i.e. FX Option, Contract Options and Contract Options CFD . NetPositionBase NetPositionStatic Static part of net position information NetPositionId String [Community] The id of the net position. This can be used to fetch the open positions of a net position from the Positions service. NetPositionView NetPositionDynamic Dynamic part of net position information. UnderlyingDisplayAndFormat InstrumentDisplayAndFormat Information about the underlying instrument of the net position and how to display it. -
Request Example
Request URL
GET port/v1/netpositions/me/?$top=99&$skip=99&FieldGroups=NetPositionBase&PriceMode=RegularTradingHours
-
Response Example
Response body
{ "__next": "/openapi/port/....../?$top=1&$skip=1", "Data": [ { "NetPositionBase": { "AccountId": "192134INET", "Amount": 100000.0, "AssetType": "FxSpot", "CanBeClosed": true, "ClientId": "654321", "HasForceOpenPositions": false, "IsMarketOpen": false, "NonTradableReason": "None", "NumberOfRelatedOrders": 0, "OpeningDirection": "Buy", "OpenIpoOrdersCount": 0, "OpenOrdersCount": 0, "OpenTriggerOrdersCount": 0, "PositionsAccount": "192134INET", "SinglePositionStatus": "Open", "Uic": 31, "ValueDate": "2017-05-04T00:00:00Z" }, "NetPositionId": "GPBUSD_FXSpot", "NetPositionView": { "AverageOpenPrice": 1.32167, "AverageOpenPriceIncludingCosts": 1.32172, "CalculationReliability": "Ok", "CurrentPrice": 1.29188, "CurrentPriceDelayMinutes": 15, "CurrentPriceType": "Mid", "Exposure": 100000.0, "ExposureInBaseCurrency": 129205.0, "InstrumentPriceDayPercentChange": 0.27, "PositionCount": 1, "PositionsNotClosedCount": 0, "ProfitLossOnTrade": -2979.0, "Status": "Open", "TradeCostsTotal": 0.0, "TradeCostsTotalInBaseCurrency": 0.0 } } ] }