Giter VIP home page Giter VIP logo

tyler-pruitt / robinhood-crypto-autotrader Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 4.0 241 KB

An automated trader for cryptocurrency implemented in Python for the popular trading platform Robinhood. This automated trader supports live trading, simulated trading on the live market, and even backtesting.

License: MIT License

Python 100.00%
crypto cryptocurrency robinhood trading-algorithms trading-bot trading-strategies trading bitcoin ethereum dogecoin

robinhood-crypto-autotrader's Introduction

Robinhood-Crypto-Autotrader

An automated trader for crypto on Robinhood

Donate to this project and help support open-sourced financial software (anything helps!)

I am happy to accept the following crypto currencies as gifts, it is much appreciated!

  • Bitcoin (BTC) wallet address: bc1qvljdr72k3tz6w8k6hpnhv3722fmsgftkeeakx8
  • Ethereum (ETH) wallet address: 0xDd5E232561177e5E48432F6BA4fD12173Bbe869A
  • US Dollar Coin (USDC) wallet address: 0xDd5E232561177e5E48432F6BA4fD12173Bbe869A
  • Cardano (ADA) wallet address: addr1q8g90gwc2u82fnv6m0pw7crervtslar746rxx06apfcf44cg6h5us0avc20ee2azzun58lgylyl54sjr6y9efwq86krst57w35
  • Solana (SOL) wallet address: EzQveUMk45NmuftUSGLqRH8DUBmxzCpS3HuEchFc5t1X
  • Dogecoin (DOGE) wallet address: DQCzww2Sz9UhtAaMZbHHGofng1ioRgTkEu
  • Polygon (MATIC) wallet address: 0xDd5E232561177e5E48432F6BA4fD12173Bbe869A
  • Shiba Inu (SHIB) wallet address: 0xDd5E232561177e5E48432F6BA4fD12173Bbe869A
  • Avalanche (AVAX) wallet address: 0xDd5E232561177e5E48432F6BA4fD12173Bbe869A
  • Ethereum Classic (ETC) wallet address: 0x42D1125fB02D0eaAA3b0D57330EC46AaF5F95F15
  • Uniswap (UNI) wallet address: 0xDd5E232561177e5E48432F6BA4fD12173Bbe869A
  • Litecoin (LTC) wallet address: ltc1qvwzqm4jxqt0gjf7fwzxpnvtlssxtc9lutrnxsh
  • Chainlink (LINK) wallet address: 0xDd5E232561177e5E48432F6BA4fD12173Bbe869A
  • Bitcoin Cash (BCH) wallet address: bitcoincash:qr4h4edxt5muv2ns3kls0d4ca8lezu8x9v9d4r227h
  • Compound (COMP) wallet address: 0xDd5E232561177e5E48432F6BA4fD12173Bbe869A
  • Aave (AAVE) wallet address: 0xDd5E232561177e5E48432F6BA4fD12173Bbe869A
  • Tezos (XTZ) wallet address: tz1Wexc9bv6BxCBgyXwaqmJq1RNYxXBr9aff
  • Stellar Lumens (XLM): GB2ES2N326MZK4EGJBKN3ZARCQ5RTFQSAWIJAAKFVIIIJSCC35TXIMLB, memo (needs to be included): 1592369023

New to Robinhood?

Join Robinhood with my link and we'll both pick our own free stock ๐Ÿค https://join.robinhood.com/tylerp5773

To run the code:

1. place all files in the same folder

2. place your Robinhood USERNAME, PASSWORD, and CRYPTO to trade in "config.py"

You should fill in your information in the file "config.py" like so

USERNAME = "Your_Robinhood_Username"
PASSWORD = "Your_Robinhood_Password"

# The number of days to run the autotrader (INTEGER), must be greater than zero (0)
TIMEINDAYS = 1

# Export the completed crypto orders into a CSV? (BOOLEAN), must be either True or False
# Note: If set to True, should the user terminate the program via KeyboardInterrupt while trading, then the csv will still be exported
EXPORTCSV = False

# Plot analytical graphs while running? (BOOLEAN), must be either True or False
PLOTANALYTICS = False

# Plot graph of crypto price while running? (BOOLEAN), must be either True or False
PLOTCRYPTO = False

# Plot graph of portfolio while running? (BOOLEAN), must be either True of False
PLOTPORTFOLIO = False

# The mode to run the autotrader, available modes are 'LIVE', 'BACKTEST', and 'SAFELIVE'
MODE = 'SAFELIVE'

#------------------FOR 'BACKTEST' MODE ONLY---------------------------------
# 'INTERVAL', 'SPAN', and 'BOUNDS' used for retreiving historical crypto data for backtesting

INTERVAL = '15second'

SPAN = 'hour'

BOUNDS = '24_7'

#---------------------------------------------------------------------------

# Initial capital to start the backtesting with (optional: only for 'BACKTEST' and possibly 'SAFELIVE' modes)
CASH = 1000.00

# Is "CASH" above to be used in the 'SAFELIVE' mode? (BOOLEAN), must be either True or False
USECASH = True

# The cryptocurrencies to have the autotrader place orders on
CRYPTO = ['BTC','ETH']

Interval options are

['15second', '5minute', '10minute', 'hour', 'day', 'week']

Span options are

['hour', 'day', 'week', 'month', '3month', 'year', '5year']

Bounds options are

['Regular', 'trading', 'extended', '24_7']

3. modify the Trader class in "trader.py" to your personal trading strategy (optional)

4. run "main.py"

robinhood-crypto-autotrader's People

Contributors

tyler-pruitt avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

robinhood-crypto-autotrader's Issues

Runs for a while, then gets logged out?

Hello, I'm relatively new to GitHub and haven't submitted any sort of error feedback before. I downloaded and ran this bot code, which seems to work anywhere from 1 -5'ish minutes, before it repeatedly logs me out. I can immediately re-run the program, but it requires putting in the 2FA code from my phone every time. Here's an example of the error I keep getting when it bombs out:

An error occured: stopping process
logout successful
Traceback (most recent call last):
File "/home/jwest/Robinhood-Crypto-Autotrader/main.py", line 504, in
tr.sell_times[i][tr.convert_timestamp_to_datetime(crypto_historicals[i][backtest_index]['begins_at'])] = 'unable_to_sell'
NameError: name 'crypto_historicals' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/jwest/Robinhood-Crypto-Autotrader/main.py", line 590, in
rh.export.export_completed_crypto_orders('./', 'completed_crypto_orders')
File "/home/jwest/.local/lib/python3.10/site-packages/robin_stocks/robinhood/helper.py", line 31, in login_wrapper
raise Exception('{} can only be called when logged in'.format(
Exception: export_completed_crypto_orders can only be called when logged in

I can't tell if it's executing a specific step when it crashes out, but it won't seem to run for more than 5'ish minutes at a time. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.