Last active
August 21, 2021 10:22
-
-
Save janlukasschroeder/729dc58b0810926a10edf73d9c688ea2 to your computer and use it in GitHub Desktop.
SEC EDGAR Streaming Client - Python
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
import socketio | |
sio = socketio.Client() | |
@sio.on('connect', namespace='/all-filings') | |
def on_connect(): | |
print("Connected to https://api.sec-api.io:3334/all-filings") | |
@sio.on('filing', namespace='/all-filings') | |
def on_filings(filing): | |
print(filing) | |
sio.connect('https://api.sec-api.io:3334?apiKey=YOUR_API_KEY', namespaces=['/all-filings'], transports=["websocket"]) | |
sio.wait() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@dokebivc try using socket.io version 2 instead of version 3. that should solve the issue.