The rate limit state indicating whether the API is currently rate limited.

export interface RateLimitState {
isRateLimited: boolean;
retryAfter: number | null;
message: string | null;
}
interface RateLimitState {
    isRateLimited: boolean;
    retryAfter: null | number;
    message: null | string;
}

Properties

isRateLimited: boolean

Whether the API is currently rate limited.

retryAfter: null | number

Unix timestamp in milliseconds when the rate limit expires, or null if not rate limited.

message: null | string

User-facing message explaining the rate limit, or null if not rate limited.