REKI is a Python-based AI assistant with two modes: an interactive CLI for text to text Fx market analysis use and an automated trading system for FX markets also.
A rich terminal interface for conversing with an AI model, featuring real-time streaming responses and visual enhancements.
REKI-CLI.mp4
- Rich Terminal Interface: Uses the
richlibrary to display a stylized intro, formatted prompts, and Markdown-rendered AI responses. - Streaming Responses: Real-time chat experience with token-by-token streaming.
- Performance Metrics: Displays response time and characters per second (CPS) for each response.
- Custom API Endpoint: Connects to OpenAI-compatible APIs (Novita AI, xAI Grok).
- Model: Uses
gpt-5.1by default.
# Development Mode (Auto-reload)
python run_dev.py
# Direct Run
python reki/main.pyAn autonomous trading agent that analyzes FX markets every any time frame minutes and executes trades based on technical indicators and adaptive aggression strategies.
REKI-AUTO.mp4
- Autonomous 15-Minute Cycles: Analyzes markets and executes trades automatically.
- Adaptive Aggression: Adjusts trading strategy based on market tempo (High/Low).
- MT5 Integration: Direct connectivity to MetaTrader 5 for real-time execution.
- Technical Analysis Tools: Candlestick data, MACD, RSI, EMA indicators for all FX pairs.
- Position Management: Automatic Stop Loss and Take Profit handling.
- Performance Analytics: XAI-powered log analysis for trade review.
# Start the automated trading scheduler
python trading_scheduler.pyImportant: The MT5 service must run on Windows because MetaTrader 5 only supports Windows.
For Mac/Linux Users:
- You need a Windows VPS (Virtual Private Server) to run the MT5 service
- Install MT5 on your Windows VPS
- Run the MT5 service on the VPS:
cd mt5_service install requirements.txt python main.py - Set
MT5_API_URLin your.envto point to your VPS (e.g.,http://YOUR_VPS_IP:8000)
For Windows Users:
- You can run the MT5 service directly on your local machine
- Install MT5 on your Windows PC
- Run the MT5 service locally:
cd mt5_service install requirements.txt python main.py - Set
MT5_API_URLin your.envtohttp://localhost:8000
/root/reki-cli/
├── .gitignore
├── pyproject.toml
├── README.md
├── reki/ # CLI agent code
│ ├── agent.py
│ ├── main.py
│ ├── system_prompt.txt
│ └── trading_system_prompt.txt
├── tools/ # Trading and market tools
├── mt5_service/ # MT5 API service (runs on Windows)
├── trading_scheduler.py # Auto trader entry point
├── trading_logs/ # Trading session logs
└── venv/
-
Install Dependencies:
uv pip install . # OR pip install .
-
Create a
.envfile: See.env.examplefor required API keys.Required Environment Variables:
Variable Description OPENAI_API_KEYAPI key for OpenAI (used for main agent) BRAVE_API_KEYAPI key for Brave Search POLYGON_API_KEYAPI key for Polygon.io (market data) XAI_API_KEYAPI key for xAI (Grok model) XAI_API_BASE_URLBase URL for xAI API (default: https://api.x.ai/v1)XAI_MODELModel name for xAI (e.g., grok-4-fast-reasoning)NOVITA_API_KEYAPI key for Novita AI NOVITA_API_BASE_URLBase URL for Novita AI (default: https://api.novita.ai/openai)NOVITA_MODELModel name for Novita AI (e.g., deepseek/deepseek-v3.2-exp)SERPAPI_API_KEYAPI key for SerpApi (Google Finance) FOREXRATE_API_KEYAPI key for ForexRateAPI (optional) MT5_API_URLURL of your Windows VPS running MT5 API service (e.g., http://YOUR_VPS_IP:8000)