---
id: "E:cAlgo.API.SymbolSentiment.Updated"
kind: "event"
type: "T:cAlgo.API.SymbolSentiment"
url: "https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolSentiment/Updated/"
---

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

# SymbolSentiment.Updated

Member of [SymbolSentiment](https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/SymbolSentiment/index.md).

## Updated

Occurs when symbol sentiment data is updated.

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.

C#:

```csharp
event Action<SymbolSentimentUpdatedEventArgs> Updated;
```

Python:

```python
symbolSentiment.Updated += handler  # handler(obj: SymbolSentimentUpdatedEventArgs)
```

### Returns

`Action<SymbolSentimentUpdatedEventArgs>` — 

Available since cAlgo.API 5.3.

### Examples

C#:

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

private void OnSentimentUpdated(SymbolSentimentUpdatedEventArgs args)
{
    Print("{0} sentiment, buy: {1}%, sell: {2}%", args.SymbolName, args.Sentiment.BuyPercentage, args.Sentiment.SellPercentage);
}
```

Python:

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

def on_sentiment_updated(self, args):
    api.Print(f"{args.SymbolName} sentiment, buy: {args.Sentiment.BuyPercentage}%, sell: {args.Sentiment.SellPercentage}%")
```

