How to Set up a BloFin Trading Signal Bot with TradingView?

June 7, 2025 at 06:21 PM
With the launch of Signal Bots, TradingView users and signal suppliers can now publish and set up a Signal Bot with their TradingView signals. Follow the step-by-step guide below to start trading with signals on BloFin.
 
Kindly use the following link to access a comprehensive guide detailing the specifications for alert messages: Alert Message Specifications.
 
Should you encounter any difficulties, please consult the guide containing a list of frequently asked questions in FAQs. This resource is designed to assist you in resolving any issues you may encounter while using the product.
 

Step 1: Access the Signal Bot

  1. Log in to your BloFin account, and navigate to Futures -> Trading Bots.

1.png

  1. Select the Signal Bot -> Add a Signal to enter the [Add a TradingView signal] interface.

3.png

Step 2: Create your Signal

  1. We have simplified the experience to help users quickly set up their TradingView signals. Create a webhook on BloFin. On the [Add a TradingView Signal] interface, you may name your signal (up to 30 characters long) and insert an optional description of the signal (up to 150 characters long). Once done, click 'Next'.
  1. Run a Strategy on TradingView. The next page prompts you to add the Webhook URL and AlertMsg Specification that is auto-generated by BloFin. From here, click [TradingView] to directly access the TradingView website to customize your signal and fill in the Webhook URL and AlertMsg Specification.
"TradingView": Geared towards users who utilize TradingView strategy scripts, particularly those employing strategy.*() functions for signal transmission.
 

 

Step 3: Configure TradingView alerts

Kindly use the following link to access a comprehensive guide detailing the specifications for alert messages: Alert Message Specifications.
 
To begin, open TradingView and pick the trading pair you want to work with. (Please ensure you're selecting the appropriate perpetual swap contract.)
 
You can access the complete list of perpetual swaps supported on BloFin through the pair selection list available on the Trade page.
 

TradingView Strategy Scripts Guide: For Pinescript strategy creators who utilize the strategy.*() functions

Step 1: Configure your strategy script in Pine Editor, and click "Save" and "Add to chart". Alternatively, if you have an existing strategy script, add it to your chart.
 
 
Step 2: Select the gear icon associated with the strategy you've added to your chart. Adjust your strategy properties like your order size according to your preferences. Once done, click "OK" to finalize the settings.
 
 

How do I align my TradingView strategy order settings with BloFin?

In your TradingView strategy, you have three options for configuring order parameters: You can define your "order size" in terms of USDT, the number of contracts, or as a percentage of equity based on your Initial Capital. While all of these approaches can ultimately be adapted for use on BloFin, it's essential to have a clear understanding of how each method operates on TradingView and how it translates onto the BloFin platform. Here's a concise overview of the different scenarios to guide you through this process.
  1. Order size: USDT
This approach is straightforward and user-friendly. You input your order size directly in absolute terms using your quote currency, USDT. When conducting TradingView backtesting, this value will serve as the basis for all your order placements.
 
 
To ensure seamless compatibility with BloFin, remember to set your "investmentType" to "base" and configure "amount" as "{{strategy.order.contracts}}". By following these specifications, your order on BloFin will align precisely with your intended TradingView strategy.
 
{
"id": "{{strategy.order.id}}",
"action": "{{strategy.order.action}}",
"marketPosition": "{{strategy.market_position}}",
"prevMarketPosition": "{{strategy.prev_market_position}}",
"instrument": "{{ticker}}",
"signalToken": "********", //enter the signalToken for your signal
"timestamp": "{{timenow}}",
"maxLag": "60",
"investmentType": "base",
"amount": "{{strategy.order.contracts}}"
}

 

  1. Order size: Contracts
A pivotal distinction to recognize is that the concept of "contracts" is defined differently on TradingView and BloFin. On TradingView, a contract represents a single unit of the perpetual swap at the prevailing price (equivalent to one unit of base currency i.e. one contract of BTCUSDT perp is equivalent to purchasing 1 BTC worth). Conversely, on BloFin, the "contract sizes" are unique for each perpetual swap contract (e.g. One contract of BTCUSDT perp is equivalent to purchasing 0.001 BTC worth). More information about BloFin contract sizes is available here.
 
 
To ensure seamless alignment with BloFin, it's vital to configure your "investmentType" as "base" and set "amount" to "{{strategy.order.contracts}}". Notably, on TradingView, the "{{strategy.order.contracts}}" placeholder effectively corresponds to the amount in the base currency. This choice of "investmentType" as "base" facilitates direct compatibility. Adhering to these specifications guarantees that your orders on BloFin perfectly mirror your intended TradingView strategy.
 
{
"id": "{{strategy.order.id}}",
"action": "{{strategy.order.action}}",
"marketPosition": "{{strategy.market_position}}",
"prevMarketPosition": "{{strategy.prev_market_position}}",
"instrument": "{{ticker}}",
"signalToken": "********", //enter the signalToken for your signal
"timestamp": "{{timenow}}",
"maxLag": "60",
"investmentType": "base",
"amount": "{{strategy.order.contracts}}"
}
  1. Order size: % of equity
When utilizing "% of equity," it's crucial to comprehend that your equity commences with the value you specify as your Initial Capital. Subsequently, your equity is defined and evaluated through your TradingView backtesting.
 
 
While it's possible to emulate this by configuring "investmentType" as "base" and "amount" as "{{strategy.order.contracts}}" (as depicted below), it's essential to bear in mind that the values derived from this method are heavily influenced by backtesting calculations. In a real-world scenario, discrepancies between backtesting and live trading can occur, as backtesting is designed for approximate estimations rather than precise order execution. Therefore, it's advisable to set your order size definitions in either USDT or contract terms on TradingView.
{
"id": "{{strategy.order.id}}",
"action": "{{strategy.order.action}}",
"marketPosition": "{{strategy.market_position}}",
"prevMarketPosition": "{{strategy.prev_market_position}}",
"instrument": "{{ticker}}",
"signalToken": "********", //enter the signalToken for your signal
"timestamp": "{{timenow}}",
"maxLag": "60",
"investmentType": "base",
"amount": "{{strategy.order.contracts}}"
}
 
Step 3: Click on the "Alert" on the top toolbar, and change "Condition" to the script just added to the chart with "Order fills only". The expiration could also be selected as an "Open-ended alert" for convenience.
 
 
Step 4: Retrieve the alert message template from the TradingView tab within the BloFin Alert Message Specification on your BloFin Signal. Subsequently, paste this template into the "Message" section of your TradingView alert, along with a corresponding Alert Name of your choosing.
 
If you wish to make any modifications to the recommended template for your alert message, you're welcome to do so, ensuring that the changes adhere to our Alert Message Specifications provided here.
 
Чи була ця стаття корисною?