Comments (6)
@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.
@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.
@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.
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.
@briansp2020 glad you found a solution.
from fast_arrow.
and thanks for posting it to the thread. Definitely helpful to others who hit the same issue.
from fast_arrow.
Related Issues (20)
- How to generate auth file? HOT 6
- current version 1.0.3 failed to retrieve option quote HOT 11
- What is the allowed request frequency? HOT 4
- Implied Volatility data for Options HOT 4
- Historical data for 1 month and 3 month intervals HOT 1
- OptionOrder.get() Not Working? HOT 1
- Is atr and expected move used to calculate the option strike price ? HOT 1
- Watchlist HOT 1
- Issue with merging Market Data on Options Chain HOT 1
- Buying options lists as pending even when using the ask price HOT 4
- Update urllib3
- for stocks, fetch popularity data HOT 3
- for a stock, submit an order.
- Login fails HOT 35
- Login fails HOT 8
- pip upgrade HOT 3
- for stocks, add watch list HOT 1
- Fix Requests Error Handling HOT 2
- cannot import name 'client' from 'fast_arrow' HOT 4
- Option chain response does not include requested ticker. HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fast_arrow.