Read time … min

AI-native runtime for Bitfinex trading strategies

Author in Cursor, Claude Code or any AI IDE. Deploy from GitHub into a managed cloud runtime with first-class MCP control, logs and region selection.

By the TradingHost engineering team

Section 01 · At a glance

At a glance

Venue
Bitfinex
Venue type
Crypto exchange (spot, margin, derivatives)
Asset class
Crypto
Supported products
Spot, margin (funded by a peer-to-peer funding pool), derivatives (perpetual contracts) at derivatives.bitfinex.com. Securities tokens via Bitfinex Securities operate as a separate venue.
Runtime model
Containerised strategy runtime (Kubernetes)
Deployment source
GitHub
Languages
Any language that runs in a container
Common integrations
Native Bitfinex REST v2, WebSocket v2, Honeycomb FIX 4.4, CCXT (bitfinex, bitfinex2), Freqtrade (via CCXT), custom
AI workflow integration
MCP control surface for Cursor, Claude Code, GitHub Copilot and CLI agents
TradingHost role
Runtime, deployment, logs, health checks, region selection, secrets, MCP control
Bitfinex role
Exchange account, API key issuance, market access, order matching, custody, settlement
Affiliation
TradingHost is independent and is not affiliated with Bitfinex or iFinex Financial Technologies Limited. Bitfinex does not serve US-domiciled customers.

Section 02 · What Bitfinex offers

What Bitfinex offers

Bitfinex offers spot, margin and derivatives trading through REST v2 and WebSocket v2, plus Honeycomb FIX 4.4 for institutional clients. Margin is funded by a peer-to-peer funding pool rather than the exchange, which makes the lending side itself a strategy surface. Perpetual contracts trade at derivatives.bitfinex.com under the F0 symbol convention (for example tBTCF0:USTF0) and require USDt0 in a dedicated derivatives wallet. Endpoint specifics change over time; the shape is durable, the precise rate-limit weights, fee tiers and symbol lists live in Bitfinex's docs.

Markets and strategy patterns

  • Spot market making on tBTCUSD and tETHUSD
  • Margin trading funded via the peer-to-peer funding pool
  • Perpetual contract trading on derivatives.bitfinex.com (F0 symbols)
  • Funding-rate strategies on the lending side (fUSD, fBTC offers)
  • Honeycomb FIX 4.4 institutional HFT
  • Sub-account scoped strategy isolation
  • Post-only and hidden order placement (order flags)
  • One-Cancels-Other (OCO) bracket logic

API surface

