Skip to content

GetAssets Method

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[]

Declaring Type

cAlgo.API.Assets

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);
             }
         }
     }
 }

Last update: January 30, 2023