Freqtrade 3commas wrapper for python

Overview

Freqtrade 3commas wrapper

The aim of this project is to provide an easy way to integrate freqtrade with 3commas. The main reason someone would want to do this is to use the auto DCA feature that 3commas provides and unfortunately freqtrade lacks.

DCA can be risky, especially if used on bad/shit/meme coins, so please use responsibly.

Setup in 3commas

Make a 3commas account and bot

First, you'll need to create a 3commas account and connect 3commas to your exchange. Then create a multi-pair long bot with the pairs you want to trade. Here you could actually select all pairs (eg. USDT_ALL) and make the more exact pair selection in freqtrade. Note, if you're going to use VolumePairList, you will need to select all the pairs in 3commas.

create a multi-pair long bot

Next set the Deal start condition to Manual/API

After electing the pairs, set your order amounts, safety orders and take profit settings. There are plenty of YouTube tutorials explaining what these are.

Once you're happy with the settings click Create bot

We will also need to write down the bot_id, this can be found in the API example or URL when looking at the bot.

get the bot id

Now we can start the bot. Since the bot is set to Manual, it won't make any trades.

3commas API

In order to control the 3commas bot with freqtrade we'll need an API key and secret.

You can get these by going to https://3commas.io/api_access_tokens and creating a new API key with BotsRead and BotsWrite

Save the key and secret, we'll need them later.

Freqtrade setup

Freqtrade has excellent documentation available at https://www.freqtrade.io/en/stable/

Follow the tutorial to get started.

Add 3commas credential to config.json

Once you've created a freqtrade configuration, you should have a file called config.json Open it in your favorite editor and add the following in the json root:

"3commas": {
	"key": "3commas_key_goes_here",
	"secret": "3commas_secret_goes_here",
	"bot_id": 123456
},

Fill that with the 3commas credentials and bot_id from the previous steps and your config.json should look something like this:

3commas json config

Add the wrapper

Now you'll need to download the 3commas wrapper in the user_data directory

wget https://raw.githubusercontent.com/AlexBabescu/freqtrade_3commas/master/user_data/freqtrade3cw.py

The wrapper depends on the py3cw package. You will need to install it with:

pip install py3cw

If you are a Docker user, please refer to the freqtrade documentation on how to add additional packages in the freqtrade container - https://www.freqtrade.io/en/stable/docker_quickstart/#additional-dependencies-with-docker-compose

Using the wrapper in a strategy

All you need is to import Freqtrade3cw into your strategy and decorate the populate_buy_trend method.

....
from user_data.freqtrade3cw import Freqtrade3cw

class SampleStrategy(IStrategy):
	....

	@Freqtrade3cw.buy_signal
	def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
		....

Starting freqtrade

Freqtrade should be configured to run in dry-mode on the same exchange as your 3commas bot. If you are going to use VolumePairList then you must set your 3commas bot to use all the pairs.

Limitations and future work

Currently this only supports sending buy signals.

TODO:

  • send sell signals
  • turn this into a python package

If you have any questions you can find me on discord at alb#1349

Have fun!

Owner
Alex Babescu
Alex Babescu
Make your Pass (sanitaire) Fun Again

Make Your Pass (Sanitaire) Fun Again Customize your Pass Sanitaire (French name for EU digital Covide19 Certificate) with colors and images, thus make

101 Dec 01, 2022
Image Tooᥣs Bot I specialize for logo design Services with Amazing logo Creator Platform and more tools

Image Tooᥣs Bot I specialize for logo design Services with Amazing logo Creator Platform and more tools

Sz Team Bots <sz/>✌️ 10 Oct 21, 2022
Grape - A webbrowser with its own Search Engine

Grape 🔎 A Web Browser made entirely in python. Search Engine 🔎 Installation: F

Grape 2 Sep 06, 2022
The programm for collecting data from Tinkoff API and building Excel table.

tinkproject The program for portfolio analysis via Tinkoff API Hello! This is my first project, please, don't judge me. This project was developed for

214 Dec 02, 2022
TORNADO CASH Pancakeswap Sniper BOT 2022-V1 (MAC WINDOWS ANDROID LINUX)

