Inspiration

I've been part of the Web3 space for nearly a decade, contributing to open-source projects and building systems that aim to make decentralized technologies more accessible and useful. One of my most meaningful contributions was to MOSIP.io, an open-source digital identity platform backed by the Gates Foundation and UNDP. You can find more of my work on GitHub: .aiham

Over time, I got deeply involved in crypto trading — especially futures. Like many, I experienced losses due to inconsistent signals, poor timing, and emotional decisions. That frustration inspired me to build something smarter. I wanted to create an AI agent that could help people trade more intelligently and avoid the mistakes I made.

That’s how XashAI started — an AI-powered trading agent designed to automate and optimize futures trading decisions.

What it does

XashAI is an AI trading agent that connects to Binance Futures and helps users trade based on data, not emotions. It fetches market data in real time, processes signals, predicts price movement, and places trades automatically when confidence is high.

It uses a combination of deep learning and reinforcement learning (RL) to analyze historical and live data. The goal is to identify trades with favorable risk-to-reward ratios and execute them with minimal human intervention.

The system also includes a clean React frontend that displays live signals, trading metrics, confidence scores, and AI analysis — making it easy for users to understand why a trade is happening.

How I built it

The frontend was built with React and Tailwind CSS, optimized for clean presentation and real-time updates.

The backend runs on FastAPI with native WebSocket support, ensuring low-latency communication between the AI engine and the UI. The signal generation engine pulls data from multiple APIs, aggregates it, and feeds it into the prediction model. When the confidence threshold is met, the agent places a trade via Binance’s Futures API.

I trained the AI agent using historical OHLCV data, combining AI models for trend forecasting with a reinforcement learning layer that decides optimal entry and exit points based on reward functions tuned to crypto market behavior.

Challenges I faced

One of the hardest parts was getting the AI model to not just predict well, but to act well. Trading isn't just about being right — it's about timing and managing risk. Training the RL agent to understand when not to trade was just as important.

Another major challenge was handling system stability. After restarts or connection losses, the bot had to resume trading without losing state or duplicating trades. I had to ensure proper recovery of WebSocket connections and realignment of trading logic.

Building a real-time trading agent that talks to Binance and syncs with a live frontend also required a lot of debugging and system design to keep everything efficient and reliable.

What I learned

This project helped me grow as both a developer and a trader. I learned how to structure real-time AI pipelines for production, how to build and serve models using FastAPI, and how to create trading logic that adapts to live market conditions.

On the AI side, combining LSTM with reinforcement learning taught me a lot about how to balance prediction with decision-making. And on the product side, I gained insight into what traders actually want to see — simple, trustworthy, data-backed insights.

Most importantly, I learned that solving your own problem can lead to building something that helps others too.

Built With

Share this project:

Updates