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. AccountGroupKey AccountGroupKey Query-String The key of the account group to which the closed positions belongs. AccountKey AccountKey Query-String The key of the account to which the closed positions belongs. ClientKey ClientKey Query-String The key of the client to which the closesd positions belongs. ClosedPositionId String Query-String The id of the closed position to which the closedposition belongs FieldGroups ClosedPositionFieldGroup [] Query-String Specifies which data to return. Default is [ClosedPosition] -
Response Parameters
View Response CodesName Type Description ClosedPosition ClosedPosition ClosedPosition info ClosedPositionUniqueId String Unique id of the closed position based on OpeningPositionId and ClosingPositionId - Required for subscription to provide a key. DisplayAndFormat InstrumentDisplayAndFormat [Community] Information about the instrument of the closed position and how to display it. Exchange InstrumentExchangeDetails Information about the instrument's exchange and trading status. NetPositionId String NetPosition ID -
Request Example
Request URL
GET port/v1/closedpositions/?$top=99&$skip=99&ClosedPositionId=139597294-139694249&FieldGroups=ClosedPositionDetails&ClientKey=493b43a5-fe85-4d1f-9071-dd4a9d4e42a4&AccountGroupKey=stringValue&AccountKey=01b64edf-da03-4145-bf33-ae21527d4c86
-
Response Example
Response body
{ "__next": "/openapi/port/....../?$top=1&$skip=1", "Data": [ { "ClosedPosition": { "AccountId": "192134INET", "Amount": 300000.0, "AssetType": "FxSpot", "BuyOrSell": "Buy", "ClientId": "654321", "ClosedProfitLoss": 9597.0, "ClosedProfitLossInBaseCurrency": 9597.0, "ClosingMarketValue": 0.0, "ClosingMarketValueInBaseCurrency": 0.0, "ClosingMethod": "Explicit", "ClosingPositionId": "139694249", "ClosingPrice": 1.09139, "ConversionRateInstrumentToBaseSettledClosing": false, "ConversionRateInstrumentToBaseSettledOpening": true, "ExecutionTimeClose": "2017-05-02T00:00:00Z", "ExecutionTimeOpen": "2017-04-12T00:00:00Z", "OpeningPositionId": "139597294", "OpenPrice": 1.0594, "Uic": 21 }, "ClosedPositionUniqueId": "139597294-139694249", "NetPositionId": "EURUSD_FxSpot" } ] }