Endpoint Parameters

  • Request parameters

    Name Type Origin Description
    Arguments InstrumentExposureRequest 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 Integer 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 Integer 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 Integer Actual refresh rate assigned to the subscription according to the customers SLA.
    Snapshot InstrumentExposureResponseListResult Snapshot of the current data on hand, when subscription was created.
    State String This property is kept for backwards compatibility.
    Tag String Client specified tag assigned to the subscription, if specified in the request.
  • Streaming Response Parameters

    Name Type Description
    Amount Number Sum exposure of positions in instrument
    AssetType AssetType The AssetType.
    AverageOpenPrice Number The average price of all the positions that make up the exposure.
    CalculationReliability CalculationReliability If an error was encountered this code indicates source of the calculation error.
    CanBeClosed Boolean Indicates if the exposure may be closed.
    DisplayAndFormat InstrumentDisplayAndFormat Information about the instrument and how to display it.
    ExpiryDate UtcDateTime The ExpiryDate.
    InstrumentPriceDayPercentChange Number Percent change in instrument's price between Previous Close and current Last Traded price.
    LowerBarrier Number LowerBarrier for digital option.
    NetPositionId String The exposure net position id. May be used to fetch the net position or open positions of the net position from the Open Positions service.
    ProfitLossOnTrade Number The P/L on the trade in the currency in which the instrument is traded.
    PutCall PutCall The Put/Call value of the option.
    Strike Number The strike price of the option.
    Uic Integer Unique id of the instrument.
    UpperBarrier Number UpperBarrier for digital option.
    ValueDate UtcDateTime The value date. Only used to distinguish FxForwards.
  • Request Example

    Request URL
    POST /port/v1/exposure/instruments/subscriptions
    Request Body
    {
      "Arguments": {
        "AccountGroupKey": "LZTc7DdejXODf-WSl2aCyQ==",
        "AccountKey": "LZTc7DdejXODf-WSl2aCyQ==",
        "AssetType": "FxSpot",
        "ClientKey": "7m4I|vtYLUnEGg77o9uQhw==",
        "PriceMode": "RegularTradingHours",
        "Uic": 21
      },
      "ContextId": "-",
      "Format": "stringValue",
      "ReferenceId": "-",
      "RefreshRate": 104,
      "ReplaceReferenceId": "-",
      "Tag": "stringValue"
    }
    
  • Response Example

    Response body
    {
      "ContextId": "20240423053108139",
      "Format": "application/json",
      "InactivityTimeout": 120,
      "ReferenceId": "E01378",
      "RefreshRate": 1000,
      "Snapshot": {
        "Data": [
          {
            "Amount": 200000,
            "AssetType": "FxSpot",
            "AverageOpenPrice": 1.08414,
            "CalculationReliability": "Ok",
            "CanBeClosed": false,
            "DisplayAndFormat": {
              "Currency": "USD",
              "Decimals": 4,
              "Description": "Euro/US Dollar",
              "Format": "AllowDecimalPips",
              "Symbol": "EURUSD"
            },
            "NetPositionId": "EURUSD_FxSpot",
            "Uic": 21
          }
        ]
      },
      "State": "Active"
    }
    
  • Streaming Response Example

    Response body
    {
      "Amount": 200000,
      "AssetType": "FxSpot",
      "AverageOpenPrice": 1.08414,
      "CalculationReliability": "Ok",
      "CanBeClosed": false,
      "DisplayAndFormat": {
        "Currency": "USD",
        "Decimals": 4,
        "Description": "Euro/US Dollar",
        "Format": "AllowDecimalPips",
        "Symbol": "EURUSD"
      },
      "NetPositionId": "EURUSD_FxSpot",
      "Uic": 21
    }