Profit Information
Last updated
Last updated
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
Parameter Name | Parameter Type | Required | Suggestions |
---|---|---|---|
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
Parameter Name | Parameter Type | Required | Suggestions |
---|---|---|---|
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
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
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
Sets a custom base value used in the ROI calculation (realized profits / baseValue * 100).
Syntax: SetBotRoiBaseValue(baseValue, [ market ])
Return type: Void
Parameter Name | Parameter Type | Required | Suggestions |
---|---|---|---|
Parameter Name | Parameter Type | Required | Suggestions |
---|---|---|---|
Parameter Name | Parameter Type | Required | Suggestions |
---|---|---|---|
Parameter Name | Parameter Type | Required | Suggestions |
---|---|---|---|
market
String
False
InputAccount,InputAccountMarket,InputMarket,AccountGuid
includeUnrealized
Boolean
False
True,False
market
String
False
InputAccount,InputAccountMarket,InputMarket,AccountGuid
direction
Enum
False
PositionLong,PositionShort,NoPosition
market
String
False
InputAccount,InputAccountMarket,InputMarket,AccountGuid
direction
Enum
False
PositionLong,PositionShort,NoPosition
market
String
False
InputAccount,InputAccountMarket,InputMarket,AccountGuid
market
String
False
InputAccount,InputAccountMarket,InputMarket,AccountGuid
baseValue
Number
True
Input,Number,SessionGet
market
String
False
InputAccount,InputAccountMarket,InputMarket,AccountGuid