Skip to content
Stock Index

Operate Stock Index

Maintain the mapping between stocks and indices, using operation to distinguish actions; used to classify a stock's index level in stress tests.

Request parameters

  • Required: operation (operation type), id (record ID).
  • Optional: stock_code, index_code, operator.
  • See the field descriptions for the format, value range, and business meaning of each field.

Business notes

operation selects the create, edit, or delete action, id identifies the target record, and stock_code and index_code establish the stock-to-index mapping.

Risk warning

This operation changes the stock-index mapping used by stress tests and affects the related risk calculations. Confirm the operation type and parameters before calling.

Result

On success, the described operation is completed; subsequent state and returned data follow the 200 response definition.

POSThttps://b-api.lbkrs.com/v1/risk_monitoring/stock_index_operate

Authorization

AuthorizationstringheaderRequired

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

Request body application/json

operationintegerrequired

Operation. enum Operation { 0=Create 1=Edit 2=Delete 3=New }; Edit always sends 1 and Delete always sends 2 (no Create=0 / New=3 call site was seen on the client).

Values
0
Create
1
Edit
2
Delete
3
New
stock_codestring

Stock Code. The counter_id input in the edit form (disabled, for display).

index_codestring

Index Code. The index_code input box on the edit form.

idintegerrequired

ID. The primary-key ID of the selected stock-index record, populated programmatically.

operatorstring

Operator. Current logged-in operator account; included on edit/delete

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