Skip to main content

Supported adjustments

Endpoint: /adjustments/supported/<_server_name_> Method : GET Example endpoint: http://localhost:9090/adjustments/supported/MR Result is a serialized array of SupportedAdjustmentDTOs read more about this DTO Example Result:
[
   {
       "name": "Add-on",
       "type": "SENSI_ADD_ON",
       "factLevel": true,
       "cube": "Sensitivity Cube",
       "stores": [
           "TradeSensitivities"
       ],
       "filters": [
           {
               "name": "RiskFactorId2",
               "type": "string",
               "optional": false,
               "levelPath": "[Risk].[Risk Factors Secondary].[RiskFactor2]"
           },
           {
               "name": "Ccy",
               "type": "string",
               "optional": false,
               "levelPath": "[Currencies].[Currencies].[Ccy]"
           },
           {
               "name": "MaturityLabels",
               "type": "string",
               "optional": false,
               "levelPath": "[Risk].[Maturities].[Maturity]"
           },
           {
               "name": "TenorDates",
               "type": "string",
               "optional": false,
               "levelPath": "[Risk].[Tenor Dates].[Tenor Date]"
           },
           {
               "name": "TenorLabels",
               "type": "string",
               "optional": false,
               "levelPath": "[Risk].[Tenors].[Tenor]"
           },
           {
               "name": "SensitivityName",
               "type": "string",
               "optional": false,
               "levelPath": "[Sensitivities].[Sensitivity].[SensitivityName]"
           },
           {
               "name": "RiskFactorId",
               "type": "string",
               "optional": false,
               "levelPath": "[Risk].[Risk Factors].[RiskFactor]"
           },
           {
               "name": "AsOfDate",
               "type": "localDate[yyyy-MM-dd]",
               "optional": false,
               "levelPath": "[Dates].[Date].[AsOfDate]"
           },
           {
               "name": "Moneyness",
               "type": "string",
               "optional": false,
               "levelPath": "[Risk].[Moneyness].[Moneyness]"
           },
           {
               "name": "TradeId",
               "type": "string",
               "optional": false,
               "levelPath": "[Booking].[Trades].[TradeId]"
           },
           {
               "name": "MaturityDates",
               "type": "string",
               "optional": false,
               "levelPath": "[Risk].[Maturity Dates].[Maturity Date]"
           }
       ],
       "measures": [
           "CrossGamma Native",
           "Cash Native",
           "Dividend Quantity",
           "Gamma Native",
           "Theta Native",
           "Delta Native",
           "Volga Native",
           "Vega Native",
           "Vanna Native"
       ],
       "input": [
           {
               "name": "Values",
               "type": "double",
               "optional": false,
                "main": true
           }
       ]
   },
   {
       "name": "Add-on",
       "type": "PNL_ADD_ON",
       "factLevel": true,
       "cube": "PLCube",
       "stores": [
           "PnL"
       ],
       "filters": [
           {
               "name": "Ccy",
               "type": "string",
               "optional": false,
               "levelPath": "[Currencies].[Currencies].[Ccy]"
           },
           {
               "name": "RiskFactor",
               "type": "string",
               "optional": false,
               "levelPath": "[Risk].[Risk Factors].[RiskFactor]"
           },
           {
               "name": "AsOfDate",
               "type": "localDate[yyyy-MM-dd]",
               "optional": false,
               "levelPath": "[Dates].[Date].[AsOfDate]"
           },
           {
               "name": "Type",
               "type": "string",
               "optional": false,
               "levelPath": "[PnL].[Types].[Type]"
           },
           {
               "name": "TradeId",
               "type": "string",
               "optional": false,
               "levelPath": "[Booking].[Trades].[TradeId]"
           }
       ],
       "measures": [
           "DTD PnL Native"
       ],
       "input": [
           {
               "name": "Daily",
               "type": "double",
               "optional": false,
                "main": true
           }
       ]
   }
]

Adjustment execution

