Skip to content

PendingOrder.TradeType

property · PendingOrder · cAlgo.API

DesktopCLICloud

Specifies whether this order is to buy or sell.

Definition

TradeType TradeType {get;}
pendingOrder.TradeType: TradeType

Returns TradeType

Examples

var buyOrders = PendingOrders.Count(order => order.TradeType == TradeType.Buy);
Print("Pending buy orders: {0}", buyOrders);
buyOrders = len([order for order in api.PendingOrders if order.TradeType == TradeType.Buy])
api.Print(f"Pending buy orders: {buyOrders}")