Username: Password:

Author Topic: Kucoin API - Rate Limit Exceeded  (Read 13474 times)

Offline adubnz

  • Rookie
  • *
  • Posts: 1
    • View Profile
Kucoin API - Rate Limit Exceeded
« on: March 13, 2022, 07:39:14 PM »
Hi there,

I'm getting a rate limit exceeded warning from Kucoin:

RateLimitExceeded: kucoin GET https://openapi-v2.kucoin.com/api/v3/market/orderbook/level2?symbol=XXX-USDT 429 Too Many Requests {"code":"429000","msg":"Too Many Requests"}
    at kucoin.handleHttpStatusCode (/snapshot/node14Win/node_modules/ccxtKucoin/js/base/Exchange.js:569:19)
    at /snapshot/node14Win/node_modules/ccxtKucoin/js/base/Exchange.js:601:18
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async timeout (/snapshot/node14Win/node_modules/ccxtKucoin/js/base/functions/time.js:195:24)
    at async kucoin.fetchOrderBook (/snapshot/node14Win/node_modules/ccxtKucoin/js/kucoin.js:849:26) {
  constructor: [Function: RateLimitExceeded]
}
Fetching orderbook again.{"name":"RateLimitExceeded"}
kucoin - throwing error: "Fetching orderbook again.{\"name\":\"RateLimitExceeded\"}"
Error: Fetching orderbook again.{"name":"RateLimitExceeded"}
    at errorHandler (/snapshot/node14Win/ctx/js/kucoin.js)
    at runMicrotasks (<anonymous>)

I can't tell if it's affecting trading or not, and can't find any guidance on how to change the API request rate?

is it in the config.js under "bot" for either of these?:

"tick_interval": 30,
"interval_ticker_update": 25000,

Which are set at the default values.  Do I need to change either of these, or something else (also what are the units?)
Thanks in advance!

Offline Aitor

  • Administrator
  • *****
  • Posts: 570
  • Telegram: @AitorRuiz Gunbot.shop
    • View Profile
    • Gunbot
Re: Kucoin API - Rate Limit Exceeded
« Reply #1 on: March 16, 2022, 04:44:12 AM »
Hi, try stopping the bot for some minutes and start it again with a higher delay.

Offline dringwal

  • Rookie
  • *
  • Posts: 2
    • View Profile
Re: Kucoin API - Rate Limit Exceeded
« Reply #2 on: September 03, 2022, 06:17:53 PM »
I increased my delay to the max of 60 second and I still get the rate limit exceeded. Is it because I am trading three pairs at once?

Offline Aitor

  • Administrator
  • *****
  • Posts: 570
  • Telegram: @AitorRuiz Gunbot.shop
    • View Profile
    • Gunbot
Re: Kucoin API - Rate Limit Exceeded
« Reply #3 on: October 08, 2022, 04:42:44 PM »
The minimum delay you can use depends on your connection, your settings... I would stop the bot for 15 minutos and try again with 60. If you get the same, try increasing it a bit more.