Exclusive 22% OFF All Quantra by QuantInsti Courses for IBridgePy Users Master algorithmic trading from beginner to advanced — Python for trading, machine learning strategies, options trading, and more.
HUI22 Use HUI22 for 22% off
HUI7 Stack HUI7 for an additional 7% off
Browse Courses →
← Back to Blog

Add reqHistParam( ) to IBridgePy documentation 4/10/2017

April 11, 2017

reqHistParam IBridgePy Function for Historical Data

The reqHistParam documentation provides precise control over historical data requests from Interactive Brokers. This essential function for algorithmic trading allows custom bar sizes, timeframes, and data ranges.

reqHistParam documentation for historical data requests

reqHistParam Documentation: Parameters and Examples

Use reqHistParam to clearly define the parameters when you request historical data from IB.

security: use symbol( ) or symbols( ) or superSymbol( ) to define security

barSize: 1 sec, 5 secs, 15 secs, 30 secs, 1 min, 2 mins, 3 mins, 5 mins, 15 mins, 30 mins, 1 hour, 1 day

goBack: Valid values include any integer followed by a space and then S (seconds), D (days) or W (week), for example, ’10 D’ stands for 10 days

endTime: Defines a query end date and time at any point. Use python datetime object.

Learn more from Python official documentation.