AI-powered market analysis for currency pairs with Hono.js, Cloudflare Workers and Twilio
Tags: devchallenge, twiliochallenge, ai, twilio
Published: 2024-06-22 21:17:03

*This is a submission for [Twilio Challenge v24.06.12](https://dev.to/challenges/twilio)*

## What I Built
Nomisma is a cutting-edge AI-driven application that delivers real-time market analysis and updates on currency pairs directly to your WhatsApp. This innovative tool leverages the power of Hono.js, Twilio serverless functions, WhatsApp API, and Cloudflare Workers AI to provide users with timely and insightful financial information.

### Key Features:

- Real-Time Market Analysis: Receive the latest updates on currency pairs, including bid, ask, and mid prices. Detailed analysis to help you make informed decisions on currency trading.

- WhatsApp Integration: Get all your updates and analysis sent directly to your WhatsApp for convenient and immediate access. Ensures you are always in the loop, no matter where you are.

- User-Friendly Interface: Simple and intuitive UI for setting up your preferences and managing notifications. Built using Hono.js for a smooth and responsive user experience.

- Serverless and Scalable: Utilizes Twilio's serverless functions for efficient and scalable communication handling. Cloudflare Workers AI ensures robust and fast processing of market data and analysis.

### Use Cases:

- Traders: Stay updated with the latest market trends and data for informed trading decisions.
- Financial Analysts: Get regular insights into currency pairs to aid in market research and analysis.
- Investors: Receive timely updates on currency pairs to monitor investments and market movements.

## Demo
<!-- Share a link to your app and include some screenshots here. -->
{% embed https://github.com/DesmondSanctity/tyche-nomisma %}

![home-page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xy01oir0o8ud8mufe8t9.png)

![select-pair](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ltmvdokb3b6i35g4c3r0.png)

![chart-n-scheduler](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v5bbmlbh2xdys9nqb7pr.png)

![whatsapp-message](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c2374z430rgi2u0tofzh.png)

You can find the live solution here - [Nomisma](https://tyche-nomisma.0xanon.workers.dev)

## Twilio and AI
How It Works...

### Setup:
- Users sign up and provide their WhatsApp number for receiving notifications.
- Select the currency pairs you are interested in and the intervals at which you want to receive updates.

### Notification and Analysis:
- The AI processes market data and generates insightful analysis for the selected currency pairs.
- Notifications are sent to your WhatsApp, ensuring you have accurate information at your fingertips.

### Technology Stack:
- Hono.js: Provides a fast, flexible, and scalable web framework for building the application.
- Twilio ([Serverless Functions](https://www.twilio.com/docs/serverless) & [WhatsApp API](https://www.twilio.com/docs/whatsapp/quickstart)): Handles the communication and delivery of notifications via WhatsApp.
- Cloudflare Workers AI: Ensures efficient data processing and AI-driven market analysis. I used the [@cf/meta/llama-3-8b-instruct](https://developers.cloudflare.com/workers-ai/models/llama-3-8b-instruct/) for the analysis generation.

## Additional Prize Categories
This submission qualifies for:
- Twilio Times Two: I used Twilio serverless function to host the messaging service to make it easily scalable when there are many users. I also used the WhatsApp API for the communication between the app and the users.
- Impactful Innovators: This app is very innovative for getting deep market insight and analysis using AI and APIs that offer historical data. It can be used by traders, investors, and analysts to keep up to date with fundamental, technical, and trend analysis without having to do much work.