Python Crypto Bot

Overview

Docker Tests

Python Crypto Bot v4.0.3 (pycryptobot)

Join our chat on Telegram

https://t.me/joinchat/09hYKfelbRY2MDNk

Supporting The Project

I get paid to write on Medium. Readers following me, applauding and commenting on my articles, all helps with my earnings. I provided this bot to all of you for free and actively developing it. One way you can support my efforts is to follow me on Medium and read my articles. The Medium subscription is $5 a month (roughly £3) so basically nothing in terms of the value you are getting from the bot. Your efforts here would be greatly appreciated!

Follow me on Medium for updates!

https://whittle.medium.com

Python Crypto Bot (PyCryptoBot)

https://medium.com/coinmonks/python-crypto-bot-pycryptobot-b54f4b3dbb75

What’s new in PyCryptoBot 2?

https://medium.com/coinmonks/whats-new-in-pycryptobot-2-a4bbb1b0c90e

PyCryptoBot with Telegram

https://medium.com/coinmonks/pycryptobot-with-telegram-83eed5f230c2

PyCryptoBot Results and Config

https://medium.com/coinmonks/pycryptobot-results-and-config-57fb6625a6d9

Coinbase Pro Portfolio Tracker

https://medium.com/coinmonks/coinbase-pro-portfolio-tracker-a6e4a1c6b8f8

TradingView.com Charts

https://levelup.gitconnected.com/tradingview-com-charts-36a49c9f77ea

Optional Add-on

Coinbase Pro Portfolio Tracker

https://github.com/whittlem/coinbaseprotracker

An all-in-one view of all your Coinbase Pro portfolios. Highly recommended if running multiple bots and keeping track of their progress.

Prerequisites

  • When running in containers: a working docker/podman installation

  • Python 3.9.x installed -- https://installpython3.com (must be Python 3.9 or greater)

    % python3 --version

    Python 3.9.1

  • Python 3 PIP installed -- https://pip.pypa.io/en/stable/installing

    % python3 -m pip --version

    pip 21.0.1 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)

Installation

Manual

% git clone https://github.com/whittlem/pycryptobot
% cd pycryptobot
% python3 -m pip install -r requirements.txt

Container

Install Docker Desktop
https://docs.docker.com/desktop

From Github image repo

% docker pull ghcr.io/whittlem/pycryptobot/pycryptobot:latest
latest: Pulling from whittlem/pycryptobot/pycryptobot
8f403cb21126: Pull complete
65c0f2178ac8: Pull complete
1091bd628216: Pull complete
cb1eb04426a4: Pull complete
ec065b94ad1c: Pull complete
Digest: sha256:031fd6c7b7b2d08a743127e5850bc3d9c97a46e02ed0878f4445012eaf0619d3
Status: Downloaded newer image for ghcr.io/whittlem/pycryptobot/pycryptobot:latest
ghcr.io/whittlem/pycryptobot/pycryptobot:latest

Local repo

% docker build -t pycryptobot .

Additional Information

The "requirements.txt" was created with python3 -m pip freeze

Run it

Manual

% python3 pycryptobot.py 
   

   

Docker (Option 1)

Example Local Absolute Path: /home/example/config.json
Example Market: BTC-GBP

Daemon:
% docker run --name BTC-GBP -v /home/example/config.json:/app/config.json -d ghcr.io/whittlem/pycryptobot/pycryptobot:latest 
   
    

Example:
% docker run --name BTC-GBP -v /Users/whittlem/Documents/Repos/Docker/config.json:/app/config.json -d ghcr.io/whittlem/pycryptobot/pycryptobot:latest --live 0
e491ae4fdba28aa9e74802895adf5e856006c3c63cf854c657482a6562a1e15

Interactive:
% docker run --name BTC-GBP -v /home/example/config.json:/app/config.json -it ghcr.io/whittlem/pycryptobot/pycryptobot:latest 
    
     

List Processes:
% docker ps

Example:
% docker ps
CONTAINER ID   IMAGE                                             COMMAND                  CREATED          STATUS          PORTS     NAMES
e491ae4fdba2   ghcr.io/whittlem/pycryptobot/pycryptobot:latest   "python3 pycryptobot…"   46 seconds ago   Up 44 seconds             BTC-GBP

Container Shell:
% docker exec -it BTC-GBP /bin/bash
[[email protected] app]#

Build your own image (if necessary):
docker build -t pycryptobot_BTC-GBP .

Running the docker image:
docker run -d --rm --name pycryptobot_BTC-GBP_container pycryptobot_BTC-GBP

    
   

Typically I would save all my settings in the config.json but running from the command line I would usually run it like this.

% python3 pycryptobot.py --market BTC-GBP --granularity 3600 --live 1 --verbose 0 --selllowerpcnt -2

docker-compose (Option 2)

To run using the config.json in template folder,

% docker-compose up -d

By default, docker-compose will use the config inside ./market/template. We provide this as a template for any market config.

For each market you want to trade, create a copy of this folder under market. Also create either a coinbase.key or binance.key file to each folder depending which trading platform is being used. For example, if you are trading BTCEUR and ETHEUR your market folder should look like this:

├── market
│ ├── BTCEUR
│ │ ├── config.json
│ │ ├── pycryptobot.log
│ │ └── graphs
│ └── ETHEUR
│   ├── config.json
│   ├── pycryptobot.log
│   └── graphs

modify docker-compose.yaml

version: "3.9"

services:
  btceur:
    build:
      context: .
    container_name: btceur
    volumes:
      - ./market/BTCEUR/coinbase.key:/app/coinbase.key.json
      - ./market/BTCEUR/config.json:/app/config.json
      - ./market/BTCEUR/pycryptobot.log:/app/pycryptobot.log
      - ./market/BTCEUR/graphs:/app/graphs
      - /etc/localtime:/etc/localtime:ro
    environment:
      - PYTHONUNBUFFERED=1
    deploy:
      restart_policy:
        condition: on-failure

  etheur:
    build:
      context: .
    container_name: etheur
    volumes:
      - ./market/ETHEUR/coinbase.key:/app/coinbase.key.json
      - ./market/ETHEUR/config.json:/app/config.json
      - ./market/ETHEUR/pycryptobot.log:/app/pycryptobot.log
      - ./market/ETHEUR/graphs:/app/graphs
      - /etc/localtime:/etc/localtime:ro
    environment:
      - PYTHONUNBUFFERED=1
    deploy:
      restart_policy:
        condition: on-failure

Run all your bots. Note that each market should have it's own config. Graphs will be saved on each market's folder.

% docker-compose up -d

Kubernetes (Helm) (Option 3)

There is a helm chart available in this repo. It will create your config.json as a configmap and the binance/coinbase keys as secrets, and mount them into the Pod. To run pycryptobot as a Kubernetes deployment, create your helm values as yaml in the following format (do not change the path to the api_key_file):

", "client_id" : " ", } } coinbasepro_key: | XXXXXXXXXXXXXXXXXXXX YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY zzzzzzzzzzzz ">
config: >
    {
        "coinbasepro": {
            "api_url": "https://api.pro.coinbase.com",
            "config": {
                "base_currency": "ETH",
                "quote_currency": "EUR",
                "live": 1,
                "sellatloss": 0,
                "disablelog": 1,
                "autorestart": 1
            },
            "api_key_file": "/app/keys/coinbasepro.key"
        },
        "telegram" : {
            "token" : "
    
     ",
            "client_id" : "
     
      ",
        }
    }

coinbasepro_key: |
    XXXXXXXXXXXXXXXXXXXX
    YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
    zzzzzzzzzzzz

     
    

Or, for binance:

", "client_id" : " ", } } binance_key: | XXXXXXXXXXXXXXXXXXXX YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY ">
config: >
    {
        "binance": {
            "api_url": "https://api.binance.com",
            "config": {
                "base_currency": "ETH",
                "quote_currency": "EUR",
                "live": 1,
                "sellatloss": 0,
                "disablelog": 1,
                "autorestart": 1
            },
            "api_key_file": "/app/keys/binance.key"
        },
        "telegram" : {
            "token" : "
    
     ",
            "client_id" : "
     
      ",
        }
    }

binance_key: |
    XXXXXXXXXXXXXXXXXXXX
    YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY

     
    

Or, for kucoin:

", "client_id" : " ", } } kucoin_key: | XXXXXXXXXXXXXXXXXXXX YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY zzzzzzzzzzzz ">
config: >
    {
        "kucoin": {
            "api_url": "https://api.kucoin.com",
            "config": {
                "base_currency": "ETH",
                "quote_currency": "EUR",
                "live": 1,
                "sellatloss": 0,
                "disablelog": 1,
                "autorestart": 1
            },
            "api_key_file": "/app/keys/coinbasepro.key"
        },
        "telegram" : {
            "token" : "
    
     ",
            "client_id" : "
     
      ",
        }
    }

kucoin_key: |
    XXXXXXXXXXXXXXXXXXXX
    YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
    zzzzzzzzzzzz

     
    

Or both:

", "client_id" : " ", } } coinbasepro_key: | XXXXXXXXXXXXXXXXXXXX YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY zzzzzzzzzzzz binance_key: | XXXXXXXXXXXXXXXXXXXX YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY kucoin_key: | XXXXXXXXXXXXXXXXXXXX YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY zzzzzzzzzzzz ">
config: >
    {
        "coinbasepro": {
            "api_url": "https://api.pro.coinbase.com",
            "config": {
                "base_currency": "ETH",
                "quote_currency": "EUR",
                "live": 1,
                "sellatloss": 0,
                "disablelog": 1,
                "autorestart": 1
            },
            "api_key_file": "/app/keys/coinbasepro.key"
        },
        "binance": {
            "api_url": "https://api.binance.com",
            "config": {
                "base_currency": "ETH",
                "quote_currency": "EUR",
                "live": 1,
                "sellatloss": 0,
                "disablelog": 1,
                "autorestart": 1
            },
            "api_key_file": "/app/keys/binance.key"
        },
        "kucoin": {
            "api_url": "https://api.kucoin.com",
            "config": {
                "base_currency": "ETH",
                "quote_currency": "EUR",
                "live": 1,
                "sellatloss": 0,
                "disablelog": 1,
                "autorestart": 1
            },
            "api_key_file": "/app/keys/kucoin.key"
        },
        "telegram" : {
            "token" : "
    
     ",
            "client_id" : "
     
      ",
        }
    }

coinbasepro_key: |
    XXXXXXXXXXXXXXXXXXXX
    YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
    zzzzzzzzzzzz
binance_key: |
    XXXXXXXXXXXXXXXXXXXX
    YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
kucoin_key: |
    XXXXXXXXXXXXXXXXXXXX
    YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
    zzzzzzzzzzzz

     
    

Then run:

git clone https://github.com/whittlem/pycryptobot
cd pycryptobot/chart
helm upgrade -i pycryptobot-eth-eur -f 
   

   

So if you created above helm values file as config-eth-eur.yaml, you would run:

helm upgrade -i pycryptobot-eth-eur -f config-eth-eur.yaml

Bot mechanics

Smart switching:

  • If the EMA12 is greater than the EMA26 on the 1 hour and 6 hour intervals switch to start trading on the 15 minute intervals
  • If the EMA12 is lower than the EMA26 on the 1 hour and 6 hour intervals switch back to trade on the 1 hour intervals
  • If a "granularity" is specified as an argument or in the config.json then smart switching will be disabled
  • Force smart switching between 1 hour and 15 minute intervals with "smartswitch" argument or config option (1 or 0)

Buy signal:

  • EMA12 is currently crossing above the EMA26 and MACD is above the Signal OR MACD is currently crossing above the Signal and EMA12 is above the EMA26
  • Golden Cross (SMA50 is above the SMA200) <-- bull market detection
  • On-Balance Volume Percent > -5 <-- suitable momentum required
  • Elder Ray Buy is True <-- bull market detection

The bot will only trade in a bull market to minimise losses! (you can disable this)

Special buy cases:

  • "nobuynearhighpcnt" to specify the percentage from high that the bot should not buy if "disablebuynearhigh" is not specified.

Sell signal:

  • EMA12 is currently crossing below the EMA26
  • MACD is below the Signal

Special sell cases:

  • "buymaxsize" specifies a fixed max amount of the quote currency to buy with
  • "nosellminpcnt" specifies the lower margin limit to not sell above
  • "nosellmaxpcnt" specifies the upper margin limit to not sell below
  • If "sellatloss" is on, bot will sell if price drops below the lower Fibonacci band
  • If "sellatloss" is on and "selllowerpcnt" is specified the bot will sell at the specified amount E.g. -2 for -2% margin
  • If "sellatloss" is on and "trailingstoploss" is specified the bot will sell at the specified amount below the buy high
  • If "sellupperpcnt" is specified the bot will sell at the specified amount E.g. 10 for 10% margin (Depending on the conditions I lock in profit at 3%)
  • If the margin exceeds 3% and the price reaches a Fibonacci band it will sell to lock in profit
  • If the margin exceeds 3% but a strong reversal is detected with negative OBV and MACD < Signal it will sell
  • "sellatloss" set to 0 prevents selling at a loss

Optional Options

--stats                             Display order profit and loss (P&L) report
--autorestart                       Automatically restart the bot on error
--sellatresistance                  Sells if the price reaches either resistance or Fibonacci band

Disabling Default Functionality

--disablebullonly                   Disable only buying in bull market
--disablebuynearhigh                Disable buying within 3% of the dataframe high
--disablebuymacd                    Disable macd buy signal
--disablebuyema                     Disable ema buy signal.If both core indicators ema and macd buy signals are disabled, bot won't buy.Doesn't affect sell strategy.
--disablebuyobv                     Disable obv buy signal
--disablebuyelderray                Disable elder ray buy signal
--disablefailsafefibonaccilow       Disable failsafe sell on fibonacci lower band
--disablefailsafelowerpcnt          Disable failsafe sell on 'selllowerpcnt'
--disableprofitbankupperpcnt        Disable profit bank on 'sellupperpcnt'
--disableprofitbankfibonaccihigh    Disable profit bank on fibonacci upper band
--disableprofitbankreversal         Disable profit bank on strong candlestick reversal
--disabletelegram                   Disable sending telegram messages
--disablelog                        Disable writing log entries
--disabletracker                    Disable saving CSV on buy and sell events

"Sell At Loss" explained

The "sellatloss" option disabled has it's advantages and disadvantages. It does prevent any losses but also prevents you from exiting a market before a crash or bear market. Sometimes it's better to make an occasional small loss and make it up with several buys than be conservative and potentially lock a trade for weeks if not months. It happened to me while testing this with the last crash (after Elon's tweet!). Three of my bots did not sell while the profit dropped to -10 to -20%. It did bounce back and I made over 3% a trade with any losses but I also lost out of loads of trading opportunities. It's really a matter of preference. Maybe some markets would be more appropriate than others for this.

Live Trading

In order to trade live you need to authenticate with the Coinbase Pro or Binance APIs. This is all documented in my Medium articles. In summary you will need to include a config.json file in your project root which contains your API keys. If the file does not exist it will only work in test/demo mode.

Trading Simulation

--sim ['fast, fast-sample, slow-sample']   Sets simulation mode
--simstartdate                             Start date for sample simulation e.g '2021-01-15'
--simenddate                               End date for sample simulation or 'now'

simstartdate takes priority over simenddate if both are given

Simulation trades.csv

By default, when running a simulation, if there are any orders, a file called trades.csv with all BUYS and SELLS will be created.

With --tradesfile you can control the name and where file is stored, eg --tradesfile BTSUDC-trades.csv

API key / secret / password storage

From now on it's recommended NOT to store the credentials in the config file because people share configs and may inadvertently share their API keys within.

Instead, please, create binance.key or coinbase.key or kucoin.key (or use your own names for the files) and refer to these files in the config.json file as:

"api_key_file" : "binance.key"

Once you have done that, "api_key" and "api_secret" can be safely removed from your config file and you're free to share your configs without worrying of leaked credentials.

binance.key / conbase.key / kucoin.key examples

Actually it's pretty simple, these files are supposed to be a simple text files with the API key on the first line, API secret on the second line and in case of coinbase and kucoin, probably the API password on the third. No comments or anything else is allowed, just the long string of numbers:

0234238792873423...82736827638472
68473847745876abscd9872...8237642

(dots are used to indicate places where the strings were shortened)

config.json examples

Coinbase Pro basic (using smart switching)

{
    "api_url" : "https://api.pro.coinbase.com",
    "api_key_file" : "coinbase.key",
    "config" : {
        "cryptoMarket" : "BTC",
        "fiatMarket" : "GBP",
        "live" : 1,
        "sellatloss" : 0
    }
}

Coinbase Pro basic (specific granularity, no smart switching)

{
    "api_url" : "https://api.pro.coinbase.com",
    "api_key_file" : "coinbase.key",
    "config" : {
        "cryptoMarket" : "BCH",
        "fiatMarket" : "GBP",
        "granularity" : 3600,
        "live" : 1,
        "sellatloss" : 0
    }
}

Coinbase Pro only (new format)

{
    "coinbasepro" : {
        "api_url" : "https://api.pro.coinbase.com",
        "api_key_file" : "coinbase.key",
        "config" : {
            "base_currency" : "BTC",
            "quote_currency" : "GBP",
            "granularity" : "3600",
            "live" : 0,
            "verbose" : 0
        }
    }
}

Binance only (new format)

{
    "binance" : {
        "api_url" : "https://api.binance.com",
        "api_key_file" : "binance.key",
        "config" : {
            "base_currency" : "BTC",
            "quote_currency" : "ZAR",
            "granularity" : "1h",
            "live" : 0,
            "verbose" : 0
        }
    }
}

Kucoin (using smart switching)

{
    "api_url" : "https://api.kucoin.com",
    "api_key_file" : "kucoin.key",
    "config" : {
        "base_currency" : "BTC",
        "quote_currency" : "GBP",
        "live" : 1,
        "sellatloss" : 0
    }
}

Coinbase Pro, Binance and Kucoin (new format)

{
    "binance" : {
        "api_url" : "https://api.binance.com",
        "api_key_file" : "binance.key",
        "config" : {
            "base_currency" : "BTC",
            "quote_currency" : "ZAR",
            "granularity" : "1h",
            "live" : 0,
            "verbose" : 0
        }
    },
    "coinbasepro" : {
        "api_url" : "https://api.pro.coinbase.com",
        "api_key_file" : "coinbase.key",
        "config" : {
            "base_currency" : "BTC",
            "quote_currency" : "GBP",
            "granularity" : "3600",
            "live" : 0,
            "verbose" : 0
        }
    },
    "kucoin" : {
        "api_url" : "https://api.kucoin.com",
        "api_key_file" : "kucoin.key",
        "config" : {
            "base_currency" : "BTC",
            "quote_currency" : "GBP",
            "granularity" : "3600",
            "live" : 0,
            "verbose" : 0
        }
    }
}

All the "config" options in the config.json can be passed as arguments E.g. --market

Command line arguments override config.json config.

For telegram, add a piece to the config.json as follows:

", "client_id" : " " } ">
"telegram" : {
    "token" : "
    
     ",
    "client_id" : "
     
      "
}

     
    

You can use @botfather and @myidbot in telegram to create a bot with token and get a client id.

For configuring logger, add a piece to the config.json as follows: This is also default configuration of the logger, if no config is given and log is not disabled this configuration will apply.

"logger" : {
    "filelog": 1,
    "logfile": "pycryptobot.log",
    "fileloglevel": "DEBUG",
    "consolelog": 1,
    "consoleloglevel": "INFO"
}

"filelog" and "consolelog" can only get 1 (enable) or 0 (disable). "--disablelog" argument or "disablelog" config will disable to writing logfile as backwards compatibility. If you want to disable logging entirely, you can set "filelog" and "consolelog" to 0.

"logfile" is overriden by '--logfile' console argument. If '--logfile' used when running bot "logfile": "pycryptobot.log" line in config file will be ignored.

"fileloglevel" and "consoleloglevel" can get one of 'CRITICAL', 'ERROR', 'WARNING', 'INFO', 'DEBUG', 'NOTSET' For further detail in log levels: https://docs.python.org/3/library/logging.html#logging-levels

Multi-Market Trading

The bot can trade multiple markets at once. This is also documented in my Medium articles. The bot will execute buys using the full "quote currency" balance it has access too and it will sell the full "base currency" balance it has access too. In order to ring-fence your non-bot funds you should create another "Portfolio" in Coinbase Pro and assign API keys to it. That way you limit exposure. You can so something similar with Binance using sub-accounts but I believe you need to be a certain level to do this.

The way you trade multiple markets at once is create multiple Coinbase Pro portfolios for each each bot instance. You will then clone this project for additional bots with the relevant Portfolio keys (config.json).

I have 5 bots running at once for my Portfolios: "Bot - BTC-GBP", "Bot - BCH-GBP", "Bot - ETH-GBP", "Bot - LTC-GBP", and "Bot - XLM-EUR".

Assuming each bot has a config.json that looks similar to this (update the "cryptoMarket" and "fiatMarket" appropriately):

{
    "api_url" : "https://api.pro.coinbase.com",
    "api_key_file" : "coinbase.key"
    "config" : {
        "cryptoMarket" : "BTC",
        "fiatMarket" : "GBP",
        "live" : 1
        "selllowerpcnt" : -2
    }
}

The way I run my five bots is as follow:

BTC-GBP % rm pycryptobot.log; git pull; clear; python3 pycryptobot.py

BCH-GBP % rm pycryptobot.log; git pull; clear; python3 pycryptobot.py

ETH-GBP % rm pycryptobot.log; git pull; clear; python3 pycryptobot.py

LTC-GBP % rm pycryptobot.log; git pull; clear; python3 pycryptobot.py

XLM-EUR % rm pycryptobot.log; git pull; clear; python3 pycryptobot.py

Notice how I don't pass any arguments. It's all retrieved from the config.json but you can pass the arguments manually as well.

The merge from "binance" branch back into "main"

Some of you may have been helping test the new code for a few months in the "binance" branch. This is now merged back into the "main" branch. If you are still using the "binance" branch please carry out the following steps (per bot instance).

git reset --hard
git checkout main
git pull
python3 -m pip install -r requirements.txt

Please note you need to be using Python 3.9.x or greater. The previous bot version only required Python 3.x.

Stats Module

To keep track of the bots performance over time you can run the stats module. e.g.

python3 pycryptobot.py --stats

This will analyse all the completed buy/sell trade pairs to give stats on todays trades, the trades over the last 7 days, the trades over the last 30 days, and all-time trades.

An optional flag of --statstartdate can be given to ignore all trades that happened before a specified date. The date must be of the format: yyyy-mm-dd. e.g.

python3 pycryptobot.py --stats --statstartdate 2021-6-01

To get the stats from all your bots, another optional flag of --statgroup can be used. This takes a list of markets and merges the results into one output. e.g.

python3 pycryptobot.py --stats --statgroup BTCGBP ETHGBP ADAGBP

or via the config.json file e.g.

"config": {
    ....
    "stats": 1,
    "statgroup": ["BTCGBP", "ETHGBP", "ADAGBP"],
    ....
}

Note: --statgroup only accepts a group of markets if the quote currency (in this example GBP) is the same.

If you want more detail than the simple summary, add the optional flag --statdetail. This will print a more detailed list of the transactions. --statdetail can work in conjunction with --statstartdate and --statgroup.

Upgrading the bots

I push updates regularly and it's best to always be running the latest code. In each bot directory make sure you run this regularly.

git pull

I've actually included this in the examples in how to start the bot that will do this for you automatically.

Fun quick non-live demo

python3 pycryptobot.py --market BTC-GBP --granularity 3600 --sim fast --verbose 0

If you get stuck with anything email me or raise an issue in the repo and I'll help you sort it out. Raising an issue is probably better as the question and response may help others.

Enjoy and happy trading! :)

