---
id: "T:cAlgo.API.Permission"
kind: "interface"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/Permissions/Permission/"
---

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

# Permission (interface)

Base interface for Permissions

Environments: Desktop supported · CLI works differently · Cloud works differently.

- CLI: IsAllowed is always true and Request returns true without showing a prompt.
- Cloud: IsAllowed is always true and Request returns true without showing a prompt.

## Definition

```csharp
public interface Permission
```

## Examples

C#:

```csharp
Permission permission = Permissions.TradingPermission;
if (permission.IsAllowed || permission.Request())
    Print("Trading is allowed");
else
    Print("Trading permission was denied");
```

Python:

```python
permission = api.Permissions.TradingPermission
if permission.IsAllowed or permission.Request():
    api.Print("Trading is allowed")
else:
    api.Print("Trading permission was denied")
```

## Methods

- `bool Request()` — Requests the permission from user. [details](https://help.ctrader.com/ctrader-algo/references/Permissions/Permission/Request/index.md)

## Properties

- `bool IsAllowed {get;}` — True if Permission is given by user otherwise false. [details](https://help.ctrader.com/ctrader-algo/references/Permissions/Permission/IsAllowed/index.md)

