Skip to content
Index Haircut Management

Upsert Index Haircut

Edit an existing index Haircut configuration. The field structure matches "Create index Haircut", with id additionally identifying the target record.

Request parameters

  • Required: id (configuration ID), name (rule name), security_type (security type), haircut (haircut rate).
  • When security_type is Stock, also pass market, and optionally scope the rule with include_indexes or exclude_indexes and include_exchanges or exclude_exchanges.
  • risk_index_haircut_configs does not document a record ID column, so confirm the id of the target rule before calling.
  • See the field descriptions for the format, value range, default behavior, and business meaning of each field.

Business notes

Overwrites the index Haircut configuration identified by id. The haircut is used to compute the collateral value of a security.

Risk warning

This operation modifies a risk-control haircut configuration and directly affects the collateral value and margin calculation of the affected securities. Confirm the target record and parameters before calling.

Result

On success, the configuration is updated; subsequent state and returned data follow the 200 response definition.

POSThttps://b-api.lbkrs.com/report/haircut/upsert_index_haircut

Authorization

AuthorizationstringheaderRequired

Send the Broker ACCESS_TOKEN as Authorization: Bearer <token>.

Permission

lb_hk_report.haircut_indexes

The Broker ACCESS_TOKEN must be granted the permission above, or the call will be rejected.

Request body application/json

idnumberrequired

Config ID. The ID of the index Haircut rule to edit.

namestringrequired

Rule Name. Name of the index Haircut rule.

security_typestringrequired

Security Type. Values follow the haircut_rule_security_type enumeration. When the value is Stock, market is required and the index and exchange scopes apply.

marketstring

Market. Values follow the haircut_market_list enumeration. Required when security_type is Stock.

include_indexesarray<string>

Include Indexes. Index counter_id values (such as IX/SH/000011) whose constituents the rule applies to. Pass either include_indexes or exclude_indexes.

exclude_indexesarray<string>

Exclude Indexes. Index counter_id values whose constituents the rule excludes.

include_exchangesarray<string>

Include Exchanges. Values follow the haircut_exchange_list enumeration. Pass either include_exchanges or exclude_exchanges.

exclude_exchangesarray<string>

Exclude Exchanges. Values follow the haircut_exchange_list enumeration.

haircutstringrequired

Haircut. A decimal string greater than 0 and at most 1, for example 0.5 for 50%.

Responses

HTTP 200The request was processed successfully. The response data does not contain additional business fields.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 400Bad request. Check the business error code in code and the error details in message.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 401The user is not authenticated, or the login session has expired.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 403The current account is not authorized to use this feature. Grant the required permission to the account in User Permission.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 408The request timed out. Check the business error code in code and the error details in message.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

Whale Docs