Skip to content
Longport Whale
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.

POSThttps://b-api.longbridge.xyz/forex/rate/create

Authorization

AuthorizationstringheaderRequired

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

Request body application/json

channel_namestringrequired

Channel Name. Channel / rate type, a dropdown selection; values come from the manual_forex_change_type dynamic enumeration and are not fixed; for multi-select they are joined into a comma-separated string.

source_fromstringrequired

Rate Source From. Rate source, single-select; values come from the forex_rate_source_v2 dynamic enumeration and are not fixed, e.g. SINGLE (a single currency pair).

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 Frontend Resource. Automatically attached audit fields, containing $behavior (operation description) and $action (fixed value add).

Responses

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

No nested fields

Whale Docs