Skip to content

Commit

Permalink
Merge pull request #483 from mattf1n/master
Browse files Browse the repository at this point in the history
Account number optional argument for `export_completed_stock_orders`, `get_all_stock_orders`
  • Loading branch information
jmfernandes authored Oct 12, 2024
2 parents 769dedf + 3b7fa9f commit 4fcfb42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions robin_stocks/robinhood/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def create_absolute_csv(dir_path, file_name, order_type):


@login_required
def export_completed_stock_orders(dir_path, file_name=None):
def export_completed_stock_orders(dir_path, file_name=None, account_number=None):
"""Write all completed orders to a csv file
:param dir_path: Absolute or relative path to the directory the file will be written.
Expand All @@ -51,7 +51,7 @@ def export_completed_stock_orders(dir_path, file_name=None):
"""
file_path = create_absolute_csv(dir_path, file_name, 'stock')
all_orders = get_all_stock_orders()
all_orders = get_all_stock_orders(account_number=account_number)
with open(file_path, 'w', newline='') as f:
csv_writer = writer(f)
csv_writer.writerow([
Expand Down

0 comments on commit 4fcfb42

Please sign in to comment.