Table of Contents

Constructor BudgetRequest

Namespace
WhalesSecret.TradeScriptLib.API.TradingV1.Budget
Assembly
WhalesSecret.TradeScriptLib.dll

BudgetRequest(string, string, BudgetSnapshot)

Creates a instance of the object.

public BudgetRequest(string strategyName, string primaryAsset, BudgetSnapshot initialBudget)

Parameters

strategyName string

Unique name of the trading strategy.

primaryAsset string

Name of the primary asset that is used to calculate profits and losses.

initialBudget BudgetSnapshot

Initial budget of the trading strategy. The budget must not be empty and it must include primaryAsset. It must not contain negative values and there must be at least one asset that has non-zero value.

Exceptions

InvalidArgumentException

Thrown if:

  • strategyName is null or empty,
  • primaryAsset is null or empty,
  • initialBudget is null or empty, or it contains negative values, or it only contains zero values, or it does not contain primaryAsset.
.