Skip to content

Commit 4fcfb42

Browse files
authored
Merge pull request #483 from mattf1n/master
Account number optional argument for `export_completed_stock_orders`, `get_all_stock_orders`
2 parents 769dedf + 3b7fa9f commit 4fcfb42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

robin_stocks/robinhood/export.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def create_absolute_csv(dir_path, file_name, order_type):
4141

4242

4343
@login_required
44-
def export_completed_stock_orders(dir_path, file_name=None):
44+
def export_completed_stock_orders(dir_path, file_name=None, account_number=None):
4545
"""Write all completed orders to a csv file
4646
4747
:param dir_path: Absolute or relative path to the directory the file will be written.
@@ -51,7 +51,7 @@ def export_completed_stock_orders(dir_path, file_name=None):
5151
5252
"""
5353
file_path = create_absolute_csv(dir_path, file_name, 'stock')
54-
all_orders = get_all_stock_orders()
54+
all_orders = get_all_stock_orders(account_number=account_number)
5555
with open(file_path, 'w', newline='') as f:
5656
csv_writer = writer(f)
5757
csv_writer.writerow([

0 commit comments

Comments
 (0)