Bitget Guide
Connect TradingView to Bitget (Spot, Margin, and Futures) using TradeAdapter’s direct API integration. This guide covers strategy and indicator alerts with the Message Generators.
Video walkthrough #
Bitget + TradingView setup
1 — Create Bitget API keys #
Bitget uses API keys with a passphrase. Create a key and add the TradeAdapter IP to the whitelist.
-
Open API Management
Log in to Bitget and select API Management from the menu.
-
Create new API
Click Create new API. Add the TradeAdapter IP
35.75.198.16to Link IP Address. In the Notes box enter a name (e.g. “tradeadapter”). Set a passphrase and save it — you will need it with the key and secret. -
Save your credentials
Copy and store your Access APIKey and SecretKey. The secret is shown only once. You will paste them into the alert message as
bitget_api_key,bitget_secret, andbitget_passphrase.
2 — Select the Bitget symbol in TradingView #
Open TradingView and search for the symbol using the BITGET prefix. Match the symbol to the market you will use in your message: Spot, Margin, or Futures.
Important
The {{ticker}} placeholder sends this exact symbol to Bitget. The symbol must exist in the chosen market and match the supported symbols. Check the symbol lists for min size and precision.
Bitget Spot Symbols •
Bitget Margin Symbols •
Bitget Futures Symbols
3 — Add your strategy or indicator #
Bitget supports both strategy and indicator alerts. Load your Pine Script onto the chart so it generates the trading signals.
Use the Bitget Message Generator (Strategy). One alert with trigger “Order fills only”. TradingView fills action, size, and price via {{strategy.order.action}}, {{strategy.order.contracts}}, {{strategy.order.price}}.
Use the Bitget Message Generator (Indicator). Set order_action and order_size manually in the message. Create one alert per action (e.g. Buy, Sell).
Not sure if you have a strategy or an indicator? See Indicator vs Strategy.
4 — Configure order size #
Bitget enforces symbol-specific rules (min size, precision). Configure your strategy’s position size so that {{strategy.order.contracts}} meets the symbol’s minimum and step. For Limit orders, ensure {{strategy.order.price}} respects the price precision. For indicators, set order_size in the message accordingly.
Bitget Spot •
Bitget Margin •
Bitget Futures — check min size and precision per symbol.
5 — Create the TradingView alert #
Press Alt + A (or the alarm clock icon) to create a new alert.
Strategy → one alert
Under Condition, select your strategy and set trigger to “Order fills only”. TradingView fills action, size, and price via the strategy placeholders.
Required: Webhook URL + Message
In Notifications, enable Webhook URL and paste your personal webhook from your TradeAdapter profile. Paste the JSON message in the Message field. Build it with the Bitget Message Generator (Strategy) or Bitget Message Generator (Indicator).
Alert message (Strategy) #
Use this template for strategy-based alerts. Replace the placeholder values with your API key, secret, and passphrase. Set order_market to Spot or Futures. For Margin, use margin_mode (isolated/crossed). Keep the TradingView placeholders as-is.
{
"bitget_api_key": "PUT YOUR BITGET API KEY HERE",
"bitget_secret": "PUT YOUR BITGET SECRET HERE",
"bitget_passphrase": "PUT YOUR PASSPHRASE HERE",
"real_order": "No",
"order_market": "Spot",
"order_type": "Market",
"margin_mode": "isolated",
"exchange": "bitget",
"ticker": "{{ticker}}",
"time": "{{timenow}}",
"order_contracts": "{{strategy.order.contracts}}",
"order_action": "{{strategy.order.action}}",
"order_price": "{{strategy.order.price}}",
"market_position": "{{strategy.market_position}}",
"prev_market_position": "{{strategy.prev_market_position}}"
}
Message fields explained #
| Field | Description |
|---|---|
bitget_api_key |
Your Bitget Access APIKey from the API creation step. |
bitget_secret |
Your Bitget SecretKey. Store it securely and never share it. |
bitget_passphrase |
The passphrase you set when creating the API key. |
real_order |
"Yes" sends real orders to Bitget. "No" sends test orders via TradeAdapter only. |
order_market |
"Spot" or "Futures". For margin trading, use the appropriate market and margin_mode. |
order_type |
"Market" or "Limit". For Limit orders, order_price is used as the limit price. |
margin_mode |
For Margin market only: "isolated" or "crossed". Keep as-is for Spot or Futures. |
exchange |
Must be "bitget" so TradeAdapter routes the order to Bitget. |
ticker |
The TradingView symbol from {{ticker}} (e.g. BITGET:BTCUSDT). |
order_contracts |
Position size from your strategy ({{strategy.order.contracts}}). |
order_action |
"BUY" or "SELL". Use {{strategy.order.action}} for strategies. |
order_price |
Price from the strategy ({{strategy.order.price}}), used for Limit orders. |
market_position |
Strategy position after the order ({{strategy.market_position}}). |
prev_market_position |
Strategy position before the order ({{strategy.prev_market_position}}). |
6 — Execute & monitor #
-
Start with test orders
Set
"real_order": "No"and trigger a few alerts. Check MyTrades to see how TradeAdapter interprets your signals. -
Verify on Bitget
When you set
"real_order": "Yes", monitor your Bitget account to confirm orders execute as expected. -
Recreate alerts after changes
If you change strategy parameters or the message, delete and recreate the TradingView alert so the new values are applied.
Important notes #
API security — Never share your Secret or passphrase. Use a key with trading permission only. Add IP
35.75.198.16 to the whitelist so only TradeAdapter can use the key.
Respect symbol specs — Check Spot, Margin, and Futures symbol lists for min size and precision; test with small orders before scaling.
Recreate alerts after changes — If you change strategy/indicator parameters or message fields, delete and recreate the TradingView alert.
All setup guides