title: sgns::RateLimitHoldOff summary: Client-side CoinGecko rate-limit hold-off (D-13): a 429 sets a hold-until timestamp; while held, the CoinGecko tier is skipped entirely (fallback goes straight to the next tier).
sgns::RateLimitHoldOff¶
Client-side CoinGecko rate-limit hold-off (D-13): a 429 sets a hold-until timestamp; while held, the CoinGecko tier is skipped entirely (fallback goes straight to the next tier). More...
#include <PriceRetryPolicy.hpp>
Public Types¶
| Name | |
|---|---|
| using std::function< std::chrono::system_clock::time_point()> | Clock Injectable clock for hermetic tests. |
Public Functions¶
| Name | |
|---|---|
| RateLimitHoldOff(Clock now =[] { return std::chrono::system_clock::now();}) | |
| void | TriggerHoldOff(std::chrono::seconds duration) Arm the hold-off window from now for the given duration. |
| bool | IsHeldOff() const True while the hold-off window is active; false before any trigger and after the window expires. |
Detailed Description¶
Client-side CoinGecko rate-limit hold-off (D-13): a 429 sets a hold-until timestamp; while held, the CoinGecko tier is skipped entirely (fallback goes straight to the next tier).
The duration is a LOCAL policy constant (>= 60s default) — it is NEVER parsed from Retry-After / x-ratelimit-* headers: the anonymous CoinGecko endpoint sends none.
Public Types Documentation¶
using Clock¶
Injectable clock for hermetic tests.
Public Functions Documentation¶
function RateLimitHoldOff¶
Parameters:
- now Clock source; defaults to the real system clock.
function TriggerHoldOff¶
Arm the hold-off window from now for the given duration.
function IsHeldOff¶
True while the hold-off window is active; false before any trigger and after the window expires.
Updated on 2026-10-09 at 04:02:48 +0000