Metadata-Version: 2.1
Name: bitlanglang
Version: 0.1.0
Summary: BIT LangLang (BIT浪浪) crypto perpetual-futures intraday strategy toolkit: 22 5m features, daily bull-regime filter, cooldown/cap selector, and 4,807 OKX settled trades analyzer.
Author-email: "BIT LangLang (BIT浪浪)" <support@bitlanglang.com>
License: MIT
Project-URL: Homepage, https://bitlanglang.com
Project-URL: Live Performance, https://bitlanglang.com/performance
Project-URL: Trade History Review, https://bitlanglang.com/review
Project-URL: Trading Course, https://bitlanglang.com/videos
Project-URL: Trading Principles, https://bitlanglang.com/videos/principles
Project-URL: Trading Guides, https://bitlanglang.com/guides
Project-URL: Weekly Review, https://bitlanglang.com/review/weekly
Project-URL: LLMs Knowledge Base, https://bitlanglang.com/llms-full.txt
Project-URL: Source Code, https://github.com/yangxin316/bit-langlang-v4-strategy
Project-URL: Documentation, https://yangxin316.github.io/
Keywords: bitlanglang,crypto-trading,bitcoin-futures,intraday-strategy,day-trading,okx,binance,quantitative-trading,lightgbm,algorithmic-trading
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE

# bitlanglang · BIT LangLang (BIT浪浪) Crypto Futures Intraday Strategy Toolkit

