Home

/

Guides

/

TradingView to Bitfinex

Exchange SetupUpdated 2026-02-07

TradingView to Bitfinex Derivatives: Webhook Automation

8 min read

2026-02-07

Why Automate Bitfinex with TradingView

Bitfinex is one of the most established cryptocurrency exchanges in the world, operating since 2012. It has built a reputation for institutional-grade infrastructure, deep liquidity on major trading pairs, and a comprehensive suite of professional trading features. For serious traders looking for a reliable venue for automated execution, Bitfinex offers the stability and depth that comes from over a decade of continuous operation.

What sets Bitfinex apart is its dual-market support. The exchange offers both spot trading for direct cryptocurrency ownership and derivatives (perpetual contracts) for leveraged trading. Flipr.Cloud supports both markets: use Bitfinex_D for derivatives and Bitfinex_S for spot. This flexibility means you can automate your entire trading strategy across both markets from a single platform.

Despite the advantages of a professional-grade exchange, manual trading always hits the same wall: human limitations. Crypto markets operate 24/7/365, and the most profitable moves often happen when you least expect them. Fatigue, emotional reactions, and simple unavailability mean missed entries and exits. Even the best strategy fails if it cannot be executed consistently.

TradingView provides the analytical framework with Pine Script, advanced charting, and alert conditions. Flipr.Cloud completes the chain by turning those alerts into real trades. When your TradingView indicator triggers, the webhook fires to Flipr.Cloud, which parses your plain-text command and places the order on Bitfinex within 100 to 350 milliseconds. No JSON. No complex API wrappers. Just simple, readable commands that do exactly what they say.

Flipr.Cloud routes Bitfinex trades through its EU server, providing reliable low-latency connectivity to Bitfinex infrastructure. With connection pooling and pre-warmed API connections, order execution is consistent and fast regardless of when your alerts fire.

Prerequisites

Before you begin, make sure you have the following accounts and tools ready. The entire setup takes about 5 to 10 minutes once you have these in place.

  1. Bitfinex Account (verified) — Sign up at bitfinex.com and complete identity verification. You need a verified account to create API keys and access both spot and derivatives markets.
  2. TradingView Account (Essential plan or higher) — Webhooks are a paid feature on TradingView. The Essential plan (or higher) is required to send webhook notifications from your alerts. The free plan does not support webhooks.
  3. Flipr.Cloud Account — Create a free account at flipr.cloud. The free trial gives you full access to all Pro features with no time limit and no credit card required, so you can test everything before committing.

Spot and Derivatives Support

Flipr.Cloud supports both Bitfinex Derivatives (Bitfinex_D) and Bitfinex Spot (Bitfinex_S). This guide primarily covers derivatives trading, but the setup process for spot is nearly identical. Just use the Bitfinex_S suffix for spot orders. You can even add both and run strategies on both markets simultaneously.

Step 1: Create a Bitfinex API Key

The API key is how Flipr.Cloud authenticates with Bitfinex to place orders on your behalf. You will create a restricted key that can only trade, never withdraw, ensuring your funds stay safe even if the key is ever compromised.

  1. Log in to your Bitfinex account and navigate to Account > API Keys.
  2. Click "Create New Key".
  3. Give the key a descriptive label, such as Flipr-TradingView or TV-Automation.
  4. Set Permissions: Bitfinex has granular permission controls. Enable "Orders" (read and write) for trade execution. If you also want balance checking, enable "Account Info" (read only). Do not enable "Withdraw" permissions.
  5. IP Whitelisting (recommended): For extra security, add the Flipr.Cloud EU server IP to the allowed list. You can find the current server IP in your Flipr.Cloud dashboard under API Keys settings.
  6. Click "Generate API Key" and complete any 2FA verification Bitfinex requires.
  7. Save your API Key and API Secret immediately. Bitfinex only shows the Secret once. Store both values in a secure password manager.

Security Warning

Never share your API key or secret with anyone. Never enable withdrawal permissions for a trading bot key. If you suspect your key has been compromised, delete it immediately from Bitfinex and create a new one. Flipr.Cloud encrypts all API keys at rest using industry-standard Fernet encryption.

Step 2: Add the API Key to Flipr.Cloud

Now that you have your Bitfinex API key and secret, you need to register them with Flipr.Cloud so it can execute trades on your behalf.

  1. Log in to Flipr.Cloud and navigate to the API Keys page from the sidebar.
  2. Click the "Add API Key" button.
  3. Select Bitfinex as the exchange.
  4. Select your desired market type: Derivatives for perpetual contracts with leverage, or Spot for direct crypto trading.
  5. Paste your API Key and API Secret into the corresponding fields.
  6. Give the key a recognizable label (e.g., Bitfinex-Derivatives or Bitfinex-Spot).
  7. Click "Test Connection" to verify that Flipr.Cloud can reach Bitfinex with your credentials.

