---
title: "Transaction Fees"
canonical: https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/transaction-fees
markdown: https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/transaction-fees.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/03%20Writing%20Algorithms/24%20Reality%20Modeling/04%20Transaction%20Fees
modified: 2026-11-22
index: https://www.quantconnect.com/llms.txt
---

# Transaction Fees

[Documentation](https://www.quantconnect.com/docs/v2.md) > [Writing Algorithms](https://www.quantconnect.com/docs/v2/writing-algorithms.md) > Reality Modeling > Transaction Fees

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

## Pages in This Section

- [Key Concepts](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/transaction-fees/key-concepts.md): To give your backtests the most accurate fees, LEAN contains transaction fee models that model the fee structure of many popular brokerages.
- [Supported Models](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/transaction-fees/supported-models.md): This page describes some of the pre-built fee models in LEAN. If none of these models perform exactly how you want, create a custom fee model.
