Giter Site home page Giter Site logo

Comments (5)

jmfernandes avatar jmfernandes commented on August 15, 2024

get_all_option_positions(info=None) should return option positions but it seems to be a bit buggy and doesnt return everything. (Theres also one for crypto positions in crypto.py)

I should include this info in readme because its confusing why robinhood has it split up on their API but all history is in a single display on their website/app

from robin_stocks.

nick-martin-24 avatar nick-martin-24 commented on August 15, 2024

agreed....would be nice to access all at once. Although in my scenario I only need to access one type.

Really cool library, I like what you've done and glad I stumbled upon this

from robin_stocks.

alexonab avatar alexonab commented on August 15, 2024

Not exactly the same issue but kind of related. When no positions are open, it would be helpful if the return value is an empty list. This makes it easier to tell if there are any positions vs the current response of [None] which is a single element list.

>>> len([]) == 0 
True
>>> len([None]) == 0 
False

Currently, I have to add an extra check to not try and process the current empty response.

        positions = r.get_open_option_positions()
        for pos in positions:
            if pos is None:
                continue
            print(f"{pos}")

from robin_stocks.

jmfernandes avatar jmfernandes commented on August 15, 2024

@alexonab great idea and would be easy for me to implement. All I have to do it edit helper.filter() which formats the data for all functions.

from robin_stocks.

jmfernandes avatar jmfernandes commented on August 15, 2024

@alexonab pull the latest code from github and install it and it should have the changes where the returned lists are [ ] instead of [None] so your if not list condition should execute properly now.

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.