Skip to content

Permission

interface cAlgo.API

DesktopCLICloud

Base interface for Permissions

Environment behaviour

CLI — works differently. IsAllowed is always true and Request returns true without showing a prompt.

Cloud — works differently. IsAllowed is always true and Request returns true without showing a prompt.

Definition

public interface Permission

Namespace: cAlgo.API · Group: Permissions

Examples

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

Methods

Name Description
RequestDesktopCLICloudbool Requests the permission from user.

Properties

Name Description
IsAllowedDesktopCLICloudbool True if Permission is given by user otherwise false.

See also