---
id: "P:cAlgo.API.SymbolSentimentUpdatedEventArgs.Sentiment"
kind: "property"
type: "T:cAlgo.API.SymbolSentimentUpdatedEventArgs"
url: "https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolSentimentUpdatedEventArgs/Sentiment/"
---

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

# SymbolSentimentUpdatedEventArgs.Sentiment

Member of [SymbolSentimentUpdatedEventArgs](https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolSentimentUpdatedEventArgs/index.md).

## Sentiment

Gets sentiment.

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

- Cloud: Never raised in the cloud: the events that pass it never fire there (SymbolSentiment.Updated).

C#:

```csharp
public SymbolSentiment Sentiment {get;}
```

Python:

```python
symbolSentimentUpdatedEventArgs.Sentiment: SymbolSentiment
```

### Returns

`SymbolSentiment` — 

Available since cAlgo.API 5.3.

### Examples

C#:

```csharp
protected override void OnStart()
{
    if (Symbol.Sentiment != null)
        Symbol.Sentiment.Updated += OnSentimentUpdated;
}

private void OnSentimentUpdated(SymbolSentimentUpdatedEventArgs args)
{
    if (args.Sentiment.BuyPercentage > 70)
        Print("Most traders are buying: {0}%", args.Sentiment.BuyPercentage);
}
```

Python:

```python
def on_start(self):
    if api.Symbol.Sentiment is not None:
        api.Symbol.Sentiment.Updated += self.on_sentiment_updated

def on_sentiment_updated(self, args):
    if args.Sentiment.BuyPercentage > 70:
        api.Print(f"Most traders are buying: {args.Sentiment.BuyPercentage}%")
```

