trading-bot-ml


Nametrading-bot-ml JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/krish567366/bot-model
SummaryAdvanced ML-powered trading bot with real-time market analysis
upload_time2025-08-25 04:43:44
maintainerNone
docs_urlNone
authorTrading Bot Team
requires_python>=3.11
licenseMIT
keywords trading machine-learning finance cryptocurrency bot
VCS
bugtrack_url
requirements asyncio-mqtt aiohttp websockets uvloop ccxt pandas numpy numba pyarrow pydantic pydantic-settings yfinance alpha-vantage yahooquery ta fastapi uvicorn websocket-client python-multipart python-jose sqlalchemy alembic aiosqlite psycopg2-binary streamlit plotly altair dash python-dotenv structlog click rich typer cryptography python-jose passlib pytest pytest-asyncio pytest-cov pytest-mock httpx faker black flake8 mypy isort pre-commit prometheus-client psutil requests slack-sdk python-telegram-bot influxdb-client scipy scikit-learn asyncpg aiosqlite configparser toml loguru sentry-sdk cython
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Crypto Arbitrage Trading Platform

Production-grade arbitrage trading system in Python 3.11 with real-time market data, signal generation, and automated execution.

## Features

- **Real-time Market Data**: WebSocket feeds from Binance, Kraken, Coinbase, Bybit
- **Arbitrage Signals**: Cross-exchange and triangular arbitrage detection
- **Smart Execution**: Atomic multi-leg orders with SOR (Smart Order Router)
- **Risk Management**: Position limits, circuit breakers, audit logging
- **Backtesting**: Event-driven simulation with realistic latency/slippage models
- **Monitoring**: Streamlit dashboard with P&L tracking and performance metrics
- **API**: FastAPI REST + WebSocket endpoints

## Architecture

```txt
/arbi/
├── core/
│   ├── data_feed.py       # WebSocket market data feeds
│   ├── marketdata.py      # Data models and schemas
│   ├── signal.py          # Arbitrage signal generation
│   ├── execution.py       # Smart order router
│   ├── risk.py            # Risk management and limits
│   ├── portfolio.py       # Portfolio tracking and P&L
│   ├── backtest.py        # Backtesting engine
│   └── storage.py         # Data storage (Parquet + SQLite)
├── api/
│   └── server.py          # FastAPI REST + WebSocket API
├── ui/
│   └── dashboard.py       # Streamlit monitoring dashboard
├── config/
│   └── settings.py        # Configuration management
└── tests/                 # Unit and integration tests
```

## Quick Start

1. **Install Dependencies**:

```bash
pip install -r requirements.txt
```

### 2. **Configure Environment**

```bash
cp .env.example .env
# Edit .env with your API keys and settings
```

### 3. **Run Market Data Feed**

```bash
python -m arbi.core.data_feed
```

#### 4. **Start API Server**

```bash
python -m arbi.api.server
```

#### 5. **Launch Dashboard**

```bash
streamlit run arbi/ui/dashboard.py
```

## Configuration

All configuration is managed through environment variables and `arbi/config/settings.py`:

- **API Keys**: Exchange API credentials
- **Risk Limits**: Position sizes, daily loss limits
- **Strategy Parameters**: Signal thresholds, execution delays
- **Monitoring**: Slack/Telegram webhooks

## Development

### Running Tests

```bash
pytest tests/ -v --cov=arbi
```

### Code Quality

```bash
black arbi/
flake8 arbi/
mypy arbi/
```

### Docker Deployment

```bash
docker-compose up -d
```

## License

