Code Monkey home page Code Monkey logo

Comments (5)

qwertzguy avatar qwertzguy commented on August 23, 2024 6

Is there any update on supporting this? Many algo trading frameworks assume it is possible to go from long to short directly by submitting an order that is larger than the current quantity owned. Having to separate it also impact the speed of execution since then the program needs to wait for the first order to fill before being able to enter short.

from alpaca-trade-api-python.

ttt733 avatar ttt733 commented on August 23, 2024

This error is referring to the number of shares available in your account, not in the market itself. It's important to note that, if you have a long position, you can't sell more shares than you have. You need to close your open position before you can submit and order that would open a short position. (The same is true for going from a short position to a long one.)

from alpaca-trade-api-python.

shlomiku avatar shlomiku commented on August 23, 2024

Hi @qwertzguy ,
it still works the same way.
you should open this feature request at the right location: https://forum.alpaca.markets/c/alpaca/feature-requests/14

from alpaca-trade-api-python.

Tomw3115 avatar Tomw3115 commented on August 23, 2024

Also, I'm trying to place orders during market closed hours to execute on market open, but it won't take the order that switches direction (i.e.,short to long)

from alpaca-trade-api-python.

j29scott avatar j29scott commented on August 23, 2024

What is the current status of this issue? Has support been added?

Or do you still need to wait for the closing order to be filled before submitting a new order to open a position on the opposite side (e.g., from a long to a short)?

from alpaca-trade-api-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.