API 3 rate limits

The main goal of STEX is our users satisfaction and comfort. Therefore to allow all users equal access to the exchange functionality we apply rate limits to the API 3 endpoints.
These limits are not going to limit your normal use of API, but rather to prevent misuse that can lead to service stability problems.

What are the rate limits?

Rate limits are settings of the API servers that allows only certain number of requests to be server per single user / IP address. This allows to limit malicious behavior that can flood the exchange and lead to the service interruptions.

How do I handle rate limits?

Every response API3 sends back to the request obtained contains important data about the rate limit settings for the given endpoint. Your application must handle the response headers and do not exceed the limits.

Headers that indicate the rate limits are:
x-ratelimit-limit: 100
and
x-ratelimit-remaining: 20

First one indicates the endpoint's settings and the second shows the remaining amount of the requests you have.

As soon as your application exceeds the limit (we hope it will not ;) ), the HTTP response 429 will be returned until the limits reset.
The time when the limits will be reset is returned in
x-ratelimit-reset header containing the timestamp when the limits will be reset for you:

x-ratelimit-reset: 1552633809

It is your responsibility to handle the rate limits. Applications that continue exceeding the rules will be blocked.

But I need to send more request to always have actual market data!

Indeed you don't. API 3 offers very nice way to have the latest market data with no effort at all - websocket subscription. It is not rate limited and you just need to send 1 request to subscribe to the channel. After that the data will be sent to you instantly. No server polling required anymore. Read more about websocket subscription.

Rate limits settings

Public endpoints are all together limited with 180 requests per minute per IP address.

Trading endpoints

- get /trading/orders: 15 requests per 1 minute per user

- delete /trading/orders  6 requests per 1 minute per user

- get /trading/orders/{currencyPairId}: 30 requests per 1 minute per user

- delete /trading/orders/{currencyPairId}: 15 requests per 1 minute per user

- post /trading/orders/{currencyPairId}: 120 requests per 1 minute per user

- get /trading/order/{orderId}: 15 requests per 1 minute per user

- delete /trading/order/{orderId}: 120 requests per 1 minute per user

Trading History: all together endpoints limited to 15 requests per 1 minute per user


Profile endpoints: all together endpoints limited to 60 requests per 1 minute per user

Withdrawals management endpoints:

post /profile/withdraw ,
delete /profile/withdraw/{withdrawalId}
6 requests per 1 minute per user

Please note these settings may change in the future. You have to rely only on the information that you get in the response headers

Is there ability to increase limits?

We believe these rate limits allows to implement any kind of application interacting with stex.com API 3 (taking into account that you also use the websocket subscription) and will not really limit you. But if you want to increase the limits you can contact our support.

Did this answer your question?