SUPERALGOS TIPS & TRICKS

How to Install Superalgos on Your Android Phone

Wanna turn your phone into a little money-making machine?

Py-Way
Superalgos | Algorithmic Trading

--

Photo by Rami Al-zayat on Unsplash

In this article, we will go through how to set up Superalgos on your old Android phone, which may be just lying around and waiting to be turned into a powerful trading machine.

If you are asking why on a phone:

  • it's perfect for a headless unsupervised trading instance setup (exactly what you would do with a Raspberry Pi),
  • consumes less energy, and can run both on WiFi and on 3G/4G Data,
  • has a built in UPS (Uninterrupted Power Supply) via the native battery,
  • you can take it in your pocket when traveling,
  • the whole process runs in the background, so if it's on your current phone, you can leave it running and use your phone as normal!

Setting up Superalgos on Android

In order to run SA on Android, you need a Linux environment to do so. The following steps should get you up and running in no time.

Pro-Tip: open this article on your phone so that you can copy-paste commands into your terminal!

1. Donwload Termux for Android from F-Droid

Use the link below to download the Termux .apk file and install it on your Android phone. Depending on your security settings, you may have to allow unknown sources / or have to go through ADB install for users with advanced protection features.

2. Update the repository and all packages

Once installed, start Termux and update & upgrade all packages. Make sure to accept the new space requirements and wait for the first command to finish before executing the second one.

apt update

… followed by

apt upgrade

For the upgrade command, you will be prompted multiple times if you accept new versions and downloads, either yes or no will continue the upgrade.

3. Install proot-distro and Ubuntu (no root required)

Once successfully up to date, download and install proot-distro and Ubuntu CLI using the following commands.

pkg install proot-distro

After the command is successful, install the Ubuntu distro using the following command:

proot-distro install ubuntu

Note: the terminal is case-sensitive!

After successful installation, you can start Ubuntu with:

proot-distro login ubuntu

4. Update Ubuntu and install SA prerequisites

Once successfully inside Ubuntu, you will see the console change to root@localhost. Now you will need to bring Ubuntu up to date.

For this purpose, run the following commands:

apt updateapt upgrade

Once this has been successfully done, we will install some core prerequisites for the Superalgos installation.

apt install build-essential
apt install python3
apt install git
apt install npm

Next, we need to install a recent version of Node JS.

Run the following command to install the Node Version Manager:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash

Once done, do the following:

source ~/.bashrc

After both commands execute successfully, install Node 18.0.0 (higher versions came up with errors, so try this one first).

nvm install v18.0.0

Last steps (more prerequisites):

npm install @octokit/restnpm install simple-gitnpm install bootstrapnpm install

You have successfully installed everything needed to setup SA!

5. Install Superalgos

Once you have successfully updated Ubuntu and installed all prerequisites, you can continue with the standard installation steps from https://github.com/Superalgos/Superalgos:

  • Fork the Superalgos repository (make sure you include the develop branch).
  • Clone YOUR fork of the repository (not Superalgos’).
git clone https://github.com/USERNAME/Superalgos

After successfully cloned, change the active directory to the newly created one:

cd Superalgos
  • Setting up the environment

If you did everything correctly up to this point, this next command should execute without any errors

node setup
Console output after successful setup

If you see any audit warnings, you can ignore them.

If the command was successful, you just installed SA on your phone!

  • Installing Plugins and updating GitHub Repositories

After the environment is installed, you need to get the community plugins with the following command:

node setupPlugins <Your-Github-Username> <Your-Github-Personal-Access-Token>example: node setupPlugins John ghp_asdsg34fger34c3

Link to create access token: https://github.com/settings/tokens/new (repo and workflow are required).

To finish off before starting it up, you will have to update the GitHub Repositories with the following command:

node updateGithubRepos

And that’s it! Superalgos is ready to run on your Android device!

6. Operation

Start SA with:

node platform minMemo noBrowser

This starts Superalgos on Ubuntu/Termux without a browser and with minimum RAM.

To access your SA instance you have to find out your phone’s local IP (in the Wi-Fi settings), go to the nearest pc/laptop/Chromebook or whatever, and open a browser to that address (making sure your PC and phone are on the same Wi-Fi network):

YOUR.PHONE.IP.ADDRESS:34248

Now you can jump into the tutorials!

*If you are feeling adventurous, add a Bluetooth mouse to the phone and start up your Chrome, go to 127.0.0.1:34248 or localhost:34248.

Note: If you close Termux and start it back up, you will be in the Termux Environment. From there you need to execute “proot-distro login ubuntu” and then “cd Superalgos” to land in the starting SA directory from where you can run “node platform minMemo noBrowser”

--

--