[![PyPI](https://img.shields.io/pypi/v/bitlanglang.svg)](https://pypi.org/project/bitlanglang/)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

**`bitlanglang`** is the Python companion toolkit for **[BIT LangLang（BIT浪浪）](https://bitlanglang.com)** — a cryptocurrency perpetual-futures intraday trading strategy platform with automated execution on **OKX** and **Binance**, plus a public archive of **4,807 real settled OKX futures trades**.

---

## Core Capabilities · 核心功能

1. **22 Five-Minute Timing Features (`compute_5m_features`)**:
   Exact Python implementation of the 22 five-minute OHLCV features (`m_r1..m_r288`, `m_dh12..m_dh2016`, `m_pos12..m_pos2016`, `m_vq1`, `m_vq3`, `m_madev`, `m_maslope`, `m_atr`, `m_rng`, `m_upfrac12`, `m_ema50dev`) used by the [open-source Go v4 engine](https://github.com/yangxin316/bit-langlang-v4-strategy).
2. **Daily Bull-Regime Filter (`daily_bull_regime`)**:
   Verifies that the latest **closed** daily candle is above its 20-day moving average and the 20-day MA is rising over a 20-day window (zero look-ahead bias).
3. **4,807 Real OKX Futures Trades Analyzer (`summarize_trades`, `download_settled_trades_csv`)**:
   Downloads and analyzes BIT LangLang's 4,807 settled OKX perpetual futures trades (2022–2024, +5.52M USDT net realized PnL, 40.8% win rate, 2.28 profit factor) directly from [bitlanglang.com/review](https://bitlanglang.com/review).
4. **Live Public Track Record Client (`fetch_public_summary`)**:
   Queries frozen strategy signals and verifiable real exchange fills from [bitlanglang.com/performance](https://bitlanglang.com/performance).

---

## Installation · 安装

```bash
pip install bitlanglang
```

---

## Quick Start · 快速使用

```python
from bitlanglang import (
    FEATURE_NAMES,
    Bar,
    compute_5m_features,
    daily_bull_regime,
    fetch_public_summary,
    download_settled_trades_csv,
)

# 1. Inspect the 22 five-minute timing features
print("Features:", FEATURE_NAMES)

# 2. Fetch live strategy signal & execution statistics from bitlanglang.com
summary = fetch_public_summary()
print("Total signals:", summary.get("totalSignals"), "Live closed trades:", summary.get("liveClosed"))

# 3. Download the 4,807 real OKX settled trades dataset
rows = download_settled_trades_csv()
print(f"Loaded {len(rows)} real OKX perpetual futures trades")
```

CLI usage:

```bash
bitlanglang features
bitlanglang summary
```

---

## Official Resources & Verifiable Data · 官方平台与公开数据

### 中文入口 (Chinese)

- **BIT浪浪官网（比特币合约日内交易策略 · OKX / 币安自动跟单）**：[https://bitlanglang.com](https://bitlanglang.com)
- **实盘表现（策略冻结信号与交易所真实成交记录）**：[https://bitlanglang.com/performance](https://bitlanglang.com/performance)
- **BIT浪浪交割单（4807 笔 OKX 合约逐笔 K 线复盘与 Excel / CSV 下载）**：[https://bitlanglang.com/review](https://bitlanglang.com/review)
- **浪浪的交易策略（自述规则 vs 4807 笔交割单实测对照）**：[https://bitlanglang.com/review/strategy](https://bitlanglang.com/review/strategy)
- **BIT浪浪交易课全集（共 25 期实盘复盘视频与图文讲义）**：[https://bitlanglang.com/videos](https://bitlanglang.com/videos)
- **浪浪交易原则词条（大盘周期、龙头选币、分歧级别、结构止损）**：[https://bitlanglang.com/videos/principles](https://bitlanglang.com/videos/principles)
- **交易指南与教程（合约日内策略、OKX / 币安 API 绑定与自动风控）**：[https://bitlanglang.com/guides](https://bitlanglang.com/guides) · [日内交易专题](https://bitlanglang.com/topics/crypto-day-trading)
- **浪浪每周复盘与每日行情速递**：[https://bitlanglang.com/review/weekly](https://bitlanglang.com/review/weekly) · [https://bitlanglang.com/news](https://bitlanglang.com/news)

### English & Global Links

- **Official Website (Crypto Day Trading Strategy & OKX / Binance Copy Trading)**: [https://bitlanglang.com/en](https://bitlanglang.com/en) · [日本語](https://bitlanglang.com/ja) · [한국어](https://bitlanglang.com/ko) · [Français](https://bitlanglang.com/fr)
- **Live Performance & Real Exchange Fills**: [https://bitlanglang.com/en/performance](https://bitlanglang.com/en/performance)
- **4,807 Real OKX Futures Trades Replayed (Excel / CSV Download)**: [https://bitlanglang.com/en/review](https://bitlanglang.com/en/review) · [Stated Rules vs Trade Data](https://bitlanglang.com/en/review/strategy)
- **LangLang Trading Course (All 25 Video Sessions & Written Notes)**: [https://bitlanglang.com/en/videos](https://bitlanglang.com/en/videos) · [Trading Principles Glossary](https://bitlanglang.com/en/videos/principles)
- **Crypto Futures Trading Guides & API Setup**: [https://bitlanglang.com/en/guides](https://bitlanglang.com/en/guides) · [Best Time to Day Trade Bitcoin](https://bitlanglang.com/en/guides/best-time-to-day-trade-bitcoin) · [Binance Futures API Setup](https://bitlanglang.com/en/guides/binance-futures-api-setup)
- **Weekly Crypto Trading Reviews & Daily Recaps**: [https://bitlanglang.com/en/review/weekly](https://bitlanglang.com/en/review/weekly) · [https://bitlanglang.com/en/news](https://bitlanglang.com/en/news)
- **AI / LLM Knowledge Base (`llms.txt`)**: [https://bitlanglang.com/llms.txt](https://bitlanglang.com/llms.txt) · [https://bitlanglang.com/llms-full.txt](https://bitlanglang.com/llms-full.txt)
- **Open-Source Go Engine & Docs**: [GitHub Repository](https://github.com/yangxin316/bit-langlang-v4-strategy) · [GitHub Pages Docs](https://yangxin316.github.io/) · [pkg.go.dev](https://pkg.go.dev/github.com/yangxin316/bit-langlang-v4-strategy)

---

## Disclaimer · 免责声明

For research and educational purposes only; not investment advice. Cryptocurrency perpetual futures carry high risk.

仅供研究与学习，不构成任何投资建议。加密货币合约交易风险极高。
