---
id: "T:cAlgo.API.SymbolSentiment"
kind: "interface"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolSentiment/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# SymbolSentiment (interface)

Represents a symbol sentiment.

Environments: Desktop supported · CLI supported · Cloud not supported.

- Cloud: Reading BuyPercentage/SellPercentage or subscribing Updated blocks the cBot up to 1 minute, then fails with a wait-timeout error.

## Definition

```csharp
public interface SymbolSentiment
```

Available since cAlgo.API 5.3.

## Examples

C#:

```csharp
using cAlgo.API;

namespace cAlgo.Robots;

public partial class Test : Robot
{
    protected override void OnStart()
    {
        Print($"Symbol {SymbolName} traders sentiment Buy Percentage: {Symbol.Sentiment.BuyPercentage} and Sell Percentage: {Symbol.Sentiment.SellPercentage}");
    }
}
```

Python:

```python
import clr
clr.AddReference("cAlgo.API")

from cAlgo.API import *

class Test():
    def on_start(self):
        self.print_symbol_sentiment()

        api.Symbol.Sentiment.Updated += lambda _: self.print_symbol_sentiment()

    def print_symbol_sentiment(self):
        print(f"Symbol {api.SymbolName} traders sentiment Buy Percentage: {api.Symbol.Sentiment.BuyPercentage} and Sell Percentage: {api.Symbol.Sentiment.SellPercentage}")
```

config.json:

```json
{
  "AccessRights": "None"
}
```

## Properties

- `double BuyPercentage {get;}` — Gets buy percentage if available otherwise 0. [details](https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolSentiment/BuyPercentage/index.md)
- `double SellPercentage {get;}` — Gets sell percentage if available otherwise 0. [details](https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolSentiment/SellPercentage/index.md)

## Events

- `event Action<SymbolSentimentUpdatedEventArgs> Updated;` — Occurs when symbol sentiment data is updated. [details](https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolSentiment/Updated/index.md)

