https://gist.github.com/janlukasschroeder/729dc58b0810926a10edf73d9c688ea2
你可以查看代码的参考在这里我只是修改了Api-key来挖掘和操作它但是:
File "C:/Users/A/PycharmProjects/Development/sec_original_stream.py", line 16, in <module>
sio.connect("https://api.sec-api.io:3334?apiKey=fc2d52872a23cd347198d77e6a40d8027ace80324fbf81c90f39bbd70f82d64e", namespaces=['/all-filings'])
File "C:\Anaconda3\lib\site-packages\socketio\client.py", line 304, in connect
raise exceptions.ConnectionError(exc.args[0]) from None
socketio.exceptions.ConnectionError: OPEN packet not returned by server
这个错误不断发生。
这是API的文档,与上面的代码相同 https://sec-api.io/docs#stream-python