Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buying ETH #9

Open
smsr7 opened this issue Aug 15, 2019 · 3 comments
Open

Buying ETH #9

smsr7 opened this issue Aug 15, 2019 · 3 comments

Comments

@smsr7
Copy link

smsr7 commented Aug 15, 2019

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

@arlebeckwith
Copy link

arlebeckwith commented Dec 20, 2019

Having the same problem with doge. Any help is appreciated.

@arlebeckwith
Copy link

Passing the price as a string worked for me.

@d4v3y0rk
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants