This script creates a set of trading bots on 3Commas.io based on available perpetual futures on FTX.com, and automatically provides triggers for those bots to start deals.
- Create an FTX account
- Go to FTX.com
- Follow the registration process
- Logon and deposit tokens of your choice.
- Go to https://ftx.com/wallet and
CONVERT
the tokens toUSD (USD)
as this script only works with USD.
- Go to https://ftx.com/wallet and
- Go to the Subaccounts page: https://ftx.com/profile#Subaccounts
- Press
CREATE SUBACCOUNT
, call thisPyBot1
- At
Select Account
, choosePyBot1
, see at the right-top that you see the name of this sub-account. - At
Transfer Funds Between Subaccounts
chooseUSD (USD)
, Source Account:Main Account
, Destination Account:PyBot1
and the amount of USD that you want to use for this script. - Go to the Wallet at https://ftx.com/wallet, look at the right-top to see if you are at subaccount
PyBot1
and see if you see your USD's.
- Press
- Click at your name in the right-top and select
API
: https://ftx.com/settings/api- Press
Create API Key for PyBot1
- Copy
API key
andAPI Secret
to a text-file for later usage
- Press
- Create a free 3Commas account
- Go to 3Commas.io
- Press
Try It Free
- Follow the registration process
- Logon, click on the round icon at the right-top and select
API
- Press
+ New API access token
- Name: pybot
- Select:
Bots read
,Bots write
andAccounts read
- Copy
API key
andAPI Secret
to a text-file for later usage
- Connect 3Commas with FTX
- Go to
My Exchanges
: https://3commas.io/accounts - Press
+ Connect a new exchange
- Select
API Connect
- Name:
FTX
- Sub-accoun Name:
PyBot1
- API Key: Use the FTX API Key
- API Secret: Use the FTX API Secret
- Go to
- Go to https://console.cloud.google.com/ and login with your Google account
- Select at the left (open menu if needed)
COMPUTE
-Compute Engine
-VM instances
- Press
Create Instance
(Enable API if needed)- Name:
vm-pybot
- Region:
us-east1 (South Carolina)
- Machine type:
e2-micro (2 vCPU, 1 GB memory
CREATE
- Name:
- When the VM is created
- Go to https://console.cloud.google.com/compute/instances
- Press under Connect at
SSH
. An commandline interface should pop-up in a new window.
- Execute the following commands
-
sudo apt-get -y update
-
sudo apt-get -y install build-essential wget git unzip tmux python3 python3-pip
-
sudo wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz tar -xzf ta-lib-0.4.0-src.tar.gz cd ta-lib/ ./configure --prefix=/usr make sudo make install cd ..
-
pip3 install --upgrade setuptools pip3 install TA-lib pandas_ta ccxt py3cw
-
git clone https://github.com/MvantLoo/adx-bot
-
- Execute the following commands
-
cd adx-bot cp example.config.py config.py
-
nano config.py
-
- Update the following lines:
-
TC_ACCOUNT_ID = ''
3Commas Account ID -
TC_API_KEY = ''
3Commas API Key -
TC_API_SECRET = ''
3Commas API Secret -
API_KEY = ''
FTX API Key -
SECRET_KEY = ''
FTX Secret Key -
SUB_ACCOUNT = ''
FTX Sub-account
-
- Save the file and exit nano with
Ctrl-X
, confirm the filename. - Start a new Tmux session
tmux new -s pybot1
- Create the bots
python3 Py3c_create.py
- Run the script
python3 adx_bot.py
- Sit back and enjoy
If for whatever reason you loose access to the SSH window, you can open a new window and reopen the running session.
- Go to https://console.cloud.google.com/compute/instances
- Press under Connect at
SSH
. An commandline interface should pop-up in a new window. - List the running Tmux sessions
tmux ls
- Attach to the running
pybot1
sessiontmux a -t pybot1