Skip to content
  • Documentacion

Start Here

8
  • What’s TradeAdapter
  • How TradeAdapter works
  • Supported Platforms & Brokers
  • Requirements
  • Quick Start
  • Indicator vs Strategy
  • Strategy Example
  • Safety & Risk Disclaimer

Direct API

15
  • Overview
  • Binance Guide
  • Binance US Guide
  • Bybit Guide
  • MEXC Guide
  • Kucoin Guide
  • Kraken Guide
  • Coinbase Guide
  • OKX Guide
  • BingX Guide
  • Bitget Guide
  • Gate.io Guide
  • Alpaca Guide
  • Capital Guide
  • OANDA Guide

MetaTrader

6
  • Overview
  • MT4 Setup
  • MT5 Setup
  • TradingView Alerts
  • EA Settings
  • Symbol alignment

FAQ

7
  • Overview
  • Binance
  • Bybit
  • Bitget
  • TradingView
  • Metatrader
  • Other
View Categories
  • Home
  • Docs
  • Direct API
  • Bybit Guide

Bybit Guide

Bybit Setup Guide

Connect TradingView to Bybit (Spot, Margin, Futures, and CopyTrading) using TradeAdapter’s direct API integration — step by step.

Video walkthrough #

Bybit + TradingView setup

1 — Create Bybit API keys #

Demo or Real?

We recommend starting with the Demo account at testnet.bybit.com to test your setup safely. When ready, switch to the Real account at www.bybit.com.

  1. Create or log in to your account

    Go to testnet.bybit.com (Demo) or www.bybit.com (Real) and sign in or register.

  2. Open API Management

    Go to Profile → API Management or navigate directly to API Management. Click “Create New Key”.

  3. Choose System-generated API Keys

    Select “System-generated API Keys” and give it a descriptive name (e.g. TradeAdapter).

  4. Set permissions

    Enable Trade permissions for the markets you plan to use (Spot, Derivatives, CopyTrading). Keep Withdrawals disabled — TradeAdapter never needs withdrawal access.

  5. Restrict to TradeAdapter IP

    Under IP access restrictions, add the TradeAdapter IP: 35.75.198.16

  6. Save your credentials

    Copy your API Key and Secret. They are shown only once — store them securely. You will paste both values into the alert message.

2 — Select the Bybit symbol in TradingView #

Open TradingView and search for the symbol using the BYBIT prefix. Make sure you select the correct market type:

Spot

Search BYBIT:BTCUSDT, BYBIT:ETHUSDT, etc.

Perpetual / Futures

Search BYBIT:BTCUSDT.P or look for the Swap suffix.

Important

The {{ticker}} placeholder in your alert message sends this exact symbol name to Bybit. If you pick the wrong symbol type (e.g. Spot instead of Futures), the order will fail or go to the wrong market.

3 — Add your indicator or strategy #

Load your Pine Script indicator or strategy onto the chart. This is what generates the trading signals.

Strategy

Go to Pine Editor, paste your strategy code, and click “Add to chart”. Check the Strategy Tester tab to confirm backtesting results appear.

Indicator

Add the indicator to the chart. It must use alertcondition() to fire signals. You’ll create one alert per action (Buy, Sell, TP, SL…).

Not sure which one you have? See Indicator vs Strategy.

4 — Configure order size #

Bybit enforces minimum quantity rules per symbol. Before creating the alert, make sure your order size meets these requirements.

How to set order size

If using a Strategy: go to strategy settings and set Order Size in “Contracts” to a value that fits the symbol’s minimum quantity. For example, BTCUSDT Spot requires a minimum of 0.000001 BTC.

If using an Indicator: you set the size manually via order_contracts in the alert message.

Reference

Check the exact filters for your symbol: Bybit Supported Symbols — Spot

5 — Create the TradingView alert #

Press Alt + A (or click the alarm clock icon) to create a new alert.

Strategy → 1 alert total

Under Condition, select your strategy. Set trigger to “Order fills only”. TradingView fills action, size, and price automatically.

Indicator → 1 alert per action

Under Condition, select the specific signal (Buy, Sell, TP, SL…). You set order_action and order_contracts manually in each message.

Required: Webhook URL + Message

In the Notifications tab, enable Webhook URL and paste your personal webhook from your TradeAdapter profile. Then paste the JSON message (below) in the Message field.

Alert message formats #

Paste the appropriate JSON message into the alert’s Message field. Replace only the highlighted values — the {{...}} placeholders are filled automatically by TradingView when the alert fires.

