Endpoint Parameters
-
Request parameters
Name Type Origin Description AccountGroupKey AccountGroupKey Query-String The key of the account group to which the positions belong. AccountKey AccountKey Query-String The key of the account to which the positions belong. ClientKey ClientKey Query-String The key of the client to which the positions belong. FieldGroups NetPositionFieldGroup [] Query-String Specifies which data to return. Default is [NetPositionBase,NetPositionView] NetPositionId String Route Unique id of the net position. -
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/247__Share?AccountGroupKey=stringValue&AccountKey=01b64edf-da03-4145-bf33-ae21527d4c86&ClientKey=493b43a5-fe85-4d1f-9071-dd4a9d4e42a4&FieldGroups=DisplayAndFormat
-
Response Example
Response body
{ "NetPositionBase": { "AccountId": "192134INET", "Amount": 100000, "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, "ExposureInBaseCurrency": 129205, "InstrumentPriceDayPercentChange": 0.27, "PositionCount": 1, "PositionsNotClosedCount": 0, "ProfitLossOnTrade": -2979, "Status": "Open", "TradeCostsTotal": 0, "TradeCostsTotalInBaseCurrency": 0 } }