mirror of
https://github.com/Xe138/AI-Trader.git
synced 2026-04-12 13:37:24 -04:00
refactor: remove config_path from API interface
Makes config_path an internal server detail rather than an API parameter.
Changes:
- Remove config_path from SimulateTriggerRequest
- Add config_path parameter to create_app() with default
- Store in app.state.config_path for internal use
- Update trigger endpoint to use internal config path
- Change missing config error from 400 to 500 (server error)
API calls now only need to specify date_range (and optionally models):
POST /simulate/trigger
{"date_range": ["2025-01-16"]}
The server uses configs/default_config.json by default.
This simplifies the API and hides implementation details from clients.
This commit is contained in:
@@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
## [Unreleased]
|
||||
|
||||
### Changed
|
||||
- **Simplified API Interface** - Config path is now a server-side detail
|
||||
- Removed `config_path` parameter from POST /simulate/trigger
|
||||
- Server uses internal default config (configs/default_config.json)
|
||||
- Simplifies API calls - only need to specify date_range
|
||||
- **Model Selection** - `enabled` field in config now controls which models run
|
||||
- API `models` parameter is now optional
|
||||
- If not provided, uses models where `enabled: true` in config
|
||||
|
||||
Reference in New Issue
Block a user