Start with sample code
Use a strategy starter template or an asset-specific example to understand the supported interface before adding custom behavior.
Develop custom strategy logic with the Investfly Python SDK while platform services handle supported market data, indicators, order planning, backtesting, virtual portfolios, and eligible account deployment.
class MyStrategy(TradingStrategy): def getSecurityUniverseSelector(self): return SecurityUniverseSelector.fromSymbols( SecurityType.STOCK, ["AAPL", "MSFT"] ) @data_trigger( type=DataType.BARS, barInterval=BarInterval.FIFTEEN_MINUTE ) def onMarketData(self, updatedSecurities): # Your signal and order-planning logic return orders or None
The SDK gives your code explicit interfaces for the universe, market-data callbacks, portfolio access, order requests, and shared position controls.
Use a strategy starter template or an asset-specific example to understand the supported interface before adding custom behavior.
Define security selection, data callbacks, custom indicators, signal evaluation, and order-planning requests in Python.
Run historical backtests, deploy to a virtual portfolio, inspect activity, and revise code before considering eligible live use.
Asset-native selection and execution models remain visible even when your signal logic is custom.
Python strategies run inside the supported Investfly environment rather than an unrestricted general-purpose server.
Access platform-provided bars, quotes, indicator series, and strategy services through supported interfaces.
Use supported runtime imports including NumPy, pandas, TA-Lib, statistics, typing, and Investfly SDK modules.
Express position management and portfolio limits through typed strategy-policy models where applicable.
Use the same user-authored strategy concept across backtesting, virtual portfolios, and eligible deployments.
It supplies supported market data, strategy interfaces, testing, virtual portfolios, order planning, monitoring, and eligible broker connectivity so your code can focus on the logic you author.
The current bounded runtime supports Investfly SDK modules and selected packages including NumPy, pandas, TA-Lib, statistics, typing, and math. Check the API documentation for the current interface and restrictions.
Supported Python strategies follow the shared strategy path through historical backtesting and virtual portfolio simulation, helping you inspect behavior before considering eligible live use.
Use Python when your strategy needs supported custom selection, indicators, callbacks, or signal logic. Use the visual builder when the available configuration fields can express the strategy more simply.
Review the supported interface, clone a sample, and test your own code in the platform.
Available packages, providers, instruments, and live capabilities depend on current platform support.