-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix FMV ws model and added example" (#566)
* Fix FMV ws model and add example * Updated example with correct tickers
- Loading branch information
1 parent
7905faf
commit ae03944
Showing
3 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from polygon import WebSocketClient | ||
from polygon.websocket.models import WebSocketMessage, Feed, Market | ||
from typing import List | ||
|
||
client = WebSocketClient(feed=Feed.Business, market=Market.Stocks, verbose=True) | ||
|
||
# FMV | ||
client.subscribe("FMV.*") # all ticker symbols | ||
# client.subscribe("FMV.TSLA") | ||
# client.subscribe("FMV.AAPL") | ||
# client.subscribe("FMV.NVDA") | ||
|
||
|
||
def handle_msg(msgs: List[WebSocketMessage]): | ||
for m in msgs: | ||
print(m) | ||
|
||
|
||
client.run(handle_msg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters