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

Does Alpaca support One Triggers Another trade? #734

Open
1 task done
rudeGit opened this issue Mar 12, 2024 · 1 comment
Open
1 task done

Does Alpaca support One Triggers Another trade? #734

rudeGit opened this issue Mar 12, 2024 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@rudeGit
Copy link

rudeGit commented Mar 12, 2024

Is there an existing issue for this?

  • I have searched the existing issues

What is your question?

Brokers like fidelity support the functionality of entering 2 trades simultaneously, but the second trade only executes if the first trades executes?

For example, say I already own 10 AAPL shares.
I wanted to sell all 10 of them at stop loss order of $160 (while the current price of AAPL is around $172) and if this executes I want the second order of limit buy 4 shares of MSFT at $390 (while the current MSFT is around $404) to be entered automatically. If AAPL sell trade never executes, the MSFT trade is never entered.

Is this possible with Alpaca C# API? If so, how do I go about it?

Anything else?

No response

@OlegRa OlegRa self-assigned this Mar 12, 2024
@OlegRa OlegRa added the question Further information is requested label Mar 12, 2024
@OlegRa
Copy link
Collaborator

OlegRa commented Mar 12, 2024

Unfortunately, @rudeGit, the underlying Alpaca API doesn't support inter-commodity OTO/OCO orders. All advanced orders are always placed for the same asset. You can open an issue for the underlying API but in the meantime, you have only one option - implementing this logic on the client side using trade streaming events for instance.

@OlegRa OlegRa assigned rudeGit and unassigned OlegRa Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants