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

# Exchange Specifics

> Per-exchange details for Binance, Bybit, Gateio, OKX, Coinbase, Kraken, and Aster

## Overview

Each supported exchange has unique characteristics that ClyptQ models precisely. This page consolidates all exchange-specific parameters in one place.

## Supported Exchanges

### Market Type Support

| Exchange     | Spot | Derivatives     | Market Type | Max Leverage | Quote Currency | Funding Rates                 |
| ------------ | ---- | --------------- | ----------- | ------------ | -------------- | ----------------------------- |
| **Binance**  | Yes  | Yes             | `futures`   | 125×         | USDT, USDC     | Full history                  |
| **Bybit**    | Yes  | Yes             | `linear`    | 100×         | USDT, USDC     | Full history                  |
| **Gateio**   | Yes  | Yes             | `futures`   | 100×         | USDT           | Full history                  |
| **Coinbase** | Yes  | Yes (perpetual) | `perpetual` | 10× (CFTC)   | USDC           | Collected (not auto-injected) |
| **Kraken**   | Yes  | Yes             | `perpetual` | 50×          | USD            | Full history                  |
| **OKX**      | Yes  | Yes             | `swap`      | 125×         | USDT, USDC     | Full history                  |
| **Aster**    | Yes  | Yes             | `futures`   | 20×          | USDT           | Full history                  |

### Default Fee Rates (Non-VIP)

Fees are auto-fetched via CCXT. These are default tier rates — VIP rates are lower.

| Exchange     | Spot Maker | Spot Taker | Futures Maker | Futures Taker |
| ------------ | ---------- | ---------- | ------------- | ------------- |
| **Binance**  | 0.10%      | 0.10%      | 0.02%         | 0.04%         |
| **Bybit**    | 0.10%      | 0.10%      | 0.02%         | 0.055%        |
| **Gateio**   | 0.20%      | 0.20%      | 0.015%        | 0.05%         |
| **Coinbase** | 0.40%      | 0.60%      | 0.02%         | 0.06%         |
| **Kraken**   | 0.25%      | 0.40%      | 0.02%         | 0.05%         |
| **OKX**      | 0.08%      | 0.10%      | 0.02%         | 0.05%         |

<Info>
  VIP rates can be 2-10× lower than default rates. Use `CostModelSpec` to override with your actual tier. See [Cost Models](/backtesting/cost-models) for details.
</Info>

### Margin & Liquidation Parameters

| Exchange     | Default MMR | Liquidation Fee | Threshold | Formula                     |
| ------------ | ----------- | --------------- | --------- | --------------------------- |
| **Binance**  | 1.3%        | 0.75%           | 100%      | Inverted (MMR/Equity × 100) |
| **Bybit**    | 0.5%        | 0.6%            | 1.0       | Normal (Equity/MMR)         |
| **Gateio**   | 1.0%        | 0.5%            | 1.5       | Normal (more conservative)  |
| **Coinbase** | 6.67%       | 1.0%            | 1.0       | Normal (CFTC regulated)     |
| **Kraken**   | 2.0%        | 1.5%            | 1.0       | Normal (regulated)          |
| **OKX**      | 0.5%        | 0.5%            | 1.0       | Inverted (MMR/Equity × 100) |
| **Aster**    | 2.5%        | 2.5%            | 1.0       | Normal (DEX)                |

See [Liquidation Logic](/backtesting/liquidation-logic) for detailed calculation examples.

### Funding Rate Schedule

| Exchange     | Interval | Settlement Times (UTC)                   | Notes                                                      |
| ------------ | -------- | ---------------------------------------- | ---------------------------------------------------------- |
| **Binance**  | 8 hours  | 00:00, 08:00, 16:00                      | Standard                                                   |
| **Bybit**    | 8 hours  | 00:00, 08:00, 16:00                      | Standard                                                   |
| **Gateio**   | 8 hours  | 00:00, 08:00, 16:00                      | Standard                                                   |
| **Coinbase** | 1 hour   | Every hour                               | `has_funding_rate=False` — collected but not auto-injected |
| **Kraken**   | 4 hours  | 00:00, 04:00, 08:00, 12:00, 16:00, 20:00 | 6× per day, fully simulated                                |
| **OKX**      | 8 hours  | 00:00, 08:00, 16:00                      | Standard                                                   |
| **Aster**    | 8 hours  | 00:00, 08:00, 16:00                      | Standard                                                   |

## Per-Exchange Details

### Binance

The most liquid crypto exchange with the widest selection of perpetual futures.

**Key characteristics:**

