Skip to content

A cryptocurrency trading bot which is like a state machine that has 4 states for predicting position result

License

Notifications You must be signed in to change notification settings

basaryldrm06/PaceBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PaceBot

Project Cover

Table of Contents

Description

PaceBot is an experimental trading bot developed for research purposes. Operating on a 4-stage state machine, this bot dynamically transitions between states according to a specific algorithm. It determines its position based on the current state, enabling it to perceive market direction and make accurate predictions.

PaceBot serves as a tool for users interested in experimenting with automated strategies for entering "LONG" or "SHORT" positions in the cryptocurrency market, particularly in assets like Bitcoin. With advanced algorithms, it aims to analyze market movements, and make accurate predictions.

Project Cover

How does it work?

During the Computer Architecture and GPU design lesson, I saw a model which is a 2 bit branch prediction counter. In short, this model attempts to make accurate predictions by forecasting branching outcomes based on its current state.

strategy

You can check out this model more by searching "2 bit branch predictor" on Google.
So, I though that the process of predicting the next branch state and the result of the transaction are similar. And tried to adapt this model on this trading bot.

The operational logic of the bot is as follows:

strategy

Technologies Used

  1. Python: The primary programming language driving PaceBot's functionality and logic.

  2. Binance API: PaceBot connects seamlessly to the Binance cryptocurrency exchange through its API, allowing real-time access to market data and execution of trades.

  3. TA-Lib Library: Technical Analysis Library provides essential functions for technical analysis of financial markets, aiding PaceBot in evaluating market indicators.

  4. ChatGPT: ChatGPT, powered by OpenAI, is employed for code assistance, aiding developers in coding tasks and providing guidance on library usage. Additionally, ChatGPT is utilized for crafting informative log messages, enhancing communication and facilitating a smoother understanding of PaceBot's operations.

Installation

To install Project, follow these simple steps:

  1. Install Python:
    • Visit Python official website and download python.
    • I strongly recommend downloading a version lower than 3.10 and higher than 3 to ensure that you can download it without any issues and run the Talib library smoothly.
  2. Cloning the Project into your local: Go to the directory where you want to download the project using 'cd', and then type the following command
    $git clone https://github.com/basaryldrm06/PaceBot
  3. Install Dependencies Enter these commands in sequence.
    $cd PaceBot
    $pip install -r requirements.txt

Upon successfully completing these steps, proceed to configure your settings and run the program.

In case you encounter any issues, kindly attempt to resolve them before moving forward.

If you are facing difficulties downloading the Talib library, consider trying a manual download from this link.

Configuration

Rename the file config2.py to config.py.

Open the config.py file to edit the settings, and fill in the empty fields according to your preferences.

Config File

If you do not have an api key you can obtain one from this link

You can use the default values for other sections or customize them based on your preferences.

Once you have finished editing your settings, you will be ready to run the program.

Running the Bot

If you have completed the previous steps, PaceBot is now ready to run. Start it by entering the following command:

$python main.py

After running the command, you should see a screen similar to the one below.

Running Bot

Editing the Code

Feel free to tailor the project to your specific preferences and requirements. The code has been meticulously documented to provide clear explanations of each component, empowering you to make effortless customizations. Whether you want to tweak parameters, integrate additional features, or adapt the functionality to suit your needs, the codebase is designed to be intuitive and easily adaptable.

Code Example

Warnings

This trading bot is developed solely for experimental purposes, aiming to explore the viability and effectiveness of automating the trading process by a spesific algorithm. It is a completely experimental project shared as open-source to serve as an example for the development of trading bots.

Any profits or losses incurred using this bot are entirely your responsibility. Please refrain from using the program if you are not familiar with its functionalities. Understand that engaging in financial transactions carries inherent risks, and it's crucial to exercise caution and knowledge when utilizing this bot.

Code Example

Last Words from Developer

I hope you find this project useful and enjoyable.

Feel free to follow my account for more projects like this and stay updated on upcoming releases. Don't forget to star and watch this project to receive notifications about future updates and improvements.

Algorithmic Trading Bots represent a significant advancement in our era, providing a diverse array of applications within the financial landscape. While engaging in this project, my goal was to explore the capabilities of Algorithmic Trading Bots and their effectiveness in financial transactions. For this reason, this project was particularly intriguing and enjoyable for me.

If you have any innovative ideas in mind for trading bots or AI, feel free to reach out to me through the links on my profile. We can collaborate and develop something together.

Thank you for your interest and support! 🚀