Metadata-Version: 2.4
Name: crypto-trader-py
Version: 1.0.0
Summary: crypto-trader-py is a lightweight Python toolkit for building, backtesting, and paper-trading crypto
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: description
Dynamic: description-content-type
Dynamic: license-file
Dynamic: requires-python
Dynamic: summary

# Crypto Trader Py

A lightweight Python toolkit for building, backtesting, and paper-trading cryptocurrency strategies.

## Features

- Unified market data from Binance, Coinbase, and Kraken (REST + WebSocket)
- Simple strategy API: subclass `Strategy` and implement `on_tick`
- Vectorized backtester with configurable fees, slippage, and funding rates
- Paper-trading engine that runs strategies against live price feeds
- Built-in indicators: SMA, EMA, RSI, MACD, Bollinger Bands, ATR
- Risk management helpers: position sizing, stop-loss, take-profit
- CSV/JSON trade logs and matplotlib equity curves

## Installation

Install from PyPI:

```bash
pip install crypto-trader-py
```

Or from source:

```bash
git clone https://github.com/example/crypto-trader-py
cd crypto-trader-py
pip install -e .
```

## Quick Start

```python
from crypto_trader import Backtest, SMA, Strategy

class SmaCross(Strategy):
    def on_tick(self, candle):
        fast = SMA(candle.close, 10)
        slow = SMA(candle.close, 50)
        if fast > slow:
            self.buy(size=0.1)
        elif fast < slow:
            self.close()

bt = Backtest(strategy=SmaCross, exchange='binance', pair='BTC/USDT')
bt.run(start='2023-01-01', end='2023-12-31')
print(bt.stats())
bt.plot_equity('equity.png')
```

## Paper Trading

Run a strategy against live prices without risking real funds:

```python
from crypto_trader.paper import PaperEngine

engine = PaperEngine(strategy=SmaCross, exchange='binance', pair='BTC/USDT')
engine.start()
```

## Disclaimer

This project is educational software and is **not financial advice**. Trading cryptocurrencies carries a high risk of loss.

## License

MIT
