> ## Documentation Index
> Fetch the complete documentation index at: https://docs.whitebit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Futures Trading

> Perpetual contracts on 270+ pairs with up to 100x leverage, Hedge Mode, and funding rate mechanics on WhiteBIT.

export const RegionBaseUrl = ({className = "", showBaseUrl = true}) => {
  const [region, setRegionState] = useState(() => {
    if (typeof window !== 'undefined') {
      return localStorage.getItem("api-region-preference") || "com";
    }
    return "com";
  });
  const [mounted, setMounted] = useState(false);
  const observerRef = useRef(null);
  const isSyncingRef = useRef(false);
  const updateAllContentOnPage = targetRegion => {
    try {
      const domainFrom = targetRegion === "eu" ? "whitebit.com" : "whitebit.eu";
      const domainTo = targetRegion === "eu" ? "whitebit.eu" : "whitebit.com";
      const links = document.querySelectorAll('a');
      links.forEach(link => {
        let href = link.getAttribute('href');
        if (href && href.includes(domainFrom)) {
          link.setAttribute('href', href.replace(domainFrom, domainTo));
        }
      });
      const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_TEXT, {
        acceptNode: node => {
          if (node.parentElement?.closest('.region-toggle-component')) {
            return NodeFilter.FILTER_REJECT;
          }
          return node.textContent.includes(domainFrom) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT;
        }
      });
      let currentNode;
      while (currentNode = walker.nextNode()) {
        currentNode.textContent = currentNode.textContent.replace(new RegExp(domainFrom, 'g'), domainTo);
      }
      console.log(`[RegionSync] Global content updated to ${domainTo}`);
    } catch (e) {
      console.error("[RegionSync] Error updating content:", e);
    }
  };
  const updateRegion = (newRegion, source) => {
    if (region === newRegion) return;
    console.log(`[RegionBaseUrl] Updating to "${newRegion}" (Source: ${source})`);
    if (source === 'observer') {
      isSyncingRef.current = true;
      setTimeout(() => isSyncingRef.current = false, 1000);
    }
    setRegionState(newRegion);
    localStorage.setItem("api-region-preference", newRegion);
    updateAllContentOnPage(newRegion);
    if (source === 'user-click') {
      window.dispatchEvent(new CustomEvent("regionChange", {
        detail: newRegion
      }));
      attemptToUpdateNativeDropdown(newRegion, 0);
      setTimeout(() => attemptToUpdateNativeDropdown(newRegion, 1), 500);
      setTimeout(() => attemptToUpdateNativeDropdown(newRegion, 2), 1500);
    }
  };
  const attemptToUpdateNativeDropdown = (targetRegion, attempt) => {
    if (isSyncingRef.current) return;
    try {
      const targetUrl = targetRegion === "eu" ? "https://whitebit.eu" : "https://whitebit.com";
      const targetDesc = targetRegion === "eu" ? "EU Server" : "Production Server";
      const selects = document.querySelectorAll('select');
      for (const select of selects) {
        if (select.innerHTML.includes('whitebit.com') || select.innerHTML.includes('whitebit.eu')) {
          select.value = targetUrl;
          select.dispatchEvent(new Event('change', {
            bubbles: true
          }));
          return;
        }
      }
      const buttons = Array.from(document.querySelectorAll('button, [role="combobox"]'));
      const serverSelector = buttons.find(btn => {
        if (btn.closest('a') || btn.closest('[class*="card"]') || btn.closest('nav')) {
          return false;
        }
        const txt = btn.textContent || "";
        const isServerDropdown = (txt.includes('Production Server') || txt.includes('EU Server') || txt.includes('WhiteBIT Global Server') || txt.includes('WhiteBIT EU Server')) && !txt.includes('Run') && !txt.includes('Send') || btn.getAttribute('role') === 'combobox';
        return isServerDropdown;
      });
      if (serverSelector) {
        const currentText = serverSelector.textContent || "";
        if (currentText.includes(targetDesc)) return;
        serverSelector.click();
        setTimeout(() => {
          const options = document.querySelectorAll('[role="option"], li, button');
          for (const opt of options) {
            const optText = opt.textContent || "";
            if (optText.includes(targetDesc) || optText.includes(targetUrl)) {
              opt.click();
              return;
            }
          }
        }, 100);
      }
    } catch (e) {
      console.error("[Sync] Error:", e);
    }
  };
  useEffect(() => {
    setMounted(true);
    updateAllContentOnPage(region);
    const handleStorageChange = e => {
      if (e.key === "api-region-preference" && e.newValue) {
        updateRegion(e.newValue, 'storage');
      }
    };
    const handleRegionChange = e => {
      if (e.detail !== region) {
        updateRegion(e.detail, 'event');
      }
    };
    window.addEventListener("storage", handleStorageChange);
    window.addEventListener("regionChange", handleRegionChange);
    observerRef.current = new MutationObserver(mutations => {
      if (isSyncingRef.current) return;
      updateAllContentOnPage(region);
      for (const mutation of mutations) {
        if (mutation.type !== 'childList' && mutation.type !== 'characterData') continue;
        const target = mutation.target;
        const el = target.nodeType === Node.TEXT_NODE ? target.parentElement : target;
        if (el && (el.getAttribute('role') === 'option' || el.closest('[role="listbox"]'))) continue;
        const text = target.textContent || "";
        if (text.includes('WhiteBIT EU Server') || text.includes('https://whitebit.eu') && text.includes('Server')) {
          if (el && el.tagName !== 'A' && !el.closest('.region-toggle-component')) {
            if (region !== 'eu') updateRegion('eu', 'observer');
          }
        } else if (text.includes('WhiteBIT Global Server') || text.includes('https://whitebit.com') && text.includes('Server')) {
          if (el && el.tagName !== 'A' && !el.closest('.region-toggle-component')) {
            if (region !== 'com') updateRegion('com', 'observer');
          }
        }
      }
    });
    observerRef.current.observe(document.body, {
      childList: true,
      subtree: true,
      characterData: true
    });
    if (typeof window !== 'undefined') {
      const current = localStorage.getItem("api-region-preference");
      if (current) attemptToUpdateNativeDropdown(current, 'init');
    }
    return () => {
      window.removeEventListener("storage", handleStorageChange);
      window.removeEventListener("regionChange", handleRegionChange);
      if (observerRef.current) observerRef.current.disconnect();
    };
  }, [region]);
  const apiBaseUrl = region === "eu" ? "https://whitebit.eu" : "https://whitebit.com";
  if (!mounted) return null;
  return <div className={`flex items-center gap-2 flex-wrap my-4 region-toggle-component ${className}`}>
            <span className="text-sm text-gray-500 dark:text-gray-400 font-mono">
                Base URL
            </span>
            <span className="text-sm text-gray-400">(</span>
            <div className="inline-flex bg-gray-100 dark:bg-gray-800 rounded-lg p-0.5 border border-gray-200 dark:border-gray-700">
                <button onClick={() => updateRegion("com", "user-click")} className={`px-2 py-0.5 text-xs font-medium rounded-md transition-all ${region === "com" ? "bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 shadow-sm" : "text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200"}`}>
                    .com
                </button>
                <button onClick={() => updateRegion("eu", "user-click")} className={`px-2 py-0.5 text-xs font-medium rounded-md transition-all ${region === "eu" ? "bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 shadow-sm" : "text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200"}`}>
                    .eu
                </button>
            </div>
            <span className="text-sm text-gray-400">)</span>
            {showBaseUrl && <>
                    <span className="text-sm text-gray-400">:</span>
                    <a href={apiBaseUrl} target="_blank" rel="noopener noreferrer" className="text-sm font-mono text-primary dark:text-primary-light hover:underline">
                        {apiBaseUrl}
                    </a>
                </>}
        </div>;
};

<RegionBaseUrl />

Perpetual contracts on 270+ [pairs](/concepts/markets) with up to 100x leverage and Hedge Mode for simultaneous long/short positions. The Futures Trading API shares the collateral trading endpoints with Margin Trading — the perpetual pair name (e.g., `BTC_PERP`) determines routing to the futures market.

## Capabilities

* **Up to 100x leverage** — Adjustable per account via the [leverage endpoint](/api-reference/collateral-trading/change-collateral-account-leverage). Allowed values: 1, 2, 3, 5, 10, 20, 50, 100.
* **Cash-settled** — profit and loss is the difference between entry and exit price; no physical delivery of the underlying asset
* **Hedge Mode** — Hold simultaneous long and short positions on the same pair ([check mode](/api-reference/collateral-trading/collateral-account-hedge-mode), [update mode](/api-reference/collateral-trading/update-collateral-account-hedge-mode))
* **270+ perpetual pairs** — BTC\_PERP, ETH\_PERP, and more
* **Funding rates** — Periodic settlement between long and short holders ([funding history](/api-reference/collateral-trading/funding-history))
* **USDTB bonus collateral** — Platform-granted bonus collateral token usable for futures margin (not depositable, not withdrawable)
* **6 order types** — Limit, Market, Stop-Limit, Trigger-Market, OCO, Bulk-Limit ([details](/concepts/order-types))

