Crypto currency bot

  • Hello world!

    Hello everyone, my name is Victor, I’m an international student from Indonesia and I am eager to finally start the capstone project. I’m located in Corvallis(PST), and my schedule should be pretty free in the evening, as long as you let me know of meetings ahead of time. I’m a very active person I mostly play sports like golf and basketball, I also am a foodie I enjoy trying food from all over the world. My interest in computer science began with a game called Minecraft, in it there was a mechanic that we could use to create very simple machines, I continued to tinker with the machines which eventually sparked my interest for CS. I have experience with mobile development using both react and flutter during a past internship and I gained experience with web development through several courses I took. I’d love to do a project with an AI aspect, because I find the concept of getting a computer to do your work for you very amusing, also I think that AI will be the main force that drives our society to become more advanced. The project I’m most interested in is : Cryptocurrency Trading Bot firstly because it has the AI aspect I’m looking for, training a computer to do a humans job, secondly I’m also a trader, I trade stocks nearly everyday and I have been looking to try and play with crypto killing 2 birds with one stone. I’m very flexible and easy to work, as long as we can communicate on any problems. Please let me know if anyone’s interested in teaming up!

    Milestone 1

    I’ll first give an update on our first milestone which was the completion of data gathering. I was in charge of data gathering. It was a pretty simple process in terms of the programming, but what was more important was the statistics aspect of it, ensuring there’s enough data for the model to work and selecting the data with the most quality. Our first thought process was to use a well renowned exchange, to pull data from  as well as to execute buy orders, however by doing that we’d be limiting the customizability of our program, as we can only use that exchange. Also if that exchange were to suddenly go bankrupt then our program would be susceptible as well. So instead we decided to take data from one api and use that data to execute buy orders on any exchange we want (this will most likely be done through the use of a python library for crypto). We had a little issue with choosing the API to pull from as the free ones lack data but eventually we found one which collects data from multiple exchanges and combines them it was called crypto compare. After finding the API all I had to do was pull the data and create the indicators (patterns in market data that indicate future price). I decided to make write this data into a csv file, so we can have a microservice structure where one program pulls the data, one program use the data to train the AI, and one program executes the buy based on the signal from the AI program. Now with that down I’m looking forward to work on the core part of the project, the AI training.

    11/13/2023

    Milestone 2

    The progress of our project is going well, Stuart has finished the LTSM model (AI part of the project) and Robert is working on connecting that to an exchange. From the last blog post till now I’ve been studying about the machine learning model that Stuart has developed, it’s a lot to learn but however with consistent progress I’m beginning to understand more about the topic and am confident that next quarter I can contribute to the AI part of the project. I’m very happy with the progress, as we could finish it early next quarter and then we can add/tweak our own personal features to the project. However we did run into a problem with our project mentor, as we didn’t really document what we did, in one of our assignments. So it seemed like we were just giving all of our work to our client. We should’ve elaborated more on how because of our lack of knowledge on AI we are letting Stuart create the model first and then we will be the ones to finetune it together. Well, lesson learnt: we need to have a better system on how we showcase our progress and what we did for the weeks. That’s all for this milestone and hopefully by the next post I’ve already started working on the LTSM model.

    12/04/2023

    Practices of code

    Conciseness and clarity is one of the things I’d like to work on because I feel that when I code it’s a little bit too concise and whenever I debug or go back to a code I have written It can take some time for me to understand and remember what values I wrote down. This is an example of clear and concise code from “How to Write Clean Code” by Germán Cocca

    Concise code:

    const countVowels = s => (s.match(/[aeiou]/gi) || []).length;

    console.log(countVowels(“hello world”));

    Clear Code:

    function countVowels(s) {

      const vowelRegex = /[aeiou]/gi;

      const matches = s.match(vowelRegex) || [];

      return matches.length;

    }

    console.log(countVowels(“hello world”));

    As you can see there’s a massive difference in the readability of it

    One problem I have with my code is that when I write identifiers they’re not very descriptive and that could lead to a mix up when coding.

    For example in code where I try to calculate something I’ll often use single letter variables:
    If (num == a)

    c = c+a

    When it’s better to write:

    if(number = desired)

    total = total + desired

    No documentation


    In my journey to implement a cron job for my project, I encountered significant challenges, primarily due to the sparse documentation available on integrating it with Google Colab. This posed the question: What technology did I have difficulty learning but now appreciate? The answer became apparent as I delved deeper into the world of automation and scheduling tasks. Despite the daunting task and the lack of clear, step-by-step guidance, my perseverance led me to explore solutions beyond conventional methods. The turning point came when I sought advice from a friend, a moment that not only broadened my perspective but also introduced me to the invaluable tool of GitHub workflows. This area, previously uncharted territory for me, proved to be the solution I was looking for. Following my friend’s advice and after some trial and error, I successfully set up the cron job. This experience not only resolved my immediate issue but also deepened my appreciation for GitHub workflows, transforming my initial difficulty into a valuable skill set that I now highly value.

    My role

    Before I talk about my role first I’ll briefly discuss what the project is, our project is a crypto currency trading bot which utilizes machine learning to execute trades. I worked on several things the first being finding the right source of data which is reliable, plentiful and trustworthy. After finding that I pulled the data and created indicators using that data. After that part was done I moved on to working on the user interface with Lindsey, I helped in coding the first prototype, but later took a step back because we wanted to implement a chron job. So to do that I used github workflow to trigger a job and run the script. I encountered many problems during this process but the hardest one so far was trying to set up a chron job on a jupyter notebook I tried to find any resource on it and everything I tried didn’t work, I just kept on trying and thinking of different ways I could set up a chron job online and eventually I stumbled on github workflows. I think our project will be useful to people who want to try invest in crypto but don’t have the time or knowledge to do so.