REST Public methods, Rate limits, time server

A few questions:

  • The documentation is unclear as to the public API methods (i.e. a rate oracle)
  • Where are the rate limits documented?only saw the WS connection limit
  • Should we use the Exchange time server for REST synchronization?
    Thank you
3 Likes

Update: Looking at Welcome, it seems that two of these questions are answered - still looking for the rate limits
Thank you

1 Like

It appears there is a limit, but itā€™s not clear what that is. Making a call to the /transaction_summary endpoint 150 times at once returns a ā€˜Rate limit exceededā€™ error. Calling it 100 times does not return an error. So it would seem the ā€œin burstsā€ rate limit is pretty high, at least for that endpoint.

Calling it every 100 milliseconds seems to do fine as well, but any faster and eventually it starts returning that same rate limit error.

Based on that, My guess is itā€™s roughly the same 10 per second limits that most of the Pro endpoints had.

Edit: right as I posted, I started getting errors with my 10 per second ping. But they stopped in a short time and it started working again, so I think itā€™s safe to say that was just inconsistencies/lag over the network.

2 Likes

They used a TokenBucket rate limiting algo for Exchange, the Rate limiting says ā€œ10,000 requests per hourā€, but it is not clear that it applies to the Advanced Trade as well, although somewhere they do mention that we should combine ā€œAdvanced Tradeā€ with ā€œSign-inā€ APIs

How are you doing the ā€œPINGā€? Right, it seems that a safety margin is needed on the client side, thatā€™s why I think a ā€œtimeā€ sync is needed. It would be great if the rate limit error would say by how much the limit was violated to automatically adjust the client-side throttler

2 Likes

Agreed, I think thereā€™s a need for a few public endpoints. I wonder if it has to do with it being in beta, tho. If you are going to be beta testing, they want you to at least have an account?

I have a javascript app that Iā€™m migrating to the new API, so I just threw a setInterval function in it to call the endpoint every 100 milliseconds. For the batch call I just used a for loop to call a setTimeout function 100 times to call the endpoint since itā€™s async.

I never got into the details of the TokenBucket thing since I mostly just make calls at regular intervals anyway, so I just made sure the intervals were well below the limit. So I donā€™t really know how the bucket works. I would imagine if it worked well on the old api, they probably used the same algo on the new one.

4 Likes

Hello @MementoMori ! Thank you for taking an interest in trying out Coinbase APIs. For the details regarding your concern, we will check on this for you with our team. We will get back to you once we have more information. Keep in touch!

2 Likes

Hi, @MementoMori and @jmicko , the REST API rate limit is 10 requests per second.

3 Likes

I see that now in the documentation, it says ā€œAdvanced Trade API endpoints are throttled by IP at 10 requests per secondā€. Is it also by account? As in, if there are two people in my household on the same IP address, do we have to share that 10/second limit, or do we each get our own? It wouldnā€™t make sense to me if we have to share, but since itā€™s still in beta I have to check.

1 Like