This project is a web application that provides sentiment analysis for cryptocurrency projects and includes a real-time TradingView chart. It uses OpenAI's GPT-4 model to analyze sentiment across various sources including social media, market data, and technical analysis.
- Sentiment analysis for any cryptocurrency project (default: DOT/Polkadot)
- Analysis across multiple sources: Twitter, Reddit, and Coinbase
- Provides a sentiment breakdown, overall sentiment, and investment recommendation
- Real-time streaming of AI-generated analysis
- Interactive TradingView chart for visualizing cryptocurrency price data
- Frontend: Next.js with React
- Backend: Next.js API Routes
- AI: OpenAI GPT-4
- Styling: Tailwind CSS
- Charting: TradingView Widget API
Before you begin, ensure you have met the following requirements:
- Node.js (v14 or later)
- npm or yarn
- An OpenAI API key
- Clone the repository:
cd crypto-sentiment-analysis
2.Install the dependencies:
or if you're using yarn:
3.Create a .env.local
file in the root directory and add your OpenAI API key:
-
Start the development server:
or with yarn:
-
Open your browser and navigate to
http://localhost:3000
- Enter the name of a cryptocurrency project in the input field (default is DOT for Polkadot).
- Click the "Analyze Sentiment" button.
- Wait for the AI to generate the sentiment analysis.
- Review the detailed breakdown of sentiment across different sources, overall sentiment, and investment recommendation.
- Interact with the TradingView chart to visualize price data for the selected cryptocurrency.
The project includes a TradingView chart component (TradingViewChart.tsx
) that provides real-time price data visualization for the selected cryptocurrency.
Key features of the TradingView chart:
- Automatically loads and displays chart for the selected cryptocurrency
- Supports symbol changes, allowing users to view different cryptocurrencies
- Includes various chart tools and indicators
- Displays relevant news headlines
To use the TradingView chart in your component:
import TradingViewChart from './path/to/TradingViewChart';
function YourComponent() {
return (
<div>
<TradingViewChart symbol="BTC" />
</div>
);
}
Replace "BTC" with the symbol of the cryptocurrency you want to display.
Contributions to the Crypto Sentiment Analysis project are welcome. Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for providing the GPT-4 model
- TradingView for their charting widget
- Vercel for Next.js and hosting solutions
- The open-source community for various tools and libraries used in this project