MIT License - see LICENSE file for details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/krish567366/bot-model",
    "name": "trading-bot-ml",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "trading, machine-learning, finance, cryptocurrency, bot",
    "author": "Trading Bot Team",
    "author_email": "Trading Bot Team <krish567366@example.com>",
    "download_url": "https://files.pythonhosted.org/packages/78/b7/d53c14bc7507c179e22edaad5905c7038e41d9af05f33acb26971d61c53e/trading_bot_ml-1.0.0.tar.gz",
    "platform": null,
    "description": "# Crypto Arbitrage Trading Platform\r\n\r\nProduction-grade arbitrage trading system in Python 3.11 with real-time market data, signal generation, and automated execution.\r\n\r\n## Features\r\n\r\n- **Real-time Market Data**: WebSocket feeds from Binance, Kraken, Coinbase, Bybit\r\n- **Arbitrage Signals**: Cross-exchange and triangular arbitrage detection\r\n- **Smart Execution**: Atomic multi-leg orders with SOR (Smart Order Router)\r\n- **Risk Management**: Position limits, circuit breakers, audit logging\r\n- **Backtesting**: Event-driven simulation with realistic latency/slippage models\r\n- **Monitoring**: Streamlit dashboard with P&L tracking and performance metrics\r\n- **API**: FastAPI REST + WebSocket endpoints\r\n\r\n## Architecture\r\n\r\n```txt\r\n/arbi/\r\n\u251c\u2500\u2500 core/\r\n\u2502   \u251c\u2500\u2500 data_feed.py       # WebSocket market data feeds\r\n\u2502   \u251c\u2500\u2500 marketdata.py      # Data models and schemas\r\n\u2502   \u251c\u2500\u2500 signal.py          # Arbitrage signal generation\r\n\u2502   \u251c\u2500\u2500 execution.py       # Smart order router\r\n\u2502   \u251c\u2500\u2500 risk.py            # Risk management and limits\r\n\u2502   \u251c\u2500\u2500 portfolio.py       # Portfolio tracking and P&L\r\n\u2502   \u251c\u2500\u2500 backtest.py        # Backtesting engine\r\n\u2502   \u2514\u2500\u2500 storage.py         # Data storage (Parquet + SQLite)\r\n\u251c\u2500\u2500 api/\r\n\u2502   \u2514\u2500\u2500 server.py          # FastAPI REST + WebSocket API\r\n\u251c\u2500\u2500 ui/\r\n\u2502   \u2514\u2500\u2500 dashboard.py       # Streamlit monitoring dashboard\r\n\u251c\u2500\u2500 config/\r\n\u2502   \u2514\u2500\u2500 settings.py        # Configuration management\r\n\u2514\u2500\u2500 tests/                 # Unit and integration tests\r\n```\r\n\r\n## Quick Start\r\n\r\n1. **Install Dependencies**:\r\n\r\n```bash\r\npip install -r requirements.txt\r\n```\r\n\r\n### 2. **Configure Environment**\r\n\r\n```bash\r\ncp .env.example .env\r\n# Edit .env with your API keys and settings\r\n```\r\n\r\n### 3. **Run Market Data Feed**\r\n\r\n```bash\r\npython -m arbi.core.data_feed\r\n```\r\n\r\n#### 4. **Start API Server**\r\n\r\n```bash\r\npython -m arbi.api.server\r\n```\r\n\r\n#### 5. **Launch Dashboard**\r\n\r\n```bash\r\nstreamlit run arbi/ui/dashboard.py\r\n```\r\n\r\n## Configuration\r\n\r\nAll configuration is managed through environment variables and `arbi/config/settings.py`:\r\n\r\n- **API Keys**: Exchange API credentials\r\n- **Risk Limits**: Position sizes, daily loss limits\r\n- **Strategy Parameters**: Signal thresholds, execution delays\r\n- **Monitoring**: Slack/Telegram webhooks\r\n\r\n## Development\r\n\r\n### Running Tests\r\n\r\n```bash\r\npytest tests/ -v --cov=arbi\r\n```\r\n\r\n### Code Quality\r\n\r\n```bash\r\nblack arbi/\r\nflake8 arbi/\r\nmypy arbi/\r\n```\r\n\r\n### Docker Deployment\r\n\r\n```bash\r\ndocker-compose up -d\r\n```\r\n\r\n## License\r\n\r\nMIT License - see LICENSE file for details.\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Advanced ML-powered trading bot with real-time market analysis",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://github.com/krish567366/bot-model",
        "Issues": "https://github.com/krish567366/bot-model/issues",
        "Repository": "https://github.com/krish567366/bot-model"
    },
    "split_keywords": [
        "trading",
        " machine-learning",
        " finance",
        " cryptocurrency",
        " bot"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "cc9bd74c2a0569e2d59982d33d8a1e79163521ae3b92d5ca24ae430f22460e90",
                "md5": "e7d56945e72d688a451df7b417760d60",
                "sha256": "6e8c772a049ec30ae6c0de1ea0f4a7a8d547a8ea5bee041dc1542d7ec6b708a2"
            },
            "downloads": -1,
            "filename": "trading_bot_ml-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e7d56945e72d688a451df7b417760d60",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 149230,
            "upload_time": "2025-08-25T04:43:42",
            "upload_time_iso_8601": "2025-08-25T04:43:42.210090Z",
            "url": "https://files.pythonhosted.org/packages/cc/9b/d74c2a0569e2d59982d33d8a1e79163521ae3b92d5ca24ae430f22460e90/trading_bot_ml-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "78b7d53c14bc7507c179e22edaad5905c7038e41d9af05f33acb26971d61c53e",
                "md5": "e27008e764b98089a1ac9a01c46d5ff1",
                "sha256": "bf53278e1ca9d05a2d5df33aa1a6ccf56738040bc34dbbcb53d5fc62615a34ff"
            },
            "downloads": -1,
            "filename": "trading_bot_ml-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e27008e764b98089a1ac9a01c46d5ff1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 193526,
            "upload_time": "2025-08-25T04:43:44",
            "upload_time_iso_8601": "2025-08-25T04:43:44.378536Z",
            "url": "https://files.pythonhosted.org/packages/78/b7/d53c14bc7507c179e22edaad5905c7038e41d9af05f33acb26971d61c53e/trading_bot_ml-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-25 04:43:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "krish567366",
    "github_project": "bot-model",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "asyncio-mqtt",
            "specs": [
                [
                    "==",
                    "0.16.2"
                ]
            ]
        },
        {
            "name": "aiohttp",
            "specs": [
                [
                    "==",
                    "3.9.1"
                ]
            ]
        },
        {
            "name": "websockets",
            "specs": [
                [
                    "==",
                    "12.0"
                ]
            ]
        },
        {
            "name": "uvloop",
            "specs": [
                [
                    "==",
                    "0.19.0"
                ]
            ]
        },
        {
            "name": "ccxt",
            "specs": [
                [
                    "==",
                    "4.2.25"
                ]
            ]
        },
        {
            "name": "pandas",
            "specs": [
                [
                    "==",
                    "2.1.4"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    "==",
                    "1.26.2"
                ]
            ]
        },
        {
            "name": "numba",
            "specs": [
                [
                    "==",
                    "0.58.1"
                ]
            ]
        },
        {
            "name": "pyarrow",
            "specs": [
                [
                    "==",
                    "14.0.2"
                ]
            ]
        },
        {
            "name": "pydantic",
            "specs": [
                [
                    "==",
                    "2.5.2"
                ]
            ]
        },
        {
            "name": "pydantic-settings",
            "specs": [
                [
                    "==",
                    "2.1.0"
                ]
            ]
        },
        {
            "name": "yfinance",
            "specs": [
                [
                    "==",
                    "0.2.28"
                ]
            ]
        },
        {
            "name": "alpha-vantage",
            "specs": [
                [
                    "==",
                    "2.3.1"
                ]
            ]
        },
        {
            "name": "yahooquery",
            "specs": [
                [
                    "==",
                    "2.3.7"
                ]
            ]
        },
        {
            "name": "ta",
            "specs": [
                [
                    "==",
                    "0.10.2"
                ]
            ]
        },
        {
            "name": "fastapi",
            "specs": [
                [
                    "==",
                    "0.104.1"
                ]
            ]
        },
        {
            "name": "uvicorn",
            "specs": [
                [
                    "==",
                    "0.24.0"
                ]
            ]
        },
        {
            "name": "websocket-client",
            "specs": [
                [
                    "==",
                    "1.7.0"
                ]
            ]
        },
        {
            "name": "python-multipart",
            "specs": [
                [
                    "==",
                    "0.0.6"
                ]
            ]
        },
        {
            "name": "python-jose",
            "specs": [
                [
                    "==",
                    "3.3.0"
                ]
            ]
        },
        {
            "name": "sqlalchemy",
            "specs": [
                [
                    "==",
                    "2.0.23"
                ]
            ]
        },
        {
            "name": "alembic",
            "specs": [
                [
                    "==",
                    "1.13.1"
                ]
            ]
        },
        {
            "name": "aiosqlite",
            "specs": [
                [
                    "==",
                    "0.19.0"
                ]
            ]
        },
        {
            "name": "psycopg2-binary",
            "specs": [
                [
                    "==",
                    "2.9.9"
                ]
            ]
        },
        {
            "name": "streamlit",
            "specs": [
                [
                    "==",
                    "1.28.2"
                ]
            ]
        },
        {
            "name": "plotly",
            "specs": [
                [
                    "==",
                    "5.17.0"
                ]
            ]
        },
        {
            "name": "altair",
            "specs": [
                [
                    "==",
                    "5.2.0"
                ]
            ]
        },
        {
            "name": "dash",
            "specs": [
                [
                    "==",
                    "2.16.1"
                ]
            ]
        },
        {
            "name": "python-dotenv",
            "specs": [
                [
                    "==",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "structlog",
            "specs": [
                [
                    "==",
                    "23.2.0"
                ]
            ]
        },
        {
            "name": "click",
            "specs": [
                [
                    "==",
                    "8.1.7"
                ]
            ]
        },
        {
            "name": "rich",
            "specs": [
                [
                    "==",
                    "13.7.0"
                ]
            ]
        },
        {
            "name": "typer",
            "specs": [
                [
                    "==",
                    "0.9.0"
                ]
            ]
        },
        {
            "name": "cryptography",
            "specs": [
                [
                    "==",
                    "41.0.8"
                ]
            ]
        },
        {
            "name": "python-jose",
            "specs": [
                [
                    "==",
                    "3.3.0"
                ]
            ]
        },
        {
            "name": "passlib",
            "specs": [
                [
                    "==",
                    "1.7.4"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    "==",
                    "7.4.3"
                ]
            ]
        },
        {
            "name": "pytest-asyncio",
            "specs": [
                [
                    "==",
                    "0.21.1"
                ]
            ]
        },
        {
            "name": "pytest-cov",
            "specs": [
                [
                    "==",
                    "4.1.0"
                ]
            ]
        },
        {
            "name": "pytest-mock",
            "specs": [
                [
                    "==",
                    "3.12.0"
                ]
            ]
        },
        {
            "name": "httpx",
            "specs": [
                [
                    "==",
                    "0.25.2"
                ]
            ]
        },
        {
            "name": "faker",
            "specs": [
                [
                    "==",
                    "20.1.0"
                ]
            ]
        },
        {
            "name": "black",
            "specs": [
                [
                    "==",
                    "23.11.0"
                ]
            ]
        },
        {
            "name": "flake8",
            "specs": [
                [
                    "==",
                    "6.1.0"
                ]
            ]
        },
        {
            "name": "mypy",
            "specs": [
                [
                    "==",
                    "1.7.1"
                ]
            ]
        },
        {
            "name": "isort",
            "specs": [
                [
                    "==",
                    "5.12.0"
                ]
            ]
        },
        {
            "name": "pre-commit",
            "specs": [
                [
                    "==",
                    "3.6.0"
                ]
            ]
        },
        {
            "name": "prometheus-client",
            "specs": [
                [
                    "==",
                    "0.19.0"
                ]
            ]
        },
        {
            "name": "psutil",
            "specs": [
                [
                    "==",
                    "5.9.6"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.31.0"
                ]
            ]
        },
        {
            "name": "slack-sdk",
            "specs": [
                [
                    "==",
                    "3.26.1"
                ]
            ]
        },
        {
            "name": "python-telegram-bot",
            "specs": [
                [
                    "==",
                    "20.7"
                ]
            ]
        },
        {
            "name": "influxdb-client",
            "specs": [
                [
                    "==",
                    "1.38.0"
                ]
            ]
        },
        {
            "name": "scipy",
            "specs": [
                [
                    "==",
                    "1.11.4"
                ]
            ]
        },
        {
            "name": "scikit-learn",
            "specs": [
                [
                    "==",
                    "1.3.2"
                ]
            ]
        },
        {
            "name": "asyncpg",
            "specs": [
                [
                    "==",
                    "0.29.0"
                ]
            ]
        },
        {
            "name": "aiosqlite",
            "specs": [
                [
                    "==",
                    "0.19.0"
                ]
            ]
        },
        {
            "name": "configparser",
            "specs": [
                [
                    "==",
                    "6.0.0"
                ]
            ]
        },
        {
            "name": "toml",
            "specs": [
                [
                    "==",
                    "0.10.2"
                ]
            ]
        },
        {
            "name": "loguru",
            "specs": [
                [
                    "==",
                    "0.7.2"
                ]
            ]
        },
        {
            "name": "sentry-sdk",
            "specs": [
                [
                    "==",
                    "1.38.0"
                ]
            ]
        },
        {
            "name": "cython",
            "specs": [
                [
                    "==",
                    "3.0.6"
                ]
            ]
        }
    ],
    "lcname": "trading-bot-ml"
}
        
Elapsed time: 1.76406s