Endpoint Parameters
-
Request parameters
Name Type Origin Description $skip Integer Query-String The number of entries to skip from the beginning of the collection $top Integer Query-String The number of entries to return from the beginning of the collection 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 __count Number The total count of items in the feed. __next String The link for the next page of items in the feed. Data ClosedPositionResponse [] The collection of entities for this feed. MaxRows Number The maximum number of rows that can be returned (if applicable). -
Request Example
Request URL
GET /port/v1/closedpositions?$skip=1&$top=1&AccountGroupKey=stringValue&AccountKey=01b64edf-da03-4145-bf33-ae21527d4c86&ClientKey=493b43a5-fe85-4d1f-9071-dd4a9d4e42a4&ClosedPositionId=stringValue&FieldGroups=ClosedPosition
-
Response Example
Response body
{ "__next": "/openapi/port/....../?$top=1&$skip=1", "Data": [ { "ClosedPosition": { "AccountId": "192134INET", "Amount": 300000, "AssetType": "FxSpot", "BuyOrSell": "Buy", "ClientId": "654321", "ClosedProfitLoss": 9597, "ClosedProfitLossInBaseCurrency": 9597, "ClosingMarketValue": 0, "ClosingMarketValueInBaseCurrency": 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" } ] }