Profit Information
GetBotProfit
Total realized profits on a specific market. Unrealized profits are included when 'includeUnrealized' is set on true.
Syntax: GetBotProfit([ market ], [ includeUnrealized ])
Return total realized profit. On spot/margin the result will be in the quote currency. For leverage its in the underlying currency.
Return type: Number
market
String
False
InputAccount,InputAccountMarket,InputMarket,AccountGuid
includeUnrealized
Boolean
False
True,False
GetBotROI
Gets the return on investment. The ROI is calculated by dividing the total realized profits by the average position size.
Syntax: GetBotROI([ market ])
Return the ROI percentage.
Return type: Number
market
String
False
InputAccount,InputAccountMarket,InputMarket,AccountGuid
GetCurrentProfit
Gets unrealized plus realized profits of the current open position. Optional parameters fall back to main bot settings. The accountId parameter can take a positionId as well.
Syntax: GetCurrentProfit([ direction ], [ market ])
Returns the total profit. On spot/margin the result will be in the quote currency. For leverage its in the underlying currency.
Return type: Number
direction
Enum
False
PositionLong,PositionShort,NoPosition
market
String
False
InputAccount,InputAccountMarket,InputMarket,AccountGuid
GetCurrentROI
Gets the return on investment percentage based on the total cost/margin used of the open positions. Optional parameters fall back to main bot settings. The accountId parameter can take a positionId as well.
Syntax: GetCurrentROI([ direction ], [ market ])
Returns the ROI percentage.
Return type: Number
direction
Enum
False
PositionLong,PositionShort,NoPosition
market
String
False
InputAccount,InputAccountMarket,InputMarket,AccountGuid
GetTradingReport
Gets the trading report container with many useful values to help properly evaluate a strategy or a trading system.
Syntax: GetTradingReport([ market ])
The trading report container.
Return type: Dynamic
market
String
False
InputAccount,InputAccountMarket,InputMarket,AccountGuid
SetBotRoiBaseValue
Sets a custom base value used in the ROI calculation (realized profits / baseValue * 100).
Syntax: SetBotRoiBaseValue(baseValue, [ market ])
Return type: Void
baseValue
Number
True
Input,Number,SessionGet
market
String
False
InputAccount,InputAccountMarket,InputMarket,AccountGuid
Last updated