Use this template when adding a new crypto strategy profile.
At minimum, a new profile should touch these places:
src/crypto_strategies/catalog.pysrc/crypto_strategies/manifests/__init__.pysrc/crypto_strategies/entrypoints/__init__.pysrc/crypto_strategies/runtime_adapters.py- one implementation module under
src/crypto_strategies/strategies/ - tests under
tests/
- add
StrategyDefinitioninsrc/crypto_strategies/catalog.py - add
StrategyManifestinsrc/crypto_strategies/manifests/__init__.py - add a unified entrypoint in
src/crypto_strategies/entrypoints/__init__.py - add a runtime adapter in
src/crypto_strategies/runtime_adapters.py - add catalog and entrypoint tests
- if the profile consumes upstream artifacts, add an explicit
StrategyArtifactContract - if the profile becomes live, add platform status and portability checks downstream
Every new profile must declare:
profiledomain="crypto"supported_platformsentrypointrequired_inputsdefault_configtarget_mode
required_inputs must use canonical names only.
The manifest and the catalog entry must agree on:
profiledomaindisplay_namerequired_inputsdefault_config
The entrypoint must:
- read only canonical inputs from
StrategyContext - read
ctx.portfoliowhen portfolio data is required - return only
StrategyDecision - keep exchange-specific execution details out of the strategy repo
A new runtime adapter must declare at least:
available_inputsportfolio_input_namewhen the strategy readsctx.portfolioartifact_contractwhen the strategy needs upstream artifacts
If a platform does not support the profile yet, do not add it to supported_platforms.
The artifact contract belongs in this strategy package. Platform repositories should consume it and map it to their own env/filesystem/runtime source rules.
Do not:
- branch on platform names inside strategy code
- read exchange env vars inside strategy code
- return Binance-specific order payload fields
- bind downstream code to internal helper module names
- catalog test
- entrypoint test
- governance test for canonical inputs and explicit target mode
- downstream adapter smoke test before enabling a new platform
-
StrategyDefinitionadded with explicittarget_mode -
StrategyManifestmatches the catalog definition - entrypoint reads only canonical inputs
- runtime adapter added for every compatible platform
- artifact contract added when upstream artifacts are required
- strategy code has no platform branch or env reads
- catalog, entrypoint, and governance tests were updated
- downstream platform status script or adapter smoke was updated when rollout changed