catalyst icon indicating copy to clipboard operation
catalyst copied to clipboard

Use Catalyst with a proxy

Open avolution opened this issue 7 years ago • 3 comments

Hey Guys,

Its a question or maybe a Feature-request:

How to use Catalyst with a HTTP Proxy?

CCXT have a Proxy Setting: https://ccxt.readthedocs.io/en/latest/install.html#proxy

I have tried to to set the env Variables as describes like

$ export HTTP_PROXY="http://10.10.1.10:3128"
$ export HTTPS_PROXY="http://10.10.1.10:1080"

But this have no effect.


Would also be nice to pass the Proxy setting for CCXT for these exchange setup like:

import ccxt
exchange = ccxt.poloniex({
    'proxies': {
        'http': 'http://10.10.1.10:3128',  # these proxies won't work for you, they are here for example
        'https': 'https://10.10.1.10:1080',
    },
})

Cause then I am able to set the Proxies in python (easier).

avolution avatar Oct 19 '18 11:10 avolution

To delimit the cause:

A standalone Run of CCXT with a proxy env setting

For example:

$ export HTTP_PROXY="http://xx.xx.x.x:xxxx" $ export HTTPS_PROXY="http://xx.xx.x.x:xxxx"

import ccxt

bitfinex = ccxt.bitfinex()
bitfinex.verbose = True
ohlcvs = bitfinex.fetch_ohlcv('ETH/BTC', '30m', 1504224000000)

dt = bitfinex.iso8601(ohlcvs[0][0])
print(dt)  # should print '2017-09-01T00:00:00.000Z'

Uses the Proxy connection correctly (checked in the proxy logs)

avolution avatar Oct 19 '18 13:10 avolution

The reason why this is an important Feature:

The use of a HTTP proxy is necessary to run more than one Algo (stable) on a machine. Otherwise you will get "API-Rate-Limit-Exception" from the Exchange-Side. Because the Algos are calling the exchange to frequently in sum.

avolution avatar Oct 21 '18 16:10 avolution

Thanks @avolution for the information. We will look at it.

lenak25 avatar Oct 21 '18 18:10 lenak25