---
id: "P:cAlgo.API.MessageArgs`1.SenderInstanceId"
kind: "property"
type: "T:cAlgo.API.MessageArgs`1"
url: "https://help.ctrader.com/ctrader-algo/references/Messages/MessageArgs/SenderInstanceId/"
---

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

# MessageArgs.SenderInstanceId

Member of [MessageArgs<TMessage>](https://help.ctrader.com/ctrader-algo/references/Messages/MessageArgs/index.md).

## SenderInstanceId

Gets message sender instance Id.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public string SenderInstanceId {get;}
```

Python:

```python
messageArgs.SenderInstanceId: str
```

### Returns

`string` — 

Available since cAlgo.API 5.2.

### Examples

C#:

```csharp
Messages.Subscribe<string>("Signals", args =>
{
    if (args.SenderInstanceId != InstanceId)
        Print("Signal from instance {0}: {1}", args.SenderInstanceId, args.Message);
});
```

Python:

```python
# Not available in Python: MessageArgs is only received by handlers of the generic Messages.Subscribe method
```

