Skip to content

Latest commit

ย 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

โšก Cortex AI โ€” Trading Bot

Live Scanner Non-Custodial Open Source

License Platform Python Node.js

Cortex AI Banner

โšก Cortex AI โ€” Cross-Exchange Arbitrage and Market Automation Framework

Open-source execution engine for detecting and acting on price spreads across CEX and prediction markets

๐Ÿ“– What Is Cortex AI?

Website

Cortex AI is an open-source, non-custodial framework for building and running automated arbitrage strategies. It connects to multiple exchanges through read and write API keys, monitors order books in real time, and executes trades locally on your machine with no third-party custody and no cloud dependency.

If you have been searching for a free crypto arbitrage bot on GitHub that you can actually inspect, modify, and run on your own hardware, this project is built for exactly that. It is not a closed-source ai trading app that hides its logic behind a subscription. It is a transparent, developer-friendly alternative for traders who want to understand what their bot is doing.

The project is designed for traders and developers who want full control over their execution logic. You configure the venues, define the spread thresholds, and decide when to act. Cortex AI handles the monitoring, risk checks, and order routing. You can connect it to Binance, Bybit, OKX, Gate, Bitget, or any exchange with a public API, and you can run it as a pure scanner or as a live execution engine.

For those looking for an ai trading bot that combines automation with optional intelligence, Cortex AI supports pluggable AI models including Claude AI, Gemini, and OpenAI-compatible endpoints. The AI layer is entirely optional. If you prefer rule-based arbitrage, you can run the framework without any AI provider at all.

What it is not: It is not a profit guarantee, not a managed fund, and not a signal-selling service. All configuration and financial outcomes remain your own responsibility.

Core capabilities:

  • ๐Ÿ“ก Real-time spread scanner monitors BTC, ETH, TON, SOL and other pairs across multiple exchanges simultaneously
  • โšก Low-latency order routing with local execution and minimal overhead
  • ๐Ÿง  Optional AI-assisted signal filtering integrates with Claude, Gemini, and OpenAI-compatible APIs for sentiment and volatility context
  • ๐Ÿ” Non-custodial key vault stores API keys locally with no withdrawal permissions required
  • ๐Ÿ›ก๏ธ Risk controls include configurable slippage limits, MEV protection, and per-trade caps
  • ๐Ÿ“Š Live dashboard shows P&L tracking, trade history, and spread heatmaps
  • ๐Ÿ”ง Modular architecture makes it easy to add new exchanges, custom strategies, or alternative data sources
graph TD
    A[Order Book Stream] --> B(Scanners: Binance/Bybit/OKX)
    B --> C{Spread Calculator}
    C -->|Spread > Threshold| D[Risk & Slippage Check]
    C -->|Optional| E[LLM Sentiment Filter]
    E --> D
    D -->|Passed| F[Local Execution Router]
    F --> G[Exchange APIs]

Loading

๐Ÿ†š Why Cortex AI Stands Out

Feature Cortex AI Manual Arbitrage Signal Groups Closed-Source Bots
Open Source โœ… Full code access โ€” โŒ No โŒ No
Non-Custodial โœ… Keys stay local โœ… Yes โŒ Funds held โš ๏ธ Varies
Multi-Exchange โœ… 4+ venues โš ๏ธ Manual โŒ No โœ… Some
AI Signal Layer โœ… Optional โŒ No โš ๏ธ Vague claims โŒ Rare
Local Execution โœ… Yes โœ… Yes โŒ Cloud only โš ๏ธ Varies
Configurable Risk โœ… Full control โœ… Manual โŒ No โš ๏ธ Limited
Transparent Fees โœ… No hidden cuts โœ… No fees โŒ Subscription โš ๏ธ Varies
Free Forever โœ… MIT License โœ… Free โŒ Paid โš ๏ธ Freemium

If you have been searching for a free crypto arbitrage bot github project that does not hide its code, Cortex AI is built for exactly that. Unlike closed-source ai trading apps that ask for your API keys and hold your funds, this framework keeps everything local and transparent.

๐Ÿ”ฅ Key Features

๐Ÿ“ก Real-Time Scanner

  • Simultaneous order-book monitoring across Binance, Bybit, OKX, and HTX
  • Configurable refresh interval with a default of 10 seconds
  • Spread heatmap with historical comparison
  • Supports 16+ trading pairs out of the box
  • Works as a standalone arbitrage scanner even if you never enable live execution

โšก Execution Engine

  • Local order routing with sub-second execution targets
  • Configurable slippage tolerance and max position size
  • Automatic rebalancing between venues
  • Demo mode for testing strategies without capital
  • Compatible with low-latency VPS setups for faster fills

๐Ÿง  AI-Assisted Signals (Optional)

  • Pluggable LLM integration for sentiment and volatility context
  • Supports Claude AI, Gemini, and OpenAI-compatible APIs
  • Signals are advisory only and execution logic remains fully under your control
  • No external data leaves your machine unless you enable it
  • Designed for traders who want an ai trading bot with optional intelligence, not a black box

๐Ÿ” Security and Privacy

  • Non-custodial architecture where API keys never leave your local environment
  • IP whitelisting support for all exchange connections
  • Read-only mode available for monitoring-only use
  • No telemetry, no analytics, no phone-home
  • Safe to test alongside your existing trading tools without conflicts

๐ŸŽฎ Quick Access Configuration

Parameter Description Default
EXECUTION_MODE DEMO or LIVE DEMO
SCAN_INTERVAL Order-book refresh rate in ms 10000
MAX_SLIPPAGE Maximum acceptable slippage in percent 0.15
MIN_SPREAD Minimum spread to trigger alert in percent 0.10
MAX_POSITION Maximum position size per trade in USDT 100
AI_SIGNALS Enable LLM-based signal filtering false
All parameters are configured in the .env file and can be changed without editing code.

๐Ÿš€ Installation

โšก Quick and easy โ€” takes less than 2 minutes!

Prerequisites:

  • Python 3.11+
  • Node.js 20+ for the optional MCP server
  • Exchange API keys with read and write permissions, IP whitelisted

Step 1 โ€” Clone the repository:

git clone https://github.com/cortex-ai-lab/cortex-ai-trading-bot.git
cd cortex-ai-trading-bot
pip install -r requirements.txt
npm install
cp .env.example .env

Step 2 โ€” Install dependencies:

pip install -r requirements.txt
npm install

Step 3 โ€” Configure your environment:

cp .env.example .env
Edit .env with your API credentials:

env
BINANCE_API_KEY="your-key"
BINANCE_SECRET="your-secret"
BYBIT_API_KEY="your-key"
OKX_API_KEY="your-key"
EXECUTION_MODE="DEMO"
SCAN_INTERVAL=10000
MIN_SPREAD=0.10
MAX_POSITION=100

Step 4 โ€” Run the scanner:

python main.py --mode=scanner
Step 5 โ€” Monitor the dashboard:
Open http://localhost:8080 in your browser to see live spreads and execution logs.

๐Ÿ“ Folder Structure
text
cortex-ai-trading-bot/
โ”œโ”€โ”€ main.py
โ”œโ”€โ”€ config/
โ”‚   โ””โ”€โ”€ .env
โ”œโ”€โ”€ scanners/
โ”‚   โ”œโ”€โ”€ binance.py
โ”‚   โ”œโ”€โ”€ bybit.py
โ”‚   โ””โ”€โ”€ okx.py
โ”œโ”€โ”€ execution/
โ”‚   โ”œโ”€โ”€ router.py
โ”‚   โ””โ”€โ”€ risk.py
โ”œโ”€โ”€ dashboard/
โ”‚   โ””โ”€โ”€ index.html
โ””โ”€โ”€ logs/
    โ””โ”€โ”€ trades.log

โ“ FAQ

โ“ Is this a get-rich-quick AI trading bot?

No. Cortex AI is an open-source AI trading bot, not a profit guarantee. It helps you find and act on price spreads across exchanges like Binance, Bybit, OKX, and HTX, but arbitrage is competitive and carries real financial risk. Many spreads close before execution, and fees can eat into margins. If you are searching for a "free crypto arbitrage bot github" or an "ai trading bot" that prints money, this is not it. This is a developer tool for building and running your own automated arbitrage strategies.

โ“ Will I lose money using this trading bot?

Possibly. Automated crypto trading can result in losses, especially if misconfigured. Use DEMO mode first, understand the logic, and only deploy capital you can afford to lose. This framework is used by traders who want full control over their own execution logic, not by people looking for a passive income machine.

โ“ Do you take a cut of my profits?

No. Cortex AI is fully open-source under the MIT License. There are no subscription fees, no profit sharing, and no hidden cuts. You keep 100 percent of any gains and bear 100 percent of any losses. Unlike many "ai trading app" services that charge monthly fees, this is a free and open alternative.

