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 ClosedPositionFieldGroup [] Query-String Specifies which data to return. Default is [ClosedPosition].
  • Response Parameters

    View Response Codes
    Name 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/me/?$top=99&$skip=99&FieldGroups=ExchangeInfo
  • 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"