Skip to content

feat: support direct credentials in TradingSuite.create#89

Open
rupurt wants to merge 1 commit into
TexasCoding:mainfrom
rupurt:codex/trading-suite-direct-credentials
Open

feat: support direct credentials in TradingSuite.create#89
rupurt wants to merge 1 commit into
TexasCoding:mainfrom
rupurt:codex/trading-suite-direct-credentials

Conversation

@rupurt

@rupurt rupurt commented Jun 29, 2026

Copy link
Copy Markdown

Summary

  • allow TradingSuite.create to accept direct ProjectX username/api_key credentials
  • forward account_name to direct or environment-backed client creation instead of TradingSuiteConfig
  • add regression coverage for direct credentials and partial credential validation

Why

TradingSuite.create accepted arbitrary kwargs for suite configuration and always created its ProjectX client with ProjectX.from_env(). Callers that supplied username, api_key, or account_name had those values forwarded into TradingSuiteConfig, causing an unexpected keyword argument failure before market data could initialize.

Validation

  • uv run pytest tests/trading_suite/test_core.py -q
  • uv run ruff check src/project_x_py/trading_suite.py tests/trading_suite/test_core.py
  • uv run ruff format --check src/project_x_py/trading_suite.py tests/trading_suite/test_core.py

@rupurt rupurt changed the title [codex] support direct credentials in TradingSuite.create feat: support direct credentials in TradingSuite.create Jun 29, 2026
@rupurt rupurt marked this pull request as ready for review June 29, 2026 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant