Giter Site home page Giter Site logo

Comments (6)

AmeliorateOr avatar AmeliorateOr commented on September 17, 2024

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.

AmeliorateOr avatar AmeliorateOr commented on September 17, 2024

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.

AmeliorateOr avatar AmeliorateOr commented on September 17, 2024

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.

jmfernandes avatar jmfernandes commented on September 17, 2024

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.

AmeliorateOr avatar AmeliorateOr commented on September 17, 2024

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.

AmeliorateOr avatar AmeliorateOr commented on September 17, 2024

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)

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.