This is a web application that compares foreign exchange rates from different banks in China. Users can select a currency and view the buying and selling rates for that currency at various banks. The app also provides a currency conversion feature that calculates the potential savings by comparing the best and worst selling rates.
- Select from a list of currencies (USD, HKD, JPY, GBP, EUR, AUD, CAD, SGD)
- Display the buying and selling rates for the selected currency at different banks
- Highlight the best buying rate and the best selling rate
- Convert an amount in RMB to the selected currency using the best and worst selling rates
- Calculate the potential savings by comparing the best and worst selling rates
- Update the exchange rates by clicking the "Update" button
- Python 3.7+
- Flask
- requests
- Clone the repository:
git clone https://github.com/...
- Change to the project directory:
cd forex-comparison-app
- Install the required dependencies:
pip install -r requirements.txt
- Create and write your APP CODE into
keys.py
file:
Buy the APP CODE from Aliyun
ALI_APP_CODE = "your_app_code"
- Start the server:
uvicorn forex_server:app --host 0.0.0.0 --port 80
-
Open a web browser and navigate to
http://localhost
(or the appropriate IP address if running on a remote server). -
Select a currency from the dropdown menu to view the exchange rates.
-
Enter an amount in RMB and select banks from the dropdown menus to compare the conversion rates and potential savings.
-
Click the "Update" button to fetch the latest exchange rates.
Feel free to submit pull requests or open issues if you find any bugs or have suggestions for improvements.
This project is open-source and available under the MIT License.