Product surfaces
Spot, margin (funding pool), derivatives (perpetuals via F0 symbols, requires USTF0 in derivatives wallet), securities (separate). Paper trading via tTESTBTCF0:TESTUSDTF0.
Connection methods
REST v2 (public at api-pub.bitfinex.com, authenticated at api.bitfinex.com), WebSocket v2 (wss://api-pub.bitfinex.com/ws/2 and wss://api.bitfinex.com/ws/2), Honeycomb FIX 4.4 for institutional. v1 REST and WS remain available but v2 is recommended.
Authentication
API key plus secret with a strictly increasing nonce and HMAC-SHA384 signature. Nonce cap is 9007199254740991. Each concurrent client needs its own key to avoid nonce collisions. Permissions are scoped per key (account info, orders, margin, funding, withdrawals).

For specifics, refer to Bitfinex

Specific endpoints, rate-limit weights, symbol lists, fee tiers and version history live in Bitfinex's documentation. Treat these as the source of truth.

Section 03 · Build with AI

Build your Bitfinex strategy with AI

Pick an integration method, fork a TradingHost framework starter, and author your strategy in an AI IDE. Cursor, Claude Code, GitHub Copilot and CLI-based AI agents all work with the same GitHub-native deployment loop. Bitfinex's distinctive margin model, a peer-to-peer funding pool rather than exchange-funded margin, plus the F0 symbol convention on the separate derivatives venue, shape how each framework maps onto the venue.

  • Native Bitfinex API

    Direct control over Bitfinex-specific behaviour, account data and order execution logic via REST v2 and WebSocket v2.

  • CCXT

    Common interface across Bitfinex and other crypto exchanges. CCXT exposes Bitfinex under two ids: `bitfinex` (v1) and `bitfinex2` (v2). New code should target `bitfinex2`.

  • Freqtrade or Hummingbot

    Framework-based deployments using their strategy structure and configuration model. Freqtrade reaches Bitfinex through CCXT; Hummingbot historically ships a Bitfinex spot connector.

  • Custom connector

    Your own internal trading engine or proprietary Bitfinex integration, including Honeycomb FIX 4.4 for institutional clients.

Framework support for Bitfinex products

Coverage varies by framework. Native REST v2 plus WebSocket v2 covers the full Bitfinex surface, including F0 perpetuals on the derivatives venue and the funding pool. CCXT exposes Bitfinex via two ids (`bitfinex` for v1, `bitfinex2` for v2); `bitfinex2` is recommended for new strategies. Freqtrade reaches Bitfinex through CCXT for spot, with margin and futures not officially supported. Hummingbot ships a spot-only Bitfinex connector.

FrameworkSpotMarginPerp
Native Bitfinex (REST v2 + WS v2)SupportedSupportedSupported
CCXT (bitfinex, bitfinex2)SupportedPartially supportedPartially supported
FreqtradeSupportedPartially supportedNot documented as supported
HummingbotSupportedNot documented as supportedNot documented as supported

✓ confirmed support per official framework docs. "partial" or "limited" indicates the framework reaches the surface but does not cover the full Bitfinex product. "no" indicates not officially documented as supported. Workflow links target /workflows/ pages currently in authoring.

TradingHost does not force a framework. It runs your project.

Author with AI

The framework starters above pair naturally with AI IDEs. The TradingHost MCP control surface closes the loop: AI tools can inspect deployments, review logs and manage the runtime alongside you, never the trade execution path.

Section 04 · Run on TradingHost

Run your code on TradingHost

Bitfinex provides the exchange and API access. TradingHost provides the production environment where your Bitfinex-connected strategy runs.

Instead of running strategy code on a laptop, desktop machine, generic VPS or manually configured server, you deploy from GitHub into a TradingHost-managed container runtime.

You

  • Your repo contains your code.
  • Your deployment defines how it runs.
  • Your strategy connects to Bitfinex.

TradingHost

  • Keeps the runtime online.
  • Surfaces logs and health checks.
  • Region selection.
  • Controlled deployment surface.

Deployment flow

  1. STEP 01

    Connect GitHub

    Authorise TradingHost to access your GitHub account.

  2. STEP 02

    Link a repo or start from a framework

    Point TradingHost at your existing strategy repo, or fork a TradingHost framework runtime (CCXT, Freqtrade or Hummingbot) for a working baseline.

  3. STEP 03

    Deploy into a TradingHost container

    Pick a region (EU or US-East), supply the environment values your strategy needs (Bitfinex API key plus secret, etc.), and deploy. TradingHost builds your container from the repo and runs your strategy on managed Kubernetes infrastructure. Bitfinex enforces strict per-key nonce monotonicity, so run one API key per worker process; for multiple concurrent strategies, mint a key per strategy under a sub-account so they do not collide on shared nonce space. No local Docker install required.

  4. STEP 04

    Monitor logs and health

    Watch live logs, health and runtime state from the TradingHost dashboard. The same surface is reachable through MCP from any AI IDE, so Cursor, Claude Code or a CLI agent can read deployment state and manage the runtime alongside you.

  5. STEP 05

    Update and redeploy

    Push changes to your GitHub main branch and TradingHost redeploys automatically.

Section 05 · Operational notes

Operational notes for Bitfinex

Things that bite you when you actually run a Bitfinex strategy in a containerised cloud runtime, not in Bitfinex's docs, not in framework READMEs. Every claim below is quoted or paraphrased from Bitfinex's own documentation; the deployment-side guidance is from running these strategies on TradingHost.

  1. 01 · Nonce monotonicity

    Strictly increasing per key, with a hard ceiling

    Every authenticated request needs a strictly increasing nonce per API key; the value also has a hard ceiling of 9007199254740991. Concurrent processes sharing a key will collide. Solution: one API key per running strategy or container, scoped via sub-accounts.

  2. 02 · v1 vs v2

    v2 is the supported path forward

    REST v1 still authenticates with X-BFX-APIKEY, X-BFX-PAYLOAD and X-BFX-SIGNATURE headers and a Base64 JSON payload. v2 is the supported path with faster endpoints and unified responses; new code should target v2.

  3. 03 · Sub-accounts

    One master, multiple sub-accounts, separate nonce space

    Bitfinex supports multiple sub-accounts under one master. Each sub-account holds its own API keys, wallets and nonce space, which is the recommended way to isolate strategies and avoid nonce contention.

  4. 04 · Funding pool

    Margin is peer-to-peer, not exchange-funded

    Margin on Bitfinex is funded by peer-to-peer lenders posting offers in fUSD, fBTC, etc. Borrowing strategies and lending strategies both run against the same funding book; the `No Var Rates` flag (524288) excludes variable-rate offers from matching.

  5. 05 · Derivatives split

    Perpetuals trade as F0 symbols on a separate venue

    Perpetuals trade as F0 symbols (for example tBTCF0:USTF0, tETHF0:USTF0) operated by iFinex Financial Technologies Limited. They require USDt0 in a dedicated derivatives wallet; use the Transfer Between Wallets endpoint to move funds in. Leverage defaults to 10, configurable 1 to 100 on the order.

  6. 06 · Honeycomb FIX

    FIX 4.4 is gated institutional access

    FIX is the institutional surface; access is not self-serve from the standard API page. Plan for additional onboarding and credentialing before relying on FIX in a TradingHost deployment.

  7. 07 · Rate limits

    Per-IP REST plus WebSocket connection caps

    REST limits run roughly 10 to 90 requests per minute per IP depending on endpoint, with a 60-second cooldown on breach. WebSocket caps: 5 authenticated connects per 15 seconds, 20 public connects per minute, 25 channel subscriptions per connection. Strategies that fan out across many markets should batch channels rather than opening sockets.

Section 06 · Built for

Built for

TradingHost Bitfinex runtimes are best suited to:

  • Spot market makers who want a deep, long-running USD/USDT venue
  • Margin traders who specifically want the peer-to-peer funding-pool model
  • Funding-side lenders running rate strategies on fUSD, fBTC, fETH offers
  • Perpetual traders using tBTCF0:USTF0 and other F0 pairs
  • Institutional desks that need FIX 4.4 connectivity alongside HTTP and WebSocket

Connecting GitHub and creating your first strategy is free.

Section 08 · FAQ

FAQ

No. TradingHost is independent and is not affiliated with Bitfinex or iFinex Financial Technologies Limited, the operator of the Bitfinex derivatives venue.

No. Your strategy code connects to Bitfinex and sends instructions according to your own logic, account permissions and integration method. TradingHost provides the runtime where that code runs.

No. Bitfinex API access is provided by Bitfinex. You are responsible for your Bitfinex account, API permissions, credentials and compliance with Bitfinex’s terms.

No. TradingHost is the cloud runtime where your strategy code runs. We do not provide signals, AI prediction models or pre-built bots. With TradingHost you write or generate the strategy yourself (often with Cursor or Claude Code), keep it in GitHub as your code, and use TradingHost to run it in production. 3Commas, Cryptohopper and similar products own the strategy logic; TradingHost runs your strategy.

AWS and DigitalOcean give you raw compute. You handle OS updates, container orchestration, log shipping, secret rotation, region failover and uptime monitoring yourself. TradingHost gives you a managed runtime purpose-built for trading strategies: GitHub-native deployment, MCP-driven control from AI IDEs, log and health surfaces out of the box. If you want to operate the infrastructure yourself, AWS works. If you want the runtime as a managed service, TradingHost is the shorter path.

Yes. TradingHost runs Python strategies; pick the framework runtime that matches your stack or deploy your own repo.

Yes. TradingHost supports any language that can run inside a container.

Yes. CCXT exposes Bitfinex under two ids: bitfinex targets the v1 API and bitfinex2 targets v2. Use bitfinex2 for new strategies; v2 is the supported path. Note that some Bitfinex pair listings use USD where the underlying is actually USDT, which CCXT normalises during conversion. See the CCXT framework runtime for the full setup story.

Margin is funded by a peer-to-peer book, not by the exchange. Lenders post funding offers in fUSD, fBTC, etc.; borrowers consume them when opening margin positions. The lending side is itself a strategy surface, which is unusual among major venues.

Perpetuals trade at derivatives.bitfinex.com under F0 symbols (for example tBTCF0:USTF0). They require USDt0 in a dedicated derivatives wallet, operated by iFinex Financial Technologies Limited. Transfer funds via the Transfer Between Wallets endpoint. Leverage is configurable per order, default 10, up to 100.

No. Bitfinex does not serve US-domiciled customers. If you are in the US, use Coinbase or Kraken instead. TradingHost runs your runtime regardless of region, but the venue itself must accept your account.

Yes, if your project is designed that way. You can run multiple strategy processes or services inside one runtime, or separate them into different runtimes for isolation and operational clarity. Each running strategy should hold its own API key (ideally under a sub-account) so the strict per-key nonce monotonicity does not collide. See the TradingHost runtime page for the multi-strategy model.

The fastest path is to fork a TradingHost framework runtime: CCXT or Freqtrade for a ready-to-deploy project. Or connect your own GitHub strategy repo. Linking a GitHub repo and creating a strategy is free; runtime plans are listed on the pricing page.

In your GitHub-controlled secrets workflow. TradingHost reads them at runtime through GitHub repository secrets, environment secrets or your own approved secret-management process. TradingHost does not need custody of your API key and secret. See platform secrets for the full handling model.

No. Strategies should never need withdrawal permissions. Use scoped permissions (account info, orders, margin, funding) and only enable the surfaces your strategy actually touches.

Yes. TradingHost supports MCP-based control for AI IDEs including Cursor, Claude Code, GitHub Copilot and CLI-based AI agents. AI tools can inspect deployments, review logs, restart strategies and manage runtime workflows. MCP is a control and observability surface, not the trade execution path. See the MCP control surface for the full picture.

Both. The MCP control surface works equally well from CLI-based agents (Claude Code CLI, custom MCP clients, scripted MCP calls) and from inside an IDE. The GitHub-native deployment loop also works without any AI tooling: a regular git push to your main branch triggers a redeploy.

The runtime detects the crash and exposes the relevant logs and health information. Where supported, the affected strategy can be restarted without disrupting other strategies running in the same container. Your strategy code is still responsible for safe error handling, duplicate-order protection and risk controls. See observability for the logs and health surface.

Bitfinex requires a strictly increasing nonce per API key, capped at 9007199254740991. Two processes sharing one key will collide and one will be rejected. Fix it by giving each running strategy its own API key, ideally on its own sub-account. See the Operational notes section above for the full guidance.

TradingHost runs in the EU and US-East regions. Pick the region closest to the matching engine your strategy depends on. See the regions page for routing and proximity details.

No. TradingHost is focused on production runtime and deployment. Backtesting belongs in your research stack, framework or AlgoBuilder.