UNPKG

@d8x/perpetuals-sdk

Version:

Node TypeScript SDK for D8X Perpetual Futures

17 lines (16 loc) 609 B
import type { PredMktPriceInfo, PriceFeedConfig } from "./nodeSDKTypes"; /** * PolyMktsPxFeed gets prices from the official polymarket api * and applies the 1+px transformation * */ export default class PolyMktsPxFeed { private ids; private oracleEndpoint; constructor(config: PriceFeedConfig); isPolyMktsSym(sym: string): boolean; fetchPricesForSyms(syms: string[]): Promise<PredMktPriceInfo[]>; fetchPrices(tokenIdHex: string[]): Promise<PredMktPriceInfo[]>; fetchPriceFromAPI(tokenIdDec: string): Promise<number>; static hexToDecimalString(hexString: string): string; }