Skip to content
Exchange Service Control

Add Service Strategy

Create an FX service strategy, used to define a combined rule set of exchange channels, supported currency pairs, service time, and FX mode.

Request parameters

  • Required: is_default, service_strategy, change_type, support_currency, support_currencies, support_currencies_keys, and service_time. channel_name is also required unless service_strategy is BATCH.
  • Optional: is_combine, forex_mode (FX mode), bear_wave (spread-bearing method), currency_prefix, currency_suffix
  • See each field's definition for its format, value range, and business meaning.

Business notes

The strategy defines a combined rule set of exchange channel, supported currency pairs, service time, and FX mode. is_default can mark it as the default strategy.

Risk warning

This operation creates an FX strategy and may affect the FX service available to customers. Confirm the parameters before calling.

Result

On success the FX strategy is created; see the 200 response definition for the returned content.

POSThttps://b-api.lbkrs.com/forex/service_strategy_add

Authorization

AuthorizationstringheaderRequired

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

Permission

lb_hk_conversion.exchangeserve_update

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

Request body application/json

is_defaultstringrequired

Whether this is the default strategy. Pass a key from the forex_is_default data dictionary (GET /v1/datasets/refs/forex_is_default), not a boolean.

DEFAULT marks the default strategy; in that case the Admin console fixes change_type to 0.

change_typestringrequired

change_type.

Allowed values: 0 All, 1 Large-amount exchange, 2 Small-amount exchange (within the pool), 3 Small-amount exchange (beyond the pool)

Values
0
All
1
Large-amount exchange
2
Small-amount exchange (within the pool)
3
Small-amount exchange (beyond the pool)
service_strategystringrequired

Service strategy. Pass a key from the forex_service_strategy data dictionary (GET /v1/datasets/refs/forex_service_strategy).

When the value is BATCH, the Admin console does not send channel_name.

channel_namestring

Exchange channel. Pass a key from the can_exchange_channel_configs data dictionary (GET /v1/datasets/refs/can_exchange_channel_configs). Required unless service_strategy is BATCH.

support_currencyarray<string>required

An array of supported currency pairs, each a USD/HKD-style string (assembled from each item's currency_prefix/currency_suffix in support_currencies).

The candidate currency pairs come from the supported currency-pair list returned by POST /forex/query_support_currency.

support_currenciesarray<object>required

The same currency pairs as support_currency, in the same order, as objects. Currency codes come from the global_currency_for_exchange data dictionary.

Child attributes
currency_prefixstringrequired

Source currency of the pair, such as USD.

currency_suffixstringrequired

Target currency of the pair, such as HKD.

support_currencies_keysarray<integer>required

Zero-based index of each entry in support_currencies. For two currency pairs, pass [0, 1].

service_timestringrequired

Service time, as a JSON string with time_zones and time_rule:

  • time_zones: hk_trade_day (Hong Kong trading days), calendar_day (calendar days), or week (by weekday).
  • For hk_trade_day and calendar_day, time_rule is a string of one or more HH:mm:ss-HH:mm:ss ranges joined by &, for example "09:00:00-12:00:00&13:00:00-16:00:00".
  • For week, time_rule is an array of {week_interval, time_interval} objects. week_interval is start-end with 1 (Monday) to 7 (Sunday), for example "1-5"; time_interval uses the same range format as above.
is_combineboolean

Boolean flag for is combine.

Boolean values:

  • true - The condition applies
  • false - The condition does not apply
forex_modestring

forex_mode. The set of accepted values could not be confirmed from the frontend; refer to the backend definition.

bear_wavestring

bear_wave. The set of accepted values could not be confirmed from the frontend; refer to the backend definition.

currency_prefixstring
currency_suffixstring

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