Uses Open AI Gym environment to create autonomous cryptocurrency bot to trade cryptocurrencies.

Overview

Crypto_Bot

Uses Open AI Gym environment to create autonomous cryptocurrency bot to trade cryptocurrencies.

Steps to get started using the bot:

  1. Sign up for a binance account, you can use this link to create your account: https://accounts.binance.us/en/register?ref=56432230

  2. After Creating an account, go to "API Management" to get your API keys:

       You will receive two API Keys:
       
               API Key
               
               Secret Key-Make sure to save secret key as you will only see this key once.
    
  3. Download Crypto_Bot_Class.py File from GitHub

         In Crypto_Bot_Class.py file replace "API_KEY" Variable with your API Key from binance
         
         In Crypto_Bot_Class.py file replace "SECRET_KEY" Variable with your Secret Key from binance
    
  4. Download Model Files from Model Folder on Github In Crypto_Bot_Class.py file replace each:

               XGB_MODEL= **Your XGB_Model File Path**
               
               CROSSNN_MODEL= **Your CrossNN_Model File Path**
               
               MLP_MODEL= **Your MLP_Model File Path**
               
               FOREST_MODEL=**Your Forest_Model File Path**
               
               BIG_NN_MODEL=**Your BIG_NN_Model File Path**
    
  5. Download Data Files from Data Folder on Github In Crypto_Bot_Class.py file replace each:

             VAL_SET=**Your VALIDATION DATA File Path**
             
             TRAIN_SET**Your TRAIN DATA File Path**
    

How to select which bots to use:

By Default- VALIDATION=True: This means that your file will run on the Validation data and will print a graph comparing each model to the market over the last three months.

If you change: VALIDATION=False then the each of the 5 Models will be used to make live trades through the binance API. You can select which model you want to make trades by changing the models from True to False:

    Ex: Change: XGB_MODEL_ON=True    to     XGB_MODEL_ON=False
You might also like...
SpeechNAS Better Trade off between Latency and Accuracy for Large Scale Speaker Verification
SpeechNAS Better Trade off between Latency and Accuracy for Large Scale Speaker Verification

SpeechNAS Better Trade off between Latency and Accuracy for Large Scale Speaker Verification

Plug-n-Play Reinforcement Learning in Python with OpenAI Gym and JAX
Plug-n-Play Reinforcement Learning in Python with OpenAI Gym and JAX

coax is built on top of JAX, but it doesn't have an explicit dependence on the jax python package. The reason is that your version of jaxlib will depend on your CUDA version.

gym-anm is a framework for designing reinforcement learning (RL) environments that model Active Network Management (ANM) tasks in electricity distribution networks.
gym-anm is a framework for designing reinforcement learning (RL) environments that model Active Network Management (ANM) tasks in electricity distribution networks.

gym-anm is a framework for designing reinforcement learning (RL) environments that model Active Network Management (ANM) tasks in electricity distribution networks. It is built on top of the OpenAI Gym toolkit.

CL-Gym: Full-Featured PyTorch Library for Continual Learning

CL-Gym: Full-Featured PyTorch Library for Continual Learning CL-Gym is a small yet very flexible library for continual learning research and developme

Implement A3C for Mujoco gym envs
Implement A3C for Mujoco gym envs

pytorch-a3c-mujoco Disclaimer: my implementation right now is unstable (you ca refer to the learning curve below), I'm not sure if it's my problems. A

A
A "gym" style toolkit for building lightweight Neural Architecture Search systems

A "gym" style toolkit for building lightweight Neural Architecture Search systems

Customizable RecSys Simulator for OpenAI Gym
Customizable RecSys Simulator for OpenAI Gym

gym-recsys: Customizable RecSys Simulator for OpenAI Gym Installation | How to use | Examples | Citation This package describes an OpenAI Gym interfac

Robot Servers and Server Manager software for robo-gym

robo-gym-server-modules Robot Servers and Server Manager software for robo-gym. For info on how to use this package please visit the robo-gym website

Deep Q Learning with OpenAI Gym and Pokemon Showdown

pokemon-deep-learning An openAI gym project for pokemon involving deep q learning. Made by myself, Sam Little, and Layton Webber. This code captures g

Comments
  • Linux path?

    Linux path?

    XGB_MODEL=r'C:\Users\wkjon.spyder-py3\XGB_Model.sav' CROSSNN_MODEL= r'C:\Users\wkjon.spyder-py3\Cross_NN_Model.sav' MLP_MODEL= r'C:\Users\wkjon.spyder-py3\MLP_Model.sav' FOREST_MODEL=r'C:\Users\wkjon.spyder-py3\Forest_Model.sav' BIG_NN_MODEL=r'C:\Users\wkjon.spyder-py3\Big_NN\Big_NN_Model.pth'

    Solved

    opened by ceyhanmolla 0
  • AttributeError: 'XGBModel' object has no attribute 'enable_categorical'

    AttributeError: 'XGBModel' object has no attribute 'enable_categorical'

    <bound method Client.get_open_orders of <binance.client.Client object at 0x7f78442fb3d0>> /usr/local/lib/python3.8/dist-packages/sklearn/base.py:329: UserWarning: Trying to unpickle estimator DecisionTreeClassifier from version 0.23.1 when using version 1.0.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to: https://scikit-learn.org/stable/modules/model_persistence.html#security-maintainability-limitations warnings.warn( /usr/local/lib/python3.8/dist-packages/sklearn/base.py:329: UserWarning: Trying to unpickle estimator RandomForestClassifier from version 0.23.1 when using version 1.0.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to: https://scikit-learn.org/stable/modules/model_persistence.html#security-maintainability-limitations warnings.warn( /usr/local/lib/python3.8/dist-packages/sklearn/base.py:329: UserWarning: Trying to unpickle estimator LabelBinarizer from version 0.23.1 when using version 1.0.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to: https://scikit-learn.org/stable/modules/model_persistence.html#security-maintainability-limitations warnings.warn( /usr/local/lib/python3.8/dist-packages/sklearn/base.py:329: UserWarning: Trying to unpickle estimator MLPClassifier from version 0.23.1 when using version 1.0.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to: https://scikit-learn.org/stable/modules/model_persistence.html#security-maintainability-limitations warnings.warn( /usr/local/lib/python3.8/dist-packages/sklearn/base.py:443: UserWarning: X has feature names, but RandomForestClassifier was fitted without feature names warnings.warn( /usr/local/lib/python3.8/dist-packages/sklearn/base.py:443: UserWarning: X has feature names, but RandomForestClassifier was fitted without feature names warnings.warn( /usr/local/lib/python3.8/dist-packages/sklearn/base.py:443: UserWarning: X has feature names, but RandomForestClassifier was fitted without feature names warnings.warn( Traceback (most recent call last): File "Crypto_Bot_Class.py", line 529, in obs_3, reward_3, info_3=env_3.step() File "Crypto_Bot_Class.py", line 276, in step next_state=self.action() File "Crypto_Bot_Class.py", line 315, in action act=self.get_act() File "Crypto_Bot_Class.py", line 364, in get_act predict=self.model.predict_proba(row)[0,1] File "/usr/local/lib/python3.8/dist-packages/xgboost/sklearn.py", line 1348, in predict_proba class_probs = super().predict( File "/usr/local/lib/python3.8/dist-packages/xgboost/sklearn.py", line 879, in predict if self._can_use_inplace_predict(): File "/usr/local/lib/python3.8/dist-packages/xgboost/sklearn.py", line 811, in _can_use_inplace_predict predictor = self.get_params().get("predictor", None) File "/usr/local/lib/python3.8/dist-packages/xgboost/sklearn.py", line 505, in get_params params.update(cp.class.get_params(cp, deep)) File "/usr/local/lib/python3.8/dist-packages/xgboost/sklearn.py", line 502, in get_params params = super().get_params(deep) File "/usr/local/lib/python3.8/dist-packages/sklearn/base.py", line 210, in get_params value = getattr(self, key) AttributeError: 'XGBModel' object has no attribute 'enable_categorical'

    opened by ceyhanmolla 1
Owner
null
Reinforcement Learning with Q-Learning Algorithm on gym's frozen lake environment implemented in python

Reinforcement Learning with Q Learning Algorithm Q learning algorithm is trained on the gym's frozen lake environment. Libraries Used gym Numpy tqdm P

null 1 Nov 10, 2021
An OpenAI Gym environment for Super Mario Bros

gym-super-mario-bros An OpenAI Gym environment for Super Mario Bros. & Super Mario Bros. 2 (Lost Levels) on The Nintendo Entertainment System (NES) us

Andrew Stelmach 1 Jan 5, 2022
Trading Gym is an open source project for the development of reinforcement learning algorithms in the context of trading.

Trading Gym Trading Gym is an open-source project for the development of reinforcement learning algorithms in the context of trading. It is currently

Dimitry Foures 535 Nov 15, 2022
PaddleRobotics is an open-source algorithm library for robots based on Paddle, including open-source parts such as human-robot interaction, complex motion control, environment perception, SLAM positioning, and navigation.

简体中文 | English PaddleRobotics paddleRobotics是基于paddle的机器人开源算法库集,包括人机交互、复杂运动控制、环境感知、slam定位导航等开源算法部分。 人机交互 主动多模交互技术TFVT-HRI 主动多模交互技术是通过视觉、语音、触摸传感器等输入机器人

null 185 Dec 26, 2022
Open source simulator for autonomous vehicles built on Unreal Engine / Unity, from Microsoft AI & Research

Welcome to AirSim AirSim is a simulator for drones, cars and more, built on Unreal Engine (we now also have an experimental Unity release). It is open

Microsoft 13.8k Jan 5, 2023
Learning to trade under the reinforcement learning framework

Trading Using Q-Learning In this project, I will present an adaptive learning model to trade a single stock under the reinforcement learning framework

Uirá Caiado 470 Nov 28, 2022
Mind the Trade-off: Debiasing NLU Models without Degrading the In-distribution Performance

Models for natural language understanding (NLU) tasks often rely on the idiosyncratic biases of the dataset, which make them brittle against test cases outside the training distribution.

Ubiquitous Knowledge Processing Lab 22 Jan 2, 2023
DiffQ performs differentiable quantization using pseudo quantization noise. It can automatically tune the number of bits used per weight or group of weights, in order to achieve a given trade-off between model size and accuracy.

Differentiable Model Compression via Pseudo Quantization Noise DiffQ performs differentiable quantization using pseudo quantization noise. It can auto

Facebook Research 145 Dec 30, 2022
Code of the paper "Performance-Efficiency Trade-offs in Unsupervised Pre-training for Speech Recognition"

SEW (Squeezed and Efficient Wav2vec) The repo contains the code of the paper "Performance-Efficiency Trade-offs in Unsupervised Pre-training for Speec

ASAPP Research 67 Dec 1, 2022