This web application displays a live, interactive candlestick chart of the SOL/GMT exchange rate. It's built using Python, Flask, Plotly, and yfinance, and is deployed on Render (or Heroku) for 24/7 availability.
- Interactive Candlestick Chart: Uses Plotly to create a dynamic chart that allows users to zoom, pan, and hover over data points for details.
- Automated Data Fetching: Fetches historical price data for SOL-USD and GMT-USD from Yahoo Finance using the
yfinancelibrary. - SOL/GMT Calculation: Calculates the SOL/GMT exchange rate from the fetched data.
- Web Application: Built with Flask, a lightweight Python web framework, to serve the chart as a web page.
- Cloud Deployment: Deployed on Render (recommended) or Heroku for continuous availability.
sol-gmt-candlestick-chart/ ├── app.py # Main Flask application ├── requirements.txt # Python dependencies ├── templates/ │ └── index.html # HTML template for displaying the chart └── static/ └── style.css # (Optional) CSS for styling
- Python 3.7+
- pip (Python package installer)
- Git
- A Render account (recommended) or a Heroku account. A GitHub account is also highly recommended for easier deployment.
-
Clone the repository:
git clone https://github.com/YOUR_GITHUB_USERNAME/sol-gmt-candlestick-chart.git # Replace with your repo URL cd sol-gmt-candlestick-chart
-
Create a virtual environment (recommended):
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Run the application:
python app.py
The app will be accessible at
http://127.0.0.1:5000(or a similar local address) in your web browser.
-
Create a Render Account: Sign up at https://render.com/.
-
Push your code to GitHub.
-
Create a New Web Service on Render:
- Connect your GitHub repository.
- Name: Choose a name (e.g.,
sol-gmt-chart). - Environment:
Python 3. - Branch: Your main branch (e.g.,
main). - Build Command:
pip install -r requirements.txt - Start Command:
gunicorn app:app - Instance Type: Free
- Advanced:
- Add an environment variable:
FLASK_ENVwith a value ofproduction. - Add a second environment variable:
PORTwith value of8080.
-
Deploy: Click "Create Web Service". Render will provide you with a URL.
- Create a Heroku Account: Sign up at https://www.heroku.com/.
- Install Heroku CLI: https://devcenter.heroku.com/articles/heroku-cli.
3 Login to Heroku CLI:
heroku login - Create a
Procfile: (If not already present) In your project's root, createProcfilewith:web: gunicorn app:app - Initialize git:
git init,git add .,git commit -m "Initial" - Create a Heroku App:
heroku create your-app-name - Set Environment Variable:
heroku config:set FLASK_ENV=production - Deploy:
git push heroku main - Open the App:
heroku open
Feel free to open issues or submit pull requests for bug fixes, enhancements, or new features.
This project is licensed under the MIT License - see the LICENSE file for details. (You'll need to create a LICENSE file and put the MIT License text in it.)