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

Allow algo's to influence client_order_id for algo grouping #97

Open
bdowling opened this issue Apr 23, 2019 · 1 comment
Open

Allow algo's to influence client_order_id for algo grouping #97

bdowling opened this issue Apr 23, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@bdowling
Copy link
Contributor

It is useful to use client_order_id to help group different algos. If there was a way to define a order_prefix for example it could be used in alpaca.Backend._new_order_id for users to change.

@ttt733
Copy link
Contributor

ttt733 commented May 10, 2019

Unfortunately, with the shorting changes, handling client order IDs is not just as simple as passing through a parameter. One order, from Pylivetrader's point of view, can actually become two orders by the time it reaches the brokerage. (E.g. you have 50 shares and you submit a sell order for 100 orders, a 50 share sell order will be created and, once it fills, another 50 share short sell order will be created.) I'll see if I can think of a good way to handle this - I may just do as you suggest and use a limited prefix. Maybe the first 8 characters of the ID string could be customizable.

@shlomiku shlomiku added the enhancement New feature or request label Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants