Created
January 24, 2020 22:38
-
-
Save henryrossiter/691c4b0904f2ecf0bbc87d39f297686b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import robin_stocks as r | |
def getTradeableCryptoList(): | |
data = r.crypto.get_crypto_currency_pairs() | |
return [crypto for crypto in data if not crypto['display_only']] | |
def getCryptoPositions(): | |
positions = r.get_crypto_positions() | |
return positions | |
def getCryptoQuote(symbol): | |
quote = r.get_crypto_quote(symbol) | |
return quote | |
def buyCrypto(symbol, usd): | |
resp = r.orders.order_buy_crypto_by_price(symbol, usd) | |
return resp | |
def sellCrypto(symbol, usd): | |
resp = r.orders.order_sell_crypto_by_price(symbol, usd) | |
return resp | |
def getHistoricals(symbol): | |
resp = r.stocks.get_historicals(symbol) | |
return resp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment