Exchange Rate

πŸ“ Introduction


The Exchange Rate function allows users to view and manage exchange rates for different currencies. This function is essential for financial operations, ensuring accurate conversion rates for transactions.

image19HM1PP

πŸ› οΈ Usage


imageWQEX21

Exchange rates can be updated manually or automatically downloaded from the internet. In Vietnam, the default exchange rates are sourced from the Vietcombank API.

To initiate the update process, use the command UpdateRate

image1O91LOE

You also have an option to copy and paste the source exchange table from web into the Transfer In function of the InfoList . CreateRotatedFullStackedConeBar3DChart InfoList

🎫 Notes

If you run the Update Rate at the end of a month, Rates will automatically posted into ChartType_LineStacked Period Rate

🏷️ Data Fields

General

πŸ”‘ TxnId
Automatic id of exchange rate transaction
πŸ“ UpdatingSource
Indicate the source where this rate record is updated from
πŸ“ EffectiveDate
This rate is effective from this date
Rate Info

πŸ“β—Currency πŸ”— Currency
Select one currency code like USD, CAD, VND, which will be converted to base currency
πŸ“ Rate
Conversion Rate of this currency to base currency
πŸ“ ExchangeOperator
Divide or Multiply
Reference

πŸ“ BuyingRate
Reference Buying Rate of this currency
πŸ“ SellingRate

Reference Selling Rate of this currency

πŸ”§ Automatic Update

To automatically update the exchange rate table from the internet using an API provided by SPC, you can use a scheduled task or a cron job to periodically fetch the latest exchange rates and update your database. Here’s a step-by-step guide on how to achieve this:

Step 1: Obtain API Key First, you need to obtain an API key from SPC. This key will be used to authenticate your requests to the API.

Step 2: Set Up API Endpoint Identify the API endpoint provided by SPC for fetching exchange rates. For example, it might look something like this:


https://api.phoebus.app/exchange-rates