---
title: "Bybit Crypto Future Margin Rate Data"
description: "Bybit Crypto Future Margin Rate Data dataset from QuantConnect."
canonical: https://www.quantconnect.com/docs/v2/writing-algorithms/datasets/quantconnect/bybit-crypto-future-margin-rate-data
markdown: https://www.quantconnect.com/docs/v2/writing-algorithms/datasets/quantconnect/bybit-crypto-future-margin-rate-data.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/03%20Writing%20Algorithms/14%20Datasets/02%20QuantConnect/06%20Bybit%20Crypto%20Future%20Margin%20Rate%20Data
modified: 2026-10-28
index: https://www.quantconnect.com/llms.txt
---

# Bybit Crypto Future Margin Rate Data

[Documentation](https://www.quantconnect.com/docs/v2.md) > [Writing Algorithms](https://www.quantconnect.com/docs/v2/writing-algorithms.md) > Datasets > [QuantConnect](https://www.quantconnect.com/docs/v2/writing-algorithms/datasets/quantconnect.md) > Bybit Crypto Future Margin Rate Data

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

## Introduction

The Bybit Crypto Future Margin Rate Data by QuantConnect is for Cryptocurrency Futures margin interest data points. The data covers 631 Cryptocurrency pairs, starts in August 2020, and is delivered on a daily update frequency. This dataset is created by downloading data using Bybit API.

This dataset is an important companion to the [Bybit Crypto Future Price Data](https://www.quantconnect.com/datasets/bybit-cryptofuture-price-data) dataset because it contains information on margin interest data to model margin costs.

For more information about the Bybit Crypto Future Margin Rate Data dataset, including CLI commands and pricing, see the [dataset listing](https://www.quantconnect.com/datasets/bybit-cryptofuture-margin-rate-data).

## About the Provider

QuantConnect was founded in 2012 to serve quants everywhere with the best possible algorithmic trading technology. Seeking to disrupt a notoriously closed-source industry, QuantConnect takes a radically open-source approach to algorithmic trading. Through the QuantConnect web platform, more than 50,000 quants are served every month.

## Getting Started

The following snippet demonstrates how to request data from the Bybit Crypto Future Margin Rate dataset:

```python
def initialize(self) -> None:
    self.set_brokerage_model(BrokerageName.BYBIT, AccountType.MARGIN)

    self.crypto_future_symbol = self.add_crypto_future("BTCBUSD", Resolution.MINUTE).symbol
```

The Bybit Crypto Future Margin Rate data is added to your algorithm along with the market data when you add a crypto future subscription.

## Data Summary

The following table describes the dataset properties:

| Property | Value |
| --- | --- |
| Start Date | August 2020 |
| Asset Coverage | 631 Crypto Futures Pairs |
| Data Density | Regular |
| Resolution | Daily |
| Timezone | UTC |
| Market Hours | [Always Open](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/market-hours.md) |

## Requesting Data

To add Bybit Crypto Future Margin Rate data to your algorithm, call the `add_crypto_future` method. Save a reference to the Crypto Future `Symbol` so you can access the data later in your algorithm.

```python
from AlgorithmImports import *
from QuantConnect.DataSource import *

class CoinAPIDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2020, 6, 1)
        self.set_end_date(2021, 6, 1)

        # Set Account Currency to Tether
        self.set_account_currency("USDT", 100000)

        self.set_brokerage_model(BrokerageName.BYBIT, AccountType.MARGIN)

        crypto_future = self.add_crypto_future("BTCUSDT", Resolution.MINUTE)
        # perpetual futures does not have a filter function
        self.btcusdt = crypto_future.symbol
```

For more information about creating Crypto Future subscriptions, see [Requesting Data](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/crypto-futures/requesting-data.md).

## Accessing Data

To get the current Bybit Crypto Margin Rate data, index the `margin_interest_rates` property of the current [`Slice`](https://www.quantconnect.com/docs/v2/writing-algorithms/key-concepts/time-modeling/timeslices.md) with the Crypto Future `Symbol`. `Slice` objects deliver unique events to your algorithm as they happen, but the `Slice` may not contain data for your security at every time step. To avoid issues, check if the `Slice` contains the data you want before you index it.

```python
def on_data(self, slice: Slice) -> None:
        if self.btcusdt in slice.margin_interest_rates:
            interest_rate = slice.margin_interest_rates[self.btcusdt].interest_rate
            self.log(f"{self.btcusdt} close at {slice.time}: {interest_rate}")
```

You can also iterate through all of the data objects in the current `Slice`.

```python
def on_data(self, slice: Slice) -> None:
    for symbol, margin_interest_rate in slice.margin_interest_rates.items():
        interest_rate = margin_interest_rate.interest_rate
        self.log(f"{symbol} close at {slice.time}: {interest_rate}")
```

For more information about accessing Crypto Future data, see [Handling Data](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/crypto-futures/handling-data.md).

## Historical Data

To get historical Bybit Crypto Future Margin Rate data, call the `history` method with `MarginInterestRate` data type and the Crypto Future `Symbol`. If there is no data in the period you request, the history result is empty.

```python
# DataFrame
history_df = self.history(MarginInterestRate, self.btcusdt, 100, Resolution.DAILY)

# MarginInterestRate objects
history = self.history[MarginInterestRate](self.btcusdt, 100, Resolution.DAILY)
```

For more information about historical data, see [History Requests](https://www.quantconnect.com/docs/v2/writing-algorithms/historical-data/history-requests.md).

## Remove Subscriptions

To unsubscribe from a Crypto pair that you added with the `add_crypto` method, call the `remove_security` method.

```python
self.remove_security(self.btcusdt)
```

The `remove_security` method cancels your open orders for the security and liquidates your holdings in the [virtual pair](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/crypto/holdings.md#03-Virtual-Pairs).

## Supported Assets

The following table shows the available Crypto Future pairs:

| Pairs Available (631) |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| 1CATUSDT | 1INCHUSDT | A8USDT | AAVEUSD | AAVEUSDT | ACEUSDT |
| ACHUSDT | ACTUSDT | ACXUSDT | ADAUSD | ADAUSDT | AERGOUSDT |
| AEROUSDT | AEVOUSDT | AGIUSDT | AGIXUSDT | AGLDUSDT | AI16ZUSDT |
| AIDOGEUSDT | AIOZUSDT | AIUSDT | AIXBTUSDT | AKROUSDT | AKTUSDT |
| ALCHUSDT | ALEOUSDT | ALGOUSDT | ALICEUSDT | ALPACAUSDT | ALPHAUSDT |
| ALTUSDT | ALUUSDT | AMBUSDT | ANIMEUSDT | ANKRUSDT | ANTUSDT |
| APEUSDT | APEXUSDT | API3USDT | APTUSD | APTUSDT | APUUSDT |
| ARBUSDT | ARCUSDT | ARKMUSDT | ARKUSDT | ARPAUSDT | ARUSDT |
| ASTRUSDT | ATAUSDT | ATHUSDT | ATOMUSDT | AUCTIONUSDT | AUDIOUSDT |
| AVAAIUSDT | AVAILUSDT | AVAUSDT | AVAXUSD | AVAXUSDT | AVLUSDT |
| AXLUSDT | AXSUSDT | B3USDT | BABYDOGEUSDT | BABYUSDT | BADGERUSDT |
| BAKEUSDT | BALUSDT | BANANAS31USDT | BANANAUSDT | BANDUSDT | BANKUSDT |
| BANUSDT | BATUSDT | BBUSDT | BCHUSD | BCHUSDT | BEAMUSDT |
| BEERUSDT | BELUSDT | BENDOGUSDT | BERAUSDT | BICOUSDT | BIGTIMEUSDT |
| BILLYUSDT | BIOUSDT | BLASTUSDT | BLUEUSDT | BLURUSDT | BLZUSDT |
| BMTUSDT | BNBUSDT | BNTUSDT | BNXUSDT | BOBAUSDT | BOMEUSDT |
| BONDUSDT | BONKUSDT | BRETTUSDT | BROCCOLIUSDT | BRUSDT | BSVUSDT |
| BSWUSDT | BTCUSD | BTCUSDT | BTTUSDT | BUSDUSDT | BUZZUSDT |
| C98USDT | CAKEUSDT | CARVUSDT | CATIUSDT | CATSUSDT | CATUSDT |
| CEEKUSDT | CELOUSDT | CELRUSDT | CETUSUSDT | CFXUSDT | CGPTUSDT |
| CHEEMSUSDT | CHESSUSDT | CHILLGUYUSDT | CHRUSDT | CHZUSDT | CKBUSDT |
| CLANKERUSDT | CLOUDUSDT | COMBOUSDT | COMPUSDT | COOKIEUSDT | COOKUSDT |
| COQUSDT | COREUSDT | COSUSDT | COTIUSDT | COVALUSDT | COWUSDT |
| CPOOLUSDT | CROUSDT | CRVUSDT | CTCUSDT | CTKUSDT | CTSIUSDT |
| CVCUSDT | CVXUSDT | CYBERUSDT | DAOUSDT | DARKUSDT | DARUSDT |
| DASHUSDT | DATAUSDT | DBRUSDT | DEEPUSDT | DEGENUSDT | DENTUSDT |
| DEXEUSDT | DGBUSDT | DODOUSDT | DOGEUSD | DOGEUSDT | DOGSUSDT |
| DOGUSDT | DOODUSDT | DOP1USDT | DOTUSD | DOTUSDT | DRIFTUSDT |
| DUCKUSDT | DUSKUSDT | DYDXUSDT | DYMUSDT | EDUUSDT | EGLDUSDT |
| EIGENUSDT | ELONUSDT | ELXUSDT | ENAUSDT | ENJUSDT | ENSUSDT |
| EOSUSD | EOSUSDT | EPICUSDT | EPTUSDT | ETCUSD | ETCUSDT |
| ETHBTCUSDT | ETHFIUSDT | ETHUSD | ETHUSDT | ETHWUSDT | FARTCOINUSDT |
| FBUSDT | FDUSDUSDT | FETUSDT | FHEUSDT | FIDAUSDT | FILUSD |
| FILUSDT | FIOUSDT | FIREUSDT | FITFIUSDT | FLMUSDT | FLOCKUSDT |
| FLOKIUSDT | FLOWUSDT | FLRUSDT | FLUXUSDT | FORMUSDT | FORTHUSDT |
| FOXYUSDT | FRONTUSDT | FTMUSDT | FTNUSDT | FUELUSDT | FUNUSDT |
| FUSDT | FWOGUSDT | FXSUSDT | GALAUSDT | GALUSDT | GASUSDT |
| GEMSUSDT | GFTUSDT | GIGAUSDT | GLMRUSDT | GLMUSDT | GMEUSDT |
| GMTUSDT | GMXUSDT | GNOUSDT | GOATUSDT | GODSUSDT | GOMININGUSDT |
| GORKUSDT | GPSUSDT | GPTUSDT | GRASSUSDT | GRIFFAINUSDT | GRTUSDT |
| GTCUSDT | GUNUSDT | GUSDT | HAEDALUSDT | HBARUSDT | HEIUSDT |
| HFTUSDT | HIFIUSDT | HIGHUSDT | HIPPOUSDT | HIVEUSDT | HMSTRUSDT |
| HNTUSDT | HOOKUSDT | HOTUSDT | HPOS10IUSDT | HYPERUSDT | HYPEUSDT |
| ICPUSDT | ICXUSDT | IDEXUSDT | IDUSDT | ILVUSDT | IMXUSDT |
| INITUSDT | INJUSDT | IOSTUSDT | IOTAUSDT | IOTXUSDT | IOUSDT |
| IPUSDT | IQ50USDT | JASMYUSDT | JELLYJELLYUSDT | JOEUSDT | JSTUSDT |
| JTOUSDT | JUPUSDT | JUSDT | KAIAUSDT | KAITOUSDT | KASUSDT |
| KAVAUSDT | KDAUSDT | KERNELUSDT | KEYUSDT | KLAYUSDT | KMNOUSDT |
| KNCUSDT | KOMAUSDT | KSMUSDT | L3USDT | LADYSUSDT | LAIUSDT |
| LDOUSDT | LEVERUSDT | LINAUSDT | LINKUSD | LINKUSDT | LISTAUSDT |
| LITUSDT | LOOKSUSDT | LOOMUSDT | LPTUSDT | LQTYUSDT | LRCUSDT |
| LSKUSDT | LTCUSD | LTCUSDT | LTOUSDT | LUCEUSDT | LUMIAUSDT |
| LUNA2USDT | LUNCUSDT | MAGICUSDT | MAJORUSDT | MANAUSD | MANAUSDT |
| MANEKIUSDT | MANTAUSDT | MAPOUSDT | MASAUSDT | MASKUSDT | MATICUSDT |
| MAVIAUSDT | MAVUSDT | MAXUSDT | MBLUSDT | MBOXUSDT | MCUSDT |
| MDTUSDT | MELANIAUSDT | MEMEFIUSDT | MEMEUSDT | MERLUSDT | METISUSDT |
| MEUSDT | MEWUSDT | MICHIUSDT | MILKUSDT | MINAUSDT | MKRUSDT |
| MLNUSDT | MNTUSD | MNTUSDT | MOBILEUSDT | MOCAUSDT | MOGUSDT |
| MONUSDT | MOODENGUSDT | MORPHOUSDT | MOTHER1USDT | MOTHER2USDT | MOTHERUSDT |
| MOVEUSDT | MOVRUSDT | MTLUSDT | MUBARAKUSDT | MULTIUSDT | MUMUUSDT |
| MVLUSDT | MYRIAUSDT | MYROUSDT | NCUSDT | NEARUSD | NEARUSDT |
| NEIROCTOUSDT | NEIROETHUSDT | NEOUSDT | NFPUSDT | NFTUSDT | NILUSDT |
| NKNUSDT | NMRUSDT | NOTUSDT | NSUSDT | NTRNUSDT | NULSUSDT |
| NYANUSDT | OBOLUSDT | OBTUSDT | OCEANUSDT | OGNUSDT | OGUSDT |
| OKBUSDT | OLUSDT | OMGUSDT | OMNIUSDT | OMUSDT | ONDOUSDT |
| ONEUSDT | ONGUSDT | ONTUSDT | OPUSD | OPUSDT | ORBSUSDT |
| ORCAUSDT | ORDERUSDT | ORDIUSDT | ORNUSDT | OSMOUSDT | OXTUSDT |
| PARTIUSDT | PAXGUSDT | PEAQUSDT | PEIPEIUSDT | PENDLEUSDT | PENGUSDT |
| PENGUUSDT | PEOPLEUSDT | PEPEUSDT | PERPUSDT | PHAUSDT | PHBUSDT |
| PIPPINUSDT | PIRATEUSDT | PIXELUSDT | PIXFIUSDT | PLUMEUSDT | PNUTUSDT |
| POLUSDT | POLYXUSDT | PONKEUSDT | POPCATUSDT | PORTALUSDT | POWRUSDT |
| PRCLUSDT | PRE05EOSUSDT | PRE08EOSUSDT | PRIMEUSDT | PROMPTUSDT | PROMUSDT |
| PROSUSDT | PUFFERUSDT | PUMPUSDT | PUNDIXUSDT | PUNDUUSDT | PYRUSDT |
| PYTHUSDT | QIUSDT | QNTUSDT | QTUMUSDT | QUBICUSDT | QUICKUSDT |
| RADUSDT | RAREUSDT | RATSUSDT | RAYDIUMUSDT | RAYUSDT | RDNTUSDT |
| REDUSDT | REEFUSDT | RENDERUSDT | RENUSDT | REQUSDT | REXUSDT |
| REZUSDT | RFCUSDT | RIFSOLUSDT | RIFUSDT | RLCUSDT | RNDRUSDT |
| ROAMUSDT | RONINUSDT | RONUSDT | ROSEUSDT | RPLUSDT | RSRUSDT |
| RSS3USDT | RUNEUSDT | RVNUSDT | SAFEUSDT | SAGAUSDT | SANDUSDT |
| SATSUSDT | SCAUSDT | SCRTUSDT | SCRUSDT | SCUSDT | SDUSDT |
| SEIUSDT | SENDUSDT | SERAPHUSDT | SFPUSDT | SHELLUSDT | SHIB1000USDT |
| SIGNUSDT | SILLYUSDT | SIRENUSDT | SKLUSDT | SLERFUSDT | SLFUSDT |
| SLPUSDT | SNTUSDT | SNXUSDT | SOLAYERUSDT | SOLOUSDT | SOLUSD |
| SOLUSDT | SOLVUSDT | SONICUSDT | SPECUSDT | SPELLUSDT | SPXUSDT |
| SSVUSDT | STARLUSDT | STEEMUSDT | STGUSDT | STMXUSDT | STORJUSDT |
| STOUSDT | STPTUSDT | STRAXUSDT | STRKUSDT | STXUSDT | SUIUSD |
| SUIUSDT | SUNDOGUSDT | SUNUSDT | SUPERUSDT | SUSDT | SUSHIUSDT |
| SWARMSUSDT | SWEATUSDT | SWELLUSDT | SXPUSDT | SXTUSDT | SYNUSDT |
| SYSUSDT | TAIKOUSDT | TAIUSDT | TAOUSDT | TEST01SWELLUSDT | THETAUSDT |
| THEUSDT | TIAUSDT | TLMUSDT | TNSRUSDT | TOKENUSDT | TOMIUSDT |
| TOMOUSDT | TONUSD | TONUSDT | TOSHIUSDT | TRBUSDT | TROYUSDT |
| TRUMPUSDT | TRUUSDT | TRXUSDT | TSTBSCUSDT | TURBOUSDT | TUSDT |
| TUTUSDT | TWTUSDT | UMAUSDT | UNFIUSDT | UNIUSD | UNIUSDT |
| UROUSDT | USDCUSDT | USDEUSDT | USTCUSDT | USUALUSDT | UXLINKUSDT |
| VANAUSDT | VANRYUSDT | VELODROMEUSDT | VELOUSDT | VETUSDT | VGXUSDT |
| VICUSDT | VIDTUSDT | VINEUSDT | VINUUSDT | VIRTUALUSDT | VOXELUSDT |
| VRAUSDT | VRUSDT | VTHOUSDT | VVVUSDT | WALUSDT | WAVESUSDT |
| WAXPUSDT | WCTUSDT | WENUSDT | WHYUSDT | WIFUSD | WIFUSDT |
| WLDUSDT | WOOUSDT | WSMUSDT | WUSDT | XAIUSDT | XAUTUSDT |
| XCHUSDT | XCNUSDT | XDCUSDT | XECUSDT | XEMUSDT | XIONUSDT |
| XLMUSD | XLMUSDT | XMRUSDT | XNOUSDT | XRDUSDT | XRPUSD |
| XRPUSDT | XTERUSDT | XTZUSDT | XUSDT | XVGUSDT | XVSUSDT |
| YFIIUSDT | YFIUSDT | YGGUSDT | ZBCNUSDT | ZCXUSDT | ZECUSDT |
| ZENTUSDT | ZENUSDT | ZEREBROUSDT | ZETAUSDT | ZEUSUSDT | ZILUSDT |
| ZKFUSDT | ZKJUSDT | ZKUSDT | ZORAUSDT | ZRCUSDT | ZROUSDT |
| ZRXUSDT |  |  |  |  |  |

## Example Applications

The Binance Crypto Future Margin Rate dataset enables correct margin cost so you can accurately design strategies for Cryptocurrencies with term structure. Examples include the following strategies:

- Horizontal/Diagonal arbitrage with the underlying Cryptocurrencies
- Trade Contango/Backwardation predictions
- Hedge for illiquid Cryptocurrencies

### Classic Algorithm Example

The following example algorithm holds a long position in the BTCUSDT perpetual Future contract on the Bybit exchange. When the margin interest rate is relatively low, it flips to a short position.

```python
from AlgorithmImports import *

class BybitCryptoFutureDataAlgorithm(QCAlgorithm):

    # Add an indicator to track the low of trailing margin interest rates.
    _low_interest_rate = Minimum(10)

    def initialize(self) -> None:
        self.set_start_date(2024, 9, 1)
        self.set_end_date(2024, 12, 31)
        # Set Account Currency to USDT, since USD cannot be used to trade.
        self.set_cash("USDT", 100_000)
        # Bybit  accepts both Cash and Margin account types, select the one you need for the best reality modeling.
        self.set_brokerage_model(BrokerageName.BYBIT, AccountType.MARGIN)
        # Seed the price of each asset with its last known price to avoid trading errors.
        self.settings.seed_initial_prices = True
        # Requesting data, we only trade on BTCUSDT Future in Bybit  exchange
        # Perpetual futures does not have a filter function.
        self._future = self.add_crypto_future("BTCUSDT", Resolution.DAILY)
        # Historical data
        history = self.history[MarginInterestRate](self._future.symbol, 10, Resolution.DAILY)
        for data_point in history:
            self._low_interest_rate.update(data_point.end_time, data_point.interest_rate)

    def on_data(self, slice: Slice) -> None:
        # Note that you may want to access the margin interest of the crypto future to calculate if it would impact a trade's PnL
        # Or you can calculate the trade size on keeping the quote currency constant
        if self._future.symbol not in slice.margin_interest_rates:
            return
        interest_rate = slice.margin_interest_rates[self._future.symbol].interest_rate
        self.plot('Margin Interest Rate', str(self._future.symbol), interest_rate)
        # Short when margin interest rates are relatively low. Otherwise, long.
        if interest_rate <= self._low_interest_rate.current.value:
            if not self._future.holdings.is_short:
                self.set_holdings(self._future.symbol, -0.5)
        elif not self._future.holdings.is_long:
            self.set_holdings(self._future.symbol, 1)
        # Update the indicator.
        self._low_interest_rate.update(self.time, interest_rate)
```

### Framework Algorithm Example

The following example algorithm holds a long position in the BTCUSDT perpetual Future contract on the Bybit exchange. When the margin interest rate is relatively low, it flips to a short position.

```python
from AlgorithmImports import *

class BybitCryptoFutureDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2024, 9, 1)
        self.set_end_date(2024, 12, 31)
        self.settings.free_portfolio_value_percentage = 0.1
        # Set Account Currency to USDT, since USD cannot be used to trade.
        self.set_cash("USDT", 100000)
        # Bybit accepts both Cash and Margin account types, select the one you need for the best reality modeling.
        self.set_brokerage_model(BrokerageName.BYBIT, AccountType.MARGIN)
        # Seed the price of each asset with its last known price to avoid trading errors.
        self.settings.seed_initial_prices = True
        self.universe_settings.resolution = Resolution.DAILY
        self.universe_settings.leverage = 2
        # We only trade on BTCUSDT Future in Bybit exchange
        symbols = Symbol.create("BTCUSDT", SecurityType.CRYPTO_FUTURE, Market.BYBIT)
        self.add_universe_selection(ManualUniverseSelectionModel(symbols))
        # Custom alpha model to emit insights based on the Crypto Future price data
        self.add_alpha(CryptoFutureAlphaModel())
        # Equally invest to evenly dissipate the capital concentration risk of inidividual crypto pair
        self.set_portfolio_construction(EqualWeightingPortfolioConstructionModel())
        self.set_execution(ImmediateExecutionModel())

class CryptoFutureAlphaModel(AlphaModel):

    _min_by_symbol = {}

    def update(self, algorithm: QCAlgorithm, slice: Slice) -> List[Insight]:
        insights = []
        for symbol, low_interest_rate in self._min_by_symbol.items():
            # Note that you may want to access the margin interest of the crypto future to calculate if it would impact a trade's PnL
            # Or you can calculate the trade size on keeping the quote currency constant
            if symbol not in slice.margin_interest_rates:
                continue
            interest_rate = slice.margin_interest_rates[symbol].interest_rate
            algorithm.plot('Margin Interest Rate', str(symbol), interest_rate)
            # Short when margin interest rates are relatively low. Otherwise, long.
            if interest_rate <= low_interest_rate.current.value:
                direction = InsightDirection.DOWN
            else:
                direction = InsightDirection.UP
            insights.append(Insight.price(symbol, timedelta(1), direction))
            # Update the indicator.
            low_interest_rate.update(slice.time, interest_rate)
        return insights

    def on_securities_changed(self, algorithm: QCAlgorithm, changes: SecurityChanges) -> None:
        for security in changes.added_securities:
            symbol = security.symbol
            # Add an indicator to track the low of trailing margin interest rates.
            self._min_by_symbol[symbol] = Minimum(10)
            # Historical data
            history = algorithm.history[MarginInterestRate](symbol, 10, Resolution.DAILY)
            for data_point in history:
                self._min_by_symbol[symbol].update(data_point.end_time, data_point.interest_rate)
        for security in changes.removed_securities:
            self._min_by_symbol.pop(security.symbol, None)
```

## Data Point Attributes

The Binance Crypto Future Margin Rate dataset provides `MarginInterestRate` objects, which have the following attributes:

*Members of `QuantConnect.Data.Market.MarginInterestRate` (JSON): https://www.quantconnect.com/services/inspector?type=T:QuantConnect.Data.Market.MarginInterestRate&language=python*
