feat: raise market_api rate to 20/min, add global Polygon cap at 45/min, add rate-limit API + watchlist warning
This commit is contained in:
@@ -717,6 +717,24 @@ export function useTrendProjection(trendId: string | undefined) {
|
||||
return useGet<TrendProjection>(['trend-projection', trendId], 'query', `/api/trends/${trendId}/projection`, !!trendId);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// System: Rate Limits
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export interface RateLimitInfo {
|
||||
polygon_global_limit: number;
|
||||
market_api: {
|
||||
rate_per_minute: number;
|
||||
cadence_seconds: number;
|
||||
max_tickers_per_cycle: number;
|
||||
active_sources: number;
|
||||
};
|
||||
}
|
||||
|
||||
export function useRateLimits() {
|
||||
return useGet<RateLimitInfo>(['rate-limits'], 'query', '/api/system/rate-limits');
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Macro: Admin Toggle (Task 17.6)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user