Position Information
Last updated
Last updated
Every bit of information about the bots positions is available through the commands in the Position Information category. Each of the commands has an optional positionId. This parameter can be left empty for managed tranding and can be used but is not required for unmanaged. You can read more about that in the Position Handling page.
Position InformationThe command will return every important detail about the position.
Will return the account and market accociated with the position. The value can be used to place order or request other information about the account or market.
Returns the current position direction constant. PositionLong, PositionShort or NoPosition. Can be used if the execution flow depends on a specific direction.
Returns the current position amount. The amount is not reduced by open orders.
Returns the average enter price of the whole position.
Returns the current unrealized + realized profit of the position.
Returns the current profit/loss ratio. When trading on cross margin, max leverage will be used for the calculation. For example, on BitMEX the roi of 1 contract a $1 is based on $0.01 (100x).
All the information about the current and last position enter and exit prices are available in the postion prices category. The command are pretty straight forward.
Position Information