tardis-dev / tardis-python

Python client for tardis.dev - historical tick-level cryptocurrency market data replay API.
https://tardis.dev
Mozilla Public License 2.0
113 stars 16 forks source link

Support HTTP proxy #4

Closed batterseapower closed 3 years ago

batterseapower commented 3 years ago

Can you please support specifying a HTTP proxy (or using the system-configured default proxy) with this library? Corporate networks often require all traffic to go via a proxy.

aiohttp does have this capability: https://docs.aiohttp.org/en/stable/client_advanced.html#proxy-support

thaaddeus commented 3 years ago

Hi, sure I'll add it, just to be clear you're using tardis_client.replay functionallity?

batterseapower commented 3 years ago

That's right. Thanks!

thaaddeus commented 3 years ago

please try v1.2.12, TardisClient constructor now accepts http_proxy, hope that helps.

batterseapower commented 3 years ago

Thanks for that (and your help on the live chat earlier today regarding Huobi instrument codes). The updated TardisClient works for me, except for the fact that there is a bug with current aiohttp (3.7.4) proxy support on Windows (https://github.com/aio-libs/aiohttp/issues/4536). After applying the workaround there, the new Tardis client works.

thaaddeus commented 3 years ago

I see, thanks!