Skip to content
Reference Exchange Rate

Create Reference Exchange Rate

Create a reference exchange rate. On submit the record date is formatted as YYYYMMDD, the multi-selected channels are joined into a comma-separated string, and audit information is attached. This is a data-changing endpoint.

Request parameters

  • Required: channel_name (Channel Name), source_from (Rate Source From), base_currency (Base Currency), other_currency (Other Currency), record_date (Record Date), bid_rate (Bid Rate), offer_rate (Offer Rate), average_rate (Average Rate)
  • Optional: audit_frontend_resource (Audit Context)
  • 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/forex/rate/create

Authorization

Authorizationstringheaderlb_hk_conversion.forex_ib_ratesRequired

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

Request body application/json

channel_namestringrequired

Channel Name. Channel / rate type, a dropdown selection; for multi-select they are joined into a comma-separated string.

Allowed values: MANUAL_CURRENT (Spot rate), MANUAL_ACCOUNT (Ledger rate), CCASS

MANUAL_CURRENTMANUAL_ACCOUNTCCASS

source_fromstringrequired

Rate Source From. Rate source, single-select, e.g. SINGLE (a single currency pair).

Allowed values:

  • CCASS - Auto Follow HKEX
  • SINGLE - Single Transaction Add

CCASSSINGLE

base_currencystringrequired

Base Currency. Base currency, a dropdown selection (currency list, e.g. USD/HKD/CNH).

other_currencystringrequired

Other Currency. Counter currency, a dropdown selection (currency list).

record_datestringrequired

Record Date. Record date, format YYYYMMDD; must not be later than the current time.

bid_ratenumberrequired

Bid Rate. Buy rate, which must be greater than 0 (precision per the currency-pair configuration).

offer_ratenumberrequired

Offer Rate. Sell rate, which must be greater than 0 (precision per the currency-pair configuration).

average_ratenumberrequired

Average Rate. The mid rate, which must be greater than 0 (precision per the currency-pair configuration).

audit_frontend_resourceobject

Audit Context. Automatically attached audit fields, containing $behavior (operation description) and $action (fixed value add).

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