bybit-futures
Complete Bybit USDT perpetual futures trading system with risk management, paper trading, and live execution. Use when building a crypto futures trading bot, connecting to Bybit API, implementing stop-loss/take-profit, managing leverage and position sizing, paper trading strategies, backtesting, or deploying a WebSocket-based real-time trading system. Supports EMA crossover, RSI, and custom strategy templates.
Best use case
bybit-futures is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Complete Bybit USDT perpetual futures trading system with risk management, paper trading, and live execution. Use when building a crypto futures trading bot, connecting to Bybit API, implementing stop-loss/take-profit, managing leverage and position sizing, paper trading strategies, backtesting, or deploying a WebSocket-based real-time trading system. Supports EMA crossover, RSI, and custom strategy templates.
Teams using bybit-futures should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/bybit-futures/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How bybit-futures Compares
| Feature / Agent | bybit-futures | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Complete Bybit USDT perpetual futures trading system with risk management, paper trading, and live execution. Use when building a crypto futures trading bot, connecting to Bybit API, implementing stop-loss/take-profit, managing leverage and position sizing, paper trading strategies, backtesting, or deploying a WebSocket-based real-time trading system. Supports EMA crossover, RSI, and custom strategy templates.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Bybit Futures Trading System Complete trading infrastructure for Bybit USDT perpetual futures contracts. ## Quick Start 1. Install dependencies: `pip install ccxt websockets numpy requests` 2. Copy `scripts/config_template.py` → `config.py`, fill in API keys 3. Run paper trading: `python scripts/paper_trading_ws.py` 4. When validated, switch to live: `python scripts/live_trading.py` ## Architecture ``` config.py ← API keys + risk parameters risk_manager.py ← Position sizing, daily loss limits, max positions paper_trading_ws.py ← WebSocket real-time paper trading live_trading.py ← Live execution (same logic, real orders) backtest.py ← Historical backtesting engine ``` ## Risk Management All trades enforced by `risk_manager.py`: - **Max position**: configurable % of capital per trade (default 20%) - **Max leverage**: configurable (default 5x) - **Stop loss**: automatic per-trade (default 3%) - **Take profit**: automatic per-trade (default 6%, 2:1 R/R) - **Daily loss limit**: halt trading after X% daily drawdown (default 10%) - **Max concurrent positions**: configurable (default 3) ## Included Strategies ### EMA Crossover (ETH) - EMA(12) crosses above EMA(26) → long - EMA(12) crosses below EMA(26) → short - Best on: ETH/USDT 1h timeframe ### RSI Mean Reversion (SOL, HYPE, PEPE) - RSI(14) crosses up from below 30 → long - RSI(14) crosses down from above 70 → short - Best on: SOL, HYPE (73% WR), 1000PEPE (53% WR) 1h timeframe - Backtested: HYPE +$339, PEPE +$210 on 90-day 1h data ### Custom Strategy Template See `references/custom_strategy.md` for adding your own signals. ## WebSocket Real-Time Engine The paper/live trading engine uses Bybit's WebSocket v5 API: - **Ticker subscription**: millisecond-level price updates for SL/TP - **Kline subscription**: signal calculation on candle close only - **Auto-reconnect**: 5s retry on disconnect - **State persistence**: saves every 5 minutes to JSON ## Deployment Recommended: systemd service on a VPS. ```bash # Create service file sudo tee /etc/systemd/system/paper-trading.service << 'EOF' [Unit] Description=Paper Trading Bot (WebSocket) After=network.target [Service] Type=simple WorkingDirectory=/root/trading ExecStart=/usr/bin/python3 paper_trading_ws.py Restart=always RestartSec=10 [Install] WantedBy=multi-user.target EOF sudo systemctl enable --now paper-trading ``` ## Telegram Notifications Built-in Telegram push for all events: - Position opened/closed - Stop loss / take profit hit - 6-hourly summary reports - Error alerts Set `TG_BOT_TOKEN` and `TG_CHAT_ID` in config. ## Files - `scripts/config_template.py` — Configuration template - `scripts/risk_manager.py` — Risk management engine - `scripts/paper_trading_ws.py` — WebSocket paper trading bot - `scripts/live_trading.py` — Live trading bot - `scripts/backtest.py` — Backtesting engine - `references/custom_strategy.md` — Guide for adding custom strategies - `references/bybit_api_notes.md` — Bybit API gotchas and tips
Related Skills
futures-trading
KuCoin Futures trading using the KuCoin API. Futures market data, orders, positions, and funding fees. Authentication requires API Key, API Secret, and Passphrase.
recipe-futures-hedge-spot
Hedge a spot holding with a short futures position to lock in value.
kraken-futures-trading
Place, manage, and monitor futures orders across the full lifecycle.
kraken-futures-risk
Futures-specific risk management: leverage, funding rates, margin, and liquidation awareness.
bybit-trading
Bybit AI Trading Skill — Trade on Bybit using natural language. Covers spot, derivatives, earn, and more. Works with Claude, ChatGPT, OpenClaw, and any AI assistant.
bybit-openapi-skill
Operate Bybit V5 public market APIs through UXC with a curated OpenAPI schema, market-first discovery, and explicit private-auth boundary notes.
bybit-ai-skills
253 API endpoints for trading, derivatives, earn products on Bybit. Comprehensive AI skills covering spot, futures, options, and institutional features.
derivatives-trading-usds-futures
Binance Derivatives-trading-usds-futures request using the Binance API. Authentication requires API key and secret key. Supports testnet and mainnet.
derivatives-trading-coin-futures
Binance Derivatives-trading-coin-futures request using the Binance API. Authentication requires API key and secret key. Supports testnet and mainnet.
binance-futures-trading
币安合约交易支持,包括杠杆和合约订单。每次调用自动扣费 0.001 USDT
ai-bybit-trader
🤖 Train your own AI agent to trade crypto 24/7 on Bybit. Free skill for OpenClaw.
ai-bybit-trade
🤖 Train your own AI agent to trade crypto 24/7 on Bybit. Free skill for OpenClaw.