Comments (4)
Agreed that this is a bug. Not sure the right fix is deleting those lines. Don't have time to investigate right now though.
from robinhood-to-csv.
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):
Order:{
'updated_at':'2018-04-04T14:43:25.745567Z',
'ref_id':None,
'time_in_force':'gfd',
'fees':'0.00',
'cancel':None,
'response_category':None,
'id':'[ORDER_ID]',
'cumulative_quantity':'100.00000',
'stop_price':None,
'reject_reason':None,
'instrument':'https://api.robinhood.com/instruments/[INSTRUMENT_ID]/',
'state':'filled',
'trigger':'immediate',
'override_dtbp_checks':False,
'type':'market',
'last_transaction_at':'2018-04-04T14:43:25.648000Z',
'price':'3.05000000',
'executions':[
{
'timestamp':'2018-04-04T14:43:25.648000Z',
'price':'2.91990000',
'settlement_date':'2018-04-09',
'id':'[EXECUTION_ID]',
'quantity':'100.00000'
}
],
'extended_hours':False,
'account':'https://api.robinhood.com/accounts/[ACCOUNT_ID]/',
'url':'https://api.robinhood.com/orders/[ORDER_ID]/',
'created_at':'2018-04-04T14:43:25.427702Z',
'side':'buy',
'override_day_trade_checks':False,
'position':'https://api.robinhood.com/accounts/[ACCOUNT_ID]/positions/[POSITION_ID]/',
'average_price':'2.91990000',
'quantity':'100.00000'
}
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.
from robinhood-to-csv.
@YAmikep are you happy with @cdesai-qi's solution?
from robinhood-to-csv.
Yes, sounds good, the order information should not be changed by the executions.
from robinhood-to-csv.
Related Issues (20)
- Log-in error HOT 3
- option export file error
- Unable to login HOT 12
- TypeError: login() got an unexpected keyword argument 'device_token' HOT 1
- what is Robinhood Device Token? HOT 3
- in generated csv file, the field name mismatch with value HOT 2
- Getting this error when I try to run either csv-export.py or csv-options-export.py HOT 1
- Stop asking for a device_token
- Getting "Invalid inputs. Please try again." after inputting device token HOT 2
- How to correctly open the csv file: Data Skewed HOT 3
- Export Deposits/Withdrawals
- Pulling Information For Assigned Shares Sale
- cumulative_quantity (var q) is not always integer
- Invalid Input on login HOT 5
- password path blocked HOT 4
- Csv file format
- Is there any way to download all the ETFs symbols in robinhood?
- Only receiving "Invalid Inputs" after attempting to login with an email. HOT 2
- profit_extractor.py runs into ParserError for regular trades
- profit_extractor.py runs into AttributeError for option trades HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from robinhood-to-csv.