L.8 Web Service name: getPricing
Ability to execute an existing TP Process which can refer to any TP Rule, Prepayment Rule, Adjustment Rule, and (optionally) an Alternate Rate Output Mapping assumption in real time for a single ad-hoc instrument record.
This web service supports provisioning of FTP rate quotes for more complicated instrument records, which are not supported by the Daily FTP Rate Card process. For cases where pricing for non-standard products is required, details for the entire data record can be passed through this web service to the TP Engine, and results will be generated in nearly real-time. This web service works in the following way:
- The data record provided in JSON is inserted by the java web service program getPricing into the FSI_PM_GENERATED_INSTRMTS table.
- The Process ID of the TP Process (references TP Rule and Adjustment Rule) given in JSON is executed to generate transfer pricing results for the row of data.
- The Product ID given in the JSON is used to lookup the TP Method and Adjustment assumptions.
- If processing is completed within the time set in ofsaaws.properties file, then request ID and results will be returned automatically.
- If processing is not completed within the time set in the ofsaaws.properties, then only the request ID is returned.
- In case the results are not returned due to longer processing time, users can set up a second web service call to re-query the results using the getPricingData web service program bypassing the request ID that was returned by the getPricing call.
Rest URL format:
http://<ServerName>:port/<contextName>/rest-api/ftpPcdRestservice/
v1/getPricing
The attributes given with angular brackets should be replaced with the appropriate value in your environment.
- ServerName: This is the name of the host where these services are deployed.
- Port: This is the port number on the server where it is listening for an incoming request.
- contextName: This is the name of the web archive for the FTP Application (OFSAA). Input JSON format:
The following table provides an example of the required inputs in JSON format.
getPricing:
{ "processId" :"510291",
"instrumentParameters" : [{
"accountNumber" : "NEW_ACCOUNT_1",
"asOfDate" : "20181031",
"currentNetRate" : "12",
"originalTermToMaturity" : "5",
"originalTermMultiplier" : "Y",
"paymentFrequency" : "1",
"paymentFrequencyMultiplier" : "M",
"adjustableTypeCode" : "0",
"currentGrosBookBalance" : "250000",
"accuralBasisCode" : "2",
"amortizationTerm" : "5",
"amortizationTermMultiplier" : "Y",
"amortizationTypeCode" : "100",
"currentGrossParBalance" : "250000",
"currentPaymentAmount" : "4167",
"interestRateCode" : "9999",
"lastRepricingDate" : "20181031",
"maturityDate" : "20230711",
"nextPaymentDate" : "20180812",
"nextRepricingDate" : "20230711",
"originalGrossparBanalce" : "250000",
"originationDate" : "20180503",
"issueDate" : "20181031",
"remainingNoOfPayments" : "0",
"lastPaymentDate" : "20181031",
"interestTypeCode" : "2",
"compoundingBasisCode" : "160",
"repricingFrequency" : "0",
"repricingFrequencyMultiplier" : "M",
"productCode" : "1013",
"currency" : "USD",
"orgPaymentAmt" : "4167"
}]
}
Response:
{
"status": "success",
"data": {
"requestId": 61,
"calculatedData": [
{
"requestId": "61",
"accountNumber": "TestingProdFee",
"transferRate": "7",
"liquidityPremiumRate": "1",
"pricingIncentiveRate": "9",
"basisRiskCostRate": "9",
"otherAdjustmentRate": "9",
"allInTPRate": "28",
"asOfDate": "2018-11-10 00:00:00.0"
}
]
},
"messages": null
}
Function parameters (for getPricing):
- PROCESS_ID
- ACCOUNT_NUMBER
- AS_OF_DATE
- CURRENT_NET_RATE
- ORIGINAL_TERM_TO_MATURITY
- ORIGINAL_TERM_MULTIPLIER
- PAYMENT_FREQUENCY
- PAYMENT_FREQUENCY_MULTIPLIER
- ADJUSTABLE_TYPE_CODE
- CURRENT_GROSS_BOOK_BALANCE
- ACCRUAL_BASIS_CODE
- AMORTIZATION_TERM
- AMORTIZATION_TERM_MULTIPLIER
- AMORTIZATION_TYPE_CODE
- CURRENT_GROSS_PAR_BALANCE
- CURRENT_PAYMENT_AMOUNT
- ORG_PAYMENT_AMT
- INTEREST_RATE_CODE
- LAST_REPRICING_DATE
- MATURITY_DATE
- NEXT_PAYMENT_DATE
- NEXT_REPRICING_DATE
- ORIGINAL_GROSS_PAR_BALANCE
- ORIGINATION_DATE
- ISSUE_DATE
- REMAINING_NO_OF_PAYMENTS
- LAST_PAYMENT_DATE
- INTEREST_TYPE_CODE
- COMPOUNDING_BASIS_CODE
- REPRICING_FREQUENCY
- REPRICING_FREQUENCY_MULTIPLIER
- PRODUCT_ID
- ISO_CURRENCY_CD
Return values:
- REQUEST_ID
- ACCOUNT_NUMBER
- TRANSFER_RATE
- LIQUIDITY_PREMIUM_RATE
- BASIS_RISK_COST_RATE
- PRICING_INCENTIVE_RATE
- OTHER_ADJUSTMENTS_RATE
- ALL_IN_TP_RATE
- AS_OF_DATE
If the TP Process exceeds the allotted time limit, the web service will return only the REQUEST_ID. In this case, you can re-query the results using the getPricingData web service.