open_missing_spot_position_direct#
API documentation for tradeexecutor.strategy.account_correction.open_missing_spot_position_direct Python function.
- open_missing_spot_position_direct(strategy_universe, state, pricing_model, timestamp, asset, quantity)[source]#
Open a missing spot position.
Assume the token belongs to a spot position which we attempted to open, but state update failed (tx went eventually thru).
- Parameters:
strategy_universe (TradingStrategyUniverse) –
state (State) –
pricing_model (PricingModel) –
timestamp (datetime) –
asset (AssetIdentifier) –
quantity (Decimal) –
- Return type:
tuple[tradeexecutor.state.position.TradingPosition, tradeexecutor.state.trade.TradeExecution]