Skip to content

Assets

Summary

Represents the list of all the assets with the asset names as string values.

Signature

1
public abstract interface Assets

Namespace

cAlgo.API

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
 using cAlgo.API;
 namespace cAlgo.Robots
 {
     [Robot(AccessRights = AccessRights.None)]
     public class NewcBot2 : Robot
     {
         protected override void OnStart()
         {
             foreach (var assetName in Assets)
             {
                 var asset = Assets.GetAsset(assetName);
                 Print("Asset Name: {0} | Asset Digits: {1} | Is Deposit Asset: {2}", asset.Name, asset.Digits, asset.Name == Account.Asset.Name);
             }
         }
     }
 }

Methods

GetAsset

Summary

Gets the asset.

Signature

1
public abstract Asset GetAsset(string assetName)

Parameters

Name Type Description
assetName string Name of the asset you want to get

Return Value

Asset

GetAssets

Summary

Get multiple assets on a single call.

Signature

1
public abstract Asset[] GetAssets(string[] assetNames)

Parameters

Name Type Description
assetNames string[] Names of the assets you want to get

Return Value

Asset[]

Exists

Summary

Defines if the specific asset exists.

Signature

1
public abstract bool Exists(string assetName)

Parameters

Name Type Description
assetName string Name of the asset you want to check

Return Value

bool

Properties

Item

Signature

1
public abstract string Item {get;}

Return Value

string

Count

Summary

Gets the total number of the assets.

Signature

1
public abstract int Count {get;}

Return Value

int