Table of Contents

Method GetCurrentBudgetAsync

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

GetCurrentBudgetAsync(CancellationToken)

Gets a copy of the current budget snapshot. The current budget specifies the available amounts of all assets that the trading strategy can use at the moment.

Task<BudgetSnapshot> GetCurrentBudgetAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Cancellation token that allows the caller to cancel the operation.

Returns

Task<BudgetSnapshot>

Copy of the current budget snapshot.

Exceptions

OperationCanceledException

Thrown if the operation was cancelled, including cancellation during the shutdown.

NotAvailableException

Thrown if the trade API client was created without a budget.