This repository contains a Python script to fetch and analyze cryptocurrency trades from the Binance exchange. The script fetches all orders for a specified trading pair, processes the data to match buy and sell trades, and calculates profits or losses. The results are saved into an Excel file with enhanced formatting.
NOTE : This script works only if you buy and sell one after the other. It assumes that each buy order is followed by a corresponding sell order.
Python 3.x
binance library
openpyxl library
pip install python-binance openpyxl
git clone https://github.com/abidzzz/binance-journal.git
cd binance-trade-analyzer
Create a file named credentials.txt in the repository directory.
Add your API key and secret, each on a new line:
your_api_key
your_api_secret
Run the script:
python main.py
This project is licensed under the MIT License.
Contributions are welcome! If you find a bug or have an enhancement in mind, feel free to open an issue or submit a pull request.