This document describes how to integrate the foreign exchange (FX) feature to perform currency conversions between different currencies. The FX process includes two steps: quotation and confirmation, supporting multiple major currencies.
- FX Pre-order (Quotation): This API retrieves real-time exchange rate quotes and generates an FX order.
- Call the FX pre-order API to get an exchange rate quote
- Confirmation must be completed within the quote validity period; otherwise, a new quotation is required
- Returns an FX order number
order_nofor tracking the business process
- FX Confirmation: This API confirms and executes the FX transaction.
- Call the FX confirmation API within the quote validity period
- The
order_noparameter is the FX order numberorder_noreturned from the pre-order
- Query FX Result: This API queries the execution result of an FX transaction.
- Periodically call the query API to obtain the FX result
- The
order_noparameter is the FX order numberorder_noreturned from the pre-order
- FX Result Notification: webhook for receiving asynchronous notifications.
- Listen for callback notifications of type
FOREX - The
order_noin the notification content is the FX order numberorder_noreturned from the pre-order
- Amount Unit Notes
- All amounts use the minimum currency unit
- For example: 100.50 USD should be submitted as 10050
- Exchange Rate Notes
- The exchange rate represents how many units of the buy currency can be exchanged for 1 unit of the sell currency
- Exchange rates are kept to 6 decimal places