TradingView Binance.US API

1. Get Binance API Key
Instructions how to create API for Real account:
  • Add TradeAdapter IPs to the whitelist:
  • And Enable Spot&Margin and Futures Trading

  • Instructions how to Create Binance FUTURES TestNet account are below

    2. TradingView Alarm "Message" and "WebHook URL"
    Configure TradingView Alarm "Setting" page with following "Message" and Webhook URL. You can fins Step-by-Step instruction below.

    Webhook URL:
    For example, your WebHook URL should look like:

    Update fields highlighted by red. The rest keep as is, as they will be filled automatically by TradingView during Alarm execution. You can use Message Generator to Generate the TradingView message based on your parameters.

          "binance_api_key": "PUT YOUR BINANCE API KEY HERE",
          "binance_secret": "PUT YOUR BINANCE SECRER HERE",
          "real_order":"Yes / No",
          "order_market":"Spot / Margin / Futures",
          "order_type":"Market / Limit",
          "isolated_margin": "Yes / No",
          "exchange": "{{exchange}}",
          "ticker": "{{ticker}}",
          "time": "{{timenow}}",
          "order_contracts": "{{strategy.order.contracts}}",
          "order_action": "{{strategy.order.action}}",
          "order_price": "{{strategy.order.price}}"
    For example, final message text should look like this:

    Message Fields Explanation:
    "tradeadapter_key", "binance_api_key", "binance_secret" - Your API credentials.
    "real_order" - in case of "Yes" option order will be excuted on In case of "No" Test order will be created. Pleas check clarification for Test orders scenario Here:
    "order_market" Select which market to use Spot, Margin or Futures
    "order_type" - Select type of order "Market" or "Limit"
    "isolated_margin" - This field applicable only for Margin order. Could be "Yes" or "No". If you trading non-Margin order, can keep as "No".
    Following fields will be automatically filled by TradingView Alert Mechanism when Alert will be send:
    "exchange" - Contains Excange of the Symbol you are trading.
    "ticker" - Contacins Symbol.
    "time" - Contain time of the Alert.
    "order_contracts" - Order Size defined by your PineScript Strategy.
    "order_action" - Will contain Buy or Sell depends on your PineScript Strategy.
    "order_price" - Will contain Order Price and will be used in case of the LIMIT order.

    3. TradingView Alert Configurations Step by Step:

    STEP 1. Add Trading Strategy to the TradingView
    1.1 - Go to "PineEditor" tab page and write new or copy/paste existing trading strategy.
    1.2 - Press "Add to chart" trading strategy to your trading panel.

    STEP 2. Creat Alert for TradingView Strategy
    2.1 - Go to "Strategy Tester" tab page to check Trading strategy performance.
    2.2 - Press "Add Alert" to create Alert for your Buy/Sell signals.

    STEP 3. Configure TradingView Alert using "Message" and "WebHook URL" to connect with Broker
    3.1 - Paste "Message". You should get green mark when you enter the Message in TradingView Alert:
    3.2 - Paste "WebHook URL".

    Webhook URL:

    3. How does TEST orders work

    > for SPOT order will create TEST order on Real account (, thus Real API from is required.
    > for MARGIN. Unfortunately, Binance do not support Test orders for Margin Market. Please use smallest real order to test.
    > for FUTURES order, will create Order on Binance Testnet ( API from TestNet required.

    4. How to create Binance FUTURES TestNet account and API Key

    Biance Testnet website:
    Get API for Demo account:
    1. Login to
    2. Scroll Down to

    Also do not forget to change you TradingView message parameter "real_order" to "No",