UNPKG

ccxt

Version:

A cryptocurrency trading API with more than 100 exchanges in JavaScript / TypeScript / Python / C# / PHP / Go

29 lines (28 loc) 648 B
declare class Throttler { running: boolean; queue: { resolver: any; cost: number; }[]; config: { refillRate: number; delay: number; capacity: number; tokens: number; cost: number; algorithm: string; rateLimit: number; windowSize: number; maxWeight: number; }; timestamps: { timestamp: number; cost: number; }[]; constructor(config: any); leakyBucketLoop(): Promise<void>; rollingWindowLoop(): Promise<void>; loop(): Promise<void>; throttle(cost?: any): Promise<unknown>; } export { Throttler, };