BingX can receive signals from external platforms like TradingView and automatically execute Perpetual Futures trading (applicable for hedge mode only). All you need to do is to create a trading instruction on BingX and configure it to platforms such as TradingView to fully automate your trades. BingX offers two instruction modes: Simple Instruction and Strategy Instruction.
(1)Simple Instruction: Both the Open Instruction and Close Instruction need to be configured to enter and exit a trade. Once the instruction is set up, the trading direction, order type, margin amount and TP/SL cannot be modified.
(2) Strategy Instruction: Each indicator can be configured to an instruction to complete a complex trading strategy. It enables continuous position addition or reduction and customize an addition or reduction ratio via using variables in the Alert of TradingView.
 
How to Access Signal Trading:
Method 1: On the homepage of the BingX website, scroll down to the bottom, find Platform Service and click Signal Trading
Method 2: Click the link directly https://bingx.com/signalTrade/
 
Instructions:
Step 1: Create trading instructions on BingX.
Step 2: Configure it to the Alert on TradingView to receive BingX signals.
 
If you have any questions, please contact our online support.
 

I. How to Configure Simple Instruction?

Step 1: Create a Simple Instruction on BingX

1. Fill in the parameters
According to your desired strategy, enter the instruction's name, trading pair, direction, order type, etc.

截屏2023-07-25 21.18.37.png

*The margin mode (Isolated/Cross) and leverage amount for signal trading will be the same as your most recent Perpetual Futures settings. If you want to reconfigure your settings, click "Change Settings" below to go to Perpetual Futures to make adjustments. Then, refresh the page and your latest settings will be automatically updated.
 

2. Confirm the margin amount
Enter the amount of margin for opening the position, you can select either "By Ratio" or "By Fixed Amount".
*The funds available here are the same as your Perpetual Futures account. You can increase available funds by "Deposit" or "Transfer".

02.png
 

3. Open Instruction and Close Instruction created
You will obtain relevant parameters for the bot. These parameters need to be configured on TradingView's Alert to receive trading signals.

03.png

  

Step 2: Configure TradingView Strategy Alerts to Receive BingX Signals.

1. Configure Opening Position Signals
TradingView Alert:

Configuration Method:
After configuring the relevant parameters according to your instruction, select "Webhook URL" and fill in https://callback.bingxpro.com/api/trading-bot/v1/signal/tradingViewAlert

signal_trade.png

After pasting your Open Instruction in Message, click Create.

  
2. Configure Closing Position Signals
Follow the same steps as above. Please note that it's the Close Instruction that is pasted here. 100% of the position will be closed when the system executes your position-closing instruction.
  
3. Configured successfully
After the signals for opening and closing positions are set, you have successfully created your first signal trading bot to automatically execute TradingView strategy signals. Click Signal Trading Homepage to view.
 

The strategy instruction lets you choose between placing orders by ratio or by size. When placing orders by ratio, the opening position uses a ratio of available margin in the USDⓢ-M Futures account, determined by the value calculated by contracts * price in the signal. When closing position, the ratio is calculated using the formula: contracts / (contracts + |position_size|), based on the signal. When placing orders by size, the exact position size of the TradingView strategy is replicated. After the signal is successfully executed, the user will hold the same position size in both TradingView and BingX.

2.1 Guide to Configuring Strategy Instruction by Ratio

Step 1: Create a Strategy Instruction by Ratio on BingX

1. Fill in the parameters
According to your desired strategy, enter the instruction's name, trading pair, direction, order type, etc.
*The margin mode (Isolated/Cross) and leverage amount for signal trading will be the same as your most recent Perpetual Futures settings. If you want to reconfigure your settings, click "Change Settings" below to go to Perpetual Futures to make adjustments. Then, refresh the page and your latest settings will be automatically updated.
 
2. Created successfully and receive signals
You will obtain relevant parameters for the bot. These parameters need to be configured on TradingView's Alert to receive trading signals.
  
 

Step 2: Configure TradingView Strategy Alerts to Receive BingX Signals.

1. Set up Alert
Access TradingView's Alert:

04.png

Configuration Method:
After configuring the relevant parameters according to your instruction, select "Webhook URL" and fill in https://callback.bingxpro.com/api/trading-bot/v1/signal/tradingViewAlert

