> For the complete documentation index, see [llms.txt](https://docs.bigbeluga.org/llms.txt).
> Markdown versions of documentation pages are available by appending `.md` to page URLs; this page
> is available as [Markdown](https://docs.bigbeluga.org/automation-alerts/bybit.md).

# Bybit Automation Alerts

<mark style="color:$info;">Learn how to use placeholders and webhooks to send automated webhook
alerts from TradingView strategy alerts to Bybit based on official Bybit Webhook Signal Trading
specifications.</mark>

## Overview

Bybit Webhook Signal Trading allows you to automate perpetual and futures trades using signals from
TradingView strategies. By leveraging TradingView's webhook functionality and Bybit's Webhook Signal
Trading tool, you can dispatch real-time JSON payloads directly to your Bybit endpoints.

Refer to the official
[Bybit Webhook Signal Trading Guide](https://www.bybit.com/en/help-center/article/How-to-Use-and-Setup-Webhook-Signal-Trading-on-Bybit)
for complete platform specifications and help center documentation.

{% embed url="https://www.youtube.com/watch?v=kDER-3rU14g" %}

## Bybit Webhook Configuration & JSON Payload Structure

1. Go to Bybit, navigate to **Trade** → **Tools** in the order zone, select **Webhook Signal
   Trading**, and click **Create Now**.
2. Select your symbol (must match One-Way Position Mode) and enter a signal name to generate your
   unique Bybit Webhook URL and message template.
3. Configure your TradingView strategy alert using Bybit's standard JSON schema:

```json
{
  "symbol": "{{ticker}}",
  "side": "{{strategy.order.action}}",
  "qty": "{{strategy.order.contracts}}",
  "price": "{{close}}",
  "trigger_time": "{{timenow}}",
  "strategy_id": "10c176c0-6f2a-4262-9d9c-b5e78366a3ba"
}
```

### Payload Property Reference

| Property       | Value / Placeholder            | Explanation                                                                                                                                              |
| -------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `symbol`       | `{{ticker}}`                   | The active trading pair symbol (e.g., `BTCUSDT`).                                                                                                        |
| `side`         | `{{strategy.order.action}}`    | Dynamic trade action (`ENTER_LONG`, `EXIT_LONG`, `EXIT_SHORT`, `EXIT_SHORT`) from strategies. For indicator alerts, set manually to `"buy"` or `"sell"`. |
| `qty`          | `{{strategy.order.contracts}}` | Quantity of contracts for the order.                                                                                                                     |
| `price`        | `{{close}}`                    | The closing price at the moment the alert triggers.                                                                                                      |
| `trigger_time` | `{{timenow}}`                  | Timestamp of the alert trigger.                                                                                                                          |
| `strategy_id`  | Unique string                  | Unique strategy identifier generated by Bybit.                                                                                                           |

### Supported Placeholders & Parameters

- `{{ticker}}` – The active symbol or trading pair (e.g., `BTCUSDT`).
- `{{strategy.order.action}}` – Trade action (`ENTER_LONG`, `EXIT_LONG`, `EXIT_SHORT`, `EXIT_SHORT`)
  from strategies.
- **Indicator Alerts**: When using standard **BigBeluga Indicators** instead of strategies, you must
  manually set `"side"` to `"buy"` or `"sell"`.
- `{{close}}` – The closing price at the time the alert triggers.
- `{{strategy.order.contracts}}` – Order quantity in contracts.
- `{{timenow}}` – Timestamp of the alert trigger.

#### Example Message Format for Indicators

```json
{
  "symbol": "{{ticker}}",
  "side": "buy",
  "qty": "1",
  "price": "{{close}}",
  "trigger_time": "{{timenow}}",
  "strategy_id": "10c176c0-6f2a-4262-9d9c-b5e78366a3ba"
}
```

## Setting Up Webhook Alerts in TradingView

1. Open your chart on **TradingView** and load your BigBeluga strategy via the **Strategy Tester**.
2. Click the **Alert** icon on the strategy tester to create an alert.
3. Paste the Webhook URL provided by Bybit into the **Webhook URL** field.
4. Copy the message template from Bybit and paste it into the alert message box.
5. Click **Create** to activate your automated strategy webhook.

> Note: Ensure your Bybit account uses the **Unified Trading Account** and **One-Way Mode** (Hedge
> Mode is not supported for webhooks). Always test your setup thoroughly before executing live
> strategies. Refer to the
> [Bybit Webhook Signal Trading Guide](https://www.bybit.com/en/help-center/article/How-to-Use-and-Setup-Webhook-Signal-Trading-on-Bybit)
> for complete details.

---
