Skip to content

[codex] Pass proxy environment to CCXT loader#126

Draft
ruok808 wants to merge 1 commit into
HKUDS:mainfrom
ruok808:codex/ccxt-proxy-env
Draft

[codex] Pass proxy environment to CCXT loader#126
ruok808 wants to merge 1 commit into
HKUDS:mainfrom
ruok808:codex/ccxt-proxy-env

Conversation

@ruok808
Copy link
Copy Markdown

@ruok808 ruok808 commented May 17, 2026

Summary

  • Read conventional proxy environment variables when constructing the CCXT exchange client.
  • Pass the resulting proxies config to CCXT so public exchange data can be fetched from restricted networks.
  • Add regression coverage for ALL_PROXY and for the no-proxy case.

Why

Requests-based loaders already inherit proxy environment variables, but CCXT does not reliably do so through this loader's current constructor path. In restricted network environments, Binance/OKX public market data can time out unless the proxy is passed explicitly to CCXT.

This change only uses environment variable names and never logs proxy values or credentials.

Tests

/Users/barry/Desktop/alevinno/src/vibe-trading-research/.venv/bin/python -m pytest agent/tests/test_ccxt_loader_proxy.py agent/tests/test_ccxt_loader_bounded.py agent/tests/test_get_market_data_unresolved.py -q

Result: 13 passed.

@warren618 warren618 force-pushed the main branch 2 times, most recently from f7d1066 to 4faf216 Compare May 23, 2026 16:17
@warren618
Copy link
Copy Markdown
Collaborator

Thanks for the focused fix. I reviewed the diff and the approach looks reasonable to me.

I also verified the declared regression suite locally:

python -m pytest agent/tests/test_ccxt_loader_proxy.py agent/tests/test_ccxt_loader_bounded.py agent/tests/test_get_market_data_unresolved.py -q

Result: 13 passed.

One small process note: this PR is still marked as Draft, so we cannot treat it as ready to merge yet. When you are ready, please mark it as ready for review. After that I think this should be straightforward to merge.

Optional follow-up, not a blocker: it would be nice to add one more regression covering explicit HTTP_PROXY / HTTPS_PROXY taking precedence over ALL_PROXY, since the implementation already supports that behavior.

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.

2 participants