Skip to content
Risk Control Rules Management

Save Risk Rule

Creates or edits a risk-control engine rule.

Request parameters

  • Required: rule_name (rule name), group_name (rule group), status (status), and rule_detail (rule detail list).
  • Optional: risk_rule_id (rule id), aaid (customer account id), group_id (customer group id), and audit_frontend_resource (approval-ticket display resource).
  • See the field descriptions for each field's format, range, and business meaning.

Business notes

Both create and edit use this endpoint: omit risk_rule_id to create; supply risk_rule_id to edit that rule. A rule can be bound to a customer or customer group via aaid or group_id.

Risk warning

This operation affects the real risk-control rule engine and can change automated risk decisions and actions. Confirm the rule content and scope before calling.

Result

On success the rule is created or updated; see the 200 response definition for the returned content.

POSThttps://b-api.lbkrs.com/v1/risk_monitoring/rule_engine/save_risk_rule

Authorization

AuthorizationstringheaderRequired

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

Request body application/json

risk_rule_idstring

Passed when editing an existing rule; not passed when creating.

rule_namestringrequired

This field is required.

group_namestringrequired

Name of the risk group.

Values
ignore_margin_call
MarginCall Exemption
over_financing_margin_call_ignore
OverLimit MarginCall Exemption
statusnumberrequired

Single-select.

Allowed values: 1 Enabled, 2 Disable

Values
1
Enabled
2
Disable
aaidstring

Submitted only when the rule type is "Customized - single account"; it is the selected client's AAID.

Pass the internal numeric ID of the customer's securities account (aaid), not the securities account number account_no (such as H00000000) or the customer ID member_id. One customer can have multiple aaid values.

group_idstring

Submitted only when the rule type is "Customized - client group"; values come from the risk_client_groups dynamic enumeration and are not fixed.

Call GET /v1/datasets/refs/risk_client_groups to retrieve the current data dictionary, and use the returned entry's key as this field's value.

rule_detailarray<string>required

Each item contains parameter (the rule parameter name for float type, a numeric string).

audit_frontend_resourceobject

Audit information shown in the approval ticket: operation type (add/edit), rule type (global/customized), and a human-readable text comparison of the rule details before and after the change.

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