Skip to content
Currency Exchange

Submit Reserved Currency Exchange

Submits a currency exchange request whose funding can be topped up by automatic MMF redemption. When the Broker enables automatic MMF redemption for currency exchange, the Broker App submits exchanges through this endpoint instead of POST /v1/forex/convert; any part of the source amount beyond the exchangeable cash is covered by redeeming the MMF. Submit by either the source amount (amount) or the target amount (target_amount), not both.

Before submission, show the amounts and the cash/MMF split from POST /v1/forex/calc/multi/estimate/exchange/amount in a confirmation dialog, and submit after the Client confirms. id and reserve_no are mutually exclusive, and the one that does not apply is 0. When querying details with GET /v1/forex/convert/detail or cancelling with POST /v1/forex/front/cancel/exchange, pass reserve_no for a reserved order whose reserve_no is not 0. When in_service is false, tell the Client the estimated completion time from deal_time. On failure, show message to the Client.

When calling through WhaleCore requestService(), set requiresTradeToken to true.

POSThttps://api.lbkrs.com/v1/forex/reserve/convert

Request body application/json

fromstringrequired

Source currency, such as HKD

tostringrequired

Target currency, such as USD

amountstring

Source amount, when submitting by source amount; provide either this or target_amount

target_amountstring

Target amount, when submitting by target amount; provide either this or amount

cancel_on_rate_changeintegerrequired

Exchange rate protection:

  • 0 - Do not act on rate changes
  • 1 - Cancel this exchange automatically if the rate moves by more than 0.3%

The Broker App passes 1 only when the exchange redeems the MMF (mmf_redeem in the estimate is greater than 0) and the Client selects the option; otherwise it passes 0.

Values
0
1
account_channelstringrequired

Broker channel

Responses

HTTP 200The request succeeded. The response body contains the result of the “Submit Reserved Currency Exchange” operation.
Standard response envelopecodemessagedata
dataobjectdata structure
okboolean

Whether the submission succeeded

idinteger

Exchange record id; 0 for a reserved order, which is identified by reserve_no

reserve_nointeger

Reserved order number; 0 when the order is not reserved

is_reservedboolean

Whether a reserved order was created

in_serviceboolean

Whether the request falls within exchange service hours; when false, processing waits until service hours

deal_timestring

Estimated processing completion time, as a Unix timestamp in seconds

Whale Docs