bar_type {str} -- Defines the bar type, can be one of the following:
`['minute', 'week', 'month', 'year']` (default: {'minute'})
This is a little misleading, if I follow through to your TDClient code all the way to the TD Ameritrade documentation, there are two discrepencies:
aside from "minute" the rest should be in the form of "weekly" "monthly" and "yearly"
"daily" is also a valid option for bar width
This method is mostly utilized in your examples for streaming data by the minute so not a huge deal for that use, but I've repurposed some of this for myself for plotting candles out into the months and years hence taking a closer look into this
https://github.com/areed1192/python-trading-robot/blob/c0536b452b463404febea3de4675bcb2cea6b478/pyrobot/robot.py#L464
This is a little misleading, if I follow through to your TDClient code all the way to the TD Ameritrade documentation, there are two discrepencies:
aside from "minute" the rest should be in the form of "weekly" "monthly" and "yearly"
"daily" is also a valid option for bar width
This method is mostly utilized in your examples for streaming data by the minute so not a huge deal for that use, but I've repurposed some of this for myself for plotting candles out into the months and years hence taking a closer look into this