Endpoint Parameters

  • Request parameters

    Name Type Origin Description
    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 Route Unique id of the position.
    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/{ClosedPositionId}?AccountGroupKey=stringValue&AccountKey=01b64edf-da03-4145-bf33-ae21527d4c86&ClientKey=493b43a5-fe85-4d1f-9071-dd4a9d4e42a4&FieldGroups=ClosedPosition
  • Response Example

    Response body
    {
      "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"
    }