1

https://www.stellar.org/developers/horizon/reference/rate-limiting.html says rate limiting is based on this:

In order to provide service stability, Horizon limits the number of requests a client can perform within a one hour window. By default this is set to 3600 requests per hour—an average of one request per second. Also, while streaming every update of the stream (what happens every time there’s a new ledger) is counted. Ex. if there were 12 new ledgers in a minute, 12 requests will be subtracted from the limit.

It's been changed to 100 per second, but what defines a "client"? It isn't IP address. I'm using GCP and did a curl -i to see my rate limit, and I'm fine. But Kelp is often returning saying rate limit is exceeded. Does that mean that people are using too many kelps and my requests are considered to be from "kelp" so collectively we are sending too many requests? Or what?

kelp-JPY.service - "kelp - Stellar trading bot XRP"
   Loaded: loaded (/etc/systemd/system/kelp-JPY.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2019-02-17 21:11:02 UTC; 34min ago
 Main PID: 7584 (kelp)
    Tasks: 4 (limit: 2019)
   CGroup: /system.slice/kelp-JPY.service
           └─7584 platform/linux/kelp trade --botConf config/JPY/trader.cfg --strategy buysell --stratConf config/JPY/buysell.cfg

Feb 17 21:41:07 steve-kelp bash[7584]: 2019/02/17 21:41:07 error: cannot load offers to compute liabilities for asset (JPY:GBF3ARDZTKCF3B4V7X4C3TWH7IQ3ZVYRAMDSVQFGN4VJVBSYMI
Feb 17 21:41:07 steve-kelp bash[7584]: 2019/02/17 21:41:07 could not fetch liability for asset 'quote ', error = Horizon error: "Rate limit exceeded". Check horizon.Error.Pr
Feb 17 21:41:07 steve-kelp bash[7584]: 2019/02/17 21:41:07 Can't load offers: Horizon error: "Rate limit exceeded". Check horizon.Error.Problem for more information.
Feb 17 21:41:07 steve-kelp bash[7584]: 2019/02/17 21:41:07 error: cannot load offers to compute liabilities for asset (native): Horizon error: "Rate limit exceeded". Check h
Feb 17 21:41:07 steve-kelp bash[7584]: 2019/02/17 21:41:07 could not fetch liability for asset 'native', error = Horizon error: "Rate limit exceeded". Check horizon.Error.Pr
Feb 17 21:41:07 steve-kelp bash[7584]: 2019/02/17 21:41:07 Horizon error: "Rate limit exceeded". Check horizon.Error.Problem for more information.
Feb 17 21:41:07 steve-kelp bash[7584]: 2019/02/17 21:41:07 deleting all offers, num. continuous update cycles with errors (including this one): 4
Feb 17 21:41:07 steve-kelp bash[7584]: 2019/02/17 21:41:07 created 0 operations to delete offers
Feb 17 21:41:07 steve-kelp bash[7584]: 2019/02/17 21:41:07 ----------------------------------------------------------------------------------------------------
Feb 17 21:41:07 steve-kelp bash[7584]: 2019/02/17 21:41:07 sleeping for 9m55.218746731s...
7

It is the IP address. Here's the source:

https://github.com/stellar/go/blob/master/services/horizon/internal/init_web.go#L182

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.