TsgcWSRateLimiter › Properties › Quotas
Long-term caps (hour/day/month) evaluated on top of the main strategy.
property Quotas: TsgcRateLimitQuotaList read FQuotas write SetQuotas;
—
Each TsgcRateLimitQuotaItem caps how many requests a key (Scope = qscPerKey) or the whole system (qscGlobal) may make within a calendar period (qpHour, qpDay or qpMonth). The counter resets automatically at the start of each period. When Limit is reached the request is rejected and OnQuotaExceeded fires — typical for free-tier plans ("10,000 requests per month hard cap"): the rolling token bucket still smooths short-term traffic, but when the monthly quota is exhausted every further call fails until the next calendar month.
sgcWSRateLimiter1.Quotas.Enabled := True;
with sgcWSRateLimiter1.Quotas.Quotas.Add as TsgcRateLimitQuotaItem do
begin
Name := 'free-tier-monthly';
Scope := qscPerKey;
Period := qpMonth;
Limit := 10000;
end;