โ“ Is my money safe with a non-custodial bot?

The bot is non-custodial and never holds your funds. API keys are stored locally on your machine. For maximum safety, use read-only API keys first and disable withdrawal permissions entirely. This architecture is designed for traders who want to connect to Binance, Bybit, OKX, or Gate without giving up control of their capital.

โ“ How often is it updated?

The project is maintained actively. Check the Releases page for the latest version and changelog. New exchange connectors and AI model integrations are added regularly, including support for Claude AI, Gemini, and OpenAI-compatible APIs.

โ“ Does it work on Windows?

Yes. Cortex AI runs on Windows, macOS, and Linux. Python 3.11+ is required. The framework is lightweight enough to run on a local machine, but a low-latency VPS is recommended for live execution.

โ“ Can I use this for stock or forex trading?

The framework is primarily built for crypto exchange APIs. Stock and forex connectors are experimental and may require custom implementation. The core engine is designed around crypto arbitrage and cross-exchange spread detection.

โ“ What if the bot crashes?

The bot logs all activity to logs/trades.log and will attempt to reconnect automatically. However, you should monitor it during active use because no automation is 100 percent reliable. If you are running live strategies, always keep an eye on the dashboard.

โ“ What AI models does Cortex AI support?

Cortex AI is model-agnostic. It can integrate with Claude AI, Gemini, and OpenAI-compatible endpoints for optional signal filtering and market context. The AI layer is advisory only โ€” execution logic remains fully under your control. You can run the bot without any AI provider if you prefer pure rule-based arbitrage.

โ“ Is this a flash loan arbitrage bot?

No. Cortex AI focuses on cross-exchange arbitrage between centralized venues like Binance, Bybit, OKX, and HTX. It does not execute flash loans or on-chain MEV strategies. If you are looking for a flash loan arbitrage bot, this framework is not designed for that use case.

๐Ÿ”ง How It Works

Cortex AI reads public order-book data from connected exchanges, calculates spreads in real time, and presents them in a local dashboard. When a spread exceeds your configured threshold, the bot can either alert you or execute a trade, depending on your EXECUTION_MODE.

This makes it a practical AI trading bot for anyone who wants to build a free crypto arbitrage bot without relying on a closed-source ai trading app. The framework supports connections to major venues including Binance, Bybit, OKX, Gate, and Bitget, and can be extended to any exchange with a public API.

All logic runs locally on your machine. No data is sent to external servers unless you explicitly enable an AI signal provider. If you use Claude AI, Gemini, or OpenAI-compatible models for signal filtering, only the data you choose to send is transmitted. Otherwise, the bot operates fully offline from third-party services.

For developers searching for an open-source trading bot with Python, this project is designed to be readable, modular, and easy to extend. You can add new exchanges, custom risk rules, or alternative AI models without rewriting the core engine.

๐Ÿงน Troubleshooting

Issue Solution
Scanner shows no data Verify API keys are valid and have read permissions
Execution fails Check MAX_SLIPPAGE and MAX_POSITION settings and ensure sufficient balance on both venues
Dashboard not loading Confirm port 8080 is not blocked by firewall
AI signals not working Verify API key for your LLM provider is set and AI_SIGNALS=true
Bot crashes on startup Check Python version is 3.11+ and reinstall dependencies
Exchange connection timeout Check your internet connection and confirm the exchange API is not under maintenance
Spreads appear but no trades execute Ensure EXECUTION_MODE is set to LIVE and that your API keys have write permissions

๐Ÿ“ข Disclaimer

Cortex AI is an open-source software project provided for educational and research purposes only.

Trading cryptocurrencies and other financial instruments involves substantial risk of loss. Past performance of any strategy, whether simulated or live, does not guarantee future results. You are solely responsible for your configuration, your capital, and your outcomes.

Cortex AI operates on a strictly non-custodial basis. We do not manage, store, or have access to your funds, private keys, or API credentials.

Nothing in this repository constitutes financial advice. Use at your own risk.

About

Next-gen AI crypto trading platform & execution framework powered by Claude AI and Google AI models. Real-time sub-50ms HFT order routing, TradingView signals, Bitget & AvaTrade connectors, and native MCP protocol integration for automated cryptocurrency trading.

Topics

Resources

Stars

31 stars

Watchers

14 watching

Forks

Releases

Packages

Contributors

Languages