HistoricalTrade.Swap
property · HistoricalTrade · cAlgo.API
DesktopCLICloud
Swap is the overnight interest rate if any, accrued on the position.
Definition
double Swap {get;}
historicalTrade.Swap: float
Returns double
Examples
var totalSwap = History.Sum(trade => trade.Swap);
Print("Total swap: {0}", totalSwap);
totalSwap = sum(trade.Swap for trade in api.History)
api.Print(f"Total swap: {totalSwap}")