investfly.api.StrategyApiClient
Client for trading-strategy CRUD, deployment state, and backtests.
class
StrategyApiClient:
Create and manage configuration or Python trading strategies.
StrategyApiClient(restApiClient: investfly.api.RestApiClient.RestApiClient)
Create a strategy client backed by an authenticated transport.
def
getStrategyDeployment(self, strategyId: int) -> Optional[Dict[str, Any]]:
Return current deployment metadata, or None when the strategy is not deployed.
def
createStrategy( self, strategyModel: investfly.models.strategy.TradingStrategyModel) -> investfly.models.strategy.TradingStrategyModel:
Create a SCRIPT or CONFIG strategy from a complete strategy model.
def
updateStrategyCode(self, strategyId: int, code: str) -> str:
Replace and validate the Python source of a SCRIPT strategy.
def
updateStrategyConfig(self, strategyId: int, config: Any) -> Any:
Replace the configuration of a CONFIG strategy.