羊駝市場數據API-使用Python和Websockets流式傳輸



在此視頻中,我向您展示了如何使用新的Alpaca Market Data API通過網路套接字實時流式傳輸股票清單的價格數據。我們首先使用wscat演示如何使用websocket,然後編寫Python websocket應用程序以流式傳輸多個符號的數據。源代碼位於https://github.com/hackingthemarkets/alpaca-market-data-streaming-api

10 comments
  1. Hey Larry, first and foremost, thank you for the videos! They are incredibly helpful and inspiring! Secondly, I am receiving an error when authenticating after connecting to Alpaca. I can't figure out why. Could you give some insight as to how to authenticate it? I followed every step and downloaded all the programs and got wscat running. Thank you!

  2. I have a question for you, how would one look at a specific piece of data in the "message"? For example if I only wanted to see the low ("l"), how would I go about doing that? I have tried message["data"]["l"] and that wasn't working for me. Sorry, I am pretty new to Python.

  3. Awesome video. Thanks for sharing. Just started using the new data api with Alpaca. Will hopefully build something this week using it.

Comments are closed.