signal_trade.png

After pasting Information in Message, click Create.

long message.jpeg

2. Modify the default configuration of the script

Take BTC/USDT as an example, click "Indicators", and select the signal in "My scripts".

20230725-150402.jpeg

Click the gear icon, and fill in parameters in Properties of the strategy to adjust the fund usage when the strategy is triggered. You can configure the settings as shown in the image and save them as defaults. After configuration, for every 100 USDT traded on your TradingView, your signal bot will allocate 100% of funds in your Perpetual Contract account for opening a position.
(1) Initial capital: 100 USDT
(2) Order size: 100 USDT
(3) Pyramiding: 1 order

20230725-150407.jpeg

Note
If you wish to enter the market in batches, please modify the Pyramiding to the desired number of orders (let's assume it's N) and the "Order size" to 100/N USDT. Each time, the bot will use 1/N of the available funds in the Perpetual Futures account for placing an order. That is, for every 1 USDT traded on your TradingView, your signal bot will allocate 1/N of funds in your Perpetual Futures account for opening a position or adding to an existing position.
  
3. Configured successfully
After the signal trading is all set up, you will have your first signal trading bot to automatically execute TradingView strategy signals. Click Signal Trading Homepage to view.
   
TIPS:
If you are already a copy trading trader on BingX, your orders placed through signal trading will be automatically executed in the Perpetual Futures account, and copiers under that account will also copy the trades.
 
Logic for Opening and Closing Positions
 
A. When the user has no existing position and the signal's action is "buy", it indicates the opening of a long position. The margin used for opening a long position is calculated as = contracts * price ÷ 100 * available margin in Perpetual Futures Account.
Taking the WUSDT Perpetual Futures trading pair as example: The user has no existing position but has an available margin of 50 USDT in the Perpetual Futures Account and uses 10x leverage for WUSDT.
① When the strategy triggers an opening long position signal (buy):
{
"data":
{
"action":"buy",
"contracts":"1.554",
"position_size":"1.554"
},
"price":"0.6573",
"user_info":"STRATEGY_CFXUSDT_cfx_omvlxad863na1f9v41",
"symbol" :"WUSDT.P",
"time":"2024-05-19T09:34:05Z"
}
  

At this point, the margin used for opening the long position ≈ contracts * price ÷ 100 * available margin in Perpetual Futures Account = 1.554 * 0.6573 ÷ 100 * 50 = 0.5107221 USDT. The amount for opening the long position ≈ margin used for opening the long position * leverage = 0.5107221 USDT * 10 = 5.107221 USDT. The amount in long position that can be opened ≈ amount for opening the long position ÷ last price = 5.107221 ÷ 0.6573 = 7.77 W. (Note: The final filled amount may vary as the signal trades at market price)

B. When the user has no existing position and the signal's action is "sell", it indicates the opening of a short position. The margin used for opening a short position is calculated as = contracts * price ÷ 100 * available margin in Perpetual Futures Account.
Taking the WUSDT Perpetual Futures trading pair as example: The user has no existing position but has an available margin of 50 USDT in the Perpetual Futures Account and uses 10x leverage for WUSDT.
① When the strategy triggers an opening short position signal (sell):

{
"data":
{
"action":"sell",
"contracts":"1.554",
"position_size":"-1.554"
},
"price":"0.6573",
"user_info":"STRATEGY_CFXUSDT_cfx_omvlxad863na1f9v41",
"symbol" :"WUSDT.P",
"time":"2024-05-19T09:34:05Z"
}

 

At this point, the margin used for opening the short position ≈ contracts * price ÷ 100 * available margin in Perpetual Futures Account = 1.554 * 0.6573 ÷ 100 * 50 = 0.5107221 USDT. The amount for opening the short position ≈ margin used for opening the short position * leverage = 0.5107221 USDT * 10 = 5.107221 USDT. The amount in short position that can be opened ≈ amount for opening the short position ÷ last price = 5.107221 ÷ 0.6573 = 7.77 W. (Note: The final filled amount may vary as the signal trades at market price)

 

