---
title: "Binance"
description: "This page explains the default security-level models and markets of the BinanceBrokerageModel and the BinanceUSBrokerageModel."
canonical: https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/brokerages/supported-models/binance
markdown: https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/brokerages/supported-models/binance.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/03%20Writing%20Algorithms/24%20Reality%20Modeling/05%20Brokerages/02%20Supported%20Models/10%20Binance
modified: 2026-10-30
index: https://www.quantconnect.com/llms.txt
---

# Binance

[Documentation](https://www.quantconnect.com/docs/v2.md) > [Writing Algorithms](https://www.quantconnect.com/docs/v2/writing-algorithms.md) > Reality Modeling > Brokerages > [Supported Models](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/brokerages/supported-models.md) > Binance

> Code examples are shown in Python. Append `?lang=csharp` to this URL for the C# version of this page.

## Introduction

This page explains the Binance brokerage models, including the asset classes they supports, their default [security-level models](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/key-concepts.md#02-Security-Level-Models), and their default markets.

```python
# Binance Spot
self.set_brokerage_model(BrokerageName.BINANCE, AccountType.CASH)
self.set_brokerage_model(BrokerageName.BINANCE, AccountType.MARGIN)

# Binance Futures
self.set_brokerage_model(BrokerageName.BINANCE_FUTURES, AccountType.MARGIN)
self.set_brokerage_model(BrokerageName.BINANCE_COIN_FUTURES, AccountType.MARGIN)

# Binance US Spot
self.set_brokerage_model(BrokerageName.BINANCE_US, AccountType.CASH)
```

For more information about these models, see their respective class reference and implementation.

| Model | Class Reference | Implementation |
| --- | --- | --- |
| `BinanceBrokerageModel` | [![Example](https://cdn.quantconnect.com/i/tu/internal-link.svg)](https://www.lean.io/docs/v2/lean-engine/class-reference/py/QuantConnect/Brokerages/BinanceBrokerageModel/) | [![Example](https://cdn.quantconnect.com/i/tu/internal-link.svg)](https://github.com/QuantConnect/Lean/blob/master/Common/Brokerages/BinanceBrokerageModel.cs) |
| `BinanceFuturesBrokerageModel` | [![Example](https://cdn.quantconnect.com/i/tu/internal-link.svg)](https://www.lean.io/docs/v2/lean-engine/class-reference/py/QuantConnect/Brokerages/BinanceFuturesBrokerageModel/) | [![Example](https://cdn.quantconnect.com/i/tu/internal-link.svg)](https://github.com/QuantConnect/Lean/blob/master/Common/Brokerages/BinanceFuturesBrokerageModel.cs) |
| `BinanceCoinFuturesBrokerageModel` | [![Example](https://cdn.quantconnect.com/i/tu/internal-link.svg)](https://www.lean.io/docs/v2/lean-engine/class-reference/py/QuantConnect/Brokerages/BinanceCoinFuturesBrokerageModel/) | [![Example](https://cdn.quantconnect.com/i/tu/internal-link.svg)](https://github.com/QuantConnect/Lean/blob/master/Common/Brokerages/BinanceCoinFuturesBrokerageModel.cs) |
| `BinanceUSBrokerageModel` | [![Example](https://cdn.quantconnect.com/i/tu/internal-link.svg)](https://www.lean.io/docs/v2/lean-engine/class-reference/py/QuantConnect/Brokerages/BinanceUSBrokerageModel/) | [![Example](https://cdn.quantconnect.com/i/tu/internal-link.svg)](https://github.com/QuantConnect/Lean/blob/master/Common/Brokerages/BinanceUSBrokerageModel.cs) |

## Asset Classes

The Binance brokerage models support trading [Crypto](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/crypto.md) and [Crypto Futures](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/crypto-futures.md).

```python
self.add_crypto("BTCUSDT", Resolution.MINUTE, Market.BINANCE)
self.add_crypto_future("BTCUSD", Resolution.MINUTE, Market.BINANCE)
```

The Binance US brokerage model supports trading [Crypto](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/crypto.md).

```python
self.add_crypto("BTCUSDT", Resolution.MINUTE, Market.BINANCE_US)
```

## Orders

The Binance and Binance US brokerage models support several order types and order properties, but don't support order updates.

### Order Types

The following table describes the available order types for each asset class that the Binance and Binance US brokerage models support:

| Order Type | Crypto | Crypto Futures |
| --- | --- | --- |
| [Market](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/market-orders.md) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) |
| [Limit](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/limit-orders.md) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) |
| [Stop Market](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/stop-market-orders.md) |  | ![green check](https://cdn.quantconnect.com/i/tu/check.png) |
| [Stop limit](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/stop-limit-orders.md) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) |
| [Bracket](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/contingent-orders/bracket-orders.md) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) |  |
| [One cancels other](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/contingent-orders/one-cancels-other-orders.md) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) |  |
| [One triggers other](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/contingent-orders/one-triggers-other-orders.md) | ![green check](https://cdn.quantconnect.com/i/tu/check.png) |  |

### Order Properties

The Binance and Binance US brokerage models supports custom order properties. The following table describes the members of the `BinanceOrderProperties` object that you can set to customize order execution:

| Property | Data Type | Description | Default Value |
| --- | --- | --- | --- |
| `time_in_force` | `TimeInForce` | A [TimeInForce](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-properties.md#03-Time-In-Force) instruction to apply to the order. The following instructions are supported: `DAY` `GOOD_TIL_CANCELED` `good_til_date` | `TimeInForce.GOOD_TIL_CANCELED` |
| `post_only` | `bool` | A flag to signal that the order must only add liquidity to the order book and not take liquidity from the order book. If part of the order results in taking liquidity rather than providing liquidity, the order is rejected without any part of it being filled. |  |

```python
def initialize(self) -> None:
    # Set the default order properties
    self.default_order_properties = BinanceOrderProperties()
    self.default_order_properties.time_in_force = TimeInForce.GOOD_TIL_CANCELED
    self.default_order_properties.post_only = False

def on_data(self, slice: Slice) -> None:
    # Use default order order properties
    self.limit_order(self._symbol, quantity, limit_price)

    # Override the default order properties
    order_properties = BinanceOrderProperties()
    order_properties.time_in_force = TimeInForce.DAY
    order_properties.post_only = True
    self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)

    order_properties.time_in_force = TimeInForce.good_til_date(datetime(year, month, day))
    self.limit_order(self._symbol, quantity, limit_price, order_properties=order_properties)
```

### Contingent Orders

Binance accepts [contingent orders](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-types/contingent-orders.md) for spot Crypto with the following rules:

- A set has up to three orders for the same security: a bracket order, a limit order that triggers one order, or a one cancels other pair.
- An order that triggers other orders is a limit order outside any one cancels other pair.
- A one cancels other pair has one limit order and one stop limit order on the same side.

Binance US and Binance Futures don't support contingent orders.

### Updates

The Binance and Binance US brokerage models don't support order updates, but you can cancel an existing order and then create a new order with the desired arguments. For more information about this workaround, see the [Workaround for Brokerages That Don’t Support Updates](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/order-management/order-tickets.md#workaround-for-brokerages-that-dont-support-updates).

## Fills

The Binance brokerage models use the [ImmediateFillModel](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/trade-fills/supported-models/immediate-model.md).

## Slippage

The Binance brokerage models use the [NullSlippageModel](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/slippage/supported-models.md#02-Null-Model).

## Fees

The following table shows the fee model that each Binance brokerage model uses:

| Brokerage Model | Fee Model |
| --- | --- |
| `BinanceBrokerageModel` | [BinanceFeeModel](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/transaction-fees/supported-models.md#04-Binance-Model) |
| `BinanceFuturesBrokerageModel` | [BinanceFuturesFeeModel](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/transaction-fees/supported-models.md#05-Binance-Futures-Model) |
| `BinanceCoinFuturesBrokerageModel` | [BinanceCoinFuturesFeeModel](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/transaction-fees/supported-models.md#06-Binance-Coin-Futures-Model) |
| `BinanceUSBrokerageModel` | [BinanceFeeModel](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/transaction-fees/supported-models.md#04-Binance-Model) |

The Binance brokerage models use the default argument values for each fee model so that it models the current Binance fee schedule.

## Buying Power

The Binance brokerage models use the `CashBuyingPowerModel` for cash accounts and the `SecurityMarginModel` for margin accounts.

The following table shows the maximum leverage each brokerage model allows for margin accounts:

| Brokerage Model | Maximum Leverage |
| --- | --- |
| `BinanceBrokerageModel` | 3 |
| `BinanceFuturesBrokerageModel` | 25 |
| `BinanceCoinFuturesBrokerageModel` | 25 |

The `BinanceUSBrokerageModel` doesn't currently support margin trading.

## Settlement

The Binance brokerage models use the [ImmediateSettlementModel](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/settlement/supported-models.md#02-Immediate-Model).

## Margin Interest Rate

The following table shows the margin interest rate model that the Binance brokerages use:

| Brokerage Model | Margin Interest Rate Model |
| --- | --- |
| `BinanceBrokerageModel` | [NullMarginInterestRateModel](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/margin-interest-rate/supported-models.md#02-Null-Model) |
| `BinanceFuturesBrokerageModel` | [BinanceFutureMarginInterestRateModel](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/margin-interest-rate/supported-models.md#04-Binance-Futures-Model) for Crypto Perpetual Futures and [NullMarginInterestRateModel](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/margin-interest-rate/supported-models.md#02-Null-Model) for other assets |
| `BinanceCoinFuturesBrokerageModel` | [BinanceFutureMarginInterestRateModel](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/margin-interest-rate/supported-models.md#04-Binance-Futures-Model) for Crypto Perpetual Futures and [NullMarginInterestRateModel](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/margin-interest-rate/supported-models.md#02-Null-Model) for other assets |
| `BinanceUSBrokerageModel` | [NullMarginInterestRateModel](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/margin-interest-rate/supported-models.md#02-Null-Model) |

## Default Markets

The following table shows the default market of the Binance brokerage models:

| Brokerage Model | Market |
| --- | --- |
| `BinanceBrokerageModel` | `Market.BINANCE` |
| `BinanceFuturesBrokerageModel` | `Market.BINANCE` |
| `BinanceCoinFuturesBrokerageModel` | `Market.BINANCE` |
| `BinanceUSBrokerageModel` | `Market.BINANCE_US` |

## Account Currency

Most of the Binance brokerage models support fiat currencies like USD, but the `BinanceBrokerageModel` doesn't. When you use this brokerage model, [set the account currency](https://www.quantconnect.com/docs/v2/writing-algorithms/initialization.md#03-Set-Account-Currency) to USDT or another [Cryptocurrency that Binance supports](https://www.quantconnect.com/docs/v2/writing-algorithms/datasets/quantconnect/binance-crypto-price-data.md#11-Supported-Assets).
