Skip to content
Client Short Margin

Create Client Short Margin Ratio

Create a short-selling stock margin-ratio record for a specific client, defining the client's short margin requirements for a given security.

Request parameters

  • Required: aaid, counter_id. Usually provide im_factor, mm_factor, fm_factor, mcm_factor and expire_at together.
  • See the field descriptions for the format, value range, and business meaning of each field.

Business notes

A record typically carries the securities account, security code, and the initial, maintenance, forced-liquidation, and Margin Call margin ratios plus an expiry date, used in risk calculations for the client's short positions.

Risk warning

This operation adds a client-level short margin configuration and directly affects margin and forced-liquidation decisions on the client's short positions. Confirm the target client and parameters before calling.

Result

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

POSThttps://b-api.lbkrs.com/risk/v1/account_short_stock_margin_ratio/create

Authorization

AuthorizationstringheaderRequired

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

Permission

margin_ratio.account_short_query

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

Request body application/json

aaidintegerrequired

Internal securities account ID aaid (numeric), not the account number account_no.

counter_idstringrequired

Security code in the form {type}/{market}/{code}, e.g. ST/US/AAPL.

im_factornumber

Initial margin rate as a fraction between 0 and 1, e.g. 0.5 = 50%.

mm_factornumber

Maintenance margin rate, a fraction between 0 and 1.

fm_factornumber

Forced-liquidation margin rate, a fraction between 0 and 1.

mcm_factornumber

Margin Call rate, a fraction between 0 and 1.

expire_atinteger

Expiry time as a Unix timestamp in seconds.

Responses

HTTP 200OK
Standard response envelopecodemessagedata
dataobjectdata structure
ticket_idstring
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