Skip to content
Client Contract

Create Exchange Contract V2

Create Exchange Contract V2.

Request parameters

  • Required: trade_date (Trade Date), counter_id (Counter ID), direction (Direction), currency (Trade Currency), aaid (A/C No.), settlement_channel (Settlement Channel), open_close (Open/Close), position (Position), trade_dones (Trade Done List)
  • Optional: settlement_account (Settlement Account), stage (Trade Stage), order_source (Order Source), custodian_id (Custodian ID), expected_equity_settlement_date (Expected Equity Settlement Date), expected_balance_settlement_date (Expected Balance Settlement Date), currency_setl (Settlement Currency), trade_to_setl_exchange_rate (Trade to Settlement Exchange Rate), otcr_flag (OTCR Flag), biz_type (Biz Type), issue_price (Issue Price)
  • See each field for its format, allowed values, and business meaning.

Result

On success, the endpoint completes the operation. See the 200 response schema for returned data and subsequent state information.

POSThttps://b-api.lbkrs.com/v2/billing/exchange_contract

Production: https://b-api.lbkrs.com · Test: https://b-api.longbridge.xyz

Authorization

AuthorizationstringheaderRequired

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

Permission

lb_hk_clearing.contract_manage_edit

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

Request body application/json

trade_datestringrequired

Trading date associated with this request. Use the date format defined by the API. This field is required.

counter_idstringrequired

Counter ID associated with this request.

directionstringrequired

Direction of this business operation. This field is required.

currencystringrequired

This field is required.

aaidstringrequired

Specifies A/C No.. This field is required.

settlement_channelstringrequired

This field is required.

settlement_accountstring
stagestring
order_sourcestring
custodian_idstring

Custodian ID associated with this request.

expected_equity_settlement_datestring
expected_balance_settlement_datestring
currency_setlstring
trade_to_setl_exchange_ratestring
otcr_flagstring
open_closestringrequired

Specifies Open/Close. This field is required.

OPEN · OpenCLOSE · Close

positionstringrequired

Specifies Position. This field is required.

LONG · LongSHORT · Short

biz_typestring

Identifies the business scenario to which this request applies.

issue_pricestring

Used when the instrument type is BOND.

trade_donesarray<string>required

Each item contains order_seq (front-office order number) / quantity / amount / per_value (par value per share) / ibond_interest (accrued interest) / price.

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