Update Loan Security Price API
Update Loan Security Price API in Frappe Lending allows users to update prices of multiple loan securities through a single API request. This is useful when security valuations change and multiple collateral records need to be updated together.
For better performance, it is recommended to update loan security prices in batches of up to 500 securities per request.
Did You Know?
Updating loan security prices automatically helps maintain accurate collateral valuations used across lending operations.
API Endpoint
PUT /api/method/lending.api.update_loan_security_price
Request Body
The API accepts multiple security records with their updated prices and validity periods.
{
"data": {
"Test Security 1": {
"loan_security_price": 700,
"valid_from": "2026-03-01",
"valid_upto": "2026-03-04"
},
"Test Security 2": {
"loan_security_price": 1000,
"valid_from": "2026-03-01",
"valid_upto": "2026-03-04"
}
}
}
Request Parameters
| Parameter | Description |
|---|---|
| Security Name | Defines the loan security record for which the price needs to be updated. |
| Loan Security Price | Specifies the updated price or valuation of the security. |
| Valid From | Defines the date from which the updated security price becomes applicable. |
| Valid Upto | Defines the date until which the updated security price remains valid. |
Response
On successful completion, the API returns a confirmation message.
{
"message": "Loan Security Prices updated successfully"
}
How It Works
The API processes each security record provided in the request and updates its price along with the applicable validity period.
| Step | Description |
|---|---|
| 1. Receive Security Data | The API accepts multiple loan security records with updated price details. |
| 2. Validate Information | The system validates security names, prices, and validity dates. |
| 3. Update Prices | The loan security prices are updated with the provided values. |
| 4. Confirm Update | The API returns a success response after completing the update. |
Batch Processing Recommendation
For better performance and efficient processing:
- Send updates in batches of up to 500 loan securities per API request.
- Avoid sending very large payloads in a single request.
- Split bulk security price updates into multiple API calls when required.
Use Cases
The Update Loan Security Price API can be used for:
- Daily collateral price updates.
- Market value synchronization from external systems.
- Bulk security valuation updates.
- Automated collateral monitoring workflows.
Note
Updated loan security prices impact collateral valuation and related lending calculations where security pricing is used.
Best Practices
- Verify security names before submitting bulk updates.
- Maintain accurate validity dates for historical price tracking.
- Process large updates in batches of 500 records or fewer.
- Validate updated prices before using them for lending decisions.