Skip to content

Add QuantConnect connector framework#65

Merged
Pigbibi merged 1 commit into
mainfrom
codex/quantconnect-connector-framework
May 26, 2026
Merged

Add QuantConnect connector framework#65
Pigbibi merged 1 commit into
mainfrom
codex/quantconnect-connector-framework

Conversation

@Pigbibi

@Pigbibi Pigbibi commented May 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add dependency-free QuantConnect REST client with authenticated live-management calls
  • add deployment and brokerage payload models, including Interactive Brokers and paper brokerage settings with redaction helpers
  • document placeholder-only hybrid self-hosted/QuantConnect routing examples and bump package version to 0.7.33

Verification

  • PYTHONPATH=src pytest tests/test_quantconnect.py -q
  • PYTHONPATH=src ruff check src/quant_platform_kit/quantconnect tests/test_quantconnect.py
  • PYTHONPATH=src python -m compileall -q src/quant_platform_kit/quantconnect

Full local pytest collection is blocked on this VPS because optional numpy/pandas dependencies are not installed for existing Binance/feature-snapshot/LongBridge tests.

References

@Pigbibi Pigbibi merged commit 3193c14 into main May 26, 2026
1 check passed
@Pigbibi Pigbibi deleted the codex/quantconnect-connector-framework branch May 26, 2026 08:35

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 550b853234

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

except urllib.error.HTTPError as exc:
status_code = int(exc.code)
raw_body = exc.read()
parsed_error = _parse_response_body(raw_body)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Handle non-JSON HTTP error bodies without crashing

In the HTTPError path, the code unconditionally calls _parse_response_body(raw_body), but many gateways/proxies return HTML or empty bodies on 4xx/5xx responses; in those cases json.loads raises and callers receive a decode exception instead of QuantConnectApiError with the HTTP status. That breaks normal API error handling/retry logic exactly when the service is degraded, so this branch should tolerate parse failure and still raise QuantConnectApiError.

Useful? React with 👍 / 👎.

Comment on lines +158 to +159
if raw_body is None or raw_body == b"" or raw_body == "":
return {}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject empty 2xx responses from QuantConnect API

Returning {} for an empty response body makes post_json treat a 2xx response as success unless success is explicitly False, so truncated/invalid responses can silently pass through (for example, deploy calls can return no deployId without raising). Since the API contract documents object responses with a success field, empty bodies should be treated as protocol errors and surfaced as QuantConnectApiError.

Useful? React with 👍 / 👎.

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