* **Market types**: Spot, USDT-M Futures (linear), COIN-M Futures (inverse)
* **Quote currencies**: USDT (primary), USDC
* **Max leverage**: 125× (BTC/ETH), lower for altcoins
* **Tiered MMR**: Position size determines MMR tier (1.3% → 50% across tiers)
* **Insurance fund**: Largest in the industry

**Configuration example:**

```python theme={null}
AccountSpec(
    exchange="binance",
    market_type="futures",
    base_currency="USDT",
    initial_cash=50_000.0,
    max_leverage=20.0,
    cost_model=CostModelSpec(
        maker_fee=0.0002,    # VIP 1
        taker_fee=0.0004,    # VIP 1
    ),
)
```

### Bybit

Known for derivatives trading with competitive fee structures.

**Key characteristics:**

* **Market types**: Spot, USDT Perpetual, Inverse Perpetual
* **Quote currencies**: USDT, USDC
* **Max leverage**: 100× (BTC/ETH)
* **Lower MMR**: 0.5% default (more aggressive than Binance)
* **Unified margin**: Cross-asset margin pool

**Configuration example:**

```python theme={null}
AccountSpec(
    exchange="bybit",
    market_type="linear",     # Bybit uses "linear" (auto-normalized from "futures")
    base_currency="USDT",
    initial_cash=30_000.0,
    max_leverage=10.0,
    # No cost_model → auto-fetched from Bybit API
)
```

### Gateio

Broad altcoin selection with higher liquidation threshold.

**Key characteristics:**

* **Market types**: Spot, USDT Futures
* **Quote currencies**: USDT
* **Max leverage**: 100×
* **Higher threshold**: 1.5 margin ratio (more conservative than peers)
* **Altcoin depth**: More small-cap perpetuals than other exchanges
* **Contract units**: Futures use integer contracts, not fractional amounts

**Important note:** Gateio's 1.5× liquidation threshold means positions are liquidated **earlier** than on Binance or Bybit. A strategy that survives on Binance may get liquidated on Gateio with the same parameters.

**Contract unit conversion:** Gateio futures require integer contracts. The API converts between BTC amounts and contracts automatically:

```python theme={null}
# Gate.io: precision.amount == 1.0 → integer contracts only
# Example: BTC/USDT contract_size = 0.0001 BTC
# 0.1 BTC order → 1000 contracts
contracts = amount / contract_size
# API receives contracts (integer), internally tracked in BTC
```

### Coinbase

US-regulated exchange with CFTC oversight and strict leverage limits.

**Key characteristics:**

* **Market types**: Spot, USDC Perpetual
* **Quote currencies**: USDC (only)
* **Max leverage**: 10× (CFTC limit)
* **High MMR**: 6.67% (MM = IM × ⅔) — always static default (no dynamic tier API)
* **Higher fees**: Liquidation fee at 1.0%
* **No funding simulation**: `has_funding_rate=False` — funding not auto-injected

<Warning>
  Coinbase has `has_funding_rate=False`, so funding is **not auto-injected** in backtest or paper trading (rate defaults to 0). Funding data is collected (1h intervals) but not applied to backtest P\&L. Consider using Binance or Bybit for accurate futures backtests with funding simulation.
</Warning>

### Kraken

Regulated exchange with moderate leverage and higher liquidation costs.

**Key characteristics:**

* **Market types**: Spot, USD Futures (via krakenfutures)
* **Quote currencies**: USD
* **Max leverage**: 50×
* **Higher MMR**: 2.0% default — dynamic tier resolution supported via CCXT public API
* **Higher liquidation fee**: 1.5%
* **4-hour funding**: 6 settlements per day (vs standard 3) — fully simulated at all 6 settlement times

<Note>
  Kraken's 4-hour funding schedule means 6 settlements per day (00:00, 04:00, 08:00, 12:00, 16:00, 20:00 UTC). The backtest executor applies funding at all 6 settlement boundaries using per-exchange `FUNDING_SETTLEMENT_HOURS`.

  **CCXT note**: `fetch_funding_rate_history()` returns data at 1h intervals for Kraken, but the intermediate values (01h, 02h, 03h, etc.) are **predicted rates**, not actual settlements. Only the 4h boundary values represent real funding charges. The settlement hour gatekeeping ensures only real settlement times are applied.
</Note>

### OKX

Global exchange with Binance-style margin calculation and passphrase authentication.

**Key characteristics:**

* **Market types**: Spot, USDT-M Swap (linear)
* **Quote currencies**: USDT, USDC
* **Max leverage**: 125× (BTC/ETH)
* **Inverted margin**: Same formula as Binance (MMR/Equity × 100, trigger at ≥ 100%)
* **Passphrase required**: OKX API keys require an additional passphrase field
* **Hedge mode**: Supports both one-way and hedge mode

**Configuration example:**

```python theme={null}
AccountSpec(
    exchange="okx",
    market_type="swap",       # OKX uses "swap" for perpetual futures
    base_currency="USDT",
    initial_cash=30_000.0,
    max_leverage=20.0,
)
```

## Settlement Currencies

| Exchange     | Spot                        | Futures    |
| ------------ | --------------------------- | ---------- |
| **Binance**  | USDT, FDUSD, USDC, BTC, ETH | USDT, USDC |
| **Bybit**    | USDT, USDC                  | USDT, USDC |
| **Gateio**   | USDT, BTC, ETH              | USDT       |
| **Coinbase** | USD, USDC                   | USDC       |
| **Kraken**   | USD, USDT                   | USD        |
| **OKX**      | USDT, USDC                  | USDT, USDC |
| **Aster**    | USDT                        | USDT       |

Symbol formats differ by exchange:

```
Spot:    BTC/USDT
Futures: BTC/USDT:USDT    (settlement currency suffix)
Kraken:  BTC/USD:USD
Coinbase: BTC/USDC:USDC
```

## Position Modes

| Exchange     | One-Way | Hedge Mode | Notes                           |
| ------------ | ------- | ---------- | ------------------------------- |
| **Binance**  | Yes     | Yes        | `position_side: "long"/"short"` |
| **Bybit**    | Yes     | Yes        |                                 |
| **Gateio**   | Yes     | Yes        |                                 |
| **OKX**      | Yes     | Yes        |                                 |
| **Coinbase** | Yes     | No         | `position_side: "both"` only    |
| **Kraken**   | Yes     | No         |                                 |
| **Aster**    | Yes     | No         | DEX                             |

## Order Validation Limits

ClyptQ fetches minimum order sizes and lot sizes from each exchange via CCXT and enforces them during backtest:

### What Gets Validated

| Check               | Description                  | Example                   |
| ------------------- | ---------------------------- | ------------------------- |
| **Min amount**      | Minimum order quantity       | 0.001 BTC on Binance      |
| **Min cost**        | Minimum order notional value | \$10 on Gateio            |
| **Lot size**        | Quantity precision/step size | 0.001 BTC step on Binance |
| **Price precision** | Tick size for limit orders   | \$0.10 for BTC on Binance |

### What Happens on Rejection

Orders that fail validation are **rejected** (not filled), matching live behavior:

```python theme={null}
# After backtest, check rejection stats
results = driver.export_results()
rejection_stats = results.get("rejection_stats", {})
# → {"below_min_amount": 5, "below_min_cost": 3, "rounds_to_zero": 2}
```

If many orders are rejected, consider:

* Increasing book size (position sizing)
* Reducing the number of symbols (concentrated portfolio)
* Checking minimum requirements for your specific symbols

## Multi-Exchange Configuration

ClyptQ natively supports multi-exchange strategies. Each account has its own cost model, margin parameters, and order validation:

```python theme={null}
spec = TradingSpec(
    data=TradingDataSpec(
        symbols=["BTC", "ETH", "SOL"],
        observations=[
            OHLCVSpec(exchange=["binance", "gateio"], market_type="futures", timeframe="1m"),
        ],
        symbol_source_map=SymbolSourceMap({
            "binance:futures": ["BTC", "ETH"],
            "gateio:futures": ["SOL"],
        }),
    ),
    execution=TradingExecutionSpec(
        accounts=[
            AccountSpec(exchange="binance", market_type="futures", base_currency="USDT", initial_cash=30_000),
            AccountSpec(exchange="gateio", market_type="futures", base_currency="USDT", initial_cash=20_000),
        ],
    ),
    mode="backtest",
)
```

Each venue is independently simulated:

* **Separate cost models** (Binance fees ≠ Gateio fees)
* **Separate liquidation** (Binance 100% threshold ≠ Gateio 150% threshold)
* **Separate funding** (each venue's historical rates)
* **Separate order validation** (each venue's minimum requirements)

## Related Pages

<CardGroup cols={2}>
  <Card title="Cost Models" icon="receipt" href="/backtesting/cost-models">
    How to configure and override fee structures
  </Card>

  <Card title="Liquidation Logic" icon="triangle-exclamation" href="/backtesting/liquidation-logic">
    Detailed liquidation calculation with formulas
  </Card>

  <Card title="Funding Rates" icon="clock" href="/backtesting/funding-rates">
    Funding rate simulation and settlement timing
  </Card>

  <Card title="Supported Exchanges" icon="globe" href="/platform/supported-exchanges">
    Platform-level exchange support overview
  </Card>
</CardGroup>
