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
Hello I have socketio.exceptions.ConnectionError: OPEN packet not returned by server, and I cannot solve this problem
I just copy & paste, and them only modify apiKey to mine, Is there any regulation to operate this program? like operating time of server or OS or Socketio version?