It’s been more than a year since my first post on my journey to create a passive income source that generates a 1% daily return. After spending months testing various bot settings and trigger conditions, I’ve finally achieved a system that is truly hands-off, profitable, automatic trading. I promised to document it on this site, so here it is. Free for you to use.
To be totally transparent, when I say 3,000%, this is APY, which is about a 365% APR, or 1% per day. I know the title is a bit clickbait-ish, but it got your attention, right?
Over the past year and a bit I’ve been struggling to come up with a system that is truly passive. Of course, it doesn’t exist, you always need to be checking and adjusting your bots’ parameters for maximum returns. This system gets as close as you can to being completely passive, with only a few minor adjustments every few weeks. And seriously, as I’m typing this post my Telegram notifications keep going off, letting me know deals are closing constantly. It’s incredible, and a constant reminder the system is working.
So, What Are The Best 3Commas Bot Settings to Use?
The reality is it’s much less about the bot parameters. The most important part is the trigger. Most bot settings will work if you have the right triggers to start a deal. Having said that, I do have some preferred settings I like to use, but these depend on whether the market is ranging (going sideways), or trending (up or down). I will cover these in some later posts, and this post will give you some initial settings to work with. If you don’t want to miss those upcoming posts, make sure you’ve signed up to receive new post notifications to your email if you’re not already.
For the system to work we need a few things first. An FTX.com account. FTX is by far the best exchange in my opinion. Great liquidity, an amazing team, and some of the fairest trading I’ve seen. For example, if you trade leverage, you don’t get instantly liquidated if the price exceeds your margin. Binance and others will instantly just take all your money and leave you broke. FTX will slowly sell off part of your bags to cover your margin, so if your position improves, you’re left with some money to keep trading. Anyways, I digress.
You’re also going to need a Pro plan at 3Commas.io. This system uses two bots per trading pair. One for longs, and one for shorts. You can only run this many on the Pro plan.
Next, you’re going to need Python installed on your machine to run the code. Most computers already have Python installed, so I’m not going to cover how to install it, or anything related to the use of Python. I learned Python through google, so can you. To get up and running fast though, you can download and install the Python IDLE (Integrated Development and Learning Environment) software to make getting started a bit easier.
How The Bot Trading System Works
I had initially come up with a system where I would look for coins or tokens that were breaking out of the pack, and try to start a deal to catch the momentum. The bot would only open and close one deal. I used a comparison chart like this to look for those:
However, this meant I would have to sit and watch the chart all day, all night. Impossible when you have a full-time job and a family. So I sought out a way to automate this. Thanks to the magic of Python and API’s, it’s totally possible.
So, here’s the details.
First we need to connect 3Commas to FTX. This post describes how to make the API connection from 3Commas to FTX. You’ll also need to grab a separate set of keys from both FTX and 3Commas for the python script. That’s pretty straightforward stuff, so google it if you don’t know how.
Next we need to setup all our bots in 3Commas. We’re trading perpetual futures on FTX, and there’s like 140 or so odd perps we can trade. Since we’re going long and short, we need roughly 280 bots setup. Yikes! But no worries, the first python script helps you create the bots. The second then activates all the bots. For some reason you can’t (or I haven’t figured it out yet) create a bot via the API and have it enabled at the same time, so this requires two actions.
Lastly, we’ll run the python script which keeps an eye out on the prices and looks for those tokens or coins that are making a run or tanking, and then tells the correct bot to start a new deal. The bot will take care of the rest, ie managing the safety orders, take-profit, etc. The script will close a deal if it’s gone too far in the red, but you can adjust that parameter, or use a stop loss on the bot, as you wish.
Let’s jump into the techie bits.
Setting Up the Python Script to Automatically Trigger your 3Commas bots
The code is all stored here, and you’re free to use it and modify it as you want. You can click on the green Code button, then on Download ZIP to download a copy on your machine. Unzip the files and keep them in all the same folder.
config.py. Open the file to edit it. You can use whatever text editor you normally code with, or use the Python IDLE software. The first few lines are where you’ll enter your API keys and sub-account names. The first three are for 3Commas, and the second is for FTX. Paste the keys between the single quotes, and add the sub-account names the same way.
The next few lines determines when the script triggers and closes deals or switches positions.
PAIRS_BLACKLIST– Add any perps you don’t want bots for. Some of the ones listed already have very low volume and don’t trade well, and for some reason
PERP/USDgets caught in my filter, so it’s here to make sure we don’t try to call it since it’s not a perp. Add as many as you want, following the same format already in the file.
LTF_INTERVALS– These work together to determine the time frame you want to look at.
LTF_DELAYsets the time period between checking for the latest prices. The default here is 60 seconds.
LTF_INTERVALSis the number of prices to grab to compare the percentage increase or decrease of a token or coin. The default values are equal to a 5-minute comparison. That’s 60 seconds times 5 = 300 seconds, or 5 minutes. In other words, every 60 seconds we’re going to compare the current price to what it was 300 seconds ago. You can go as long as you want here. I’ve run scripts that check every 10 minutes on a 3-hour window (ie interval of 18).
LTF_BEAR_CHANGE– These are percent values we’re looking to exceed to cause a trigger. The default settings are 2.0% for long bots, and -2.0% for short bots. So, if a token or coin has risen in price (or decreased in price) by this amount in 300 seconds (from the calculation above), the long (or short) bot will be triggered to start a new deal.
MAX_OPEN_POSITIONS– This tells the script the maximum number of deals to run at the same time. The bot will automatically calculate how many deals you can run in parallel based on the funds in your account times the usage of each bot.
STOP_LOSS– These are not used by the script and will be removed in a future revision.
FUNDS_USAGE– This tells the bot how much of the funds you want to use in your account for the bots. 0.9 will mean 90% of the funds will be used for making deals. Depending on the way you want to play, you might need some funds for rescuing a losing deal.
SWITCH_PERCENT– This is the percentage at which the bot will either close a losing deal or switch it to a short (or long) bot. It’s like a stop loss. You can either jack this up to high value so it doesn’t kick in and use the stop loss from the bot, or not. Your choice. Just remember to make it lower than your last safety order so you don’t prematurely close a deal that might still have a chance of turning around.
TREND_STRENGTH– This value determines if the bot will start deals going against the trend, and at what threshold. Since the bot looks at longs and shorts, it may start deals in both directions at any time, as long as it meets the change percentages in the
LTF_BEAR_CHANGEsettings. However, if say the market is trending up on most coins, starting a short deal on a coin or token might not be a good idea. This value helps determine the group strength of a trend. The default value of 65 means that if more than 65% of coins or tokens are trending up, the script won’t trigger any shorts. And vice versa, if 65% of coins or tokens are trending down, the script won’t trigger any longs.
OPEN_POSITION_PRIORITY– These are not used by the script and will be removed in a future revision.
The next lines in the
config.py file are used by the
Py3c_create.py script to generate the bots. These are the same as the bot settings in 3Commas you configure when setting up a bot, so they should look familiar if you’ve setup bots before.
#Create Bot Settings BASE_ORDER_VOLUME = 10 #IN USD TAKE_PROFIT = 1.5 SAFETY_ORDER_VOLUME = 10 MARTINGALE_VOLUME_COEFFICIENT = 1.0 MARTINGALE_STEP_COEFFICIENT = 1.5 MAX_SAFETY_ORERS = 4 ACTIVE_SAFETY_ORDERS_COUNT = 3 SAFETY_ORDER_STEP_PERCENTAGE = 0.5 LEVERAGE_CUSTOM_VALUE = 1
I’m not going to address these individually, so if you need more details, have a look through the help docs at 3Commas.
The last group of settings in the
config.py file are used by the
Py3c_update.py script to update your bot parameters. This was necessary since it’s difficult to tweak the bot settings on 280+ bots manually. There’s a few extra fields added here and is really only because the 3Commas API is a bit quirky that way. But it least it gives you a few more options, like adding a stop loss if you want it.
#Update Bot Settings UPDATE_BASE_ORDER_VOLUME = 10 #IN USD UPDATE_TAKE_PROFIT = 1.2 UPDATE_SAFETY_ORDER_VOLUME = 10 UPDATE_MARTINGALE_VOLUME_COEFFICIENT = 1.0 UPDATE_MARTINGALE_STEP_COEFFICIENT = 1.0 UPDATE_MAX_SAFETY_ORERS = 4 UPDATE_ACTIVE_SAFETY_ORDERS_COUNT = 3 UPDATE_SAFETY_ORDER_STEP_PERCENTAGE = 1.25 UPDATE_LEVERAGE_CUSTOM_VALUE = 1 UPDATE_STOP_LOSS_TYPE = 'stop_loss' # or stop_loss_and_disable_bot UPDATE_STOP_LOSS_PERCENTAGE = 0 UPDATE_STOP_LOSS_TIMEOUT_ENABLED = False UPDATE_STOP_LOSS_TIMEOUT_IN_SECONDS = 300 UPDATE_START_ORDER_TYPE = 'market'
Important: At the moment, you need to make sure the settings in both sections are identical, especially after an update. This is because the script uses settings from
#Create Bot Settings to determine the maximum number of deals it can open. If you update your bots and change the settings via
#Update Bot Settings, and not update the same parameters in
#Create Bot Settings, the script won’t be able to calculate the maximum number of deals correctly. I will fix this in a future update to the code.
Don’t forget to save your changes!
The scripts use a couple of external libraries built by some smarter people than me that makes all this possible, at least easier anyways. These include the CCXT library, and the py3cw library. You’ll encounter an error if you don’t first install these. Each of those links describes how to install them, or you can run
pip install -r requirements.txt from inside the folder with the other files. You can also find more general details on setting up/installing everything in this post in the Install Dependencies for Automated Trading Bots and How to Install and Setup Python Automated Trading Scripts sections.
Create Your 3Commas Bots
config.py file and the dependencies installed, we’re ready to create our bots.
We do this with the
Py3c_create.py script. Run the script, either in the IDLE by hitting F5 on your keyboard when the file is open, or from the command line using
python3 Py3c_create.py. Note we use python 3 here, python 2 will not work.
The script will check for existing bot id files. If it’s never been run, these won’t exist and will continue to generate the bots. If the script does encounter existing bot id files, it will ask if you want to over-write them.
The script will then poll FTX and get a list of all available perps and generate a list of bots to create. It will filter out perps from the blacklist setting in the config file, and will also check the minimum order requirements for each coin or token and ignore ones that are too high for your settings. For example, if your base order or safety order values are $10, then you won’t be able to trade BTC, so the script doesn’t create a bot for BTC.
As the script runs it creates the bots on 3Commas via an API connection, and prints out its progress on the screen. It first creates all the long bots, followed by the short bots. It also generates four files,
sbotid_list.txt, which contains each token/coin pair and its equivalent bot id on 3Commas. This is basically a lookup table the trigger script will use so it knows which bot id to send the new deal trigger for. The remaining two files are
ignored_shorts.txt. These contain a list of pairs that bots were not generated for because of minimum order value requirements. These are not used by any scripts, they’re only there for your reference.
Enable Your 3Commas Bots for Trading
Sadly, it seems when a bot is created via the API it is by default not enabled. Enabling all the bots manually in 3Commas is not all that difficult, but since we have the list of bot id’s, we can do it via a script.
Py3c_update.py script. The script again checks for existing bot id files and will abort if none are found. Since you already created those in the previous section, you’ll be presented with three choices. Choose the Enable all bots option by typing in the number 2 and hitting enter.
The script will call up each bot and enable it, showing the progress on the screen and when it’s complete.
Start The Money Printing Machine!
If the above is setup as intended and no errors were encountered, you can run the main script using the command:
This script will show in the terminal window it’s running, and what it’s doing. Initially, it will spend some time collecting prices, then start sending deal start signals to your 3Commas bots. And that’s it! Sit back and watch the machine run! Occasionally the script will stop running, if the API connection is down – it happens sometimes, so just restart the script and it will continue where it left off. I’ve already configured an error catch for short downtimes and will be adding this in a future version of the script.
If you do run into errors trying to get the script to run, go through the setup again, and google your error – you’ll be surprised at how many solutions are already out there for your exact search. Lastly, drop a comment below and I’ll try to respond as soon as possible.
This is really the start of this journey. There’s still a bunch of stuff to cover, like….
Will the Python Script Run When I Turn Off My Computer?
Yes, yes it will. The script will stop running when you turn off your computer, it goes to sleep, you lose your internet connection, etc, even for a moment.
For now, run the script on your computer for testing and getting the bot setup and working. It’s a great way to get familiar with editing the config file and understanding how it works.
In another post, I’ll show you how to set this up on the cloud (Virtual Machine) so it can run 24/7, and you can safely turn your PC off at night.
What 3Commas Bot Settings Should I Use?
I’ll cover this as well in a future post. For this particular bot, because we’re just chasing volatility, there’s no real best setting here. Ideally, an all-around type of setting works best, ie one with enough safety orders built in to capture the wild swings, while keeping our win rate times risk-reward high enough, and taking a moderate profit level.
I’ll also write another post on the best 3Commas bot settings to use in a trending market. I’ll add this since it will be perfect for the next python script I’m writing that will trigger based on coins or tokens that are in a trend. With this bot, we’ll want to maximize the amount our bot uses upfront to capture as much profit as possible while maintaining a smaller level of safety orders. I’ve run tests on these settings before, and they truly outperform the typical bot settings. Anyways, stay tuned for that coming up soon.
Don’t Miss What’s Coming Up Next!
Stay up to date on all the posts and how-to’s, Subscribe!