TORNADO CASH Pancakeswap Sniper BOT 2022-V1 (MAC WINDOWS ANDROID LINUX)

Crypto Trader 1 Jan 06, 2022
Very Sempil Bot Auto Filter bot

SAMANTHA_BOT Very Sempil Bot Auto Filter bot ##[ # 𝐂𝐋𝐈𝐂𝐊 𝐁𝐄𝐋𝐎𝐖 𝐈𝐌𝐀𝐆𝐄 𝐓𝐎 𝐃𝐄𝐏𝐋𝐎𝐘 👇 👇 👇 Auto Filter Manuel Filter IMDB Admin Co

DARK WEBLOAD 3 Jun 27, 2022
Python wrapper for Revolt API

defectio is a direct implementation of the entire Revolt API and provides a way to authenticate and start communicating with Revolt servers. Similar interface to discord.py

Leon Bowie 26 Sep 18, 2022
Telegram RAT written in Python

teleRAT Python based RAT that uses Telegram for sending commands and receiving data to and from a victim computer. Setup.py Insert your API key into t

96 Jan 01, 2023
Make a command interpreter that manages AirBnb objects

AirBnB Clone Project Description This is part 1 of our AirBnb Clone project. The purpose of this project is to make a command interpreter that manages

Firdaus H. Salim 1 Nov 14, 2021
Client to allow skytrack to be used with GSPro Golf simulator application

Skytrack Interface for GSPro A Basic Interface connection from Skytrack Launch Monitors to be able to play simulator golf via GSPro About The Project

James Peruggia 2 Oct 24, 2021
Обертка для мини-игры "рабы" на python

Slaves API Библиотека для игры Рабы на Python. Большая просьба Поставьте звездочку на репозиторий. Это много для меня значит. Версии Т.к. разработчики

Zdorov Philipp 13 Mar 31, 2021
Library for working with QIWI API.

Library for working with QIWI API.

qxtony 2 Apr 26, 2022
An API or getting Optifine VersionsList/Version/Download-URL.

Optifine-API An API for getting Optifine VersionsList/Versions/Download-URL. Table of contents Get Versions List Get Specify Versions Download Optifin

2 Dec 04, 2022
Auto-commiter - Auto commiter Github

auto committer Github Follow the steps below to use this repository: 1-install c

Arman Ebtekari 8 Nov 14, 2022
A cs:go cheat/hack made in Python3.

Atomic 💖 Cheat for cs:go written in Python. Features. Glow Esp No Flash Bunny Hop Third Person To-Do. It is prefered to start the cheat when you are

Sofia 6 Feb 12, 2022
A Python Module That Uses ANN To Predict A Stocks Price And Also Provides Accurate Technical Analysis With Many High Potential Implementations!

Stox ⚡ A Python Module For The Stock Market ⚡ A Module to predict the "close price" for the next day and give "technical analysis". It uses a Neural N

Dopevog 31 Dec 16, 2022
A Telegram UserBot to Play Radio in Voice Chats. This is also the source code of the userbot which is being used for playing Radio in @AsmSafone Channel.

Telegram Radio Player UserBot A Telegram UserBot to Play Radio in Channel or Group Voice Chats. This is also the source code of the userbot which is b

SAF ONE 44 Nov 12, 2022
Telegram Bot to learn English by words and more.. ( in Arabic )

Get the mp3 files Extract the mp3.rar on the same file that bot.py on install requirements pip install -r requirements.txt #Then enter you bot token

Plugin 10 Feb 19, 2022
🛒 Bot de lista de compras compartilhada para o Telegram

Lista de Compras Lista de compras de Cuducos e Flávia. Comandos do bot Comando Descrição /add item Adiciona item à lista de compras /remove item

Eduardo Cuducos 4 Jan 15, 2022
A simple fun discord bot using discord.py that can post memes

A simple fun discord bot using discord.py * * Commands $commands - to see all commands $meme - for a random meme from the internet $cry - to make the

Dice Flip 2 Dec 20, 2021