C. When the user has an existing long position and the signal‘s action is "buy", it indicates increasing the long position. The margin used for increasing a long position = contracts * price ÷ 100 * available margin in Perpetual Futures Account. When the signal's action is "sell", it indicates closing the long position. The position closing amount = |contracts| ÷ (|position_size| + |contracts|) * available amount for closing. If "position_size" is 0, then the entire position is closed.
Taking the WUSDT Perpetual Futures trading pair as example: The user has an existing long position of 100 W, an available margin of 50 USDT in the Perpetual Futures Account and uses a 10x leverage for WUSDT.
① When the strategy triggers an increasing long position signal (buy):

{
"data":
{
"action":"buy",
"contracts":"1.554",
"position_size":"67.598"
},
"price":"0.6573",
"user_info":"STRATEGY_CFXUSDT_cfx_omvlxad863na1f9v41",
"symbol" :"WUSDT.P",
"time":"2024-05-19T09:34:05Z"
}
 
At this point, the margin used for increasing the long position ≈ contracts * price ÷ 100 * available margin in Perpetual Futures Account = 1.554 * 0.6573 ÷ 100 * 50 = 0.5107221 USDT. The amount for opening the long position ≈ margin used for opening the long position * leverage = 0.5107221 USDT * 10 = 5.107221 USDT. The amount in long position that can be opened ≈ amount for opening the long position ÷ last price = 5.107221 ÷ 0.6573 = 7.77 W. (Note: The final filled amount may vary as the signal trades at market price). The final amount of W in long position in the user's BingX account is ≈ initial position amount + new position amount = 100 + 7.77 = 107.77 W.
② When the strategy triggers a closing long position signal (sell):
{
"data":
{
"action":"sell",
"contracts":"1.554",
"position_size":"64.490"
},
"price":"0.6573",
"user_info":"STRATEGY_CFXUSDT_cfx_omvlxad863na1f9v41",
"symbol" :"WUSDT.P",
"time":"2024-05-19T09:34:05Z"
}

At this point, the amount to be closed is ≈ |contracts| ÷ (|position_size| + |contracts|) * available amount for closing = 1.554 ÷ (1.554 + 67.598) * 100 ≈ 2.247 W. The final amount of W in long position in the user's BingX account is ≈ initial position amount - closed position amount = 100 - 2.247 = 97.753 W.

 

D. When the user is holding an existing short position and the signal's action is "sell", it indicates increasing the short position. The margin used for increasing a short position = contracts * price ÷ 100 * available margin in Perpetual Futures Account. When the signal's action is "buy", it indicates closing the short position. The position closing amount = |contracts| ÷ (|position_size| + |contracts|) * available amount for closing. If "position_size" is 0, then the entire position is closed.
Taking the WUSDT Perpetual Futures trading pair as example: The user has an existing short position of 100 W, an available margin of 50 USDT in the Perpetual Futures Account and uses 10x leverage for WUSDT.
① When the strategy triggers an increasing short position signal (sell):

{
"data":
{
"action":"sell",
"contracts":"1.554",
"position_size":"-67.598"
},
"price":"0.6573",
"user_info":"STRATEGY_CFXUSDT_cfx_omvlxad863na1f9v41",
"symbol" :"WUSDT.P",
"time":"2024-05-19T09:34:05Z"
}
 
At this point, the margin used for increasing the short position ≈ contracts * price ÷ 100 * available margin in Perpetual Futures Account = 1.554 * 0.6573 ÷ 100 * 50 = 0.5107221 USDT. The amount for opening the short position ≈ margin used for opening the short position * leverage = 0.5107221 USDT * 10 = 5.107221 USDT.
The amount in short position that can be opened ≈ amount for opening the short position ÷ last price = 5.107221 ÷ 0.6573 = 7.77 W. (Note: The final filled amount may vary as the signal trades at market price)
The final amount of W in short position in the user's BingX account is ≈ initial position amount + new position amount = 100 + 7.77 = 107.77 W.
② When the strategy triggers a closing short position signal (buy):
{
"data":
{
"action":"buy",
"contracts":"1.554",
"position_size":"-64.490"
},
"price":"0.6573",
"user_info":"STRATEGY_CFXUSDT_cfx_omvlxad863na1f9v41",
"symbol" :"WUSDT.P",
"time":"2024-05-19T09:34:05Z"
}
 
