Comments (6)
After reviewing the source, I kept seeing the 'rhs_tradability : tradable' check. This leads me to consider the idea that since on Friday(expiry date) you're only able to enter closing positions, this might cause the rhs_tradability to be untradable.
I don't know how to verify this, but I thought it was worth a mention, and something important to consider for getting this data on expiry dates if that was in fact the case.
from robin_stocks.
Here is an update:
So I discovered that there is something a little deeper in this, but I'm not sure how this applies to getting the data per se. I had an option that expired today that was purchased earlier this week. On the options expiry date, today, the option chain data does not show on Robinhood's end as I had originally thought it did. A mistake I made, because the options data does still show just not how I thought.
To be more clear, the options data for the particular option I was holding was still updating live in the robinhood app. But a user is unable to view it unless an open position exists on that date, and only for that particular contract. I'm not sure how/why this would affect how I could pull this data, but it appears to be making it unavailable and I'll be trying to discover how to get around it still.
This makes some sense as Robinhood states that you can not open an option position on expiry dates, but I don't understand why you still can't view the data unless you have an active position(for just that specific contract -- not the entire chain)? It is being somehow altered, but it is still somewhere in there, hiding!
from robin_stocks.
In your options.py file, in lines 137-143 you have:
`except AttributeError as message:
print(message)
return [None]
allOptions = find_tradable_options_for_stock(symbol,optionType)
filteredOptions = [item for item in allOptions if item["expiration_date"] == expirationDate
and item['rhs_tradability'] == 'tradable']`
This is likely the return [None] list that I'm getting when I run this on an expiry Friday, but for the rhs_tradability'] == 'tradable . The item is not tradable on Friday, so how does one get that data on Friday?
I'm stuck at the moment don't know where to go from here.
from robin_stocks.
I think you should call the find_tradable_options_for_stock directly. This will give you all the available options for a stock, and you will have to filter them yourself to find what you want.
In the find by expiration and find by strike functions, i had to include the check for 'rhs_tradability' because when i was trying to update the market data, I was getting an error. But yeah the reason why you can't get the data on the day of expiration is because of the 'rhs_tradability' check.
from robin_stocks.
Perfect!
I was having issue at first getting an error saying: module robin_stocks doesn't have the attribute find_tradable_options_for_stock. I quickly realized I needed to get the most recent package upgrade for robin_stocks. Ran smoothly afterwards.
I'll report back after I test this on Friday for expiring options data. Thanks for the suggestion.
from robin_stocks.
Doing a quick test just moments ago I find using the find_tradable_options_for_stock(..) still doesn't get the expiry date data. I just did a search in the file I saved and that expiration_date is nowhere to be found. I do enjoy this alternative being able to save the entire set of option data, but not having expiry is really detrimental to a proper backtest, etc.
Do you know of any way to access the expiry day chain through Robinhood's .API using this wrapper?
from robin_stocks.
Related Issues (20)
- Trailing Stop loss function - payload issue
- get_card_transactions(cardType=None, info=None) HOT 1
- 401 Client Error: Unauthorized for url. HOT 8
- Q: has anyone build a desktop GUI client using this api? Thanks.
- Error in request_post: Received 400 HOT 1
- how to use a different account for export_completed_stock_orders
- Getting positions, historical portfolio value and trade in the IRA and Traditional IRA HOT 5
- All crypto orders being rejected HOT 1
- Robinhood ira HOT 6
- get_latest_price() does not return latest price during Robinhood 24 hour trading HOT 1
- Sell Market Orders do not work (but Buy Market Orders Work) HOT 6
- Multi logins HOT 2
- 400 Error + Ticker issue
- Not letting me place market orders to buy or sell stocks HOT 2
- Q: use order_buy_option_limit() to buy_to_close (a position that is sell_to_open earlier), what should be the creditOrDebit paramter?
- Getting Robinhood Interest Payment Data HOT 1
- Is there a robinhood API to get premarket snapshot (all stock prices)? HOT 1
- The sum of all the 5 minute or 1 hour volume data does not add upto the daily volume data
- [Bug] Dollar-Based Buy Orders Incorrectly Set to Limit Order During Regular Market Hours HOT 6
- Trouble Buying and Selling HOT 1
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 robin_stocks.