- class entities.position.Position(strategy, asset, quantity, orders=None, hold=0, available=0)¶
This is a Position object. It is used to keep track of the quantity of an asset owned in a strategy. Position objects are retreived from the broker using the get_positions() or get_position() methods.
The strategy that owns this position.
The symbol of the asset.
The quantity of the asset owned.
The orders that have been executed for this position.
list of Order
- add_order(order, quantity)¶
- property available¶
Returns an order that can be used to sell this position.
order – An order that can be used to sell this position.
- Return type
- property hold¶
- property quantity¶