Skip to main content

BitMex — Futures with Testnet

BitMex was the first major crypto derivatives exchange and still runs the cleanest Bitcoin-margined futures market in the industry. TVH supports BitMex's live and testnet environments as two separate exchange identifiers. No spot trading on BitMex — futures only.

TL;DR
  • 2 exchange identifiers: bitmex, bitmex-testnet
  • No spot trading — BitMex is derivatives-only
  • Symbol uses XBT (not BTC) — legacy naming
  • Testnet has full feature parity — separate site, separate API key
  • All variants use https://alerts.tv-hub.org
Open Bitmex accountAffiliate link — TradingView Hub may earn a commission at no cost to you.

Variants

BitMex Live

FieldValue
Exchange identifierbitmex
Webhook URLhttps://alerts.tv-hub.org
Symbol formatXBTUSD (perpetual), XBTM26 (quarterly) — XBT not BTC
Contract typesPerpetual + Quarterly Futures
Max leverage100× on XBT pairs, lower on alts
PermissionsOrder + OrderCancel
Sub-account support❌ Not supported in TVH
Demo supportUse bitmex-testnet identifier

Webhook URL:

API key creation

BitMex has no third-party binding; an IP/CIDR restriction is optional. No passphrase.

  1. Log in at bitmex.com and open Account from the top navigation.

    BitMex top navigation — Account

  2. In the Account sidebar, open API Keys.

    BitMex Account sidebar — API Keys

  3. Click Create an API Key, give it a name, set Key Permissions to Order (this allows placing and cancelling orders), and leave Withdraw off. CIDR is optional — leave it blank to allow all IPs, or pin it to the TVH IPs. Confirm with your 2FA token and click Create API Key.

    BitMex Create an API Key — Order permission, optional CIDR

  4. Write down the Secret immediately — BitMex shows it only once.

    BitMex secret key shown once

  5. Add the Key + Secret to TVH at Account → Settings → API Keys with exchange bitmex (no passphrase needed).

    TVH Add Key form — Exchange Bitmex

Symbol format reference

PairPerpetualQuarterly (Jun 2026)
BTC/USDXBTUSDXBTM26
ETH/USDETHUSDETHM26
SOL/USDSOLUSD

XBT is the legacy ISO-4217 unofficial code for Bitcoin. BitMex never moved to BTC; the codebase still uses XBT. Every BTC pair on BitMex starts with XBT instead.

Example payload:

{
"token": "your-tvh-token",
"exchange": "bitmex",
"pair": "XBTUSD",
"isMarket": true,
"isBuy": true,
"units": 100,
"leverage": 10,
"marginType": "isolated"
}
BitMex sizes in contracts

BitMex contracts are sized in USD value per contract (e.g. 1 XBTUSD contract = $1 of BTC exposure). When you set "units": 100, that's 100 contracts = $100 of notional. This differs from most other exchanges where units is the underlying coin amount.

Common BitMex quirks

  • XBT, not BTC. Every Bitcoin pair starts with XBT. Don't paste BTCUSD — it won't resolve.
  • Cross-margin via the leverage slider. On BitMex, dragging the leverage slider all the way to the left (= 0) sets cross-margin. Any non-zero value sets isolated at that leverage. TVH respects whatever you set in marginType + leverage.
  • Contracts, not coins. BitMex sizes positions in contracts (USD-denominated value), not in BTC. "units": 100 on XBTUSD = $100 notional, not 100 BTC.
  • useFixedSize is awkward. Since contracts are USD-denominated, "fixed quote size" already maps to the contract count. TVH still accepts the flag but it's redundant on BitMex.
  • 100% Bitcoin-margined PnL. All positions settle in XBT. Your PnL is denominated in XBT, not USD.
  • No sub-accounts in TVH. BitMex has sub-accounts on the exchange, but TVH doesn't currently route to them.

Feature support

FeatureLiveTestnet
Market & Limit orders
Multiple TPs
Trailing Stop
Scaled Orders
useFixedSize✅ (redundant — see above)
useEntireAccountBalance
Hedge Mode❌ Not supported
Sub-Accounts
Limit Order Chasing
Demo Account checkbox❌ (use testnet id)

Full matrix: Exchange Quirks Reference.