Position
class Position
Bases: object
Position(Instrument instrument, OrderFilled fill) -> None
Represents a position in a market.
The position ID may be assigned at the trading venue, or can be system generated depending on a strategies OMS (Order Management System) settings.
- Parameters:
- instrument (Instrument) – The trading instrument for the position.
- fill (OrderFilled) – The order fill event which opened the position.
- Raises:
- ValueError – If instrument.id is not equal to fill.instrument_id.
- ValueError – If fill.position_id is
None.
account_id
The account ID associated with the position.
- Returns: AccountId
adjustments
Return the position adjustment events.
- Return type: list[PositionAdjusted]