areed1192 / python-trading-robot

A trading robot, that can submit basic orders in an automated fashion using the TD API.
MIT License
527 stars 311 forks source link

`grab_historical_prices` method a little misleading in description #14

Open Wolfslayer opened 3 years ago

Wolfslayer commented 3 years ago

https://github.com/areed1192/python-trading-robot/blob/c0536b452b463404febea3de4675bcb2cea6b478/pyrobot/robot.py#L464


        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:

  1. aside from "minute" the rest should be in the form of "weekly" "monthly" and "yearly"

  2. "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