Endpoint: /adjustments/request Method : POST Example endpoint: http://localhost:9090/adjustments/request Body is a serialized AuditableAdjustmentRequestDTO read more about this DTO Example Body:
{
   "serverName":"MR",
   "type":"PNL_ADD_ON",
   "user":"User",
   "task":"Task",
   "comment":"Test Comment",
   "filters":[
      {
         "name":"AsOfDate",
         "value":"2018-09-28"
      },
      {
         "name":"TradeId",
         "value":"CDS_Allegheny Energy 3cc00452"
      },
      {
         "name":"Type",
         "value":"Actual PL Attributed"
      },
      {
         "name":"RiskFactor",
         "value":"Allegheny Energy_Credit spread"
      }
   ],
   "measures":[
      "DTD PnL Native"
   ],
   "input":[
      [
         {
            "name":"Daily",
            "value":"10000.0"
         }
      ]
   ]
}
Result is the execution ID Example Result: "PNL_ADD_ON_0"

Adjustment creation (sign-off server)

The following endpoints are hosted on the sign-off server (not the application server). They create adjustments and return identifiers that can be used to track execution status.

Bulk creation

Endpoint: /sign-off/rest/v2/adjustments Method: POST Example endpoint: http://localhost:8080/sign-off/rest/v2/adjustments The request body is a JSON array of adjustment objects. Each object accepts the following fields:
FieldTypeDescription
signOffTaskIdnumberThe identifier of the sign-off task.
typestringThe adjustment type (for example, PNL_ADD_ON).
reasonstringThe reason for the adjustment.
commentstringA free-text comment.
startDatestringThe start date of the adjustment scope.
endDatestringThe end date of the adjustment scope.
locationarray of {name, value}The location filters that scope the adjustment.
measuresarray of stringsThe measures targeted by the adjustment.
inputarray of {name, value}The input values for the adjustment.
The response is a JSON array in the same order as the request. Each element contains:
FieldTypeDescription
idnumberThe database id of the created adjustment. Matches the id returned by GET /sign-off/rest/v2/adjustments/{taskId} and accepted by DELETE /sign-off/rest/v2/adjustments.
executionIdstringThe stable identifier of the adjustment execution. Used by the status endpoints.
definitionIdstringThe identifier of the adjustment definition.
Example response:
[
   { "id": 1, "executionId": "PNL_ADD_ON_0", "definitionId": "0a1b2c3d-..." },
   { "id": 2, "executionId": "PNL_ADD_ON_1", "definitionId": "4e5f6a7b-..." }
]
The response body is available from Atoti Sign-Off 6.1.21 (SO-1118). Earlier versions return HTTP 200 with an empty response body.

Single adjustment creation

Endpoint: /sign-off/rest/v2/adjustment Method: POST Example endpoint: http://localhost:8080/sign-off/rest/v2/adjustment The request body is a single adjustment object using the same fields as the bulk endpoint above. The response is a single object with the same fields as one element of the bulk response:
{ "id": 1, "executionId": "PNL_ADD_ON_0", "definitionId": "0a1b2c3d-..." }
The response body is available from Atoti Sign-Off 6.1.21 (SO-1118). Earlier versions return HTTP 200 with an empty response body.

Verifying adjustment executions

After creating adjustments, the following endpoints on the sign-off server allow status tracking. GET /sign-off/rest/v2/adjustments/{taskId} — returns all adjustments for a task, including their id and status fields. GET /adjustments/status/{taskId} — returns a map of execution ids to status for a task. The {taskId} parameter is the workflow process-instance key. GET /adjustments/execution-status/{executionId} — returns the status of a single execution by its executionId.

Execution status

Endpoint: /adjustments/status/<_server_name_>/<_execution_Id_> Method : GET Example endpoint: http://localhost:9090/adjustments/status/MR/PNL\_ADD\_ON\_0 Result is a Status read more about this DTO Example Result: "REQUESTED"