https://b-api.lbkrs.com/v1/risk_monitoring/simulate_margin_call_cal_v3Production: https://b-api.lbkrs.com · Test: https://b-api.longbridge.xyz
Authorization
Send the Broker ACCESS_TOKEN as Authorization: Bearer <token>.
Permission
Request body application/json
Simulate Cal Type. SimulateCalType determines which dependent field applies: 0 by batch number, 1
by stock group, 2 by market, 3 by stock, or 4 by index level. The dependent
fields are task_id, stock_group_id, market, counter_id, and
index_price_limit_info.
0 · TaskId1 · StockGroup2 · Market3 · Stock4 · IndexLimit
Task ID. Used only when simulate_cal_type=0.
Market. Used only when simulate_cal_type=2, e.g. HK/US.
Stock Group ID. Used only when simulate_cal_type=1.
Counter ID. Used only when simulate_cal_type=3.
Price Limit. The assumed price-change percentage, e.g. -10 means a 10% drop.
Index Price Limit Info. Used only when simulate_cal_type=4; the sub-fields tier1_price_limit/tier2_price_limit/other_price_limit correspond to the assumed drops for index level 1 / level 2 / other levels respectively.
Calculation Type. A string-array enum: 0=full calculation, 1=margin call calculation, 2=non-frozen funds surplus calculation; multiple values allowed.
0 · Full Calculation2 · Non-Frozen Fund Surplus Calculation1 · Margin Call Calculation
Is Filter. Boolean flag for is filter. this field is required.
Boolean values:
true- The condition appliesfalse- The condition does not apply
Remark. This field is required.
Responses
HTTP 200The request was processed successfully. data contains task_id.codemessagedatadataobjectdata structureTask ID. The batch number generated by this stress-test calculation.
HTTP 400Bad request. Check the business error code in code and the error details in message.codemessagedatadataobjectdata structureNo nested fields
HTTP 401The user is not authenticated, or the login session has expired.codemessagedatadataobjectdata structureNo nested fields
HTTP 403The current account is not authorized to use this feature. Grant the required permission to the account in User Permission.codemessagedatadataobjectdata structureNo nested fields
HTTP 408The request timed out. Check the business error code in code and the error details in message.codemessagedatadataobjectdata structureNo nested fields