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 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<InstrumentExposureResponse> 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 exposure net position id. May be used to fetch the net position or open positions of the net position from the Open Positions service.
    Uic Int Unique id of the instrument.
    AssetType AssetType The AssetType.
    Amount Decimal Sum exposure of positions in instrument
    CanBeClosed Bool Indicates if the exposure may be closed.
    AverageOpenPrice Decimal The average price of all the positions that make up the exposure.
    ProfitLossOnTrade Decimal The P/L on the trade in the currency in which the instrument is traded.
    InstrumentPriceDayPercentChange Decimal Percent change in instrument's price between Previous Close and current Last Traded price.
    ValueDate UtcDateTime The value date. Only used to distinguish FxForwards.
    DisplayAndFormat InstrumentDisplayAndFormat Information about the instrument and how to display it.
    Strike Decimal The strike price of the option.
    PutCall PutCall The Put/Call value of the option.
    ExpiryDate UtcDateTime The ExpiryDate.
    LowerBarrier Decimal LowerBarrier for digital option.
    UpperBarrier Decimal UpperBarrier for digital option.
    CalculationReliability CalculationReliability If an error was encountered this code indicates source of the calculation error.
  • 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",
      "KnownSchemas": [
        "stringValue"
      ],
      "ReferenceId": "-",
      "RefreshRate": 125,
      "ReplaceReferenceId": "-",
      "Tag": "stringValue"
    }
    
  • Response Example

    Response body
    {
      "ContextId": "20221001045949284",
      "Format": "application/json",
      "InactivityTimeout": 120,
      "ReferenceId": "E77075",
      "RefreshRate": 1000,
      "Snapshot": {
        "Data": [
          {
            "Amount": 200000.0,
            "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.0,
        "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
      }
    ]