polygon-io / client-js

The official JS client library for the Polygon REST and WebSocket API.
MIT License
184 stars 57 forks source link

Update require syntax in examples to use import instead. #173

Closed timetraveler328 closed 1 year ago

timetraveler328 commented 1 year ago

I also updated the client initialization to use an env variable so you should be able to easily run any example like POLY_API_KEY=yourAPIKey node examples/rest/crypto-aggregates_bars.js. Added the dependencies needed to run the websocket examples as dev dependencies, so those can be run too.