redstone-api
Version:
Javascript library for fetching trusted token pricing data from Redstone data ecosystem
28 lines (27 loc) • 798 B
TypeScript
import { PriceDataWithSignature } from "../types";
export default class CacheProxy {
cacheApiUrl: string;
constructor(cacheApiUrl: string);
setCacheApiUrl(cacheApiUrl: string): void;
getPrice(args: {
symbol: string;
provider: string;
timestamp?: number;
}): Promise<PriceDataWithSignature | undefined>;
getPriceForManyTokens(args: {
provider: string;
timestamp?: number;
symbols?: string[];
}): Promise<{
[symbol: string]: PriceDataWithSignature;
}>;
getManyPrices(args: {
symbol: string;
provider: string;
fromTimestamp?: number;
toTimestamp?: number;
interval?: number;
offset?: number;
limit?: number;
}): Promise<PriceDataWithSignature[]>;
}