---
title: "Crypto"
description: "A Cryptocurrency is a digital currency that's secured by cryptography, which makes it nearly impossible to counterfeit or double-spend."
canonical: https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/crypto
markdown: https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/crypto.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/03%20Writing%20Algorithms/03%20Securities/99%20Asset%20Classes/03%20Crypto
modified: 2026-10-28
index: https://www.quantconnect.com/llms.txt
---

# Crypto

[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) > Crypto

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

A Cryptocurrency is a digital currency that's secured by cryptography, which makes it nearly impossible to counterfeit or double-spend.

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

### See Also

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

## Pages in This Section

- [Requesting Data](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/crypto/requesting-data.md): Request Crypto data in your algorithm to receive a feed of asset prices in the OnData method.
- [Handling Data](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/crypto/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.
- [Holdings](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/crypto/holdings.md): Crypto holdings require special consideration because not all brokerages track your positions in each currency pair.
- [Market Hours](https://www.quantconnect.com/docs/v2/writing-algorithms/securities/asset-classes/crypto/market-hours.md): The Crypto markets are open 24/7. There are no pre-market hours, post-market hours, holidays, late opens, or early closes.
