AI-Powered Crypto Trading Assistant
This is Team Avalanche's submission, which secured second place in the Qube Trading and Research Challenge at HackTheBurgh XI.
-
Real-Time Market Insights: Access up-to-date prices, trading volumes, and market sentiment to stay ahead of the curve.
-
Historical Trade Analysis: Review your recent trades with detailed historical data, enabling you to optimize your strategies.
-
Crypto News Integration: Stay informed on the latest developments and regulatory updates that impact your investments.
-
AI Phone Call Support: Get personalised trading advice and real-time market insights through an interactive phone call with the chatbot.
-
Interactive Dashboard: Enjoy a visually engaging dashboard with dynamic charts and trend graphs, providing an all-in-one view of your trading activity and market trends.
Our system integrates multiple APIs and frameworks to provide real-time cryptocurrency insights, trading functionalities, and interactive chatbot capabilities.
- Python
- Typescript
- CSS
- CoinGecko API - Fetches real-time market data, including cryptocurrency values and market trends.
- Crypto News API - Provides the latest cryptocurrency news to keep users informed about market changes.
- OpenAI API – Incorporates GPT-4o-mini for enhanced chatbot capabilities.
- Twilio API – Enables real-time voice-based interaction with the chatbot via phone calls
- FastAPI WebSocket - Enables real-time interactions between the OpenAI chatbot and backend.
- Flask Server – Manages function calling and integration between the chatbot, APIs, and external services.
We implemented six custom function calls to build the chatbot’s capabilities:
get_price
- Retrieves the current price of a specified cryptocurrency based on its coin ID (e.g.,"bitcoin"
).get_trend
- Fetches historical data for a given cryptocurrency to allow trend analysis.compare_trends
- Compares trends across multiple cryptocurrencies to identify patterns and market movements.get_summary
- Generates a brief summary of overall market conditions using available data.make_trade
- Enables the execution of trades for specified cryptocurrencies.give_advice
- Provides trade recommendations based on historical performance and market trends.
- Flask Backend - Manages function calling and integration between the chatbot and external APIs.
- FastAPI WebSocket - Facilitates real-time data exchange between the OpenAI chatbot and the backend.
We integrated OpenAI function calls with Twilio API, allowing users to interact with the chatbot via phone calls. This feature provides real-time market insights and trade recommendations through a voice-based interface.
We built a dashboard using Typescript and CSS to visualise personalised real time Cryptocurrency and transaction data.
Follow these steps to run the project locally. The dashboard is divided into two parallel components:
- Backend: Built with Python
- Frontend: Managed via Node.js
-
Install Dependencies:
Ensure you have Python installed. Then, run the following command to install the necessary dependencies:pip install -r requirements.txt
-
Run the Backend: Start the backend server by executing the command:
python backend.py
-
Install Node Modules: Navigate to the frontend directory and install the required dependencies:
npm install
-
Run the Frontend: Start the frontend development server with the following command:
npm run dev
Both the frontend and backend should be run in parallel to ensure the application functions correctly.
python chatbot/chat_manager.py