mikekonan / exchange-proxy

exchange-proxy
GNU General Public License v3.0
110 stars 32 forks source link

You are being rate limited #32

Closed aumcara closed 2 years ago

aumcara commented 2 years ago

Happy New Year Mike,

NB: I noticed the here under while updating freqtre to 2021-12.

I'm using your proxy since a little while, with my Kucoin Exchange, and my docker-compose.yml file is structured like this...

freqtrade-kcproxy: image: mikekonan/freqtrade-proxy:main-arm64 restart: unless-stopped container_name: freqtrade-proxy

freqtrade1: environment: SLEEP: "60" build: context: . dockerfile: "Dockerfile" restart: unless-stopped container_name: freqtrade1 volumes:

My config .json on the section involved with your proxy is as following content:

    "ccxt_config": {
        "enableRateLimit": false,
        "timeout": 60000,
        "urls": {
            "api": {
                "public": "http://freqtrade-proxy:8080/kucoin",
                "private": "http://freqtrade-proxy:8080/kucoin"
            }
        }
    },
    "ccxt_async_config": {
       "enableRateLimit": false,
                    "timeout": 60000
    },

And here below the extract of my logs :

freqtrade3 | Ray ID: 6c8311993b3e346f • freqtrade3 | 2022-01-04 08:24:07 UTC freqtrade3 |

You are being rate limited

freqtrade3 | freqtrade3 | freqtrade3 |
freqtrade3 |
freqtrade3 |

What happened?

freqtrade3 |

The owner of this website (openapi-v2.kucoin.com) has banned you temporarily from accessing this website.

freqtrade3 | freqtrade3 |
freqtrade3 | freqtrade3 | freqtrade3 |
freqtrade3 | freqtrade3 | freqtrade3 | freqtrade3 | freqtrade3 |
freqtrade3 |
freqtrade3 | freqtrade3 | freqtrade3 | freqtrade3 | freqtrade3 | " freqtrade3 | 2022-01-04 08:24:07,886 - freqtrade.exchange.common - WARNING - retrying fetch_ticker() still for 1 times freqtrade3 | 2022-01-04 08...

Do you have an idea of what could be wrong ?

Thank you

mikekonan commented 2 years ago

Hello,

Actually, the proxy could violate kucoin filtering rules, but only on startup, when it's trying to prefetch candles before starts receiving them over WebSocket. When 429 occurs, the proxy forwards the response transparently to freqtrade to make it fetched again.

Regarding your issue, you need to be sure that proxy is only one source of requests to kucoin API. If not, maybe your server has the same IP that another doing a lot of requests?

aumcara commented 2 years ago

Hi Mike,

Thanks for replying so fast.

Regarding the 429 this does not happen anymore since I installed you proxy :-)

Regarding the second paragraph, I don't know how to check that :-/ rather unexperimented with FT and such type of verification.

What I can say is that, I have, 5 FreqTrade bots running ... 2 live bots and 3 dry bots

The thing that could (maybe imho) make thing go wrong is maybe that these 5 strats are using different timeframe value :-/

Bot1 : is using timeframe = 1m Bot2 : is using timeframe = 5m Bot3 : is using timeframe = 15m Bot4 : is using timeframe = 5m Bot5 : is using timeframe = 15m

I only have one VPS server with FreqTrade installed on it and those 5 strats.

Is there something I could verify more deeply in order fo you to help me solve this issue ?

NB: Fyi, BUYS adn SELLS are happening normaly in Live and in Dry mode.

Thanks for your support.

mikekonan commented 2 years ago

Q: The thing that could (maybe imho) make thing go wrong is maybe that these 5 strats are using different timeframe value :-/ A: It's fine. Proxy optimizing these requests, so your machine does not overflow kucoin API with sending unnecessary requests.

What is the VPS provider? Could you change the IP of your server over the admin interface?

If you are sure that there are no request sources to kucoin API I think you have to ask for their support.

aumcara commented 2 years ago

OK ...

The VPS Provider is : Oracle in Japan (I have a paid subscription but using it in the limits of the Free Tier.)

Regarding the other eventual request ... the only thing I do is accessing the FreqUI interfaces via remote SSH connection ... I don't think this is a problem right ?

mikekonan commented 2 years ago

Regarding the other eventual request ... the only thing I do is accessing the FreqUI interfaces via remote SSH connection ... I don't think this is a problem right ?

You are right, it's not a problem