Giter VIP home page Giter VIP logo

Comments (6)

briansp2020 avatar briansp2020 commented on June 7, 2024 1

@westonplatter
Thanks for you help. I was able to successfully issue "buy to cover order". The information I get from OptionPosition.all & OptionPosition.mergein_market_list was slightly different. So, instead of specifying "url", I needed to specify "option"

legs = [{ "side": "buy",
    "option": data["option"],
    "position_effect": "close",
    "ratio_quantity": 1 }]

from fast_arrow.

westonplatter avatar westonplatter commented on June 7, 2024

@briansp2020 thanks for the feedback. Glad to year the software is useful to more than just me. Thank you also for surfacing your issue with the code snippets.

Quick answer, I have not tried using the code to buy back a shorted option.

If you wanted to come up with a solution, you could follow the api calls in Chrome's inspect while using the Robinhood website to see how RH closes them. I don't have an option option contracts atm but can look next week. Feel free to beat me to the punch.

from fast_arrow.

briansp2020 avatar briansp2020 commented on June 7, 2024

@westonplatter
Thanks for getting back to me. I'm not familiar with web stuff. So, if you can give me some pointers, I'd appreciate it.

If I right click on the submit button and select Inspect, will I be able to find out the information? There are so many tabs and sections, it's very hard to figure out where to look. If you can give me some simple steps to find out the necessary information for placing initial option orders (i.e. how to find

direction = "credit"
legs = [{ "side": "sell",
    "option": candidate["url"],
    "position_effect": "open",
    "ratio_quantity": 1 }]

), maybe I can use same steps to find information for buying options to close...

from fast_arrow.

westonplatter avatar westonplatter commented on June 7, 2024

essentially execute the "close option" workflow on robinhood's website and take this approach, https://www.youtube.com/watch?v=WOQDrGrd9H8, to confirm the HTTP params sent in the AJAX/API call to robinhood's backend.

from fast_arrow.

westonplatter avatar westonplatter commented on June 7, 2024

@briansp2020 glad you found a solution.

from fast_arrow.

westonplatter avatar westonplatter commented on June 7, 2024

and thanks for posting it to the thread. Definitely helpful to others who hit the same issue.

from fast_arrow.

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.