Comments (5)
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.
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.
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.
@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.
@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)
- "Limit order quantity cannot include fractional shares" HOT 1
- "Extended hours and market hours mismatch." HOT 2
- Bug found: Incorrect Arguments in order_sell_stop_loss Function HOT 2
- "order_buy_crypto_limit_by_price" and "order_buy_crypto_limit"
- Exception: Invalid bearer token. HOT 6
- Logging out of all other devices via API ... HOT 1
- 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
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.