Skip to content
Longport Whale
Client Stock Margin

Upload Account Stock Margin Ratio

The "Upload" button on the Client Stock Margin (long) page; the Client Short Margin page shares the same set of interfaces (differing only in file_type/template). The long side uses file_type=1 and the short side uses file_type=3; the request parameters come from the endpoint callbacks of these two BatchImport calls. Involves real margin-ratio changes.

POSThttps://b-api.longbridge.xyz/risk/v1/account_stock_margin_ratio/upload

Authorization

AuthorizationstringheaderRequired

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

Request body application/json

s3_keystringrequired

Uploaded File S3 Key. First upload the CSV file to the data.porter service (prefix: credit_management), obtain the returned object-storage key, then submit it as this parameter; the template is available via the in-page "Download template" link uploade-template-new_4.csv.

file_typenumberrequired

Upload Dimension Type. Enum: 0 = modify stock margin ratio, 1 = modify account long-stock margin ratio (used on this page), 2 = client-group details, 3 = modify account short-stock margin ratio (used on the short-stock page).

audit_frontend_resourceobject

Frontend Audit Log Metadata. Not a business field; used for backend audit-log display. The front end always sends { filename: uploaded file name, $behavior: operation description, $action: 'bulk_add', service: 'data.porter' }.

Responses

HTTP 200No confirmable field definitions are available for the response yet.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

Whale Docs