Skip to content
Market

Manage Clearing Markets

Create/edit/delete of a clearing market share one endpoint, distinguished by action_in (1 = add, 2 = delete, 3 = modify). It changes real market-configuration data.

Request parameters

  • Required: action_in (Action Type), id (Market Record ID)
  • Optional: market (Market), currency (Currency), overnight_flag (Overnight Market Flag), custodian_id (Custodian ID), sub_position_no (Custodian Sub Position No.), balance_back_n (Cash Settlement Tn), equity_back_n (Equity Settlement Tn), main_flag (Main Market Flag), otc_flag (OTC Market Flag), use_public_stock_info (Use Public Stock Info), busin_flow_id (Business Flow ID)
  • See each field for its format, allowed values, default behavior, and business meaning.

Result

On success, the endpoint completes the described business operation. See the 200 response schema for returned data.

POSThttps://b-api.longbridge.xyz/clearing/markets

Authorization

AuthorizationstringheaderRequired

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

Request body application/json

action_instringrequired

Enum: 1=Add, 2=Delete, 3=Modify.

Allowed values:

  • 1 - Add
  • 2 - Delete
  • 3 - Modify

1 · Add2 · Delete3 · Modify

idnumberrequired

0 on add (may be omitted); the existing record ID on edit/delete.

marketstring

Values come from the clearing_markets_all dynamic enumeration.

Call GET /v1/datasets/refs/clearing_markets_all to retrieve the current data dictionary, and use the returned entry's key as this field's value.

currencystring

Settlement currency of the market.

USD · USDHKD · HKDSGD · SGDCNY · CNYAUD · AUDJPY · JPYGBP · GBPEUR · EURCNH · CNH

overnight_flagnumber

Whether this is an overnight market.

0 · No1 · Yes

custodian_idnumber

Values come from the clearing_custodians dynamic enumeration.

Call GET /v1/datasets/refs/clearing_custodians to retrieve the current data dictionary, and use the returned entry's key as this field's value.

sub_position_nostring

Values come from the custodian_sub_positions dynamic enumeration.

Call GET /v1/datasets/refs/custodian_sub_positions to retrieve the current data dictionary, and use the returned entry's key as this field's value.

balance_back_nnumber

Number of days the balance is carried back (T+N).

0 · 01 · 12 · 23 · 3

equity_back_nnumber

Number of days equity is carried back (T+N).

0 · 01 · 12 · 23 · 3

main_flagnumber

Whether this is the base (main) market for clearing.

0 · No1 · Yes

otc_flagnumber

OTC day-end processing mode for the market.

0 · Normal Day-End Tasks1 · Simplified Day-End Tasks For OTC2 · Non-Day-End Process99 · Disabled

use_public_stock_infonumber

Whether the market depends on the public stock information library.

0 · Independent On Public Stock Information1 · Dependent On Public Stock Information

busin_flow_idnumber

Filled in when a day-end process is selected; empty otherwise.

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