# CryptoWise: Intelligent Trading and Insights Platform

## Inspiration

The inspiration for CryptoWise stemmed from the dynamic and often unpredictable nature of the cryptocurrency market. We recognized the need for a comprehensive platform that not only provides real-time data but also offers intelligent insights and automated trading capabilities. Our goal was to empower traders, researchers, and enthusiasts with tools that enhance decision-making and streamline trading processes.

## What it does

CryptoWise is an all-in-one platform designed to revolutionize the cryptocurrency trading experience. It offers:

* **Real-Time Data Visualization:** Users can view up-to-the-minute cryptocurrency values and trends through interactive charts.
* **Intelligent Query Handling:** A chatbot integrated with advanced LLM technology answers queries related to real-time, historical, and generic cryptocurrency data.
* **Automated Trading:** The platform includes a predictive model that suggests Buy, Sell, or Hold actions based on real-time data analysis, with the capability to execute trades automatically when conditions are met.

## How we built it

We built CryptoWise using a combination of cutting-edge technologies:

* **Data Acquisition:** Integrated WebSocket APIs to fetch real-time cryptocurrency data, which is stored in SingleStore Database for fast retrieval and analytics.
* **Visualization:** Used SingleStore's analytics API to create dynamic charts that display changing market trends.
* **Chatbot Integration:** Leveraged the GROQ API and OpenAI 3.5 Turbo model to develop a chatbot capable of handling complex queries about cryptocurrency.
* **Predictive Modeling:** Developed a model trained on real-time and historical data from Kraken's WebSocket and OHLC APIs to make trading decisions.
* **Automated Trading with Smart Contracts:** Utilized smart contracts for executing trades securely. MetaMask authentication ensures secure access to users' wallets using private keys. Initially planned integration with Fetch.ai's agent-based tools faced challenges due to technical integration complexity and resource allocation constraints.

## Challenges we ran into

Throughout the development of CryptoWise, we faced several challenges:

* **Data Integration:** Ensuring seamless integration of real-time data from multiple sources was complex and required robust solutions.
* **Model Training:** Continuously training the predictive model on diverse datasets to maintain accuracy was demanding.
* **User Interface Design:** Creating an intuitive and user-friendly interface that effectively displays complex data was challenging but crucial for user engagement.
* **Agent-Based Trading Integration:** The complexity of integrating Fetch.ai's agents with our existing infrastructure proved challenging, along with resource limitations.

## Accomplishments that we're proud of

We are proud of several key accomplishments:

* **Seamless Data Flow:** Successfully integrated various data sources into a cohesive platform that delivers real-time insights.
* **Advanced AI Integration:** Implemented a sophisticated chatbot that enhances user interaction with accurate and relevant responses.
* **Automated Trading Feature:** Developed an automated trading system using smart contracts that executes trades based on predictive analytics, offering users a competitive edge.

## What we learned

The development of CryptoWise taught us invaluable lessons:

* **Importance of Data Accuracy:** Real-time accuracy is critical in financial applications, necessitating rigorous testing and validation.
* **AI Capabilities:** Leveraging AI for query handling and decision-making can significantly enhance user experience and platform functionality.
* **User-Centric Design:** Designing with the user in mind is essential for creating an engaging and effective interface.

## What's next for CryptoWise: Intelligent Trading and Insights Platform

Looking ahead, we plan to expand CryptoWise's capabilities by:

* **Enhanced Predictive Analytics:** Further refining our models to improve prediction accuracy and broaden the range of supported cryptocurrencies.
* **User Personalization:** Introducing features that allow users to customize their experience based on individual preferences and trading strategies.
* **Community Engagement:** Building a community around CryptoWise where users can share insights, strategies, and feedback to continuously improve the platform.

CryptoWise aims to set a new standard in cryptocurrency trading by combining powerful analytics with intuitive design, making it an indispensable tool for anyone involved in the crypto market.

# API Documentation

## Overview

This section provides details about the various API endpoints used in the CryptoWise platform, categorized according to their role in the architecture.

## Automated Trading

* **Automated Purchase Endpoint**
	+ **URL:** `http://146.190.123.50:4000/api/simulate-purchase`
	+ **Purpose:** Simulates the purchase of cryptocurrency based on model predictions.

## Query Handling

* **Query to LLM**
	+ **URL:** `http://146.190.123.50:4000/query`
	+ **Purpose:** Sends user queries to the LLM for categorization and response generation.

## Data Acquisition

* **Kraken WebSocket API**

	+ **URL:** `wss://ws.kraken.com/`
	+ **Purpose:** Provides real-time cryptocurrency data for live updates.
* **Historical Data**

	+ **URL:** `https://api.kraken.com/0/public/OHLC`
	+ **Purpose:** Fetches historical price data for cryptocurrencies.

## Machine Learning

* **ML Prediction API**
	+ **URL:** `http://146.190.123.50:5000/prediction`
	+ **Purpose:** Provides predictions on Buy, Sell, or Hold actions based on real-time data analysis.

