Skip to content
Stock Group

Add Stocks to Group

Bulk-adds securities to a specified stock group.

Request parameters

  • Required: group_id (target stock group id) and counter_ids (the securities to add; multiple can be sent at once).
  • See the field descriptions for each field's format, source, and business meaning.

Business notes

Stock groups define the scope that risk-control rules apply to. This endpoint appends the securities in counter_ids to the group identified by group_id. audit_frontend_resource may be supplied to carry approval-display context.

Risk warning

This operation changes stock group membership and may affect risk strategies that reference the group. Confirm the target group and security list before calling.

Result

On success the securities in counter_ids are added to the specified group; subsequent state and returned data follow the 200 response definition.

POSThttps://b-api.lbkrs.com/v1/risk/stock-group/add-stocks

Authorization

AuthorizationstringheaderRequired

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

Request body application/json

group_idstringrequired

Target stock group id that the stocks are added to.

Values are dynamic. Call GET /v1/datasets/refs/stock_groups to retrieve the current data dictionary, and use the returned entry's key as this parameter's value.

counter_idsarray<string>required

List of stock counter ids (counter_id) to add to the stock group; multiple values are allowed per call. Each element is a single stock's counter_id, consistent with the counter_id used by the stock group details dataset (stock_group_details) and the remove-stock endpoint (stock-group/remove-stock).

audit_frontend_resourceobject

Caller-provided audit context for the approval workflow, such as the target stock group name (stock_group_name). It is used only for display in the approval process and does not affect processing. Omitting it does not affect the add operation.

Responses

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

On success data is an empty object.

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