Skip to main content

Rate Limiting

The TradeStation API Rate Limits on the number of requests a given user & client can make to the API in order to ensure fairness between users and prevent abuse to our network. Each API Key is allocated quota settings upon creation. These settings are applied on a per-user basis. If the quota is exceeded, an HTTP response of 429 Too Many Requests will be returned. Quotas are reset on a 5-minute interval based on when the user issued the first request.

note

We recommend using streaming services if available.

Resource Categories

The rate limit applies to the following resource-categories:

Resource-CategoryQuotaInterval
Accounts2505-minute
Order Details2505-minute
Balances2505-minute
Positions2505-minute
Quote Change Stream5005-minute
Barchart Stream5005-minute
TickBar Stream5005-minute
Each Option Endpoint901-minute
Quote Snapshot301-minute
MarketDepth Stream*301-minute
MarketDepth Stream*10concurrent
Option Quote Stream10concurrent
Option Chain Stream10concurrent
Order Stream40concurrent
Order Stream by Order Id40concurrent
Positions Stream40concurrent

*The MarketDepth rate limit is a combined amount that applies to Quotes and Aggregate streams.

Intervals

Quotas have "Windows" that last for a limited time interval (generally 5-minutes). Once the user has exceeded the maximum request count, all future requests will fail with a 429 error until the interval expires. Rate Limit intervals do not slide based upon the number of requests, they are fixed at a point in time starting from the very first request for that category of resource. After the interval expires, the cycle will start over at zero and the user can make more requests.

Example A

A user logs into the TradeStation WebAPI with their application and issues a request to /v3/brokerage/accounts. As a result, the request quota is incremented by one for the Accounts resource-category. The user then issues 250 more requests immediately to /v3/brokerage/accounts. The last request fails with 429 Too Many Requests. All subsequent requests continue to fail until the 5-minute interval expires from the time of the very first request.

Example B

A user logs into the TradeStation WebAPI with their application and issues a request to /v3/brokerage/accounts/123456782/positions. As a result, the request quota is incremented by one for the Positions resource-category. The user then immediately issues the same request 250 more times. The last request fails with 429 Too Many Requests. All subsequent requests continue to fail until the 5-minute interval expires from the time of the first request.

Example Throttled Request

GET https://api.tradestation.com/v3/brokerage/accounts/123456782/positions HTTP/1.1
Host: api.tradestation.com
Authorization: bearer eE45VkdQSnlBcmI0Q2RqTi82SFdMSVE0SXMyOFo5Z3dzVzdzdk
Accept: application/json

Example Failed Response

HTTP/1.1 429 Too Many Requests
Content-Length: 55
Date: Thu, 04 Feb 2021 21:18:07 GMT

{"Error":"TooManyRequests","Message":"Rate quota exceeded"}