Skip to content

Commit ebf492f

Browse files
committed
Ammended package name and added content to README
1 parent b7238ce commit ebf492f

File tree

4 files changed

+36
-1
lines changed

4 files changed

+36
-1
lines changed

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,36 @@
11
# A Python client library for Polgyon's WebSocket and RESTful APIs
2+
3+
Currently this repo only supports the WebSocket API
4+
5+
## Getting Started
6+
7+
For a basic product overview, check out our [setup and use documentation](https://polygon.io/sockets)
8+
9+
10+
## Simple Demo
11+
```python
12+
import time
13+
14+
15+
from polygon_client import WebSocketClient, STOCKS_CLUSTER
16+
17+
18+
def my_customer_process_message(message):
19+
print("this is my custom message processing", message)
20+
21+
22+
def main():
23+
key = 'your api key'
24+
my_client = WebSocketClient(STOCKS_CLUSTER, key, my_customer_process_message)
25+
my_client.run_async()
26+
27+
my_client.subscribe("T.MSFT", "T.AAPL", "T.AMD", "T.NVDA")
28+
time.sleep(2)
29+
30+
my_client.close_connection()
31+
32+
33+
if __name__ == "__main__":
34+
main()
35+
36+
```

example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import time
22

3-
from client import WebSocketClient, STOCKS_CLUSTER
3+
from polygon_client import WebSocketClient, STOCKS_CLUSTER
44

55

66
def my_customer_process_message(message):

0 commit comments

Comments
 (0)