<Note>
  **API naming convention:** WhiteBIT's API uses "collateral" endpoints for both
  Margin and Futures trading. The market pair determines the product:
  spot pairs (e.g., `BTC_USDT`) for Margin, perpetual pairs (e.g., `BTC_PERP`)
  for Futures. All endpoints under `/api/v4/order/collateral/` and
  `/api/v4/collateral-account/` serve both products.
  See [Compare Trading Products](/products/compare-trading) for a full side-by-side comparison.
</Note>

<Warning>
  WhiteBIT's demo account supports **spot trading only** — it does not support Futures or Margin
  trading. Test all leveraged trading flows on the live API with minimum order sizes.
  See [First API Call](/guides/first-api-call) for safe testing guidance.
</Warning>

## Who Uses This

* **Hedge funds** — Delta-neutral strategies, funding rate harvesting, directional leveraged trades on perpetual contracts
* **HFT / Prop trading firms** — High-frequency futures strategies with [colocation](/platform/colocation) (3–5 ms latency)
* **Quantitative developers** — Programmatic position management, cross-margin optimization, automated hedging

## Common Integration Patterns

**Directional perpetual trading** — Open leveraged long or short positions on perpetual contracts. Set leverage via the [leverage endpoint](/api-reference/collateral-trading/change-collateral-account-leverage), place orders through the [collateral order endpoints](/api-reference/collateral-trading/overview), and monitor positions with the [open positions endpoint](/api-reference/collateral-trading/open-positions). The API returns a `liquidationPrice` field in position responses for risk monitoring.

**Delta-neutral strategies** — Use [Hedge Mode](/api-reference/collateral-trading/update-collateral-account-hedge-mode) to hold simultaneous long and short positions on the same perpetual pair. Profit from funding rate differentials while maintaining market-neutral exposure. Fetch current funding rates via the [public futures endpoint](/api-reference/market-data/available-futures-markets-list) and historical rates via the [funding history endpoint](/api-reference/collateral-trading/funding-history).

## Risk Mechanics

### Margin Modes

Futures positions operate in one of two margin modes:

* **Cross Margin** — All available collateral in the account backs every open position. Higher capital efficiency, but a single losing position can affect the entire account balance.
* **Isolated Margin** — Each position has a fixed margin allocation. Losses are capped at the isolated margin amount. Other positions and the remaining collateral balance remain unaffected.

Check the current margin configuration via the [collateral account summary endpoint](/api-reference/collateral-trading/collateral-account-summary). Leverage can be adjusted using the [leverage endpoint](/api-reference/collateral-trading/change-collateral-account-leverage).

### Liquidation

Positions face liquidation when the maintenance margin requirement is breached. Key details:

