I am a newbie to algo development and want to figure out the streaming data feature.
I see in the sample code there are many functions take variables
bar are arguments. For example,
async def on_minute(conn, channel, bar).
conn is defined as
conn = StreamConn(). But I don’t see anywhere in the code where
bar are defined.
A.* Aggregate ( per second ),
AM.* Aggregate ( per minute ) channels?
bar? Are those just OHLC data?
The second argument,
channel ,is a string object that indicates which stream of data it is.
The third argument,
bar is sometimes named
data in other examples but is the actual message data, in a
dict type, which is basically the
data field in the json message.
Thanks for the answer.
A follow up question, how is the third argument generated? Are they generated using the decorator
For example, in the martingale example (https://github.com/alpacahq/alpaca-trade-api-python/blob/master/examples/martingale.py), where can I find how the
data arguments are generated/defined?
data is streamed from Alpaca or Polygon, where’s the function that actually gets
data? Is it the