Issues
  • So what exchanges, markets, and config are you all using?

    So what exchanges, markets, and config are you all using?

    According to Github there are 333 of you regularly updating your bots. I'm glad you are finding it useful :)

    I was just curious how all of you are doing?

    1. Which exchange(s) are you using? Coinbase Pro, Binance, or both?
    2. How many bots are you running?
    3. How much are you trading per bot?
    4. Which markets are you trading?
    5. What config is working well for you?

    I'll start off...

    1. I'm using Coinbase Pro only
    2. I have 5 bots running (in case you didn't see Coinbase Pro now supports 10 portfolios!)
    3. Up until yesterday I was trading £500 per bot. When ever the bots have a successful trade I transfer the profits to my bank account. I increased this to £1500 a bot yesterday.
    4. I'm trading "ADA-GBP", "BCH-GBP", "BTC-GBP", "ETH-GBP", and "LTC-GBP". I was trading "XLM-EUR" but I found it too unreliable, too volatile for my liking. From my analysis ADA looks like a better option as it looks more stable and also more independent from Bitcoin and Ethereum.
    5. I'm actually trying out a new config from this morning. I have disabled "sellatloss" for a few weeks and it has been working really well for me. The change I made this morning was to "disablebullonly", "disablebuyobv", and "disablebuyelderray". The reason I disabled them is because they were there to prevent losses but I have "sellatloss" disabled so they are redundant with that on. I would rather be more liberal with my trades and trade more often. So I'm only using EMA crossovers and MACD with sell at loss disabled. I'll let you know how this works out.

    As an example my BTC-GBP config.json looks like this (with my keys removed):

    {
        "coinbasepro" : {
            "api_url" : "https://api.pro.coinbase.com",
            "api_key" : "",
            "api_secret" : "",
            "api_passphrase" : "",
            "config" : {
                "base_currency" : "BTC",
                "quote_currency" : "GBP",
                "live" : 1,
                "sellatloss" : 0,
                "disablebullonly" : 1,
                "disablebuyobv" : 1,
                "disablebuyelderray" : 1
            }
        },
        "telegram" : {
            "token" : "",
            "client_id" : ""
        }
    }
    
    documentation 
    opened by whittlem 44
  • Ignored buymaxsize

    Ignored buymaxsize

    Hi All,

    when the Bot was started it did not respect the buymaxsize present within the configurations and bought for the entire amount of the quote_currency.

    "config" : { "base_currency" : "ADA", "quote_currency" : "USDT", "buymaxsize": 500, .... }

    Regards.

    bug waiting help required 
    opened by TICLAB 25
  • Binance marketSell list indices must be integers or slices, not str

    Binance marketSell list indices must be integers or slices, not str

    Hi all, I just observed this message and the trade didn't happen:

    BNB balance before order: 0.2927 BUSD balance before order: 0.0 04-05-2021 00:33:51 Binance marketSell list indices must be integers or slices, not str BNB balance after order: 0.2927 BUSD balance after order: 0.0

    Running as:

                             Python Crypto Bot                                
    
               Release : v2.0.0 (commit: 6)                                   
    
              Bot Mode : LIVE - live trades using your funds!                 
           Bot Started : 2021-05-03 23:53:14.090838                           
    
          Sell At Loss : 1  --sellatloss 1                                    
     Sell At Resistance : True  --sellatresistance                            
       Trade Bull Only : True  --disablebullonly                              
         Buy Near High : True  --disablebuynearhigh                           
          Use Buy MACD : True  --disablebuymacd                               
           Use Buy OBV : True  --disablebuyobv                                
     Use Buy Elder-Ray : True  --disablebuyelderray                           
    Sell Fibonacci Low : True  --disablefailsafefibonaccilow
    Sell Fibonacci High : True  --disableprofitbankfibonaccihigh
    Candlestick Reversal : True  --disableprofitbankreversal                    
              Telegram : True  --disabletelegram                              
                   Log : True  --disablelog                                   
               Tracker : True  --disabletracker                               
    

    *** smart switch from granularity '1h' (1 hour) to '15m' (15 min) ***

    bug 
    opened by denissonpaz 23
  • Raspberry pi docker image armhf

    Raspberry pi docker image armhf

    Describe the bug When attempting to run the container from the image repository using the below settings it fails with the following errors down in the container logs. This suggests that I am attempting to run a x86/x64 image on an armhf system which is likely as I am using the one from the image repository hosted in this repo.

    I have also attempted to build the container for armhf and failed spectacularly. (see followup post in this report. )

    btcusd    | 2021-11-24T19:38:48.485305374Z standard_init_linux.go:228: exec user process caused: exec format error
    btcusd    | 2021-11-24T19:38:54.600144045Z standard_init_linux.go:228: exec user process caused: exec format error
    btcusd    | 2021-11-24T19:39:01.195989348Z standard_init_linux.go:228: exec user process caused: exec format error
    

    To Reproduce docker-compose.yml

    version: "3.9"
    
    services:
      btcusd:
        image: ghcr.io/whittlem/pycryptobot/pycryptobot:latest
        container_name: btcusd
        volumes:
          - ./market/binance.key:/app/keys/binance.key:ro
          - ./market/BTCBUSD/config.json:/app/config.json
          - ./market/BTCBUSD/pycryptobot.log:/app/pycryptobot.log
          - ./market/BTCBUSD/graphs:/app/graphs
          - /etc/localtime:/etc/localtime:ro
        environment:
          - PYTHONUNBUFFERED=1
        restart: always
    

    config.json

    {
        "binance": {
            "api_url": "https://api.binance.com",
            "config": {
                "base_currency": "BTC",
                "quote_currency": "BUSD",
                "live": 0,
                "sellatloss": 1,
                "disablelog": 0,
                "autorestart": 0,
                "enableinsufficientfundslogging": 1,
                "logbuysellinjson": 1,
                "graphs": 1,
                "websocket": 0,
                "stats": 0,
                "verbose": 1,
                "consolelog": 1,
                "consoleloglevel": "DEBUG"
            },
            "api_key_file": "/app/keys/binance.key"
        }
    }
    

    Expected behavior Docker container to run and start trading.

    Desktop (please complete the following information):

    • Raspberry pi Buster
    • Docker version 20.10.11, build dea9396
    opened by warrmr 19
  • Unified granularity

    Unified granularity

    Description

    Here the description of the issue: https://github.com/whittlem/pycryptobot/issues/203

    Fixes # (issue)

    Type of change

    Please make your selection.

    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [ ] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
    • [ ] This change requires a documentation update
    • [ ] This change requires a new dependency
    • [x] Code Maintainability / comments
    • [x] Code Refactoring / future-proofing

    How Has This Been Tested?

    Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

    Checklist:

    • [x] My code follows the style guidelines of this project
    • [x] I have performed a self-review of my own code
    • [ ] I have commented my code, particularly in hard-to-understand areas
    • [ ] I have made corresponding changes to the documentation
    • [x] My changes generate no new warnings
    • [ ] I have added pytest unit tests that prove my fix is effective or that my feature works
    • [x] New and existing unit tests pass locally with my changes
    • [ ] Any dependent changes have been merged and published in downstream modules
    • [x] I have checked my code and corrected any misspellings
    opened by dthevenin 19
  • Add container image build to repo

    Add container image build to repo

    This PR adds a Dockerfile and example docker-compose.yaml to allow for easier administration.

    In order to enable the build in your repo, you should:

    • create a PAT for your account (User > Settings > Developer settings > Personal Access Tokens) with the read and write package rights
    • put the token into a secret variable for this repo (Settings > secrets > New secret). Give it the name "PACKAGE_TOKEN" as this is configured in the github action
    • Change the visibility of the created "package" (User > Your Profile > Packages > pycryptobot/pycryptobot > Package settings > Change visibility

    It is a bit of work, but it makes usability a lot easier :)

    I also fixed all markdown-lint violations in the readme file.

    You can check the actual container that was built out of this: ghcr.io/lvlie/pycryptobot/pycryptobot:latest

    And I think the "action" log should also be visible as well: https://github.com/lvlie/pycryptobot/runs/2307818414?check_suite_focus=true

    opened by lvlie 18
  • Launch with error 'KeyError:

    Launch with error 'KeyError: "['specified_funds'] not in index"'

    Describe the bug Errors at launch. It only affects one of my 3 portfolios on startup, as the format doesn't confirm to the specc here: https://github.com/whittlem/pycryptobot/blob/d530ab7d59364acfd4322f47bfc5ee9af35fe289/models/CoinbasePro.py#L192

    To Reproduce Steps to reproduce the behavior:

    1. launch using python3 pycryptobot.py
    2. See error

    Error Log

    Traceback (most recent call last):
      File "pycryptobot.py", line 66, in <module>
        orders = account.getOrders(app.getMarket(), '', 'done')
      File "/home/pi/pycryptobot/BTC/models/TradingAccount.py", line 110, in getOrders
        self.orders = model.getOrders(market, action, status)
      File "/home/pi/pycryptobot/BTC/models/CoinbasePro.py", line 195, in getOrders
        df = resp.copy()[[ 'created_at', 'product_id', 'side', 'type', 'filled_size', 'specified_funds', 'executed_value', 'fill_fees', 'status' ]]
      File "/home/pi/.local/lib/python3.7/site-packages/pandas/core/frame.py", line 3030, in __getitem__
        indexer = self.loc._get_listlike_indexer(key, axis=1, raise_missing=True)[1]
      File "/home/pi/.local/lib/python3.7/site-packages/pandas/core/indexing.py", line 1265, in _get_listlike_indexer
        self._validate_read_indexer(keyarr, indexer, axis, raise_missing=raise_missing)
      File "/home/pi/.local/lib/python3.7/site-packages/pandas/core/indexing.py", line 1315, in _validate_read_indexer
        raise KeyError(f"{not_found} not in index")
    KeyError: "['specified_funds'] not in index"
    

    I've gone in to actually check the columns of resp, and it only contains the following:

    ['id', 'price', 'size', 'product_id', 'profile_id', 'side', 'type', 'time_in_force', 'post_only', 'created_at', 'done_at', 'done_reason', 'fill_fees', 'filled_size', 'executed_value', 'status', 'settled']
    

    Desktop (please complete the following information):

    • OS: Linux; Debian
    • Version: latest git pull as of 2.0.6

    Additional context Config file, aside from base_currency identical to working ones. :

    {
         "coinbasepro" : {
             "api_url" : "https://api.pro.coinbase.com",
             "api_key" : "...",
             "api_secret" : "...",
             "api_passphrase" : "...",
             "config" : {
                 "base_currency" : "BTC",
                 "quote_currency" : "USD",
                 "live" : 1,
                 "sellatloss" : 0,
                 "granularity": 60
             }
         },
         "telegram" : {
             "token" : "...",
             "client_id" : "..."
         }
    }
    
    bug 
    opened by tiems90 17
  • error when buying on binance

    error when buying on binance

    Hello

    i got an error message when attempting to buy Algo on binance this morning :

    2021-04-25 08:00:00 | ALGOUSDT 1h | Close: 1.15 | BUY

    ALGO balance before order: 0.0 USDT balance before order: 199.98 Order quantity after rounding and fees: 172.84 25-04-2021 10:47:14 Binance marketBuy APIError(code=-2010): Account has insufficient balance for requested action. ALGO balance after order: 0.0 USDT balance after order: 199.98

    as you can see, i had ~200 usdt in my acount thanks

    opened by delphsmith 17
  • Statsmodels and Pandas issue on Raspberry Pi

    Statsmodels and Pandas issue on Raspberry Pi

    An exception which causes the program to quit.

    On Raspberry Pi running bot from a Terminal screen. All dependencies were updated to the latest versions available and supported on the Raspberry Pi.

    Logger screen:

    /home/pi/.local/lib/python3.7/site-packages/statsmodels/tsa/base/tsa_model.py:583: ValueWarning: A date index has been provided, but it has no associated frequency information and so will be ignored when e.g. forecasting. ' ignored when e.g. forecasting.', ValueWarning) /home/pi/.local/lib/python3.7/site-packages/statsmodels/tsa/base/tsa_model.py:583: ValueWarning: A date index has been provided, but it has no associated frequency information and so will be ignored when e.g. forecasting. ' ignored when e.g. forecasting.', ValueWarning) /home/pi/.local/lib/python3.7/site-packages/statsmodels/tsa/base/tsa_model.py:583: ValueWarning: A date index has been provided, but it has no associated frequency information and so will be ignored when e.g. forecasting. ' ignored when e.g. forecasting.', ValueWarning) /home/pi/.local/lib/python3.7/site-packages/statsmodels/tsa/base/tsa_model.py:583: ValueWarning: A date index has been provided, but it has no associated frequency information and so will be ignored when e.g. forecasting. ' ignored when e.g. forecasting.', ValueWarning)

    Restarting application after exception: KeyError('The end argument could not be matched to a location related to the index of the data.')

    2021-06-15 05:00:00 | ETC-GBP | 3600 | Close: 41.9720 | ^ EMA12/26: 41.7507 > 41.4208 ^ | ^ MACD: 0.3298 > 0.3164 ^ | WAIT | Last Action: BUY | -26.1610% (delta: -14.305) /home/pi/.local/lib/python3.7/site-packages/statsmodels/tsa/base/tsa_model.py:583: ValueWarning: A date index has been provided, but it has no associated frequency information and so will be ignored when e.g. forecasting. ' ignored when e.g. forecasting.', ValueWarning) /home/pi/.local/lib/python3.7/site-packages/statsmodels/tsa/base/tsa_model.py:583: ValueWarning: A date index has been provided, but it has no associated frequency information and so will be ignored when e.g. forecasting. ' ignored when e.g. forecasting.', ValueWarning) ^[c/home/pi/.local/lib/python3.7/site-packages/statsmodels/tsa/base/tsa_model.py:583: ValueWarning: A date index has been provided, but it has no associated frequency information and so will be ignored when e.g. forecasting. ' ignored when e.g. forecasting.', ValueWarning) /home/pi/.local/lib/python3.7/site-packages/statsmodels/tsa/base/tsa_model.py:583: ValueWarning: A date index has been provided, but it has no associated frequency information and so will be ignored when e.g. forecasting. ' ignored when e.g. forecasting.', ValueWarning) KeyError('The end argument could not be matched to a location related to the index of the data.') Traceback (most recent call last): File "pandas/_libs/hashtable_class_helper.pxi", line 1039, in pandas._libs.hashtable.Int64HashTable.get_item KeyError: 1623744000000000000

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last): File "pandas/_libs/index.pyx", line 446, in pandas._libs.index.DatetimeEngine.get_loc KeyError: Timestamp('2021-06-15 08:00:00')

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last): File "/home/pi/.local/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 2897, in get_loc raise KeyError(key) from err KeyError: Timestamp('2021-06-15 08:00:00')

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last): File "/home/pi/.local/lib/python3.7/site-packages/pandas/core/indexes/datetimes.py", line 627, in get_loc raise KeyError(orig_key) from err KeyError: '2021-06-15 08:00:00'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last): File "/home/pi/.local/lib/python3.7/site-packages/statsmodels/tsa/base/tsa_model.py", line 170, in get_index_loc raise KeyError(str(e)) KeyError: 'only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last): File "/home/pi/.local/lib/python3.7/site-packages/statsmodels/tsa/base/tsa_model.py", line 333, in get_prediction_index raise KeyError('The end argument could not be matched to a' KeyError: 'The end argument could not be matched to a location related to the index of the data.'

    help required 
    opened by Olney1 16
  • Exception('GET (401) https://api.pro.coinbase.com/orders?status=done - request timestamp expired')

    Exception('GET (401) https://api.pro.coinbase.com/orders?status=done - request timestamp expired')

    This error occurs while executing the code about after 20mins

    2021-07-12 13:43:05 | BTC-EUR (BEAR) | 3600 | Current Price: 28200.93 Exception('GET (401) https://api.pro.coinbase.com/orders?status=done - request timestamp expired') Exception: GET (401) https://api.pro.coinbase.com/orders?status=done - request timestamp expired

    opened by SithX 14
  • Insufficient funds Coinbase Pro

    Insufficient funds Coinbase Pro

    Describe the bug Attempt to run bot and get an error message that there are no funds when I do have $100 available.

    To Reproduce Steps to reproduce the behavior:

    1. Run the bot command
    2. get the error message

    Expected behavior I was hoping that the bot would begin to run.

    Screenshots See below

    Desktop (please complete the following information): Raspberry Pi 4 Current code for bot from here Python 3

    I'm running into a similar issue: image

    After I ran the "...--lastaction SELL" I got this error message: image

    I think this is related to other issues but I'm not sure how or what to do to fix this.
    I'm attempting to start a bot for the first time using Coinbase Pro for DOT.

    user support 
    opened by dvpetta 14
  • Panda Error

    Panda Error

    I am a newby to python - can you please explain how to resolve the issue below please.


    c:\Crypto\Experiment\pycryptobot-main -Bitcoin\pycryptobot-main>python pycryptobot.py --live 1 Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\core\indexes\base.py", line 5845, in _raise_if_missing raise KeyError(f"{not_found} not in index") KeyError: "['created_at', 'market', 'action', 'type', 'size', 'filled', 'fees', 'price', 'status'] not in index"

    c:\Crypto\Experiment\pycryptobot-main -Bitcoin\pycryptobot-main>

    opened by asmaarm1 0
  • Telegram_bot not running after upgrade

    Telegram_bot not running after upgrade

    After upgrading from v6.0.0 to 6.3.0 I noticed that I can't run the telegram bot anymore. I could solve the issue by checking out to the beta branch. Nevertheless I am reporting the issue which others may also encounter.

    # python3.9 telegram_bot.py
    2022-05-04 18:05:34,498 - telegram.helper - INFO - Telegram Bot is listening
    Traceback (most recent call last):
      File "/home/h1/telegram_bot.py", line 922, in <module>
        main()
      File "/home/h1/telegram_bot.py", line 907, in main
        botconfig.setcommands(None, None)
      File "/home/h1/telegram_bot.py", line 260, in setcommands
        self.helper.send_telegram_message(
      File "/home/h1/models/telegram/helper.py", line 235, in send_telegram_message
        context.bot.send_message(
    AttributeError: 'Updater' object has no attribute 'send_message'
    ^CException ignored in: <module 'threading' from '/usr/lib/python3.9/threading.py'>
    Traceback (most recent call last):
      File "/usr/lib/python3.9/threading.py", line 1470, in _shutdown
        lock.acquire()
    

    System info: NAME="Ubuntu" VERSION="20.04.4 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian

    opened by hoseinit 1
  • Insufficient funds

    Insufficient funds

    Describe the bug I'm trying to understand why it's not returning the balance correctly. 2022-04-30 22:00:56 WARNING Insufficient Funds! (BTC=0.0, USD=0.0)

    To Reproduce Config file: { "coinbasepro": { "api_url": "https://api.pro.coinbase.com", "config": { "base_currency": "BTC", "quote_currency": "USD", "live": 1, "sellatloss": 1, "sellatresistance": 0, "trailingstoploss": -1.5, "trailingstoplosstrigger": 5, "nosellmaxpcnt": 3, "nosellminpcnt": -3, "disablebullonly": 0, "disablebuynearhigh": 1, "disablebuymacd": 0, "disablebuyobv": 1, "disablebuyelderray": 0, "disablefailsafefibonaccilow": 1, "disableprofitbankreversal": 0, "disabletracker": 1, "disabletelegram": 1, "autorestart": 0, "graphs": 1, "verbose": 1, "stats": 0, "enableinsufficientfundslogging": 1, "enabletelegrambotcontrol": 1, "websocket": 0, "disablelog": 0, "buypercent": 99, "sellpercent": 99, "buyminsize": 0, "sellsmartswitch": 0, "trailingbuypcnt": 0.5, "telegramtradesonly": 0, "granularity": "3600", "enableml": 0, "recvwindow": 20000 } }, "logger" : { "filelog": 1, "logfile": "pycryptobot.log", "fileloglevel": "DEBUG", "consolelog": 1, "consoleloglevel": "DEBUG" } }

    Any insight into what I can do to set it straight? I've tried --recvWindow 20000 and I've tried to make sure system time is synced. Those were the only fixes I could find from googling around. I also tried the beta branch to see if any update would help.

    Thanks.

    opened by cparsell 2
  • Python error when --sim is used

    Python error when --sim is used

    Describe the bug Error : 2022-03-10 23:45:00 | JASMYUSDT | 15m | Close: 0.0169 | BUY Resistance level of 0.0172 formed at 2022-03-10 21:15:00 Fibonacci Retracement Levels:{'ratio0_286': 0.01, 'ratio0': 0.01} TypeError("cannot concatenate object of type '<class 'dict'>'; only Series and DataFrame objs are valid")

    when i run simulation

    To Reproduce Steps to reproduce the behavior: python3 pycryptobot.py --market JASMYUSDT --live 0 --sim fast Expected behavior Result of the simulation

    Desktop (please complete the following information):

    • OS: Ubuntu 20.04.4 LTS
    • pycryptobot beta 6.2.0
    • python 3.9.5
    • pip 22.0.4
    opened by wtc0der 5
  • Buying not happening

    Buying not happening

    Describe the bug Buying is not happening with below configuration. Tried for hours but no luck. any help with config.json file is appreciated.

    config.json :

    "coinbasepro": { "api_url": "https://api.pro.coinbase.com", "api_key_file": "coinbasepro.key", "config" : { "autorestart": 1, "base_currency": "SHIB", "disablebullonly": 1, "disablebuyelderray": 1, "disablebuyema": 0, "disablebuymacd": 0, "disablebuynearhigh": 1, "disablebuyobv": 1, "disablefailsafefibonaccilow": 1, "disablelog": 0, "disabletracker": 1, "disableprofitbankreversal": 0, "enableinsufficientfundslogging": 1, "enabletelegrambotcontrol": 0, "live": 1, "logbuysellinjson": 1, "nobuynearhighpcnt": 4, "nosellmaxpcnt": 3, "nosellminpcnt": -3, "quote_currency": "USD", "sellatloss": 1, "sellatresistance": 0, "selllowerpcnt": -12, "trailingbuypcnt": 1, "trailingstoploss": -1.5, "trailingstoplosstrigger": 6, "websocket": 0 } }

    }

    terminal output:

                             Python Crypto Bot                               |
    

    | Release : v6.0.0 |

    | Bot Mode : LIVE - live trades using your funds! | | Bot Started : 2022-03-22 14:10:54.387212 | | Exchange : coinbasepro |

    | Sell Lower : -12.0% --selllowerpcnt | | No Sell Max : 3.0% --nosellmaxpcnt | | No Sell Min : -3.0% --nosellminpcnt | | Trailing Stop Loss : -1.5% --trailingstoploss | | Trailing Stop Loss Trg : 6.0% --trailingstoplosstrigger | | Sell At Loss : True --sellatloss | | Sell At Resistance : False --sellatresistance | | Trade Bull Only : False --disablebullonly | | Allow Buy Near High : False --disablebuynearhigh | | No Buy Near High Pcnt : 4.0% --nobuynearhighpcnt | | Use Buy MACD : True --disablebuymacd | | Use Buy EMA : True --disablebuyema | | Use Buy OBV : False --disablebuyobv | | Use Buy Elder-Ray : False --disablebuyelderray | | Sell Fibonacci Low : False --disablefailsafefibonaccilow | | Sell Lower Pcnt : True --disablefailsafelowerpcnt | | Candlestick Reversal : True --disableprofitbankreversal | | Telegram : True --disabletelegram | | Telegram trades only : False --telegramtradesonly | | Telegram error msgs : True --disabletelegramerrormsgs | | Log : True --disablelog | | Tracker : False --disabletracker | | Auto restart Bot : True --autorestart | | Web Socket : False --websocket | | Insufficient Funds Log : True --enableinsufficientfundslogging | | Log Buy and Sell order : True --logbuysellinjson | | Trailing Buy Percent : 1.0 --trailingbuypcnt |

    *** smart switch from granularity 3600 (1 hour) to 900 (15 min) *** 2022-03-22 18:00:00 | SHIB-USD | 900 | Close: 2.358e-05 | ^ EMA12/26: 0.00002 > 0.00002 ^ | v MACD: 0.00000 < 0.00000 v | WAIT | Last Action: SELL | DF HIGH: 2.535e-05 | DF LOW: 2.139e-05 | SWING: 18.51% | CURR Price is -6.98% away from DF HIGH | Range: 2022-03-10 07:00:00 <--> 2022-03-22 18:00:00 2022-03-22 18:11:56 | SHIB-USD | 900 | Current Price: 2.357e-05 | -7.02% from DF HIGH 2022-03-22 18:33:25 | SHIB-USD | 900 | Current Price: 2.351e-05 | -7.26% from DF HIGH 2022-03-22 18:34:25 | SHIB-USD | 900 | Current Price: 2.351e-05 | -7.26% from DF HIGH 2022-03-22 18:35:26 | SHIB-USD | 900 | Current Price: 2.354e-05 | -7.14% from DF HIGH 2022-03-22 18:36:29 | SHIB-USD | 900 | Current Price: 2.354e-05 | -7.14% from DF HIGH 2022-03-22 18:37:31 | SHIB-USD | 900 | Current Price: 2.353e-05 | -7.18% from DF HIGH 2022-03-22 18:38:31 | SHIB-USD | 900 | Current Price: 2.355e-05 | -7.1% from DF HIGH 2022-03-22 18:39:32 | SHIB-USD | 900 | Current Price: 2.355e-05 | -7.1% from DF HIGH 2022-03-22 18:40:35 | SHIB-USD | 900 | Current Price: 2.353e-05 | -7.18% from DF HIGH 2022-03-22 18:41:37 | SHIB-USD | 900 | Current Price: 2.353e-05 | -7.18% from DF HIGH 2022-03-22 18:42:38 | SHIB-USD | 900 | Current Price: 2.354e-05 | -7.14% from DF HIGH 2022-03-22 18:43:41 | SHIB-USD | 900 | Current Price: 2.355e-05 | -7.1% from DF HIGH 2022-03-22 18:44:42 | SHIB-USD | 900 | Current Price: 2.355e-05 | -7.1% from DF HIGH 2022-03-22 18:45:00 | SHIB-USD | 900 | Close: 2.354e-05 | v EMA12/26: 0.00002 < 0.00002 v | v MACD: -0.00000 < -0.00000 v | WAIT | Last Action: SELL | DF HIGH: 2.524e-05 | DF LOW: 2.246e-05 | SWING: 12.38% | CURR Price is -6.74% away from DF HIGH | Range: 2022-03-19 16:00:00 <--> 2022-03-22 18:45:00 2022-03-22 18:30:00 | SHIB-USD | 900 | Close: 2.355e-05 | v EMA12/26: 0.00002 < 0.00002 v | v MACD: -0.00000 < -0.00000 v | WAIT | Last Action: SELL | DF HIGH: 2.535e-05 | DF LOW: 2.246e-05 | SWING: 12.87% | CURR Price is -7.1% away from DF HIGH | Range: 2022-03-19 15:45:00 <--> 2022-03-22 18:30:00 2022-03-22 18:45:00 | SHIB-USD | 900 | Close: 2.354e-05 | v EMA12/26: 0.00002 < 0.00002 v | v MACD: -0.00000 < -0.00000 v | WAIT | Last Action: SELL | DF HIGH: 2.524e-05 | DF LOW: 2.246e-05 | SWING: 12.38% | CURR Price is -6.74% away from DF HIGH | Range: 2022-03-19 16:00:00 <--> 2022-03-22 18:45:00 2022-03-22 18:48:47 | SHIB-USD | 900 | Current Price: 2.354e-05 | -6.74% from DF HIGH 2022-03-22 18:49:49 | SHIB-USD | 900 | Current Price: 2.355e-05 | -6.7% from DF HIGH 2022-03-22 18:50:49 | SHIB-USD | 900 | Current Price: 2.356e-05 | -6.66% from DF HIGH 2022-03-22 18:51:50 | SHIB-USD | 900 | Current Price: 2.357e-05 | -6.62% from DF HIGH 2022-03-22 18:52:53 | SHIB-USD | 900 | Current Price: 2.357e-05 | -6.62% from DF HIGH 2022-03-22 18:53:49 | SHIB-USD | 900 | Current Price: 2.357e-05 | -6.62% from DF HIGH 2022-03-22 18:54:54 | SHIB-USD | 900 | Current Price: 2.357e-05 | -6.62% from DF HIGH 2022-03-22 18:55:55 | SHIB-USD | 900 | Current Price: 2.358e-05 | -6.58% from DF HIGH 2022-03-22 18:56:58 | SHIB-USD | 900 | Current Price: 2.36e-05 | -6.5% from DF HIGH 2022-03-22 18:57:58 | SHIB-USD | 900 | Current Price: 2.359e-05 | -6.54% from DF HIGH 2022-03-22 18:59:03 | SHIB-USD | 900 | Current Price: 2.36e-05 | -6.5% from DF HIGH 2022-03-22 19:00:03 | SHIB-USD | 900 | Current Price: 2.359e-05 | -6.54% from DF HIGH 2022-03-22 19:00:00 | SHIB-USD | 900 | Close: 2.36e-05 | v EMA12/26: 0.00002 < 0.00002 v | v MACD: -0.00000 < -0.00000 v | WAIT | Last Action: SELL | DF HIGH: 2.524e-05 | DF LOW: 2.246e-05 | SWING: 12.38% | CURR Price is -6.5% away from DF HIGH | Range: 2022-03-19 16:15:00 <--> 2022-03-22 19:00:00 2022-03-22 18:45:00 | SHIB-USD | 900 | Close: 2.36e-05 | v EMA12/26: 0.00002 < 0.00002 v | v MACD: -0.00000 < -0.00000 v | WAIT | Last Action: SELL | DF HIGH: 2.524e-05 | DF LOW: 2.246e-05 | SWING: 12.38% | CURR Price is -6.5% away from DF HIGH | Range: 2022-03-19 16:00:00 <--> 2022-03-22 18:45:00 2022-03-22 19:00:00 | SHIB-USD | 900 | Close: 2.363e-05 | v EMA12/26: 0.00002 < 0.00002 v | ^ MACD: -0.00000 > -0.00000 ^ | WAIT | Last Action: SELL | DF HIGH: 2.524e-05 | DF LOW: 2.246e-05 | SWING: 12.38% | CURR Price is -6.38% away from DF HIGH | Range: 2022-03-19 16:15:00 <--> 2022-03-22 19:00:00 2022-03-22 19:04:10 | SHIB-USD | 900 | Current Price: 2.364e-05 | -6.34% from DF HIGH 2022-03-22 19:05:10 | SHIB-USD | 900 | Current Price: 2.364e-05 | -6.34% from DF HIGH 2022-03-22 19:06:12 | SHIB-USD | 900 | Current Price: 2.363e-05 | -6.38% from DF HIGH 2022-03-22 19:07:14 | SHIB-USD | 900 | Current Price: 2.363e-05 | -6.38% from DF HIGH 2022-03-22 19:08:15 | SHIB-USD | 900 | Current Price: 2.368e-05 | -6.18% from DF HIGH 2022-03-22 19:09:15 | SHIB-USD | 900 | Current Price: 2.369e-05 | -6.14% from DF HIGH 2022-03-22 19:10:18 | SHIB-USD | 900 | Current Price: 2.367e-05 | -6.22% from DF HIGH 2022-03-22 19:11:22 | SHIB-USD | 900 | Current Price: 2.367e-05 | -6.22% from DF HIGH 2022-03-22 19:12:24 | SHIB-USD | 900 | Current Price: 2.369e-05 | -6.14% from DF HIGH 2022-03-22 19:13:24 | SHIB-USD | 900 | Current Price: 2.371e-05 | -6.06% from DF HIGH 2022-03-22 19:14:25 | SHIB-USD | 900 | Current Price: 2.371e-05 | -6.06% from DF HIGH 2022-03-22 19:15:00 | SHIB-USD | 900 | Close: 2.37e-05 | v EMA12/26: 0.00002 < 0.00002 v | ^ MACD: -0.00000 > -0.00000 ^ | WAIT | Last Action: SELL | DF HIGH: 2.524e-05 | DF LOW: 2.246e-05 | SWING: 12.38% | CURR Price is -6.1% away from DF HIGH | Range: 2022-03-19 16:30:00 <--> 2022-03-22 19:15:00 2022-03-22 19:00:00 | SHIB-USD | 900 | Close: 2.371e-05 | v EMA12/26: 0.00002 < 0.00002 v | ^ MACD: -0.00000 > -0.00000 ^ | WAIT | Last Action: SELL | DF HIGH: 2.524e-05 | DF LOW: 2.246e-05 | SWING: 12.38% | CURR Price is -6.06% away from DF HIGH | Range: 2022-03-19 16:15:00 <--> 2022-03-22 19:00:00 2022-03-22 19:17:32 | SHIB-USD | 900 | Current Price: 2.372e-05 | -6.02% from DF HIGH

    opened by subbu52 0
  • FileNotFoundError when using docker-compose

    FileNotFoundError when using docker-compose

    Following the exact steps as listed in the documentation for docker-compose with pycryptobot, I am getting a: FileNotFoundError: [Errno 2] No such file or directory: 'coinbase.key'

    This is my docker-compose.yml:

    version: "3.9"
    
    services:
      pycrypto:
          build:
            context: .
          container_name: btcusd
          volumes:
            - ./market/BTCUSD/coinbase.key:/app/coinbase.key.json
            - ./market/BTCUSD/config.json:/app/config.json
            - ./market/BTCUSD/pycryptobot.log:/app/pycryptobot.log
            - ./market/BTCUSD/graphs:/app/graphs
            - /etc/localtime:/etc/localtime:ro
          environment:
            - PYTHONUNBUFFERED=1
          deploy:
            restart_policy:
              condition: on-failure
    

    And my tree in the market folder:

    market
    ├── BTCUSD
    │   ├── coinbase.key
    │   ├── config.json
    │   ├── graphs
    │   └── pycryptobot.log
    └── template
        ├── config.json
        ├── graphs
        │   └── readme.txt
        └── pycryptobot.log
    

    The full error:

    Attaching to btcusd
    btcusd  | Traceback (most recent call last):
    btcusd  |   File "/app/models/config/coinbase_pro_parser.py", line 61, in parser
    btcusd  |     with open( api_key_file, 'r') as f :
    btcusd  | FileNotFoundError: [Errno 2] No such file or directory: 'coinbase.key'
    btcusd  | 
    btcusd  | During handling of the above exception, another exception occurred:
    btcusd  | 
    btcusd  | Traceback (most recent call last):
    btcusd  |   File "/app/models/config/coinbase_pro_parser.py", line 69, in parser
    btcusd  |     raise RuntimeError(f"Unable to read {api_key_file}")
    btcusd  | RuntimeError: Unable to read coinbase.key
    btcusd exited with code 1
    

    The command I entered: docker compose up -d Environment: Ubuntu 20.4 WSL with Docker Desktop on Windows 11 Latest pycryptobot version pulled from official branch (6.0.0)

    Config.json:

    {
        "coinbasepro": {
            "api_url": "https://api.pro.coinbase.com",
            "config": {
                "base_currency": "BTC",
                "quote_currency": "USD",
                "autorestart": 1,
                "live": 1,
                "sellatloss" : 1,
                "selllowerpcnt" : -10,
                "trailingstoploss" : -1.5,
                "sellatresistance" : 0,
                "disablebullonly" : 0,
                "disablebuynearhigh" : 1,
                "disablebuymacd" : 0,
                "disablebuyobv" : 0,
                "disablebuyelderray" : 0,
                "disablefailsafefibonaccilow" : 1,
                "disableprofitbankreversal" : 1,
                "disabletracker" : 1,
                "graphs" : 0,
                "verbose" : 0,
                "stats" : 0,
                "buymaxsize": 50
            },
            "api_key_file": "coinbase.key"
        }
    }
    

    Full tree in pycryptobot:

    pycryptobot/
    ├── CHANGELOG.md
    ├── Dockerfile
    ├── Dockerfile-websvc
    ├── LICENSE
    ├── README.md
    ├── chart
    │   ├── Chart.yaml
    │   ├── files
    │   ├── templates
    │   │   ├── NOTES.txt
    │   │   ├── _helpers.tpl
    │   │   ├── configmap.yaml
    │   │   ├── deployment.yaml
    │   │   ├── secret.yaml
    │   │   └── serviceaccount.yaml
    │   └── values.yaml
    ├── config.json.sample
    ├── config.yaml.sample
    ├── create-graphs.py
    ├── docker-compose.yaml
    ├── docs
    │   ├── DockerBotSetup.md
    │   ├── TelegramBotScanner.md
    │   ├── TelegramBotSetup.md
    │   ├── UbuntuSystemdService.md
    │   └── images
    │       ├── applying_patch.png
    │       └── folder_structure.png
    ├── graphs
    ├── gui.py
    ├── guihelp.txt
    ├── logs
    ├── market
    │   ├── BTCUSD
    │   │   ├── coinbase.key
    │   │   ├── config.json
    │   │   ├── graphs
    │   │   └── pycryptobot.log
    │   └── template
    │       ├── config.json
    │       ├── graphs
    │       │   └── readme.txt
    │       └── pycryptobot.log
    ├── models
    │   ├── AppState.py
    │   ├── BotConfig.py
    │   ├── ConfigBuilder.py
    │   ├── Github.py
    │   ├── PyCryptoBot.py
    │   ├── Stats.py
    │   ├── Strategy.py
    │   ├── Trading.py
    │   ├── TradingAccount.py
    │   ├── __init__.py
    │   ├── chat
    │   │   ├── __init__.py
    │   │   └── telegram.py
    │   ├── config
    │   │   ├── __init__.py
    │   │   ├── binance_parser.py
    │   │   ├── coinbase_pro_parser.py
    │   │   ├── default_parser.py
    │   │   ├── dummy_parser.py
    │   │   ├── kucoin_parser.py
    │   │   └── logger_parser.py
    │   ├── exchange
    │   │   ├── ExchangesEnum.py
    │   │   ├── Granularity.py
    │   │   ├── __init__.py
    │   │   ├── binance
    │   │   │   ├── __init__.py
    │   │   │   └── api.py
    │   │   ├── coinbase_pro
    │   │   │   ├── __init__.py
    │   │   │   └── api.py
    │   │   └── kucoin
    │   │       ├── __init__.py
    │   │       └── api.py
    │   ├── helper
    │   │   ├── LogHelper.py
    │   │   ├── MarginHelper.py
    │   │   ├── TelegramBotHelper.py
    │   │   ├── TextBoxHelper.py
    │   │   └── __init__.py
    │   └── telegram
    │       ├── __init__.py
    │       ├── actions.py
    │       ├── callbacktags.py
    │       ├── config.py
    │       ├── control.py
    │       ├── handler.py
    │       ├── helper.py
    │       └── settings.py
    ├── pycryptobot.py
    ├── pytest.ini
    ├── requirements.txt
    ├── sandbox-tracker.py
    ├── scanner.json
    ├── scanner.json.sample
    ├── scanner.py
    ├── screener.json.sample
    ├── screener.py
    ├── script-binance-webhooks-historical.py
    ├── script-binance-webhooks-ticker.py
    ├── script-binance-webhooks.py
    ├── script-binance_v2.py
    ├── script-coinbasepro-webhooks-historical.py
    ├── script-coinbasepro-webhooks-ticker.py
    ├── script-coinbasepro-webhooks.py
    ├── script-dummy_exchange.py
    ├── script-get_fees.py
    ├── script-get_orders.py
    ├── script-get_time.py
    ├── script-kucoin.py
    ├── script-technical-analysis.py
    ├── scripts
    │   └── docker-pull-and-create-container.sh
    ├── telegram_bot.py
    ├── tests
    │   ├── integration_tests
    │   │   ├── test_model_exchange_binance.py
    │   │   └── test_model_exchange_coinbase_pro.py
    │   └── unit_tests
    │       ├── binance_config.json.skip
    │       ├── data
    │       │   └── telegram_data
    │       │       └── TESTUSDT.json
    │       ├── responses
    │       │   └── account1.json
    │       ├── test_binance.py.skip
    │       ├── test_config.py
    │       ├── test_exchange_binance.py
    │       ├── test_exchange_coinbase.py
    │       ├── test_exchange_enum.py
    │       ├── test_formatting.py
    │       ├── test_granularity_enum.py
    │       ├── test_margin_calculation.py
    │       ├── test_model_pycryptobot.py.skip
    │       ├── test_telegram_bot.py
    │       └── trading
    │           ├── __init__.py
    │           └── test_trading_indicators.py
    ├── troubleshoot.py
    ├── views
    │   ├── TradingGraphs.py
    │   └── __init__.py
    ├── websvc
    │   ├── __init__.py
    │   └── app
    │       ├── __init__.py
    │       ├── css
    │       │   └── app.css
    │       ├── js
    │       │   └── app.js
    │       └── pages
    │           ├── __init__.py
    │           └── pages.py
    └── websvc.py
    
    36 directories, 122 files
    
    opened by devinat1 2
Releases(6.3.0)
  • 6.3.0(May 2, 2022)

    What's Changed

    • [FIX] #677 - Fix exception with Granulary and Binance exchange by @wtc0der in https://github.com/whittlem/pycryptobot/pull/678
    • Telegram bot updates by @markhollingworth-worthit in https://github.com/whittlem/pycryptobot/pull/681
    • WebGui Update by @markhollingworth-worthit in https://github.com/whittlem/pycryptobot/pull/683
    • average the margin_calculation on get_closed_trades in actions.py by @Darlywa in https://github.com/whittlem/pycryptobot/pull/687
    • fix if config scanner section missing by @markhollingworth-worthit in https://github.com/whittlem/pycryptobot/pull/689
    • Hot/fix by @Darlywa in https://github.com/whittlem/pycryptobot/pull/691
    • Add Bot Config Editor to WebGui by @markhollingworth-worthit in https://github.com/whittlem/pycryptobot/pull/693
    • fix for typos merge 690 by @markhollingworth-worthit in https://github.com/whittlem/pycryptobot/pull/694
    • Fix for build #690 by @markhollingworth-worthit in https://github.com/whittlem/pycryptobot/pull/695
    • fix PR 690 by @markhollingworth-worthit in https://github.com/whittlem/pycryptobot/pull/698
    • Updated Trivy output format as per https://github.com/aquasecurity/tr… by @warrmr in https://github.com/whittlem/pycryptobot/pull/699
    • fix merges conflicts for 690 by @markhollingworth-worthit in https://github.com/whittlem/pycryptobot/pull/700
    • For for merge #690 attempt 2 by @markhollingworth-worthit in https://github.com/whittlem/pycryptobot/pull/701
    • Merge beta into main by @whittlem in https://github.com/whittlem/pycryptobot/pull/690

    New Contributors

    • @wtc0der made their first contribution in https://github.com/whittlem/pycryptobot/pull/678
    • @Darlywa made their first contribution in https://github.com/whittlem/pycryptobot/pull/687

    Full Changelog: https://github.com/whittlem/pycryptobot/compare/6.0.0...6.3.0

    Source code(tar.gz)
    Source code(zip)
  • 6.0.0(Feb 8, 2022)

    What's Changed

    • Back merge main into beta by @whittlem in https://github.com/whittlem/pycryptobot/pull/645
    • Added TechnicalAnalysis unit tests by @joa-rodrigues in https://github.com/whittlem/pycryptobot/pull/647
    • add trade confirmations and minor fixes by @chriskoepf in https://github.com/whittlem/pycryptobot/pull/648
    • Bugfix to Fido (Watchdog) by @woblit in https://github.com/whittlem/pycryptobot/pull/650
    • TG Bot Config editor update by @markhollingworth-worthit in https://github.com/whittlem/pycryptobot/pull/649
    • V5.2.0 fixes by @markhollingworth-worthit in https://github.com/whittlem/pycryptobot/pull/653
    • updated trade confirmations by @chriskoepf in https://github.com/whittlem/pycryptobot/pull/654
    • added docker layer caching to container by @warrmr in https://github.com/whittlem/pycryptobot/pull/655
    • v5.2.0 fixes by @markhollingworth-worthit in https://github.com/whittlem/pycryptobot/pull/657
    • Fix - possible multi buy problem in new buy/sell code by @chriskoepf in https://github.com/whittlem/pycryptobot/pull/658
    • Misc Beta Fixes. Incorporated Kucoin GetOrders Caching system by @woblit in https://github.com/whittlem/pycryptobot/pull/659
    • fix for default exchange being used by @markhollingworth-worthit in https://github.com/whittlem/pycryptobot/pull/661
    • fix buy/sell trades and trailingstoplosstrigger by @chriskoepf in https://github.com/whittlem/pycryptobot/pull/662
    • Kucoin Caching Update by @woblit in https://github.com/whittlem/pycryptobot/pull/665
    • Docker ReInstated multi-stage build and added container metadata by @warrmr in https://github.com/whittlem/pycryptobot/pull/663
    • telegram bot control file fixes by @markhollingworth-worthit in https://github.com/whittlem/pycryptobot/pull/664
    • Ability to toggle Kucoin cache through config file by @woblit in https://github.com/whittlem/pycryptobot/pull/669
    • Minor fixes by @chriskoepf in https://github.com/whittlem/pycryptobot/pull/670
    • doc: fixed spelling :) by @warrmr in https://github.com/whittlem/pycryptobot/pull/671
    • bugfix screener hanging occasionally by @warrmr in https://github.com/whittlem/pycryptobot/pull/672
    • refactoring TelegramBotScanner.md by @Joel-max-s in https://github.com/whittlem/pycryptobot/pull/674
    • Merge beta into main by @whittlem in https://github.com/whittlem/pycryptobot/pull/652

    New Contributors

    • @Joel-max-s made their first contribution in https://github.com/whittlem/pycryptobot/pull/674

    Full Changelog: https://github.com/whittlem/pycryptobot/compare/5.1.3...6.0.0

    Source code(tar.gz)
    Source code(zip)
  • 5.1.3(Jan 3, 2022)

  • 5.1.2(Jan 3, 2022)

    What's Changed

    • Back merge main into beta by @whittlem in https://github.com/whittlem/pycryptobot/pull/641
    • Minor Bugfixes by @chriskoepf in https://github.com/whittlem/pycryptobot/pull/642
    • Fido the Watchdog / Scanner Updates / General Bug Fixes by @woblit in https://github.com/whittlem/pycryptobot/pull/643
    • Merging beta into main by @whittlem in https://github.com/whittlem/pycryptobot/pull/644

    Full Changelog: https://github.com/whittlem/pycryptobot/compare/5.1.1...5.1.2

    Source code(tar.gz)
    Source code(zip)
  • 5.1.1(Dec 31, 2021)

    What's Changed

    • Restarting Bots / Crashing Bots Fix by @woblit in https://github.com/whittlem/pycryptobot/pull/639
    • Merge beta into main by @whittlem in https://github.com/whittlem/pycryptobot/pull/640

    Full Changelog: https://github.com/whittlem/pycryptobot/compare/5.1.0...5.1.1

    Source code(tar.gz)
    Source code(zip)
  • 5.1.0(Dec 30, 2021)

    What's Changed

    • align currency regex checks for telegram bot by @derekrobertson in https://github.com/whittlem/pycryptobot/pull/633
    • Back merge beta into main by @whittlem in https://github.com/whittlem/pycryptobot/pull/635
    • Updated Tag Line for failing builds by @warrmr in https://github.com/whittlem/pycryptobot/pull/637
    • Add preventloss and trailingimmediatebuy options by @chriskoepf in https://github.com/whittlem/pycryptobot/pull/638
    • Merge beta into main by @whittlem in https://github.com/whittlem/pycryptobot/pull/636

    Full Changelog: https://github.com/whittlem/pycryptobot/compare/5.0.2...5.1.0

    Source code(tar.gz)
    Source code(zip)
  • 5.0.2(Dec 27, 2021)

    What's Changed

    • v5 Fix isSellTrigger and revise change_pcnt_high fix by @chriskoepf in https://github.com/whittlem/pycryptobot/pull/630
    • Fix scan kucoin leverage by @derekrobertson in https://github.com/whittlem/pycryptobot/pull/631
    • Merge beta into main by @whittlem in https://github.com/whittlem/pycryptobot/pull/632

    New Contributors

    • @derekrobertson made their first contribution in https://github.com/whittlem/pycryptobot/pull/631

    Full Changelog: https://github.com/whittlem/pycryptobot/compare/5.0.1...5.0.2

    Source code(tar.gz)
    Source code(zip)
  • 5.0.1(Dec 24, 2021)

    What's Changed

    • Back merging main into beta by @whittlem in https://github.com/whittlem/pycryptobot/pull/627
    • Bug fixes for v5 release by @chriskoepf in https://github.com/whittlem/pycryptobot/pull/625
    • [FIX] Corrected typo in container build pipeline by @warrmr in https://github.com/whittlem/pycryptobot/pull/626
    • Merging beta into main by @whittlem in https://github.com/whittlem/pycryptobot/pull/628

    Full Changelog: https://github.com/whittlem/pycryptobot/compare/5.0.0...5.0.1

    Source code(tar.gz)
    Source code(zip)
  • 5.0.0(Dec 20, 2021)

    What's Changed

    • Back merge main into beta by @whittlem in https://github.com/whittlem/pycryptobot/pull/579
    • Kucoin websockets and scanner by @markhollingworth-worthit in https://github.com/whittlem/pycryptobot/pull/581
    • fix parser by @markhollingworth-worthit in https://github.com/whittlem/pycryptobot/pull/584
    • Adopt chart for telegram bot by @byymster in https://github.com/whittlem/pycryptobot/pull/586
    • Revert "Adopt chart for telegram bot" by @whittlem in https://github.com/whittlem/pycryptobot/pull/591
    • Fix Sims and some vars, add buylastsell and multibuycheck by @chriskoepf in https://github.com/whittlem/pycryptobot/pull/601
    • Docker for raspberry pi armhf by @warrmr in https://github.com/whittlem/pycryptobot/pull/603
    • New screener by @notoriousBLP in https://github.com/whittlem/pycryptobot/pull/604
    • Remove extra code submitted that wasn't ready by @chriskoepf in https://github.com/whittlem/pycryptobot/pull/606
    • Updated PyCryptoBot to allow using Crypto rather than Fiat as a base currency with small currency amounts by @woblit in https://github.com/whittlem/pycryptobot/pull/608
    • Revert "New screener" - pending Telegram_Bot changes are on the way. by @chriskoepf in https://github.com/whittlem/pycryptobot/pull/610
    • Fix JSON typo in values.yaml example by @Dwaynekj in https://github.com/whittlem/pycryptobot/pull/612
    • Revert "Updated PyCryptoBot to allow using Crypto rather than Fiat as a base currency with small currency amounts" by @chriskoepf in https://github.com/whittlem/pycryptobot/pull/614
    • TG Bot Update + Trailing Buy by @markhollingworth-worthit in https://github.com/whittlem/pycryptobot/pull/617
    • fix for TGBot helper error when not using TG bot by @markhollingworth-worthit in https://github.com/whittlem/pycryptobot/pull/618
    • Given the formula (c) in this documentation in the description it seems that the cumulative returns is missing… by @joa-rodrigues in https://github.com/whittlem/pycryptobot/pull/620
    • fix trailingbuypcnt bug by @chriskoepf in https://github.com/whittlem/pycryptobot/pull/622
    • Docs/adding docker documentation by @warrmr in https://github.com/whittlem/pycryptobot/pull/623
    • Merge beta into main by @whittlem in https://github.com/whittlem/pycryptobot/pull/602

    New Contributors

    • @warrmr made their first contribution in https://github.com/whittlem/pycryptobot/pull/603
    • @notoriousBLP made their first contribution in https://github.com/whittlem/pycryptobot/pull/604
    • @woblit made their first contribution in https://github.com/whittlem/pycryptobot/pull/608
    • @Dwaynekj made their first contribution in https://github.com/whittlem/pycryptobot/pull/612
    • @joa-rodrigues made their first contribution in https://github.com/whittlem/pycryptobot/pull/620

    Full Changelog: https://github.com/whittlem/pycryptobot/compare/4.4.2...5.0.0

    Source code(tar.gz)
    Source code(zip)
  • 4.4.2(Nov 21, 2021)

    What's Changed

    • Update TelegramBotHelper.py by @markhollingworth-worthit in https://github.com/whittlem/pycryptobot/pull/577

    Full Changelog: https://github.com/whittlem/pycryptobot/compare/4.4.1...4.4.2

    Source code(tar.gz)
    Source code(zip)
  • 4.4.1(Nov 20, 2021)

    What's Changed

    • Changelog reformatting by @thiasB in https://github.com/whittlem/pycryptobot/pull/539
    • Add files via upload by @jaredrsommer in https://github.com/whittlem/pycryptobot/pull/543
    • various bug fixes by @markhollingworth-worthit in https://github.com/whittlem/pycryptobot/pull/544
    • Using enum instead of strings when comparing exchanges by @edrickrenan in https://github.com/whittlem/pycryptobot/pull/547
    • Trigger Rolling update of Deployment after updating ConfigMap by @byymster in https://github.com/whittlem/pycryptobot/pull/550
    • Add logs for orders in json format by @byymster in https://github.com/whittlem/pycryptobot/pull/552
    • Kucoin fix for multiple buys by @chriskoepf in https://github.com/whittlem/pycryptobot/pull/548
    • Fix Binance Market validation by @byymster in https://github.com/whittlem/pycryptobot/pull/549
    • Introducing granularity enum by @edrickrenan in https://github.com/whittlem/pycryptobot/pull/553
    • Finishing exchange migration to enum by @edrickrenan in https://github.com/whittlem/pycryptobot/pull/554
    • Beta - Kucoin fixes, Telegram options and output additions, api_key_file cli option by @chriskoepf in https://github.com/whittlem/pycryptobot/pull/557
    • Adding granularity config to default_parser.py by @edrickrenan in https://github.com/whittlem/pycryptobot/pull/564
    • Beta by @markhollingworth-worthit in https://github.com/whittlem/pycryptobot/pull/567
    • fix for binance candles by @markhollingworth-worthit in https://github.com/whittlem/pycryptobot/pull/569
    • Fix for incorrect insufficient base fund errors on Kucoin by @chriskoepf in https://github.com/whittlem/pycryptobot/pull/570
    • telegram config options, sim buy timestamp, fix tracker bug by @chriskoepf in https://github.com/whittlem/pycryptobot/pull/571
    • spelling fixes by @markhollingworth-worthit in https://github.com/whittlem/pycryptobot/pull/574
    • unit test fix by @markhollingworth-worthit in https://github.com/whittlem/pycryptobot/pull/575
    • Added fix for datetime compatibility with ticker datetime notation. by @Zathrasss in https://github.com/whittlem/pycryptobot/pull/576
    • Merging beta into main by @whittlem in https://github.com/whittlem/pycryptobot/pull/573

    New Contributors

    • @jaredrsommer made their first contribution in https://github.com/whittlem/pycryptobot/pull/543
    • @byymster made their first contribution in https://github.com/whittlem/pycryptobot/pull/550
    • @Zathrasss made their first contribution in https://github.com/whittlem/pycryptobot/pull/576

    Full Changelog: https://github.com/whittlem/pycryptobot/compare/4.2.1...4.4.1

    Source code(tar.gz)
    Source code(zip)
  • 4.2.1(Oct 19, 2021)

    What's Changed

    • Fix typos discovered by codespell by @cclauss in https://github.com/whittlem/pycryptobot/pull/532
    • some fixes by @markhollingworth in https://github.com/whittlem/pycryptobot/pull/537
    • Merging beta into main by @whittlem in https://github.com/whittlem/pycryptobot/pull/538

    New Contributors

    • @markhollingworth made their first contribution in https://github.com/whittlem/pycryptobot/pull/537

    Full Changelog: https://github.com/whittlem/pycryptobot/compare/4.2.0...4.2.1

    Source code(tar.gz)
    Source code(zip)
  • 4.2.0(Oct 17, 2021)

    What's Changed

    • don't truncate close price by @thiasB in https://github.com/whittlem/pycryptobot/pull/522
    • Fix typo by @cclauss in https://github.com/whittlem/pycryptobot/pull/523
    • Fix typos discovered by codespell by @cclauss in https://github.com/whittlem/pycryptobot/pull/524
    • Updates/telegrambot by @markhollingworth-worthit in https://github.com/whittlem/pycryptobot/pull/530
    • Merge beta into main by @whittlem in https://github.com/whittlem/pycryptobot/pull/531

    New Contributors

    • @thiasB made their first contribution in https://github.com/whittlem/pycryptobot/pull/522
    • @cclauss made their first contribution in https://github.com/whittlem/pycryptobot/pull/523

    Full Changelog: https://github.com/whittlem/pycryptobot/compare/4.1.0...4.2.0

    Source code(tar.gz)
    Source code(zip)
  • 4.1.0(Oct 8, 2021)

    What's Changed

    • Merge beta into main by @whittlem in https://github.com/whittlem/pycryptobot/pull/504
    • Feature/kucoin init by @markhollingworth-worthit in https://github.com/whittlem/pycryptobot/pull/510
    • chore(logger): Add trade currency on dryrun simulation summary by @germainlefebvre4 in https://github.com/whittlem/pycryptobot/pull/506
    • Telegram output tweaks by @chriskoepf in https://github.com/whittlem/pycryptobot/pull/513
    • doc: Update CHANGELOG.md by @germainlefebvre4 in https://github.com/whittlem/pycryptobot/pull/514
    • Merging beta into main by @whittlem in https://github.com/whittlem/pycryptobot/pull/512
    • Feature/telegrambot by @markhollingworth-worthit in https://github.com/whittlem/pycryptobot/pull/520
    • Merging beta into main by @whittlem in https://github.com/whittlem/pycryptobot/pull/521

    New Contributors

    • @chriskoepf made their first contribution in https://github.com/whittlem/pycryptobot/pull/513

    Full Changelog: https://github.com/whittlem/pycryptobot/compare/4.0.3...4.1.0

    Source code(tar.gz)
    Source code(zip)
Owner
Michael Whittle
Solution Architect
Michael Whittle
There is a new admin bot by @sinan-m-116 .

find me on telegram! deploy me on heroku, use below button: If you can't have a config.py file (EG on heroku), it is also possible to use environment

Sinzz-sinan-m 0 Nov 9, 2021
A Django app that creates automatic web UIs for Python scripts.

Wooey is a simple web interface to run command line Python scripts. Think of it as an easy way to get your scripts up on the web for routine data anal

Wooey 1.8k May 21, 2022
A high-level app and dashboarding solution for Python

Panel provides tools for easily composing widgets, plots, tables, and other viewable objects and controls into custom analysis tools, apps, and dashboards.

HoloViz 1.9k May 28, 2022
Python books free to read online or download

Python books free to read online or download

Paolo Amoroso 3.4k May 17, 2022
PyMMO is a Python-based MMO game framework using sockets and PyGame.

PyMMO is a Python framework/template of a MMO game built using PyGame on top of Python's built-in socket module.

Luis Souto Maior 50 May 20, 2022
Python code for "Machine learning: a probabilistic perspective" (2nd edition)

Python code for "Machine learning: a probabilistic perspective" (2nd edition)

Probabilistic machine learning 4.8k May 28, 2022
A python application for manipulating pandas data frames from the comfort of your web browser

A python application for manipulating pandas data frames from the comfort of your web browser. Data flows are represented as a Directed Acyclic Graph, and nodes can be ran individually as the user sees fit.

Schlerp 158 Mar 23, 2022
A modern Python package manager with PEP 582 support.

A modern Python package manager with PEP 582 support.

Python Development Master(PDM) 2.4k May 27, 2022
Firebase Admin Console is a centralized platform for easy viewing and maintenance of Firestore database, the back-end API is a Python Flask app.

Firebase Admin Console is a centralized platform for easy viewing and maintenance of Firestore database, the back-end API is a Python Flask app. A starting template for developers to customize, build, and even deploy the desired admin console for their DB.

Daqi Chen 2 Jan 31, 2022
This is a simple backtesting framework to help you test your crypto currency trading. It includes a way to download and store historical crypto data and to execute a trading strategy.

You can use this simple crypto backtesting script to ensure your trading strategy is successful Minimal setup required and works well with static TP a

Andrei 148 May 18, 2022
Django-based Crypto Portfolio Tracker – keep an eye on Shiba Inu and other Crypto

Crypto Tracker ?? ?? – Central Portfolio Tracking Easy asset tracking – at a glance ?? Dashboard to centrally monitor current crypto portfolio develop

null 62 Apr 7, 2022
Satoshi is a discord bot template in python using discord.py that allow you to track some live crypto prices with your own discord bot.

Satoshi ~ DiscordCryptoBot Satoshi is a simple python discord bot using discord.py that allow you to track your favorites cryptos prices with your own

Théo 2 Apr 22, 2022
Satoshi is a discord bot template in python using discord.py that allow you to track some live crypto prices with your own discord bot.

Satoshi ~ DiscordCryptoBot Satoshi is a simple python discord bot using discord.py that allow you to track your favorites cryptos prices with your own

Théo 2 Apr 22, 2022
null 469 May 17, 2022
Tsar-Bot - Crypto auto trade bot that use sentiment analysis from twitter

Tsar Bot - Crypto Sentiment Bot Tsar Bot is a Twitter Crypto Sentiment Bot that

Hilmi Azizi 19 May 2, 2022
Freqtrade is a free and open source crypto trading bot written in Python

Freqtrade is a free and open source crypto trading bot written in Python. It is designed to support all major exchanges and be controlled via Telegram. It contains backtesting, plotting and money management tools as well as strategy optimization by machine learning.

null 17.5k May 22, 2022
Freqtrade is a free and open source crypto trading bot written in Python

Freqtrade is a free and open source crypto trading bot written in Python. It is designed to support all major exchanges and be controlled via Telegram. It contains backtesting, plotting and money management tools as well as strategy optimization by machine learning.

null 17.5k May 22, 2022
Python Crypto Bot

Python Crypto Bot

Michael Whittle 1.5k May 19, 2022
Freqtrade is a free and open source crypto trading bot written in Python.

Freqtrade is a free and open source crypto trading bot written in Python. It is designed to support all major exchanges and be controlled via Telegram. It contains backtesting, plotting and money management tools as well as strategy optimization by machine learning.

Kazune Takeda 5 Dec 30, 2021
An advanced crypto trading bot written in Python

Jesse Jesse is an advanced crypto trading framework which aims to simplify researching and defining trading strategies. Why Jesse? In short, Jesse is

Jesse 3.9k May 21, 2022
This is a DCA crypto trading bot built for Binance written in Python

This is a DCA crypto trading bot built for Binance written in Python. It works by allowing you to DCA at an interval of your choosing and reports back on your average buy price as well as a chart consisting of each DCA.

Andrei 52 May 18, 2022
Free python/telegram bot for easy execution and surveillance of crypto trading plans on multiple exchanges.

EazeBot Introduction Have you ever traded cryptocurrencies and lost overview of your planned buys/sells? Have you encountered the experience that your

Marcel Beining 94 May 19, 2022
This is a free python bot program that crosses you to farm with auto click in space crypto NFT game, having fun :) Creator: Marlon Zanardi

?? Space Crypto auto click bot ready-to-use ?? This is a free python bot program that crosses you to farm with auto click in space crypto NFT game, ha

null 172 Apr 30, 2022
Crypto trading bot that detects surges in the bitcoin price and executes trades.

The bot will be trading Bitcoin automatically if the price has increased by more than 3% in the last 10 minutes. We will have a stop loss of 5% and t

null 160 May 6, 2022
This is a fully functioning Binance trading bot that takes into account the news sentiment for the top 100 crypto feeds.

This is a fully functioning Binance trading bot that takes into account the news sentiment for the top 100 crypto feeds.

Andrei 1.5k May 21, 2022
Bot to trade crypto trading ranges

crypto-trading-bot Crypto bot with DCA or GRID trading strategy Sends notifictions to telegram chat Crypto bot with webhook feature which can be used

null 3 Jun 18, 2021
A bot that escrows crypto transactions on Reddit

EscrowBot I NEED BCH TESTNET FOR TESTING. Please send me some BCH testnet if you have some: bchtest:qz5eur3prqyvd8u77m6fzf9z6cruz9q7vq4qvgdnuk Depende

Nathan Lim 7 May 11, 2022
Trading strategy for the Freqtrade crypto bot

NostalgiaForInfinity Trading strategy for the Freqtrade crypto bot Change strategy Add strategies to the user_data/strategies folder and also in the d

iterativ 1.2k May 21, 2022
trading strategy for freqtrade crypto bot it base on CDC-ActionZone

ft-action-zone trading strategy for freqtrade crypto bot it base on CDC-ActionZone Indicator by piriya33 Clone The Repository if you just clone this r

Miwtoo 13 May 13, 2022