Connection Verified

If the test shows your account balance, the connection is working correctly. Flipr.Cloud is now authorized to place trades on your Bitfinex account. If the test fails, double-check that your API key has Order permissions enabled and that you copied the key and secret without extra spaces.

After adding the key, you will see your personal webhook URL on the dashboard. It looks like:

Your Webhook URL

https://flipr.cloud/webhook/{your_user_id}/{your_webhook_token}

Copy this URL. You will need it in the next step when configuring your TradingView alert.

Step 3: Create a TradingView Alert with Webhook

This is where the automation happens. You will configure a TradingView alert that sends a webhook request to Flipr.Cloud every time your indicator or strategy triggers. Flipr.Cloud will parse the message and execute the trade on Bitfinex instantly.

  1. Open your chart on TradingView with the indicator or strategy you want to automate.
  2. Click the "Alert" button (clock icon) or press Alt + A.
  3. Set your alert condition (e.g., indicator crossing a threshold, strategy entry signal, price level).
  4. In the "Notifications" tab, check "Webhook URL" and paste your Flipr.Cloud webhook URL.
  5. In the "Message" field, enter your trading command using Smart Syntax. This is plain text, not JSON:

Alert Message: Derivatives (Market Entry with SL/TP)

BTCUSDT on Bitfinex_D market long 0.01 sl off 2% tp off 5%

Alert Message: Spot (Buy Order)

BTCUSDT on Bitfinex_S market long 0.001

Two lines for each command. The first line specifies the symbol and exchange with the correct suffix. The second line is the trading command. When the derivatives alert fires, Flipr.Cloud will:

  • Open a long position of 0.01 BTC on Bitfinex Derivatives

  • Set a stop loss 2% below the entry price

  • Set a take profit 5% above the entry price

Click "Create" to save the alert. TradingView will now send a webhook to Flipr.Cloud every time this alert triggers.

About Bitfinex_D and Bitfinex_S

The _D suffix routes to Bitfinex Derivatives (perpetual contracts with leverage). The _S suffix routes to Bitfinex Spot (direct crypto trading). Always use the correct suffix for your intended market. If you have multiple Bitfinex API keys, target a specific one by using the key label, e.g., BTCUSDT on Bitfinex-Derivatives.

Step 4: Test with a Small Order

Before deploying your full strategy, always test with the smallest possible position size. This confirms that the entire pipeline works: TradingView fires the alert, Flipr.Cloud receives it, parses the command, and executes the trade on Bitfinex.

  1. Create a test alert with a condition that will trigger soon (e.g., price crossing a level that is close to the current price).
  2. Use the minimum position size for the pair. Start with the smallest allowed amount to minimize risk during testing.
  3. Open the Real-Time Log on your Flipr.Cloud dashboard. This shows every incoming webhook and the resulting trade execution in real time via Server-Sent Events.
  4. Wait for (or manually trigger) the alert. Watch the Real-Time Log for the execution confirmation.
  5. Verify the order on Bitfinex by checking your Positions (derivatives) or Order History (spot).

Pay attention to the execution speed shown in the Real-Time Log. For Bitfinex, you should see execution times in the 100 to 350ms range. This is the time from when Flipr.Cloud received the webhook to when the order was confirmed by Bitfinex.

Quick Test Without Waiting

You can also test your webhook directly using the "Test Webhook" feature on the Flipr.Cloud dashboard, or by sending a manual HTTP POST request to your webhook URL. This lets you verify the connection without waiting for a TradingView alert to trigger.

Useful Smart Syntax Commands for Bitfinex

Flipr.Cloud uses Smart Syntax, a plain-text command format designed for TradingView webhooks. Here are the most common commands you will use with Bitfinex. Examples below use Bitfinex Derivatives (Bitfinex_D), but the same command structure works for Spot (Bitfinex_S) where applicable.

Market Entry with Stop Loss and Take Profit

The most common command. Opens a position at market price with protective stop loss and take profit orders placed automatically.

Market Long with SL/TP

BTCUSDT on Bitfinex_D market long 0.01 sl off 2% tp off 5%

The off prefix means "offset from current price." So sl off 2% places the stop loss 2% below your entry, and tp off 5% places the take profit 5% above.

Limit Entry

Place a limit order at a specific offset from the current price, with stop loss and take profit.

Limit Order

ETHUSDT on Bitfinex_D limit long 0.1 off 1% sl off 2% tp off 5%

This places a limit buy order 1% below the current price. The SL and TP will be placed after the limit order fills.

Close a Position

Close part or all of an open position. Use percentage of position size for flexible exits.

Close Entire Position

BTCUSDT on Bitfinex_D close long 100%

Close Half Position

