UNPKG

polygon.io

Version:

Isomorphic Javascript client for Polygon.io Stocks, Forex, and Crypto APIs

18 lines (13 loc) 511 B
export * from "./rest"; export * from "./websockets"; import restClient, { IRestClient } from "./rest"; import websocketClient, { IWebsocketClient } from "./websockets"; export interface IPolygonClient { rest: IRestClient; websockets: IWebsocketClient; } export const polygonClient = (apiKey: string, restApiBase?: string, websocketApiBase?: string): IPolygonClient => ({ rest: restClient(apiKey, restApiBase), websockets: websocketClient(apiKey, websocketApiBase) }); export default polygonClient;