jmfernandes / robin_stocks

This is a library to use with Robinhood Financial App. It currently supports trading crypto-currencies, options, and stocks. In addition, it can be used to get real time ticker information, assess the performance of your portfolio, and can also get tax documents, total dividends paid, and more. More info at
http://www.robin-stocks.com
MIT License
1.71k stars 463 forks source link

Error using find_options_by_expiration #180

Open mrbanter opened 4 years ago

mrbanter commented 4 years ago

Hi all. I'm pretty new with python and I am having issue using "find_options_by_expiration" function. When I run it, I get an error that says "ValueError: dictionary update sequence element #0 has length 28; 2 is required" which seems to stem from line 182 in "find_options_by_expiration". Speciically when the code calls " item.update(marketData)".

Can anyone help me? Thank you.

image

adrianbegi commented 4 years ago

Facing the same issue.

lxwang commented 4 years ago

In the line

item.update(marketData)

change it to

item.update(marketData[0])

should fix it

ankit1200 commented 4 years ago

I've created a PR addressing this bug fix: https://github.com/jmfernandes/robin_stocks/pull/185