This repository contains official examples and demos built by the Polygon.io team. These examples showcase how to use our REST and WebSocket APIs to access market data across stocks, options, crypto, forex, and more.
- Quickstart demos for different asset classes and API endpoints
- Examples using our client libraries
- Integrations with databases, charting tools, and analytics platforms
- Utility scripts and helper functions
Most examples require a Polygon.io API key. If you need an API key, sign up here to get started. Set it using an environment variable:
export POLYGON_API_KEY=your-api-key-here
Then follow the README in each example folder for setup instructions.
examples/
├── rest/
├── websocket/
└── integrations/
Warning: The examples, demos, and outputs produced with this project are generated by artificial intelligence and large language models. You acknowledge that this project and any outputs are provided "AS IS", may not always be accurate and may contain material inaccuracies even if they appear accurate because of their level of detail or specificity, outputs may not be error free, accurate, current, complete, or operate as you intended, you should not rely on any outputs or actions without independently confirming their accuracy, and any outputs should not be treated as financial or legal advice. You remain responsible for verifying the accuracy, suitability, and legality of any output before relying on it.
This project is licensed under the MIT License.
For product support or technical help, contact us at polygon.io/contact.