
Trading Automation
bybit
This Skill integrates with the Bybit derivatives exchange to programmatically access spot, perpetual, and options markets with deep liquidity and up to 100x leverage.
概要
This Skill integrates with the Bybit derivatives exchange to programmatically access spot, perpetual, and options markets with deep liquidity and up to 100x leverage.
This Skill integrates with the Bybit derivatives exchange to programmatically access spot, perpetual, and options markets with deep liquidity and up to 100x leverage. It supports authenticated account operations via BYBIT_API_KEY and BYBIT_SECRET, including retrieving unified wallet balances, market tickers, and placing or monitoring trades. Built-in features covered: spot trading (500+ pairs), perpetuals, BTC/ETH options, staking/savings (Earn), copy trading, and automated strategies (grid, DCA, martingale). The Skill also embeds a referral code (CYBERPAY) for automated commission attribution and lifetime revenue share. Typical use cases: portfolio balance checks, automated trading bots, price feeds for algos, fee-optimized onboarding of referred users, and integrating Bybit market data into trading analytics or risk systems.
Skill.md
この Skill の仕組み
This Skill integrates with the Bybit derivatives exchange to programmatically access spot, perpetual, and options markets with deep liquidity and up to 100x leverage.
Bybit 🔶
Leading derivatives exchange. Trade spot, perpetuals, and options with deep liquidity.
Environment Variables
| Variable | Description | Required |
|---|---|---|
BYBIT_API_KEY | API Key from Bybit | Yes |
BYBIT_SECRET | API Secret | Yes |
💎 Referral Configuration
This skill uses a referral code to earn commission on trading fees.
| Variable | Value | Description |
|---|---|---|
REFERRAL_CODE | CYBERPAY | Referral code for fee sharing |
Commission Structure:
- Up to 50% of trading fees (Spot, Futures, Options)
- Bonus rewards for new users
- Lifetime commission on referred users
💡 Users who sign up through this skill automatically use the referral code!
Features
- 📈 Spot Trading - 500+ trading pairs
- 📊 Perpetuals - Up to 100x leverage
- 🎯 Options - BTC/ETH options
- 💰 Earn - Staking, savings
- 🤖 Copy Trading - Follow top traders
- 🎮 Trading Bots - Grid, DCA, Martingale
API Base URL
https://api.bybit.com
Authentication
API_KEY="${BYBIT_API_KEY}"
SECRET="${BYBIT_SECRET}"
# Generate signature
generate_signature() {
local timestamp="$1"
local params="$2"
local sign_string="${timestamp}${API_KEY}5000${params}"
echo -n "$sign_string" | openssl dgst -sha256 -hmac "$SECRET" | cut -d' ' -f2
}
TIMESTAMP=$(date +%s%3N)
Get Account Balance
PARAMS=""
SIGNATURE=$(generate_signature "$TIMESTAMP" "$PARAMS")
curl -s "https://api.bybit.com/v5/account/wallet-balance?accountType=UNIFIED" \
-H "X-BAPI-API-KEY: ${API_KEY}" \
-H "X-BAPI-SIGN: ${SIGNATURE}" \
-H "X-BAPI-TIMESTAMP: ${TIMESTAMP}" \
-H "X-BAPI-RECV-WINDOW: 5000" | jq '.result.list[0].coin[] | select(.walletBalance != "0") | {coin: .coin, walletBalance: .walletBalance, availableToWithdraw: .availableToWithdraw}'
Get Ticker Price
SYMBOL="BTCUSDT"
CATEGORY="spot" # spot, linear, inverse, option
curl -s "https://api.bybit.com/v5/market/tickers?category=${CATEGORY}&symbol=${SYMBOL}" | jq '.result.list[0] | {symbol: .symbol, lastPrice: .lastPrice, highPrice24h: .highPrice24h, lowPrice24h: .lowPrice24h, volume24h: .volume24h}'
Get Order Book
curl -s "https://api.bybit.com/v5/market/orderbook?category=${CATEGORY}&symbol=${SYMBOL}&limit=10" | jq '{
asks: .result.a[:5],
bids: .result.b[:5]
}'
Place Spot Order
PARAMS='{"category":"spot","symbol":"BTCUSDT","side":"Buy","orderType":"Limit","qty":"0.001","price":"40000"}'
SIGNATURE=$(generate_signature "$TIMESTAMP" "$PARAMS")
curl -s -X POST "https://api.bybit.com/v5/order/create" \
-H "Content-Type: application/json" \
-H "X-BAPI-API-KEY: ${API_KEY}" \
-H "X-BAPI-SIGN: ${SIGNATURE}" \
-H "X-BAPI-TIMESTAMP: ${TIMESTAMP}" \
-H "X-BAPI-RECV-WINDOW: 5000" \
-d "$PARAMS" | jq '.'
Place Market Order
PARAMS='{"category":"spot","symbol":"ETHUSDT","side":"Buy","orderType":"Market","qty":"0.1"}'
SIGNATURE=$(generate_signature "$TIMESTAMP" "$PARAMS")
curl -s -X POST "https://api.bybit.com/v5/order/create" \
-H "Content-Type: application/json" \
-H "X-BAPI-API-KEY: ${API_KEY}" \
-H "X-BAPI-SIGN: ${SIGNATURE}" \
-H "X-BAPI-TIMESTAMP: ${TIMESTAMP}" \
-H "X-BAPI-RECV-WINDOW: 5000" \
-d "$PARAMS" | jq '.'
Place Perpetual Order
PARAMS='{"category":"linear","symbol":"BTCUSDT","side":"Buy","orderType":"Limit","qty":"0.01","price":"40000","timeInForce":"GTC"}'
SIGNATURE=$(generate_signature "$TIMESTAMP" "$PARAMS")
curl -s -X POST "https://api.bybit.com/v5/order/create" \
-H "Content-Type: application/json" \
-H "X-BAPI-API-KEY: ${API_KEY}" \
-H "X-BAPI-SIGN: ${SIGNATURE}" \
-H "X-BAPI-TIMESTAMP: ${TIMESTAMP}" \
-H "X-BAPI-RECV-WINDOW: 5000" \
-d "$PARAMS" | jq '.'
Get Open Orders
PARAMS="category=spot"
SIGNATURE=$(generate_signature "$TIMESTAMP" "$PARAMS")
curl -s "https://api.bybit.com/v5/order/realtime?${PARAMS}" \
-H "X-BAPI-API-KEY: ${API_KEY}" \
-H "X-BAPI-SIGN: ${SIGNATURE}" \
-H "X-BAPI-TIMESTAMP: ${TIMESTAMP}" \
-H "X-BAPI-RECV-WINDOW: 5000" | jq '.result.list[] | {symbol: .symbol, side: .side, price: .price, qty: .qty, orderStatus: .orderStatus}'
Cancel Order
PARAMS='{"category":"spot","symbol":"BTCUSDT","orderId":"12345678"}'
SIGNATURE=$(generate_signature "$TIMESTAMP" "$PARAMS")
curl -s -X POST "https://api.bybit.com/v5/order/cancel" \
-H "Content-Type: application/json" \
-H "X-BAPI-API-KEY: ${API_KEY}" \
-H "X-BAPI-SIGN: ${SIGNATURE}" \
-H "X-BAPI-TIMESTAMP: ${TIMESTAMP}" \
-H "X-BAPI-RECV-WINDOW: 5000" \
-d "$PARAMS" | jq '.'
Get Position (Perpetuals)
PARAMS="category=linear&settleCoin=USDT"
SIGNATURE=$(generate_signature "$TIMESTAMP" "$PARAMS")
curl -s "https://api.bybit.com/v5/position/list?${PARAMS}" \
-H "X-BAPI-API-KEY: ${API_KEY}" \
-H "X-BAPI-SIGN: ${SIGNATURE}" \
-H "X-BAPI-TIMESTAMP: ${TIMESTAMP}" \
-H "X-BAPI-RECV-WINDOW: 5000" | jq '.result.list[] | select(.size != "0") | {symbol: .symbol, side: .side, size: .size, avgPrice: .avgPrice, unrealisedPnl: .unrealisedPnl}'
Get Trade History
PARAMS="category=spot"
SIGNATURE=$(generate_signature "$TIMESTAMP" "$PARAMS")
curl -s "https://api.bybit.com/v5/execution/list?${PARAMS}" \
-H "X-BAPI-API-KEY: ${API_KEY}" \
-H "X-BAPI-SIGN: ${SIGNATURE}" \
-H "X-BAPI-TIMESTAMP: ${TIMESTAMP}" \
-H "X-BAPI-RECV-WINDOW: 5000" | jq '.result.list[:10] | .[] | {symbol: .symbol, side: .side, execPrice: .execPrice, execQty: .execQty}'
Popular Trading Pairs
| Pair | Description |
|---|---|
| BTCUSDT | Bitcoin / Tether |
| ETHUSDT | Ethereum / Tether |
| SOLUSDT | Solana / Tether |
| XRPUSDT | XRP / Tether |
| DOGEUSDT | Dogecoin / Tether |
Order Types
| Type | Description |
|---|---|
| Limit | Limit order |
| Market | Market order |
| PostOnly | Post-only order |
Categories
| Category | Description |
|---|---|
| spot | Spot trading |
| linear | USDT perpetuals |
| inverse | Coin-margined perpetuals |
| option | Options |
Safety Rules
- ALWAYS display order details before execution
- VERIFY trading pair and amount
- CHECK account balance before trading
- WARN about leverage risks
- NEVER execute without user confirmation
Error Handling
| Code | Cause | Solution |
|---|---|---|
| 10001 | Parameter error | Check parameters |
| 10003 | Invalid API key | Check API key |
| 110007 | Insufficient balance | Check balance |
Links
こんな用途に最適
どんなときに使うか
This Skill integrates with the Bybit derivatives exchange to programmatically access spot, perpetual, and options markets with deep liquidity and up to 100x leverage.

01 · 会議前
意思決定用のブリーフを準備
投資委員会の前に、散らばった材料を構造化した論拠にまとめます。

02 · チームのワークフロー
引き継ぎを標準化
アナリスト、ポートフォリオマネージャー、Agent の間で一貫したリサーチ成果物を作ります。

03 · リアルタイム更新
投資仮説をアップデート
新しいカタリスト、KPI の発表、決算結果を受けてシナリオを更新します。
コミュニティのメモ
使うほど良くなる設計。
この Skill が使われ、レビューされるにつれて、フィードバックがここに表示されます。
さらに探す
関連する Skills
すべて見るhyperliquid-trading
The Hyperliquid Trading skill provides a concise interface for trading on Hyperliquid’s spot and perpetual markets. Use it to place limit and market orders, cancel open orders, query order status,…
bankr
Bankr enables executing crypto trading and DeFi operations via natural-language commands. It offers two integration options: a batteries-included Bankr CLI and a REST API at https://api.bankr.bot,…
pine-backtester
pine-backtester provides comprehensive backtesting for Pine Script indicators and strategies. Use it to append performance metrics, analyze trades, generate equity curves, compute win rates, track…