使用Python和Websockets實時流式傳輸股市數據



在此視頻中,我們使用websockets和我們的Alpaca API密鑰從polygon.io流式傳輸股票市場數據。我們同時使用wscat和Python Websocket客戶端進行連接。 。

9 comments
  1. Hi Larry, perhaps you have an answer, I cannot authenticate via the terminal. Thanks for your help.
    > (base) MacBook-Pro-GJ:~ gj$ wscat -c wss://alpaca.socket.polygon.io/stocks

    Connected (press CTRL+C to quit)

    < [{"ev":"status","status":"connected","message":"Connected Successfully"}]

    > {"action":"auth","params":"I use my key here"}

    < [{"ev":"status","status":"auth_failed","message":"authentication failed"}]

  2. Fantastic video. Very educational. appreciate the time taken to make these videos and make the content easy to use. Just started working with the Alpaca API last week so having the Polygon data feeding into it will be a nice complement. Keep the videos coming please.

Comments are closed.