PositionCreationResultDTO is returned after a position is created. It contains either the position id or the error message.
Position ID (filled if order creation is successful).
Order ID (filled if order creation is successful).
Error message (filled if position creation failed).
Exception (filled if position creation failed).
Indicates if the position creation was successful or not.
PositionDTO is the amount of a security, commodity or currency which is owned by an individual, dealer, institution, or other fiscal entity
An identifier that uniquely identifies the position.
The order id that opened the position.
The trade that opened the position.
The order id that closed the position.
The trade that closed the position.
Last calculated gain from the last ticker received.
Lowest price for this position. You can get the corresponding gain with
Highest price for this position. You can get the corresponding gain with
PositionDTO also have a
getGain()method that returns the gain you made with this position (if the position is closed of course). If the position is not closed, you can get the lastest potential gain calculated from the last ticker with the
PositionRulesDTO is used by Cassandre trading bot to know if it should close a position.
Stop gain percentage has been set.
Stop gain percentage.
Stop loss percentage has been set.
Stop loss percentage.
PositionStatusDTO describes the different status of a position.
A position has been created, a buy order has been made but not yet completed.
The buy order has been accepted.
A sell order has been made but not yet completed.
The sell order has been accepted.
Get position by id.
Creates a position with its associated rules.
Method called by streams at every ticker update.
Method called by streams on every trade update.
Used by Cassandre to restore position after restart.
Used by Cassandre to backup positions to database.