* **Mark price** (not last traded price) is used for liquidation calculations. Temporary price wicks do not trigger liquidation.
* **Partial liquidation** is the primary mechanism: only a portion (e.g., 20–30%) of the position is closed first to restore margin. If partial liquidation is insufficient, full liquidation follows.
* **Liquidation sequence:** margin positions first (smallest to largest initial margin value) → crypto borrowings → futures positions last
* **Maintenance Margin Rate (MMR):** 3% for leverage 1x–10x. Per-market leverage limits and collateral brackets: [collateral brackets page](https://whitebit.com/trading-data/collateral-brackets)
* The API returns a `liquidationPrice` field in position responses — monitor the liquidation price alongside collateral balance
* When a position is liquidated, the collateral allocated to the position is lost
* **Auto-Deleveraging (ADL):** Final-stage mechanism activated only when standard market liquidity cannot fully cover a liquidated position. ADL closes profitable counterparty positions on the opposite side, ranked by an internal Rating; integrators monitor exposure via the ADL Grade indicator (0–4). See [Auto-Deleveraging](/concepts/auto-deleveraging) for the full mechanism, formulas, and risk-management guidance.

> **Coming soon:** Detailed mark price methodology and liquidation price formulas will be published here. For institutional inquiries, contact [institutional@whitebit.com](mailto:institutional@whitebit.com).

### Funding Rates

Perpetual contracts use a funding rate mechanism to keep the contract price aligned with the spot index price:

* **Settlement interval per market** — The `funding_interval_minutes` field on the [futures markets endpoint](/api-reference/market-data/available-futures-markets-list) returns the cadence for each pair. At each settlement, long holders pay short holders or vice versa depending on the funding rate.
* **Positive rate** = longs pay shorts (contract price above index). **Negative rate** = shorts pay longs.
* Fetch the current predicted funding rate for any pair via `GET /api/v4/public/futures`
* Fetch historical funding rates via `GET /api/v4/public/funding-history/{market}`
* Fetch account-specific funding payments via `POST /api/v4/collateral-account/funding-history`

### USDTB

USDTB is a platform-granted bonus collateral token:

* Usable as margin for futures positions
* Cannot be deposited or withdrawn — granted through platform promotions or programs
* Appears in the collateral account balance alongside USDT and other collateral assets

## Technical Overview

| Detail         | Value                                                     |
| -------------- | --------------------------------------------------------- |
| Endpoints      | 19 shared with Margin (all `POST`, all authenticated)     |
| Authentication | HMAC-SHA512 ([guide](/api-reference/authentication))      |
| Rate limits    | Vary per endpoint ([details](/api-reference/rate-limits)) |
| Pair format    | Perpetual pairs: `BTC_PERP`, `ETH_PERP`, etc.             |

Endpoint categories (shared with Margin Trading):

* **Account & Balance** — Balance, balance summary, account summary, leverage, hedge mode (6 endpoints)
* **Order Management** — Limit, bulk-limit, market, stop-limit, trigger-market, OCO, cancel (7 endpoints)
* **Order Queries** — Conditional orders, OCO orders (2 endpoints)
* **Position Management** — Open positions, close position, position history, funding history (4 endpoints)

The pair name determines whether an order is Margin or Futures. Perpetual pairs (e.g., `BTC_PERP`) route to Futures. Spot pairs (e.g., `BTC_USDT`) route to Margin.

For full endpoint documentation, see the [Collateral Trading API Reference](/api-reference/collateral-trading/overview).

For Go and PHP examples, see [SDKs](/sdks).

## What's Next

<CardGroup cols={3}>
  <Card title="Margin & Futures Quickstart" icon="rocket" href="/products/margin-futures/quickstart">
    Open a first futures position in 5 minutes.
  </Card>

  <Card title="Margin Trading" icon="chart-line" href="/products/margin/overview">
    Compare with leveraged spot pairs — up to 10x leverage.
  </Card>

  <Card title="API Reference" icon="square-terminal" href="/api-reference/collateral-trading/overview">
    Full endpoint documentation for all 19 collateral trading endpoints.
  </Card>
</CardGroup>
