羊驼市场数据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.