Open smsr7 opened 5 years ago
Having the same problem with doge. Any help is appreciated.
Passing the price as a string worked for me.
@smsr7 I think the problem is you need to do move the price=round(float(info['mark_price']) * 1.005, 2)
out of the params and create a variable called price with the resultant data and then use the price variable in the params.
Attempting to buy Ethereum with the code:
market_order_info = r.trade( 'ETHUSD', price=round(float(info['mark_price']) * 1.005, 2), quantity="0.0001", side="buy", time_in_force="gtc", type="market" )
returns error:400 Client Error: Bad Request for url: https://nummus.robinhood.com/orders/
File "/usr/local/lib/python3.6/site-packages/robinhood_crypto_api/robinhood_crypto_api.py", line 268, in trade raise TradeException() robinhood_crypto_api.robinhood_crypto_api.TradeException
This same code works when changing 'ETHUSD' to 'BTCUSD' is there anyway to get the buying / selling api to work with Ethereum or is it Bitcoin exclusive