This coin value tracker is a simple single-page application that displays the details of your cryptocurrency holdings on Binance, presented in an interactive graph. The application utilizes the Binance API to fetch real-time data and visualizes it for a quick overview of your coin values.
Follow the steps below to set up and run coin value tracker on your local machine.
- Python 3.x
- Git
-
Clone the repository to your local machine:
git clone https://github.com/Johnny-FTW/my_portfolio.git
-
Navigate to the project directory:
cd my_portfolio -
Install project dependencies:
pip install -r requirements.txt
-
Create a .env file in the project directory and add your Binance API key and secret:
API_KEY='your_api_key' API_SECRET='your_api_secret'
Important Security Note: Do not share or expose your API key and secret. Keep your credentials confidential to prevent unauthorized access to your Binance account and potential security risks. Additionally, refrain from committing the .env file containing your keys to version control systems to ensure the safety of your sensitive information.
- Open config.py and update the assets list with the cryptocurrencies you own:
config = { 'api_key': os.getenv("API_KEY"), 'api_secret': os.getenv("API_SECRET"), 'assets': ['ENS', 'BNB'] # Add your assets here } - Customize the chart appearance by modifying chart_data.js:
// Modify background and hover colors as desired datasets: [{ data: assetKeys.map(key => data[key]), backgroundColor: ["#FFE633", "#33D1FF"], hoverBackgroundColor: ["#F9FF33","#33E0FF"] }]
Run the following command to start the application:
python run.py Open your web browser and visit http://localhost:5000 to view your portfolio.
This project is licensed under the MIT License.