At this point, the amount of short position to be closed is ≈ |contracts| ÷ (|position_size| + |contracts|) * available amount for closing = 1.554 ÷ (1.554 + 67.598) * 100 ≈ 2.247 W. The final amount of W in short position in the user's BingX account is ≈ initial position amount + closed short position amount = 100 - 2.247 = 97.753 W.
 
2.2 Guide to Configuring Strategy Instruction by Size

Step 1: Create a strategy instruction by size on BingX.

1. Fill in the parameters
According to your desired strategy, enter the instruction's name, trading pair, direction, order type, etc.
*The margin mode (Isolated/Cross) and leverage amount for signal trading will be the same as your most recent Perpetual Futures settings. If you want to reconfigure your settings, click "Change Settings" below to go to Perpetual Futures to make adjustments. Then, refresh the page and your latest settings will be automatically updated.
2. Once created, obtain the instruction information
You will obtain relevant parameters for the bot. These parameters need to be configured on TradingView's Alert to receive trading signals.
1031-2.png

Step 2: Configure it to the Alert on TradingView to receive BingX signals.

1. Configure signal
Access TradingView's Alert:
Configuration Method:
After configuring the relevant parameters according to your instruction, select "Webhook URL" and fill in https://callback.bingxpro.com/api/trading-bot/v1/signal/tradingViewAlert
After pasting Information in Message, click Create.
2. Settings completed
After the signal trading is all set up, you will have your first signal trading bot to automatically execute TradingView strategy signals. Click Signal Trading Homepage to view.
PS: When placing orders by size
1. The exact position size of the TradingView strategy is replicated. After the signal is successfully executed, the user will hold the same position size in both TradingView and BingX.
2. When position_size > 0, it indicates a long position; position_size < 0 indicates a short position, and position_size = 0 means closing the position.
Examples to Illustrate the Logic of Opening, Adding, and Closing Positions.
The signal parameter "position_size" represents the position size on TradingView, while M represents the position size on BingX. The "+" indicates a long position, and "-" indicates a short position.
Scenario A: When position_size = 0, this closes the position, and neither side holds a position.
Scenario B: When position_size > 0, it indicates a long position in TradingView.
  • Adding to Long Position: When position_size = 2 BTC and M = 1 BTC, adding 1 BTC brings M to 2 BTC.
  • Reducing Long Position: When position_size = 2 BTC and M = 3 BTC, reducing by 1 BTC brings M down to 2 BTC.
  • Closing and Reopening Position: When position_size = 2 BTC and M = -1 BTC, closing out -1 BTC and reopening with 2 BTC results in M = 2 BTC.
  • No Change in Position: When position_size = 2 BTC and M = 2 BTC, there is no increase or decrease.
Scenario C: When position_size < 0, it indicates a short position in TradingView.
  • Adding to Short Position: When position_size = -2 BTC and M = -1 BTC, adding 1 BTC short brings M to -2 BTC.
  • Reducing Short Position: When position_size = -2 BTC and M = -3 BTC, reducing by 1 BTC brings M to -2 BTC.
  • Closing and Reopening Position: When position_size = -2 BTC and M = 1 BTC, closing out 1 BTC and reopening with a short position of 2 BTC results in M = -2 BTC.
  • No Change in Position: When position_size = -2 BTC and M = -2 BTC, there is no increase or decrease.
 
 
Notes:
1. Signal Trading is carried out within BingX Perpetual Futures. Trades use the funds in the Perpetual Futures account. Please ensure that you have sufficient funds in your account to avoid trading failures. Click View Funds to check.
2. The trading pairs supported by Signal Trading are the same as Perpetual Futures. The rules for trading fees can be viewed by clicking Fee Schedule.
3. You need to subscribe to TradingView Pro to use the Webhook function of TradingView.
4. In addition to TradingView, BingX Signal Trading also supports the receipt of other platforms' signals.
5. The triggering of signals depends on external platforms. Please be aware that there may be a loss of or delay in signals.
6. For traders running multiple trading pairs, it is recommended to use subaccounts for asset isolation and create a separate subaccount for each trading pair and configure one strategy for each account, as Strategy Instruction will use funds in Perpetual Futures.
7. Please initialize (reset to zero) the positions on both TradingView and BingX before starting to link signals.
8. For strategy instructions by ratio, use position_size=0 to close positions. Avoid using the one-click reverse function.