For Strategy #

TradingView Alert Message — Strategy
{
    "bybit_api_key": "YOUR_API_KEY",
    "bybit_secret": "YOUR_SECRET",
    "real_order": "No",
    "order_market": "Spot",
    "order_type": "Market",
    "isolated_margin": "No",
    "auto_rounding": "Yes",
    "exchange": "{{exchange}}",
    "ticker": "{{ticker}}",
    "time": "{{timenow}}",
    "order_contracts": "{{strategy.order.contracts}}",
    "order_action": "{{strategy.order.action}}",
    "order_price": "{{strategy.order.price}}",
    "market_position": "{{strategy.market_position}}",
    "market_position_size": "{{strategy.market_position_size}}",
    "prev_market_position": "{{strategy.prev_market_position}}",
    "prev_market_position_size": "{{strategy.prev_market_position_size}}"
}

Open Message Generator — Strategy

For Indicator #

TradingView Alert Message — Indicator
{
    "bybit_api_key": "YOUR_API_KEY",
    "bybit_secret": "YOUR_SECRET",
    "real_order": "No",
    "order_market": "Spot",
    "order_type": "Market",
    "order_action": "buy",
    "order_contracts": "100",
    "isolated_margin": "No",
    "auto_rounding": "Yes",
    "exchange": "{{exchange}}",
    "ticker": "{{ticker}}",
    "time": "{{timenow}}"
}

Create one alert per action — duplicate the alert, change order_action to sell, and adjust order_contracts as needed.

Open Message Generator — Indicator

Message fields explained #

Field Description
bybit_api_key Your Bybit API Key (from Step 1)
bybit_secret Your Bybit Secret (from Step 1)
real_order "Yes" executes on Bybit. "No" creates a test order (uses Demo/Testnet API keys).
order_market "Spot", "Margin", "Futures", or "Copy"
order_type "Market" or "Limit"
isolated_margin Only for Margin orders. "Yes" = isolated, "No" = cross. Keep "No" for Spot/Futures.
auto_rounding Automatically rounds position size and price to fit Bybit filters. Keep "Yes".
order_action Indicator: "buy" or "sell". Strategy: filled by {{strategy.order.action}}.
order_contracts Indicator: quantity as a number. Strategy: filled by {{strategy.order.contracts}}.

6 — Execute & monitor #

  1. Start with Demo

    Use API keys from testnet.bybit.com and set "real_order": "No". Let the first alert fire and check your MyTrades page.

  2. Verify on Bybit Testnet

    Log in to testnet.bybit.com and check your order history to confirm the trade was placed correctly.

  3. Go live

    Create new API keys on www.bybit.com (real account), update the message with your real API credentials, change "real_order" to "Yes", delete the old alert, and create a new one.

Symbol specifications #

Bybit enforces minimum quantity and max quantity rules per symbol. Check the full list before setting your order size to avoid rejections.

Spot

Min Qty, Step Size, Max Qty.

View Spot

Futures

Min Qty, Max MKT Qty, Max Qty.

View Futures

CopyTrading

Min Qty, Max Qty, Leverage.

View CopyTrading

Important notes #

🔑
API security — Never share your Secret. Keep withdrawals disabled. Only whitelist the TradeAdapter IP (35.75.198.16).
🧪
Demo first — Start with Bybit’s Testnet. Use Demo API keys and "real_order": "No" to validate your setup before going live.
🔄
Recreate alerts after changes — If you modify Pine Script parameters, delete and recreate the alert. Editing an existing alert does not update placeholders.
🎯
Symbol must match — The TradingView chart symbol must correspond to a valid symbol on Bybit for the selected market type.
📊
Order size — Check Symbol Specifications to ensure your order meets Bybit’s minimum quantity requirements.

Need a different exchange?
All setup guides
Updated on February 24, 2026

What are your Feelings

  • Happy
  • Normal
  • Sad

Share This Article :

  • Facebook
  • X
  • LinkedIn
  • Pinterest
Binance US GuideMEXC Guide
Table of Contents
  • Video walkthrough
  • 1 — Create Bybit API keys
  • 2 — Select the Bybit symbol in TradingView
  • 3 — Add your indicator or strategy
  • 4 — Configure order size
  • 5 — Create the TradingView alert
  • Alert message formats
    • For Strategy
    • For Indicator
  • Message fields explained
  • 6 — Execute & monitor
  • Symbol specifications
  • Important notes
© 2026 • Built with GeneratePress