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.longbridge.xyz/v2/billing/exchange_contract

Authorization

Authorizationstringheaderlb_hk_clearing.contract_manage_editRequired

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

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

Specifies Trade Currency. This field is required.

aaidstringrequired

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

settlement_channelstringrequired

Specifies Settlement Channel. This field is required.

settlement_accountstring

Specifies Settlement Sub Position.

stagestring

Specifies Trade Stage.

order_sourcestring

Specifies Order Source.

custodian_idstring

Custodian ID associated with this request.

expected_equity_settlement_datestring

Specifies Expected Equity Settlement Date.

expected_balance_settlement_datestring

Specifies Expected Balance Settlement Date.

currency_setlstring

Specifies Settlement Currency.

trade_to_setl_exchange_ratestring

Specifies Trade to Settlement Exchange Rate.

otcr_flagstring

Specifies OTCR Flag.

open_closestringrequired

Specifies Open/Close. This field is required.

Allowed values:

  • OPEN - Open
  • CLOSE - Close

OPEN · OpenCLOSE · Close

positionstringrequired

Specifies Position. This field is required.

Allowed values:

  • LONG - Long
  • SHORT - Short

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