You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Has anyone gotten the trailing stop loss function to work?
import robin_stocks as r
login = r.robinhood.login([uname],[pw],expiresIn=1000000)
sellorder = r.robinhood.orders.order_sell_trailing_stop(symbol='AAPL', quantity=1, trailAmount=5, trailType='percentage', timeInForce='gtc', jsonify=True)
It returns:
WARNING: priceType should be "ask_price" or "bid_price". You entered "True"
404 Client Error: Not Found for url: https://api.robinhood.com/accounts/gtc
{'account': ['This field may not be null.'],
'time_in_force': ['"False" is not a valid choice.']}
Clearly there's something wrong with how the parameters are handled within the library and then sent to the RH endpoint.
I decided to dig in and try the REST API function manually by defining the payload dict myself:
Has anyone gotten the trailing stop loss function to work?
It returns:
Clearly there's something wrong with how the parameters are handled within the library and then sent to the RH endpoint.
I decided to dig in and try the REST API function manually by defining the
payload
dict myself:However, it returns:
If I remove the
stop_price
it says:What am I doing wrong here?
The text was updated successfully, but these errors were encountered: