Endpoint Parameters

  • Request parameters

    Name Type Origin Description
    $top Int Query-String Optional number of elements to retrieve.
    Arguments PositionRequest Body Arguments for the subscription request.
    ContextId String Body The streaming context id that this request is associated with. This parameter must only contain letters (a-z) and numbers (0-9) as well as - (dash) and _ (underscore). It is case insensitive. Max length is 50 characters.
    Format String Body Optional Media type (RFC 2046) of the serialized data updates that are streamed to the client. Currently only application/json and application/x-protobuf is supported. If an unrecognized format is specified, the subscription end point will return HTTP status code 400 - Bad format.
    ReferenceId String Body Mandatory client specified reference id for the subscription. This parameter must only contain alphanumberic characters as well as - (dash) and _ (underscore). Cannot start with _. It is case insensitive. Max length is 50 characters.
    RefreshRate Int Body Optional custom refresh rate, measured in milliseconds, between each data update. Note that it is not possible to get a refresh rate lower than the rate specified in the customer service level agreement (SLA).
    ReplaceReferenceId String Body Reference id of the subscription that should be replaced.
    Tag String Body Optional client specified tag used for grouping subscriptions.
  • Response Parameters

    View Response Codes
    Name Type Description
    ContextId String The streaming context id that this response is associated with.
    Format String The media type (RFC 2046), of the serialized data updates that are streamed to the client.
    InactivityTimeout Int The time (in seconds) that the client should accept the subscription to be inactive before considering it invalid.
    ReferenceId String The reference id that (along with streaming context id and session id) identifies the subscription (within the context of a specific service/subscription type)
    RefreshRate Int Actual refresh rate assigned to the subscription according to the customers SLA.
    Snapshot ListResult<PositionResponse> Snapshot of the current data on hand, when subscription was created.
    State String The value "Active".
    Tag String Client specified tag assigned to the subscription, if specified in the request.
  • Streaming Response Parameters

    Name Type Description
    NetPositionId String The id of the NetPosition, to which this position is belongs. All positions in the same instrument have the same NetPositionId.
    PositionId String Unique id of this position.
    PositionBase PositionStatic Static part of position information.
    DisplayAndFormat InstrumentDisplayAndFormat Information about the position instrument and how to display it.
    UnderlyingDisplayAndFormat InstrumentDisplayAndFormat Information about the underlying instrument of the net position and how to display it.
    PositionView PositionDynamic Dynamic part of position information.
    Exchange InstrumentExchangeDetails Information about the instrument's exchange and trading status.
    Greeks Greeks Greeks, only available for options, i.e. FX Options, Contract Options, and Contract Options CFDs.
    Costs PositionCost Trading costs associated with opening/closing a position.
  • Request Example

    Request URL
    POST port/v1/positions/subscriptions/?$top=99
    Request Body
    {
      "Arguments": {
        "AccountGroupKey": "LZTc7DdejXODf-WSl2aCyQ==",
        "AccountKey": "LZTc7DdejXODf-WSl2aCyQ==",
        "ClientKey": "7m4I|vtYLUnEGg77o9uQhw==",
        "FieldGroups": [
          "PositionBase",
          "PositionView"
        ],
        "NetPositionId": "GBPUSD_FxSpot",
        "PositionId": "1019942425",
        "PriceMode": "RegularTradingHours"
      },
      "ContextId": "20230325092555973",
      "Format": "application/json",
      "ReferenceId": "P61241",
      "RefreshRate": 1000,
      "Tag": "PAGE1"
    }
    
  • Response Example

    Response body
    {
      "Format": "application/json",
      "InactivityTimeout": 120,
      "ReferenceId": "P76364",
      "RefreshRate": 1000,
      "Snapshot": {
        "Data": [
          {
            "NetPositionId": "GBPUSD_FxSpot",
            "PositionBase": {
              "AccountId": "192134INET",
              "Amount": 100000.0,
              "AssetType": "FxSpot",
              "CanBeClosed": true,
              "ClientId": "654321",
              "CloseConversionRateSettled": false,
              "ExecutionTimeOpen": "2016-09-02T10:25:00Z",
              "IsForceOpen": false,
              "IsMarketOpen": false,
              "LockedByBackOffice": false,
              "OpenPrice": 1.32167,
              "SpotDate": "2016-09-06",
              "Status": "Open",
              "Uic": 31,
              "ValueDate": "2017-05-04T00:00:00Z"
            },
            "PositionId": "1019942425",
            "PositionView": {
              "Ask": 1.2917,
              "Bid": 1.29162,
              "CalculationReliability": "Ok",
              "CurrentPrice": 1.29169,
              "CurrentPriceDelayMinutes": 0,
              "CurrentPriceType": "Bid",
              "Exposure": 100000.0,
              "ExposureCurrency": "GBP",
              "ExposureInBaseCurrency": 129192.0,
              "InstrumentPriceDayPercentChange": 0.26,
              "ProfitLossOnTrade": -2998.0,
              "ProfitLossOnTradeInBaseCurrency": -2998.0,
              "SettlementInstruction": {
                "ActualRolloverAmount": 0.0,
                "ActualSettlementAmount": 10.0,
                "Amount": 10.0,
                "IsSettlementInstructionsAllowed": false,
                "Month": 7,
                "SettlementType": "FullSettlement",
                "Year": 2020
              },
              "TradeCostsTotal": 0.0,
              "TradeCostsTotalInBaseCurrency": 0.0
            }
          }
        ]
      },
      "State": "Active"
    }
    
  • Streaming Response Example

    Response body
    [
      {
        "NetPositionId": "GBPUSD_FxSpot",
        "PositionBase": {
          "AccountId": "192134INET",
          "Amount": 100000.0,
          "AssetType": "FxSpot",
          "CanBeClosed": true,
          "ClientId": "654321",
          "CloseConversionRateSettled": false,
          "ExecutionTimeOpen": "2016-09-02T10:25:00Z",
          "IsForceOpen": false,
          "IsMarketOpen": false,
          "LockedByBackOffice": false,
          "OpenPrice": 1.32167,
          "SpotDate": "2016-09-06",
          "Status": "Open",
          "Uic": 31,
          "ValueDate": "2017-05-04T00:00:00Z"
        },
        "PositionId": "1019942425",
        "PositionView": {
          "Ask": 1.2917,
          "Bid": 1.29162,
          "CalculationReliability": "Ok",
          "CurrentPrice": 1.29169,
          "CurrentPriceDelayMinutes": 0,
          "CurrentPriceType": "Bid",
          "Exposure": 100000.0,
          "ExposureCurrency": "GBP",
          "ExposureInBaseCurrency": 129192.0,
          "InstrumentPriceDayPercentChange": 0.26,
          "ProfitLossOnTrade": -2998.0,
          "ProfitLossOnTradeInBaseCurrency": -2998.0,
          "SettlementInstruction": {
            "ActualRolloverAmount": 0.0,
            "ActualSettlementAmount": 10.0,
            "Amount": 10.0,
            "IsSettlementInstructionsAllowed": false,
            "Month": 7,
            "SettlementType": "FullSettlement",
            "Year": 2020
          },
          "TradeCostsTotal": 0.0,
          "TradeCostsTotalInBaseCurrency": 0.0
        }
      }
    ]