Skip to content
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

Possible to add attribute to Position object? #52

Closed
jblewdv opened this issue Jan 22, 2019 · 2 comments
Closed

Possible to add attribute to Position object? #52

jblewdv opened this issue Jan 22, 2019 · 2 comments

Comments

@jblewdv
Copy link

jblewdv commented Jan 22, 2019

For my given algorithm I need to keep track of how many days each position has been held. So far, I haven't been able to find any built-in functionality for this. Correct me if I'm wrong please.

Is it possible to add an attribute called "Duration" to each position object and increment the time held myself?

@ttt733
Copy link
Contributor

ttt733 commented Jan 23, 2019

The feature request I just opened in our Alpaca-API issue tracker will be needed for this.

@bdowling
Copy link
Contributor

You could today, correlate your latest orders with your positions to find when the position was opened. Because positions can be a rollup of multiple orders or legs in/out of the position, the time-held does not have a singular meaning in the positions API.

@jblewdv I'm going to close this issue for now, as we'll track the upstream issue in the API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants