Skip to content

Commit 985e28a

Browse files
authored
set RateLimit for Coinbase (#756)
1 parent 6992680 commit 985e28a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/ExchangeSharp/API/Exchanges/Coinbase/ExchangeCoinbaseAPI.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ private ExchangeCoinbaseAPI()
4545
NonceEndPointField = "iso";
4646
NonceEndPointStyle = NonceStyle.Iso8601;
4747
WebSocketOrderBookType = WebSocketOrderBookType.FullBookFirstThenDeltas;
48+
/* Rate limits from Coinbase Pro webpage
49+
* Public endpoints - We throttle public endpoints by IP: 10 requests per second, up to 15 requests per second in bursts. Some endpoints may have custom rate limits.
50+
* Private endpoints - We throttle private endpoints by profile ID: 15 requests per second, up to 30 requests per second in bursts. Some endpoints may have custom rate limits.
51+
* fills endpoint has a custom rate limit of 10 requests per second, up to 20 requests per second in bursts. */
52+
RateLimit = new RateGate(9, TimeSpan.FromSeconds(1)); // set to 9 to be safe
4853
}
4954

5055

0 commit comments

Comments
 (0)