Skip to content

Commit b48467b

Browse files
authored
OKEx RateLimit (#694)
Increased the rate limit to 20req/2sec. It's not the real limit, but somehow "averaged", because each endpoint has it's own limit.
1 parent 4cb94a2 commit b48467b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/ExchangeSharp/API/Exchanges/OKGroup/ExchangeOKExAPI.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ public sealed partial class ExchangeOKExAPI : OKGroupCommon
3434
public string BaseUrlV5 { get; set; } = "https://www.okex.com/api/v5";
3535
protected override bool IsFuturesAndSwapEnabled { get; } = true;
3636

37+
private ExchangeOKExAPI()
38+
{
39+
RateLimit = new RateGate(20, TimeSpan.FromSeconds(2));
40+
}
41+
3742
public override string PeriodSecondsToString(int seconds)
3843
{
3944
return CryptoUtility.SecondsToPeriodString(seconds, true);

0 commit comments

Comments
 (0)