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.7k stars 459 forks source link

orders.order_buy_fractional_by_quantity and order_buy_market both not working even after using the latest helper.py code #438

Open fsagir123 opened 1 year ago

fsagir123 commented 1 year ago

I am trying to give a buy order using robin_stocks but I am getting the below errors. Based on the pull # 403 by @henryzhangpku this was resolved but I am still facing the issue. (https://github.com/jmfernandes/robin_stocks/pull/403)

Below is the code and error

Method 1 Code import robin_stocks.robinhood as rs rs.orders.order_buy_fractional_by_quantity('AAPL',10)

Error {'non_field_errors': ['Your app version is missing important stock trading updates. You can still place orders on the web.']}

Method 2 Code import robin_stocks.robinhood as rs rs.order_buy_market('NOK',2)

Error {'non_field_errors': ['Invalid Good Til Canceled order.']}

I have the latest installed robin_stocks.

Mariani-code commented 1 year ago

Try doing

import robin_stocks.robinhood as robin

order = robin.orders.order_buy_market( symbol = NOK, quantity = 2, timeInForce='gfd', )