position#

tradeexecutor.state.position module.

Module description#

Trading position state info.

Classes#

PositionType

An enumeration.

TradingPosition

TradingPosition(position_id: int, pair: tradeexecutor.state.identifier.TradingPairIdentifier, opened_at: datetime.datetime, last_pricing_at: datetime.datetime, last_token_price: tradeexecutor.state.types.USDollarAmount, last_reserve_price: tradeexecutor.state.types.USDollarAmount, reserve_currency: tradeexecutor.state.identifier.AssetIdentifier, trades: Dict[int, tradeexecutor.state.trade.TradeExecution] = <factory>, closed_at: Optional[datetime.datetime] = None, frozen_at: Optional[datetime.datetime] = None, last_trade_at: Optional[datetime.datetime] = None, stop_loss: Optional[tradeexecutor.state.types.USDollarAmount] = None, take_profit: Optional[tradeexecutor.state.types.USDollarAmount] = None)