-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug when several executions in an order #12
Comments
Agreed that this is a bug. Not sure the right fix is deleting those lines. Don't have time to investigate right now though. |
I don't think the CSV output should replace order quantity and price with first execution quantity and price. Order price and quantity are entered by a user when creating an order. It may differ from the executed price and quantity. Here's an example of a market order from my portfolio (note both prices):
I propose to leave the order price and quantity alone. Cumulative quantity is the sum of execution[quantity], and average_price is the average of execution[price]. Most users refer to these as filled quantity and filled price, respectively. |
@YAmikep are you happy with @cdesai-qi's solution? |
Yes, sounds good, the order information should not be changed by the executions. |
When there are several executions within an order, the quantity extracted is wrong because the current code uses the quantity of the first execution.
For example, the CSV will say that the quantity of the order is 100 while it is actually 231.
By removing the 2 following lines, the code will use the
quantity
of the order which I believe is correct.https://github.com/joshfraser/robinhood-to-csv/blob/master/csv-export.py#L95-L96
The text was updated successfully, but these errors were encountered: