Skip to content

AshBornCommander/AshBorn-Core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– AshBorn Core

Python Solana Telegram License Status

An autonomous Solana trading intelligence system β€” sniff alpha, execute trades, and control everything through Telegram.


πŸ“– Overview

AshBorn Core is a fully autonomous, multi-threaded Python trading bot built for the Solana ecosystem. It continuously sniffs for emerging token opportunities, evaluates alpha signals through an intelligent brain loop, and executes trades β€” all while being remotely controllable via a Telegram interface or a local command file. Designed for low-latency, always-on operation with clean separation of concerns across its bot, sniffer, and utility layers.


✨ Features

πŸ”Ž Alpha Sniffer

  • Continuously monitors the Solana network for new and trending token activity
  • Runs on a dedicated async event loop for non-blocking, real-time performance
  • Configurable scan intervals and token filters

🧠 Brain (Intelligence Layer)

  • Background task scheduler that evaluates alpha signals from the sniffer
  • Applies configurable logic to determine buy/sell/hold decisions
  • Runs co-located on the same async loop as the sniffer for tight integration

πŸ“² Telegram Remote Control

  • Full bot interface via python-telegram-bot for remote command execution
  • Issue trade commands, query status, and monitor activity from anywhere
  • Runs in its own daemon thread β€” always listening, never blocking

πŸ“„ Local Command File Watcher

  • Monitors command.txt in real time for direct trade instructions
  • Simple human-readable format: e.g., BUY USDC 0.2
  • Useful for local testing, scripting, or fallback control
  • Runs as the main thread's blocking loop

πŸ—‚οΈ Structured Logging

  • Powered by loguru with configurable log levels via .env
  • Colour-coded console output via colorama
  • Log files stored under the logs/ directory

πŸ§ͺ Testnet Support

  • Dedicated testnet/ directory for safe strategy testing before going live
  • Swap between mainnet and testnet via environment config

πŸ› οΈ Tech Stack

Category Technology
Language Python 3.11+
Async Runtime asyncio + threading
Telegram Interface python-telegram-bot 20.7
HTTP Client httpx 0.25 + requests 2.32
Scheduling APScheduler 3.6
Logging loguru 0.7
Configuration python-dotenv
Console Output colorama

πŸ“‚ Project Structure

AshBorn-Core/
β”œβ”€β”€ main.py                    # Boot sequence β€” wires all threads together
β”œβ”€β”€ command.txt                # Local trade command interface (e.g. BUY USDC 0.2)
β”œβ”€β”€ requirements.txt           # Python dependencies
β”œβ”€β”€ .env                       # Environment config (API keys, bot token, log level)
β”‚
β”œβ”€β”€ bot/
β”‚   β”œβ”€β”€ brain.py               # 🧠 Alpha evaluation & background task scheduler
β”‚   β”œβ”€β”€ telegram_bot.py        # πŸ“² Telegram polling bot
β”‚   └── realtime.py            # πŸ‘οΈ command.txt file watcher
β”‚
β”œβ”€β”€ sniffers/
β”‚   └── alpha_sniffer.py       # πŸ”Ž Solana token discovery loop
β”‚
β”œβ”€β”€ config/                    # Configuration files and constants
β”œβ”€β”€ data/                      # Persistent trade/signal data
β”œβ”€β”€ wallets/                   # Wallet management utilities
β”œβ”€β”€ utils/                     # Shared helper functions
β”œβ”€β”€ scripts/                   # Standalone utility scripts
β”œβ”€β”€ testnet/                   # Testnet environment for safe testing
β”œβ”€β”€ logs/                      # Runtime log files
└── archives/                  # Historical trade archives

βš™οΈ Architecture

AshBorn Core runs three concurrent execution paths from a single main() boot sequence:

main()
 β”œβ”€β”€ Thread 1 β€” TelegramThread   β†’ python-telegram-bot polling (daemon)
 β”œβ”€β”€ Thread 2 β€” SnifferThread    β†’ asyncio event loop (daemon)
 β”‚    β”œβ”€β”€ Brain background tasks  (launch_background_tasks)
 β”‚    └── Alpha sniffer loop      (start_sniffer_loop)
 └── Main Thread                 β†’ command.txt watcher (blocking loop)

The sniffer and brain intentionally share the same asyncio event loop β€” this keeps token signal evaluation tightly coupled with discovery without the overhead of inter-thread queues.


πŸš€ Getting Started

Prerequisites

Python 3.11+
A Solana wallet with funded keypair
A Telegram Bot token (via @BotFather)

Installation

# Clone the repository
git clone https://github.com/AshBornCommander/AshBorn-Core.git
cd AshBorn-Core

# Install dependencies
pip install -r requirements.txt

Configuration

Create a .env file in the project root:

BOT_NAME=AshBorn
LOG_LEVEL=INFO
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
SOLANA_RPC_URL=https://api.mainnet-beta.solana.com
WALLET_PRIVATE_KEY=your_wallet_private_key

⚠️ Never commit your .env file. It is listed in .gitignore.

Run

python main.py

You'll see the boot banner:

πŸ€– [AshBorn] is waking up at 2026-04-13T09:00:00 …

πŸ’¬ Command Reference

Telegram Commands

Command Description
/status Check bot health and active threads
/buy <token> <amount> Execute a buy order
/sell <token> <amount> Execute a sell order
/sniff Manually trigger alpha scan
/log View recent activity log

Local Command File (command.txt)

Write a trade command directly into command.txt and the watcher will execute it:

BUY USDC 0.2
SELL SOL 1.5

πŸ”’ Security Notes

  • Wallet private keys are loaded exclusively from environment variables β€” never hardcoded
  • The .gitignore excludes all .env files, wallet files, and log outputs
  • The wallets/ directory is not committed to version control
  • Testnet mode is recommended for all strategy development and testing

πŸ—ΊοΈ Roadmap

  • Multi-wallet support
  • Webhook-based Telegram interface (replace polling)
  • On-chain position tracking dashboard
  • Strategy plugin architecture
  • Docker containerisation for cloud deployment
  • Automated stop-loss / take-profit logic

πŸ‘¨β€πŸ’» Developer

Pavan Kumar Malladi Data Engineer & Systems Developer Phoenix, Arizona


πŸ“„ License

This project is licensed under the MIT License.


Built for speed, autonomy, and precision β€” AshBorn never sleeps. ⚑

About

πŸ€– AshBorn Core β€” An autonomous Solana trading intelligence system. Sniffs alpha, evaluates signals, executes trades, and is fully controllable via Telegram or local command file. Built with Python, asyncio & python-telegram-bot.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages