Trading bot running on Bybit and Binance Futures

Passivbot is a cryptocurrency trading bot written in Python, intended to require minimal user intervention.
It is observed that prices in a market will fluctuate up and down, creating opportunities for capitalizing on the noise.
The bot’s purpose is to automate the harvest.

It operates on spot or futures markets by listening to websocket stream of live trades, automatically creating and cancelling limit buy and sell orders.

Because passivbot’s live behavior is deterministic, it may be simulated on historical price data, using the included backtester.
Also included is an optimizer, which finds better configurations by iterating thousands of backtests with different candidates.
The bot can be controlled via Telegram.

The strategy is integrated — the bot only needs a predefined configuration to run.

Binance Futures Trading Bot
Binance Futures Trading Bot


  • Python >= 3.8
  • requirements.txt dependencies

Pre-optimized configurations

A number of pre-optimized configurations for Passivbot can be found at https://github.com/JohnKearney1/PassivBot-Configurations.


For more detailed information about Passivbot, see documentation on https://www.passivbot.com

See also https://www.futuresboard.xyz/guides.html

Futures Trading Bot Guide

To start trading Futures you need 1) Futures account on Binance 2) Create API keys for Futures account and set up a Futures access point on TradeSanta 3) Be a Maximum plan subscriber.

Here’s a guide to Futures automated trading via TradeSanta

1. Create a Futures access point on Binance. To do that:

a. Create a futures account

b. Transfer the amount of money you want to trade to Futures wallet

c. Create API new API keys and copy the credentials

d. Click on the edit restriction button, check Futures trading and click save. Make sure your Futures trading is set to one-way mode, not hedge mode (hedge mode is not supported by TradeSanta bots).

2. Create a new access point on TradeSanta the usual way

3. To create your first Futures bot you need to be a Maximum plan subscriber.

4. Create a bot

a. Choose a Futures access point, a pair to trade and predicted price direction (long or short).

b. The bot works like a spot DCA bot. Set up the bot as usual. You will see a new parameter – Leverage which specifies how much money you will borrow. Before setting up a leverage make sure that you have enough collateral to take it. The bigger the leverage the smaller position would be available to you. If this amount of leverage is not available, the bot won’t start.

c. The order volume is calculated as the amount with leverage

d. Calculator below will show you how much you need to have in your wallet to start the deal with the chosen setting. The bigger the leverage, the smaller the sum you need to place the same order volume

e. Note, you can only create 1 bot for each pair.

f. Only USDT M Futures are available for bot trading for now nd only one-way mode is supported. If you set hedge mode on Binance Futures the bot will not start trading, so please make sure you have one-way mode on.

5. Bot trading

a. The Futures bot stats are the same as for a spot bot. It contains the same parameters such as Unrealized and Realized Profit, Unsold volume, price chart and orders placed.

b. Please note that whenever the bot places a new Extra order, the amount of Margin balance needed to keep positions open will go up. The position will be liquidated and the bot will stop once Margin ratio reaches 100%. Keep an eye on the exchange to check your current margin ratio.

c. Realized profit takes into account commission, but doesn’t not include funding fee.

To learn more about Futures trading on Binance, you might want to checkout the following guides:


To-Do list: (suggest something and I’ll add it)

  • Add option to overwrite saved price data so you don’t have to manually delete the old data.
  • Maybe Provide a standard bot strategy for Bot…
  • GUI if people were interested (could take a while I’ve no experience here)
  • Speed up Data Set aligner in Backtester with multiprocessing


Technical Analysis driven Crypto Trading bot on Binance Futures

  • Utilizes python-Binance Client to execute orders and pull data from Binance
  • Utilizes ta library for Technical indicators
  • Write your own functions/classes to implement your TA strategies.
  • There is no default Strategy implemented you must do this in Data_Set.py as specified below.
  • Comes with some pre-coded strategies found in TradingStrats.py
  • If you enjoy the repo please share it around to friends & tweet about it using the tweet button above
    or Buy me a Coffee
  • Min version = python 3.7

Binance Setup

  • Create a Binance Account (This link uses my referral which gives you 5% kickback on trades & would be greatly appreciated)
  • Enable Two-factor Authentication in the security section to keep your crypto safe.
  • Create a new API key under the API Management section.
  • [] Read Info [] Enable Trading [] Enable Futures [X] Enable Withdrawals
  • Whitelist your IP address to further secure your account, and so that your API keys don’t expire after 1 month.
  • Fill in your api keys into api_secret and api_key in API_keys.py.