## Analytics

* **Bollinger Bands**

	+ **URL:** `http://146.190.123.50:4000/api/analytics/bollinger-bands?coin=XBT&period=20&stdDev=2`
	+ **Purpose:** Calculates Bollinger Bands for specified cryptocurrency and period.
* **Historical Volatility**

	+ **URL:** `http://146.190.123.50:4000/api/analytics/historical_volatility?coin=XBT`
	+ **Purpose:** Computes historical volatility for the specified cryptocurrency.
* **Stats**

	+ **URL:** `http://146.190.123.50:4000/api/analytics/stats`
	+ **Purpose:** Provides statistical analysis of cryptocurrency data.
* **Candle Data**

	+ **URL:** `http://146.190.123.50:4000/api/analytics/get_candle_data?coin=XBT`
	+ **Purpose:** Retrieves candlestick data for detailed market analysis.
## Inspiration

GET RICH QUICK!

## What it does

Do you want to get rich? Are you tired of the man holding you down? Then, WeakLink.Ai is for you! Our app comes equipped with predictive software to suggest the most beneficial stocks to buy based off your preferences. Simply said, a personal stock broker in your pocket.

## How we built it

Weaklink.Ai front end is built using the Dash framework for python. The partnered transactions are preformed with the assistance of Standard Library where our back end calculation engine uses modern machine learning techniques to make decisions about the best time to buy or sell a specific stock. Confirmation is sent to the user's mobile device via Twilio. Upon confirmation the workflow will execute the buy or sell transaction. The back end engine was custom built in python by one of our engineers.

## Challenges we ran into

It was difficult to scrape the web for precise data in a timely and financially efficient fashion.
It was very challenging to integrate Blockstack into a full python environment.
The front end design was reformatted several times.
There was some learning curves adjusting to never before seen or used api.
Finding financially efficient solutions to some api

## Accomplishments that we're proud of

Despite the various challenges we are proud of our project. The front was more visually appealing than anticipated. The transition from back end calculations to visual inspection was relatively seamless. This was our first time working with each other and we had very good synergy, we were able to divide up the work and support one another along the way each taking part in touching each aspect of the project.

## What we learned

The various api available as well as some of their limitations. We discovered that open source api is often more helpful than a closed source black box. We also learned a lot about data security via Blockstack. Lastly we learned about various ways to interpret and analyze stocks in a quantitative fashion.

## What's next for WeakLink.Ai

There is a lot of work left for us. The most immediate priority would be to set up trend analysis based on historical data of the user followed by more customization options. A place for the user to describe their desires and our machine learning algorithm will take that information into account in order to recommend actions of the user which is in their best interest.
## Inspiration

We have two bitcoin and cryptocurrency enthusiasts on our team, and only of us made money during its peak earlier this month. Cryptocurrencies are just too volatile, and its value depends too much on how the public feels about it.
How people think and talk about a cryptocurrency affects it price to a large extent, unlike stocks which also have the support of the market, shareholders and the company itself.

## What it does

Our website scrapes for thousands of social media posts and news articles to get information about the required cryptocurrency. We then analyse it using NLP and ML and determine whether the price is likely to go up or down in the very near future.
We also display the current price graphs, social media and news trends (if they are positive, neutral or negative) and the popularity ranking of the selected currency on social platforms.

## How I built it

The website is mostly built using node.js and bootstrap. We use chart.js for a lot of our web illustrations, as well as python for web scraping, performing sentimental analysis and text processing. NLKT and Google Cloud Natural Language API were especially useful with this. We also stored our database on firebase.
**Google Cloud**: We used firebase to efficiently store and manage our database, and Google Cloud Natural Language API to perform sentimental analysis on hundreds of social media posts efficiently.

## Challenges I ran into

It was especially hard to create, store and process the large datasets we made consisting of social media posts and news articles. Even though we only needed data from the past few weeks, it was a lot since so many people post online. Getting relevant data, free of spam and repeated posts, and actually getting useful information out of it was hard.

## Accomplishments that I'm proud of

We are really proud that we were able to connect multiple streams of data, analyse them and display all relevant information. It was amazing to see when our results matched the past peaks and crashes in bitcoin price.

## What I learned

We learned how to scrape relevant data from the web, clean it and perform sentimental analysis on it to make predictions about future prices. Most of this was new to our team members and we definitely learned a lot.

## What's next for

We hope to further increase the functionality of our website. We want users to have an option to give the website permission to automatically buy and sell cryptocurrencies when it determines it is the best time to do so.

## Domain name

We bought the domain name get-crypto-insights.online for the best domain name challenge since it is relevant to our project. If I found a website of this name on the internet, I would definitely visit it to improve my cryptocurrency trading experience.

## About Us

We are Discord team #1, with @uditk, @soulkks, @kilobigeye and @rakshaa