---
title: "Forex"
description: "Forex markets are for trading foreign currencies."
canonical: https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/forex
markdown: https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/forex.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/03%20Writing%20Algorithms/03%20Securities/99%20Asset%20Classes/05%20Forex
modified: 2026-10-30
index: https://www.quantconnect.com/llms.txt
---

# Forex

[Documentation](https://www.quantconnect.com/docs/v2.md) > [Writing Algorithms](https://www.quantconnect.com/docs/v2/writing-algorithms.md) > Securities > [Asset Classes](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes.md) > Forex

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

Forex markets are for trading foreign currencies.

- [Requesting Data](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/forex/requesting-data.md)
- [Handling Data](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/forex/handling-data.md)
- [Market Hours](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/forex/market-hours.md)

### See Also

- [BasicTemplateForexAlgorithm.py](https://github.com/QuantConnect/Lean/blob/master/Algorithm.Python/BasicTemplateForexAlgorithm.py)
- [BasicTemplateForexAlgorithm.cs](https://github.com/QuantConnect/Lean/blob/master/Algorithm.CSharp/BasicTemplateForexAlgorithm.cs)

## Pages in This Section

- [Requesting Data](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/forex/requesting-data.md): Request Forex data in your algorithm to receive a feed of exchange rates in the OnData method.
- [Handling Data](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/forex/handling-data.md): LEAN passes the data you request to the OnData method so you can make trading decisions. The Slice object groups the data together with a timestamp.
- [Market Hours](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/forex/market-hours.md): This page shows the trading hours, holidays, and time zone of the Forex market.
