1 | initial version |
It looks like the get_crypto()
function is not available in the stocks
module of the Robinhood API. Instead, you can use the crypto
module to interact with cryptocurrency data.
Here is an example of how to use the crypto
module to get information about cryptocurrency:
import robin_stocks as rs
# log in to Robinhood
rs.login()
# get information about Ethereum
eth_info = rs.crypto.get_crypto_info('ETH')
# get the current market price of Ethereum
eth_price = rs.crypto.get_crypto('ETH')['last_trade_price']
# log out of Robinhood
rs.logout()
You can also use other functions in the crypto
module, such as get_crypto_currency_pairs()
to get a list of cryptocurrency trading pairs available on Robinhood.