---
id: "T:cAlgo.API.PluginAttribute"
kind: "class"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/Attributes/PluginAttribute/"
---

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

# PluginAttribute (class)

Sealed class PluginAttribute.

Environments: Desktop supported · CLI supported · Cloud supported.

## Definition

```csharp
public sealed class PluginAttribute : Attribute
```

## Remarks

Marks a class as a Plugin. The Plugin attribute cannot be omitted.

## Examples

C#:

```csharp
using cAlgo.API;

namespace cAlgo.Plugins
{
    // config.json declares the plugin settings, the class holds only the code
    public partial class PluginAttributeSample : Plugin
    {
        protected override void OnStart()
        {
            Print("Plugin started, time zone: {0}", TimeZone.DisplayName);
        }
    }
}
```

Python:

```python
class PluginAttributeSample():
    def on_start(self):
        api.Print(f"Plugin started, time zone: {api.TimeZone.DisplayName}")
```

config.json:

```json
{
  "AccessRights": "None",
  "TimeZone": "UTC"
}
```

## Constructors

- `public PluginAttribute()` — Initializes a new PluginAttribute instance. [details](https://help.ctrader.com/ctrader-algo/references/Attributes/PluginAttribute/Constructor/index.md)

## Properties

- `public AccessRights AccessRights {get; set;}` — Gets or sets the access rights required for the Plugin. [details](https://help.ctrader.com/ctrader-algo/references/Attributes/PluginAttribute/AccessRights/index.md)
- `public string AdditionalInfoUrl {get; set;}` — Gets or sets additional info url. [details](https://help.ctrader.com/ctrader-algo/references/Attributes/PluginAttribute/AdditionalInfoUrl/index.md)
- `public string TimeZone {get; set;}` — Sets the timezone for all the Plugin datetime references [details](https://help.ctrader.com/ctrader-algo/references/Attributes/PluginAttribute/TimeZone/index.md)