BTCUSDT on Bitfinex_D close long 50%

Entry-Relative Stop Loss and Take Profit

Use the e prefix to set SL/TP relative to your entry price instead of the current price. This is useful when the market price may have moved by the time the order executes.

Entry-Relative SL/TP

ETHUSDT on Bitfinex_D market short 0.5 sl e+1.5% tp e-4%

For a short position, sl e+1.5% places the stop loss 1.5% above entry, and tp e-4% places take profit 4% below entry.

Multiple Take Profits

You can send multiple commands in a single webhook message using a block format. This is useful for scaling out of a position at different price levels.

Entry with Multiple Take Profits

BTCUSDT on Bitfinex_D market long 0.03 takeprofit long 33%p off 3% takeprofit long 33%p off 5% takeprofit long 100%p off 8%

This opens a 0.03 BTC long, then sets three take profit levels: 33% of the position at 3% profit, another 33% at 5%, and the remaining position at 8%.

Check Balance

You can check your Bitfinex account balance at any time by sending a simple balance command.

Balance Check

BTCUSDT on Bitfinex_D balance

Bitfinex-Specific Tips

Bitfinex has some exchange-specific characteristics that are worth understanding when setting up your automation. Here are the key points to keep in mind.

Dual Market Support: Derivatives and Spot

Bitfinex is one of the few exchanges where Flipr.Cloud supports both derivatives and spot markets. Use Bitfinex_D for perpetual contracts (leveraged trading, long and short) and Bitfinex_S for spot (direct cryptocurrency trading). You can add separate API keys for each market or use a single key with both market type registrations.

Institutional-Grade Infrastructure

Operating since 2012, Bitfinex has one of the most mature and battle-tested trading engines in crypto. The platform is designed for professional and institutional traders, which means reliable order execution, deep liquidity, and consistent API performance. This translates directly into more predictable fills for your automated strategies.

Strong BTC and ETH Liquidity

Bitfinex is particularly known for deep liquidity on BTC and ETH pairs. If your TradingView strategy focuses on major pairs, Bitfinex often provides excellent fill prices with minimal slippage. The institutional user base contributes to thick order books, especially during high-volume periods.

EU Server Routing

Flipr.Cloud routes all Bitfinex orders through its EU server, providing reliable low-latency connectivity. This is handled automatically. When you send a webhook to Flipr.Cloud, the system detects Bitfinex as the target exchange and routes the request to the optimal server before executing the trade.

Granular API Permissions

Bitfinex offers some of the most granular API permission controls in the industry. You can precisely control what the API key can do: read account info, place orders, manage funding, and more. For Flipr.Cloud, you only need Order (write) permission. This fine-grained control is an extra layer of security for your automated trading setup.

Troubleshooting

If your webhook automation is not working as expected, here are the most common issues and their solutions. Most problems are related to API key configuration or symbol formatting.

"Invalid API Key" Error

  • Verify you copied the API key and secret correctly, with no extra spaces or characters.
  • Confirm the key has Order (write) permission enabled on Bitfinex.
  • Bitfinex API keys can expire. Check that your key is still active in the Bitfinex API management panel.
  • Use the "Test Connection" button in Flipr.Cloud to re-verify.

Wrong Market (Derivatives vs Spot)

  • Make sure you are using the correct suffix: Bitfinex_D for derivatives and Bitfinex_S for spot.
  • Verify that your API key in Flipr.Cloud is registered under the correct market type (Derivatives or Spot).
  • You can add the same Bitfinex API key twice in Flipr.Cloud with different market types if you want to trade on both markets.

"Insufficient Balance" Error

  • Bitfinex uses separate wallets for different features. Ensure funds are in the correct wallet for your trading type (Derivatives wallet or Exchange wallet for spot).
  • Transfer funds between wallets on Bitfinex if needed. This is instant and free within your account.
  • For derivatives, check that your position size relative to leverage does not exceed available margin.

"Symbol Not Found" Error

  • Use the standard format BTCUSDT in your webhook. Flipr.Cloud handles the conversion to Bitfinex internal format.
  • Do not use Bitfinex-specific symbols (like tBTCUSD) in your webhook messages.
  • Verify that the pair exists on the market you are targeting (derivatives pairs differ from spot pairs).

Webhook Not Received

  • Confirm the webhook URL is correctly pasted in TradingView. It should start with https://flipr.cloud/webhook/.
  • Check that your TradingView plan supports webhooks (Essential or higher).
  • Look at the Real-Time Log on Flipr.Cloud to see if the webhook arrived but failed to execute.
  • Make sure the alert is active and has not expired.

Frequently Asked Questions

Ready to Automate Your Trading?

Set up TradingView webhook automation in under 2 minutes. No JSON required. Works with 15+ exchanges.

Full Pro features • No time limit • No credit card