CryptoPump is a cryptocurrency trading bot that focuses on high speed and flexibility

Overview

cryptopump

  • CryptoPump is a cryptocurrency trading bot that focuses on extremely high speed and flexibility. The algorithms utilize Go Language and the exchange WebSockets to react in real-time to market movements based on Bollinger statistical analysis and pre-defined profit margins.

  • CryptoPump calculates the Relative Strength Index (3,7,14) and MACD index, allowing users to configure buying, selling, and holding thresholds.

  • CryptoPump also provides different configuration settings for operating in downmarket, such as specifying the amount to buy in the downmarket when to change purchase behavior and thresholds.

  • CryptoPump supports all cryptocurrency pairs and provides the ability to define the exchange commission when calculating profit and when to sell.

  • CryptoPump also provides DryRun mode, the ability to use Binance TestNet for testing, Telegram bot integration, Time enforcement, Sell-to-cover, and much more.

  • Currently, only the Binance API is supported, but I developed the software to allow easy implementation of additional exchanges.

  • Configure the Binance exchange APIKEY and SECRETKEY in config.yml. In addition, the Telegram APIKEY, if in use, has to be configured at TGBOTAPIKEY in the config.yml file.

  • Telegram accepts command /stop /sell /buy /funds /master

  • CryptoPump requires MySQL to persist data and transactions, and the .sql file to create the structure can be found in the MySQL folder (cryptopump.sql). I use MySQL with Docker in the same machine Cryptopump is running, and it performs well. Cloud-based MySQL instances are also supported. The environment variables are in launch.json if Visual Studio Code is in use; optionally, the following environment variables set DB_USER, DB_PASS, DB_TCP_HOST, DB_PORT, DB_NAME.

  • To use Binance TestNet, set launch.json or environment variable TESTNET to True. (https://testnet.binance.vision)

  • I run CryptoPump in Visual Studio Code, but it can be run without an IDE. For each instance of the code, a new HTTP port is opened, starting with 8080, 8081, 8082. Just point your browser to the address, and you should get the session configuration page and the Bollinger and Exchange data.

*** If you feel like contributing to the project, you are very welcome ***

Comments
  • Websocket issues in debug output

    Websocket issues in debug output

    Seeing this issue in 1.8.0, 1.8.1 and 1.8.1.1 with Go 1.17.5. Maybe this is reason why my Binance funds are not reflected in the dashboard?

    2021/12/17 10:33:55 http: panic serving 192.168.5.30:58941: runtime error: slice bounds out of range [:3] with length 0 goroutine 23 [running]: net/http.(*conn).serve.func1() /usr/local/go/src/net/http/server.go:1802 +0xb9 panic({0x913120, 0xc000029fe0}) /usr/local/go/src/runtime/panic.go:1047 +0x266 github.com/aleibovici/cryptopump/loader.LoadSessionDataAdditionalComponents(0x905cc0, 0xc0001f5860, 0x952ecb) /home/marcus/cryptopump/loader/loader.go:83 +0x12b2 main.(*myHandler).handler(0xc00000e2b8, {0xa05698, 0xc0000f4700}, 0xc0000f3400) /home/marcus/cryptopump/main.go:164 +0x597 net/http.HandlerFunc.ServeHTTP(0x0, {0xa05698, 0xc0000f4700}, 0x0) /usr/local/go/src/net/http/server.go:2047 +0x2f net/http.(*ServeMux).ServeHTTP(0x0, {0xa05698, 0xc0000f4700}, 0xc0000f3400) /usr/local/go/src/net/http/server.go:2425 +0x149 net/http.serverHandler.ServeHTTP({0xc0001f57d0}, {0xa05698, 0xc0000f4700}, 0xc0000f3400) /usr/local/go/src/net/http/server.go:2879 +0x43b net/http.(*conn).serve(0xc0001c4280, {0xa084e0, 0xc0000eb4a0}) /usr/local/go/src/net/http/server.go:1930 +0xb08 created by net/http.(*Server).Serve /usr/local/go/src/net/http/server.go:3034 +0x4e8

    websocket: bad handshake

    opened by marcvsnet 9
  • Binance credentials wrong format

    Binance credentials wrong format

    Using Docker approach this messages appears on providing credentials via the Admin page, which worked before in v1.9.0 and before without issues

    cryptopump_app    | DEBU[2022-01-06 09:09:34] github.com/aleibovici/cryptopump/exchange.binanceGetAccount - <APIError> code=-2014, msg=API-key format invalid.  orderID=0 threadID=c7ba7esconks7399tk40
    cryptopump_app    | DEBU[2022-01-06 09:09:34] github.com/aleibovici/cryptopump/exchange.binanceGetAccount - <APIError> code=-2014, msg=API-key format invalid.  orderID=0 threadID=c7ba7esconks7399tk40
    cryptopump_app    | DEBU[2022-01-06 09:09:34] github.com/aleibovici/cryptopump/exchange.binanceGetSymbolFunds - <APIError> code=-2014, msg=API-key format invalid.  orderID=0 threadID=c7ba7esconks7399tk40
    cryptopump_app    | DEBU[2022-01-06 09:09:37] github.com/aleibovici/cryptopump/exchange.binanceGetUserStreamServiceListenKey - <APIError> code=-2014, msg=API-key format invalid.  orderID=0 threadID=c7ba7esconks7399tk40
    cryptopump_app    | DEBU[2022-01-06 09:09:37] github.com/aleibovici/cryptopump/algorithms.WsUserDataServe - <APIError> code=-2014, msg=API-key format invalid.  orderID=0 threadID=c7ba7esconks7399tk40
    
    enhancement 
    opened by marcvsnet 4
  • Build issue on 1.8.1

    Build issue on 1.8.1

    Getting an build issue on Go 1.6 or 1.7.5 for 1.8.1, 1.8.0 is fine.

    $ go build .
    # github.com/aleibovici/cryptopump/mysql
    mysql/mysql.go:1080:6: GetGlobal redeclared in this block
            previous declaration at mysql/mysql.go:1051:123
    
    opened by marcvsnet 2
  • Failed to GetLotSize

    Failed to GetLotSize

    Hey Andre,

    It's much easier speaking here compared to twitter so I hope you don't mind me opening an issue. I got mysql running on my unraid server as docker. I'm able to connect to it and I've imported your .sql file into it like this:

    $ docker exec -i xxxxxxxx mysql -uroot -pthepassword cryptopump < /path/to/cryptopump.sql

    now I'm able to start cryptopump under Visual Studio Code. I have set the Binance API and secret and enabled spot trading.

    Here's my config.yaml:

    config:
      apikey: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      apikeytestnet: 
      buy_24hs_highprice_entry: "0.0005"
      buy_24hs_highprice_entry_macd: "20"
      buy_direction_down: "20"
      buy_direction_up: "10"
      buy_macd_entry: "-30"
      buy_macd_upmarket: "10"
      buy_quantity_fiat_down: "50"
      buy_quantity_fiat_init: "50"
      buy_quantity_fiat_up: "50"
      buy_repeat_threshold_down: "0.002"
      buy_repeat_threshold_down_second: "0.002"
      buy_repeat_threshold_down_second_start_count: "2"
      buy_repeat_threshold_up: "0.0001"
      buy_rsi7_entry: "40"
      buy_wait: "60"
      debug: "false"
      dryrun: "true"
      exchange_comission: "0.075"
      exchangename: BINANCE
      exit: "false"
      newsession: "false"
      profit_min: "0.001"
      secretkey: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      secretkeytestnet: 
      sellholdonrsi3: "70"
      selltocover: "false"
      sellwaitaftercancel: "10"
      sellwaitbeforecancel: "20"
      symbol: BUSD
      symbol_fiat: BUSD
      symbol_fiat_stash: "100"
      testnet: "false"
      tgbotapikey: 
      time_enforce: "false"
      time_start: 04:00AM
      time_stop: 07:00PM
    
    

    So, when starting up I get:

    `Exception has occurred: panic
    "runtime error: invalid memory address or nil pointer dereference"
    Stack:
    	4  0x0000000001213e34 in github.com/aleibovici/cryptopump/logger.LogEntry.Do
    	    at C:/go/cryptopump-1.6/cryptopump-1.6/logger/logger.go:123
    	5  0x00000000012e4e12 in github.com/aleibovici/cryptopump/functions.StrToFloat64
    	    at C:/go/cryptopump-1.6/cryptopump-1.6/functions/functions.go:42
    	6  0x0000000001325d8b in github.com/aleibovici/cryptopump/exchange.GetLotSize
    	    at C:/go/cryptopump-1.6/cryptopump-1.6/exchange/exchange.go:125
    	7  0x0000000001349dfc in main.execution
    	    at C:/go/cryptopump-1.6/cryptopump-1.6/main.go:530
    	8  0x0000000001348787 in main.(*myHandler).handler·dwrap·1
    	    at C:/go/cryptopump-1.6/cryptopump-1.6/main.go:259
    

    Do you have any idea what might be wrong in this case?

    opened by fandangos 2
  • handle error code 1001

    handle error code 1001

    Hi Andre,

    Here is a fix for an unhandled error that caused the bot to disconnect from binance server.

    time="2021-08-05 02:44:01" level=debug msg="cryptopump/algorithms.WsKline.func2 - websocket: close 1001 (going away)" orderID=0 threadID=c435ggsrs38slni7mhhg
    time="2021-08-05 04:40:02" level=debug msg="cryptopump/algorithms.WsUserDataServe.func2 - websocket: close 1001 (going away)" orderID=0 threadID=c435ggsrs38slni7mhhg
    

    It is not easy to reproduce the error to verify the fix, not until it happened again at least..

    opened by hanw 2
  • Dynamic loading of sessionData

    Dynamic loading of sessionData

    Changes to accomodate dynamic loading of real-time websockets data into html via javascript and a API in /sessiondata. Known bug: plotter widget size when embedded into json object.

    opened by aleibovici 0
Releases(v2.0)
  • v2.0(Feb 1, 2022)

    • New Docker support for Raspberry Pi and MariaDB. This has been a long-standing request, and I am glad we have been able to provide support for Raspberry Pi and MariaDB with Docker. (Please note that MySQL is not supported with Raspberry Pi). Check it out, and follow the instructions here: https://hub.docker.com/repository/docker/andreleibovici/cryptopump

    • We also have simplified the error handling and much of the Binance API errors and are now easily handled Cryptopump is running much more smoothly and in our tests, it has not stopped any time, despite the Binance API errors thrown at Cryptopump.

    Known-Issue:

    • When running Cryptopump multi-thread with Docker the browser session will not be automatically opened pointing to the correct port. In such scenarios, please open a new browser tab pointing to the correct port.
    Source code(tar.gz)
    Source code(zip)
  • v1.9.2(Jan 6, 2022)

    • New Self-contained Docker container set with CryptoPump and MySQL fully configured. Just enter you API and Secret Keys and you CryptoPump environment is up and running. Docker implementation drastically simplify the requirements to get CryptoPump running. Check it out, and follow the intructions here: https://hub.docker.com/repository/docker/andreleibovici/cryptopump

    • New global admin page to enter API and Secret Keys, completely eliminating the need to deal with config file manually. The global admin settings will apply to all CryptoPump sessions.

    • Documentation update for the new capabilities.
    • Various internal code improvements for performance
    Source code(tar.gz)
    Source code(zip)
  • v1.9(Dec 26, 2021)

    • New Sell button for each order, enabling you to choose which order to sell. Previously, only the order closest to the profit margin would sell when the 'Sell' button was manually triggered. This enables granular selection of which orders to sell when they are underwater. The 'Sell MArket' button still operates selling the order closest to the profit margin.

    • New DryRun logging now logs every simulated buy and sell transaction for post-audit (cryptopump.log)
    • MySQL query and index optimization, reducing the load on MySQL server and increasing the system scalability. (DB schema update required)
    • Documentation update for the new capabilities.
    • Various internal code improvements for performance

    This release requires a database update if you are already running Cryptopump in production, or if you are deploying for the first time, simply use cryptopump.sql.

    ALTER TABLE `orders` ADD INDEX `orders_idx_side_status` (`Side`,`Status`);
    
    
    DELIMITER $$
    CREATE DEFINER=`root`@`%` PROCEDURE `GetProfit`()
    BEGIN
    SELECT
            SUM(`source`.`Profit`) AS `profit`,
            SUM(`source`.`Profit`) + (`source`.`Diff`) AS `netprofit`,
            AVG(`source`.`Percentage`) AS `avg` 
        FROM
            (SELECT
                `orders`.`Side` AS `Side`,
                `Orders`.`Side` AS `Orders__Side`,
                `orders`.`Status` AS `Status`,
                `Orders`.`Status` AS `Orders__Status`,
                `orders`.`ThreadID` AS `ThreadID`,
                `Orders`.`CummulativeQuoteQty` AS `Orders__CummulativeQuoteQty`,
                `orders`.`CummulativeQuoteQty` AS `CummulativeQuoteQty`,
                (`Orders`.`CummulativeQuoteQty` - `orders`.`CummulativeQuoteQty`) AS `Profit`,
                ((`Orders`.`CummulativeQuoteQty` - `orders`.`CummulativeQuoteQty`) / CASE 
                    WHEN `Orders`.`CummulativeQuoteQty` = 0 THEN NULL 
                    ELSE `Orders`.`CummulativeQuoteQty` END) AS `Percentage`,
    (SELECT
        sum(`session`.`DiffTotal`) AS `sum` 
    FROM
        `session`) AS `Diff` 
    FROM
    `orders` 
    INNER JOIN
    `orders` `Orders` 
        ON `orders`.`OrderID` = `Orders`.`OrderIDSource` 
    WHERE
    (
        `orders`.`Side` = 'BUY'
    ) 
    AND (
        `orders`.`Status` = 'FILLED'
    )
    ) `source` 
    WHERE
    (
    1 = 1 
    AND `source`.`Orders__Side` = 'SELL' 
    AND 1 = 1 
    AND `source`.`Orders__Status` = 'FILLED'
    );
    END$$
    DELIMITER ;
    
    
    
    DELIMITER $$
    CREATE DEFINER=`root`@`%` PROCEDURE `GetOrderByOrderID`(IN in_param_OrderID bigint, IN in_param_ThreadID varchar(45))
    BEGIN
    DECLARE declared_in_param_orderid BIGINT; 
    DECLARE declared_in_param_threadid CHAR(50); 
    SET declared_in_param_orderid = in_param_orderid; 
    SET declared_in_param_threadid = in_param_threadid;
    SELECT 
        `orders`.`orderid` AS `OrderID`,
        `orders`.`price` AS `Price`,
        `orders`.`executedquantity` AS `ExecutedQuantity`,
        `orders`.`cummulativequoteqty` AS `CummulativeQuoteQty`,
        `orders`.`transacttime` AS `TransactTime`
    FROM
        `orders`
    WHERE
        (`orders`.`orderid` = declared_in_param_orderid
            AND `orders`.`threadid` = declared_in_param_threadid)
    LIMIT 1; 
    END$$
    DELIMITER ;
    
    Source code(tar.gz)
    Source code(zip)
  • v1.8.1.1(Dec 17, 2021)

  • v1.8.1(Dec 11, 2021)

    • New Net Profit calculation. Net Profit (Net Profit = Total Profit - Order Differences) where Order Difference is the total difference between each order price and the current crypto pair price for all threads. Another way to understand Net Profit is to look at is as the total profit if all orders were to be closed at that moment in time. Net profit is important because CryptoPump will use Profits to buy orders if the crypto pair goes down in price. More info in the documentation.
    • New Net ROI calculation. While ROI is defined by Profit / Invested Amount, the Net ROI is defined by (Net Thread Profit = Total Thread Profit - Order Thread Differences) divided by Invested Amount. More info in the documentation.
    • New Telegram information when requesting /report, including Net Profit and Net ROI (Return on Investment).

    • HTML UI changes to accommodate the new information in the display.
    • The documentation has been updated to reflect the changes.
    • Additional Binance error handling was added to the system.

    This release requires a database update if you are already running Cryptopump in production, or if you are deploying for the first time, simply use cryptopump.sql.

    ALTER TABLE `cryptopump`.`session` 
    ADD COLUMN `DiffTotal` FLOAT NOT NULL AFTER `FiatFunds`;
    
    
    
    USE `cryptopump`;
    DROP procedure IF EXISTS `SaveSession`;
    
    USE `cryptopump`;
    DROP procedure IF EXISTS `cryptopump`.`SaveSession`;
    ;
    
    DELIMITER $$
    USE `cryptopump`$$
    CREATE DEFINER=`root`@`%` PROCEDURE `SaveSession`(in_ThreadID varchar(45), in_ThreadIDSession varchar(45), in_Exchange varchar(45), in_FiatSymbol varchar(45), in_FiatFunds float, in_DiffTotal float, in_Status tinyint(1))
    BEGIN
    INSERT INTO session (ThreadID, ThreadIDSession, Exchange, FiatSymbol, FiatFunds, DiffTotal, Status)
    VALUES (in_ThreadID, in_ThreadIDSession, in_Exchange, in_FiatSymbol, in_FiatFunds, in_DiffTotal, in_Status);
    END$$
    
    DELIMITER ;
    ;
    
    
    
    USE `cryptopump`;
    DROP procedure IF EXISTS `UpdateSession`;
    
    USE `cryptopump`;
    DROP procedure IF EXISTS `cryptopump`.`UpdateSession`;
    ;
    
    DELIMITER $$
    USE `cryptopump`$$
    CREATE DEFINER=`root`@`%` PROCEDURE `UpdateSession`(in_ThreadID varchar(45), in_ThreadIDSession varchar(45), in_Exchange varchar(45), in_FiatSymbol varchar(45), in_FiatFunds float, in_DiffTotal float, in_Status tinyint(1))
    BEGIN
    SET SQL_SAFE_UPDATES = 0;
    	UPDATE `session` 
    SET 
        `session`.`FiatFunds` = in_FiatFunds,
        `session`.`DiffTotal` = in_DiffTotal,
        `session`.`Status` = in_Status
    WHERE
        `session`.`ThreadID` = in_ThreadID;
    SET SQL_SAFE_UPDATES = 1;
    END$$
    
    DELIMITER ;
    ;
    
    
    
    USE `cryptopump`;
    DROP procedure IF EXISTS `GetProfit`;
    
    USE `cryptopump`;
    DROP procedure IF EXISTS `cryptopump`.`GetProfit`;
    ;
    
    DELIMITER $$
    USE `cryptopump`$$
    CREATE DEFINER=`root`@`%` PROCEDURE `GetProfit`()
    BEGIN
    SELECT 
        SUM(`source`.`Profit`) + (`source`.`Diff`) AS `sum`,
        AVG(`source`.`Percentage`) AS `avg`
    FROM
        (SELECT 
            `orders`.`Side` AS `Side`,
                `Orders`.`Side` AS `Orders__Side`,
                `orders`.`Status` AS `Status`,
                `Orders`.`Status` AS `Orders__Status`,
                `orders`.`ThreadID` AS `ThreadID`,
                `Orders`.`CummulativeQuoteQty` AS `Orders__CummulativeQuoteQty`,
                `orders`.`CummulativeQuoteQty` AS `CummulativeQuoteQty`,
                (`Orders`.`CummulativeQuoteQty` - `orders`.`CummulativeQuoteQty`) AS `Profit`,
                ((`Orders`.`CummulativeQuoteQty` - `orders`.`CummulativeQuoteQty`) / CASE
                    WHEN `Orders`.`CummulativeQuoteQty` = 0 THEN NULL
                    ELSE `Orders`.`CummulativeQuoteQty`
                END) AS `Percentage`,
                (SELECT sum(`session`.`DiffTotal`) AS `sum` FROM `session`) AS `Diff`
        FROM
            `orders`
        INNER JOIN `orders` `Orders` ON `orders`.`OrderID` = `Orders`.`OrderIDSource`) `source`
    WHERE
        (`source`.`Side` = 'BUY'
            AND `source`.`Orders__Side` = 'SELL'
            AND `source`.`Status` = 'FILLED'
            AND `source`.`Orders__Status` = 'FILLED');
    END$$
    
    DELIMITER ;
    ;
    
    
    
    USE `cryptopump`;
    DROP procedure IF EXISTS `GetProfit`;
    
    USE `cryptopump`;
    DROP procedure IF EXISTS `cryptopump`.`GetProfit`;
    ;
    
    DELIMITER $$
    USE `cryptopump`$$
    CREATE DEFINER=`root`@`%` PROCEDURE `GetProfit`()
    BEGIN
    SELECT 
    	SUM(`source`.`Profit`) AS `profit`,
        SUM(`source`.`Profit`) + (`source`.`Diff`) AS `netprofit`,
        AVG(`source`.`Percentage`) AS `avg`
    FROM
        (SELECT 
            `orders`.`Side` AS `Side`,
                `Orders`.`Side` AS `Orders__Side`,
                `orders`.`Status` AS `Status`,
                `Orders`.`Status` AS `Orders__Status`,
                `orders`.`ThreadID` AS `ThreadID`,
                `Orders`.`CummulativeQuoteQty` AS `Orders__CummulativeQuoteQty`,
                `orders`.`CummulativeQuoteQty` AS `CummulativeQuoteQty`,
                (`Orders`.`CummulativeQuoteQty` - `orders`.`CummulativeQuoteQty`) AS `Profit`,
                ((`Orders`.`CummulativeQuoteQty` - `orders`.`CummulativeQuoteQty`) / CASE
                    WHEN `Orders`.`CummulativeQuoteQty` = 0 THEN NULL
                    ELSE `Orders`.`CummulativeQuoteQty`
                END) AS `Percentage`,
                (SELECT sum(`session`.`DiffTotal`) AS `sum` FROM `session`) AS `Diff`
        FROM
            `orders`
        INNER JOIN `orders` `Orders` ON `orders`.`OrderID` = `Orders`.`OrderIDSource`) `source`
    WHERE
        (`source`.`Side` = 'BUY'
            AND `source`.`Orders__Side` = 'SELL'
            AND `source`.`Status` = 'FILLED'
            AND `source`.`Orders__Status` = 'FILLED');
    END$$
    
    DELIMITER ;
    ;
    
    
    
    ALTER TABLE `cryptopump`.`global` 
    ADD COLUMN `ProfitNet` FLOAT NOT NULL AFTER `Profit`;
    
    
    
    USE `cryptopump`;
    DROP procedure IF EXISTS `SaveGlobal`;
    
    USE `cryptopump`;
    DROP procedure IF EXISTS `cryptopump`.`SaveGlobal`;
    ;
    
    DELIMITER $$
    USE `cryptopump`$$
    CREATE DEFINER=`root`@`%` PROCEDURE `SaveGlobal`(in_Profit float, in_ProfitNet float, in_ProfitPct float, in_TransactTime bigint)
    BEGIN
    INSERT INTO global (Profit, ProfitNet, ProfitPct, TransactTime)
    VALUES (in_Profit, in_ProfitNet, in_ProfitPct, in_TransactTime);
    END$$
    
    DELIMITER ;
    ;
    
    
    
    USE `cryptopump`;
    DROP procedure IF EXISTS `UpdateGlobal`;
    
    USE `cryptopump`;
    DROP procedure IF EXISTS `cryptopump`.`UpdateGlobal`;
    ;
    
    DELIMITER $$
    USE `cryptopump`$$
    CREATE DEFINER=`root`@`%` PROCEDURE `UpdateGlobal`(in_Profit float, in_ProfitNet float, in_ProfitPct float, in_TransactTime bigint)
    BEGIN
    SET SQL_SAFE_UPDATES = 0;
    UPDATE global 
    SET 
        Profit = in_Profit,
        ProfitNet = in_ProfitNet,
        ProfitPct = in_ProfitPct,
        TransactTime = in_TransactTime
    WHERE
        ID = 1;
    SET SQL_SAFE_UPDATES = 1;
    END$$
    
    DELIMITER ;
    ;
    
    
    
    USE `cryptopump`;
    DROP procedure IF EXISTS `GetGlobal`;
    
    USE `cryptopump`;
    DROP procedure IF EXISTS `cryptopump`.`GetGlobal`;
    ;
    
    DELIMITER $$
    USE `cryptopump`$$
    CREATE DEFINER=`root`@`%` PROCEDURE `GetGlobal`()
    BEGIN
    SELECT 
        `global`.`Profit` AS `Profit`,
        `global`.`ProfitNet` AS `ProfitNet`,
        `global`.`ProfitPct` AS `ProfitPct`,
        `global`.`TransactTime` AS `TransactTime`
    FROM
        `global`
    WHERE
        `global`.`ID` = 1
    LIMIT 1;
    END$$
    
    DELIMITER ;
    ;
    
    
    Source code(tar.gz)
    Source code(zip)
  • v1.8(Nov 23, 2021)

    • New global table support offloading MySQL database when multiple threads are executed simultaneously. All threads now share some common global calculations stored in a new 'global' table', like the total amount invested or total ROI, instead of recalculating every 10 seconds for each thread.
    • Implemented Quantity Offset on UI. In rare circumstances, the database may become out-of-sync with the amount of crypto invested due to an Exchange or Connectivity error. This new field in the UI aims to represent the disparity between the system and the exchange quantities. (0 means no difference and all is good).
    • More bugs were squashed

    This release requires a database update if you are already running Cryptopump in production, or if you are deploying for the first time, simply use cryptopump.sql.

    1. Execute the following SQL statement to create the new global table:
    CREATE TABLE `global` (
      `ID` int NOT NULL AUTO_INCREMENT,
      `Profit` float NOT NULL,
      `ProfitPct` float NOT NULL,
      `TransactTime` varchar(45) NOT NULL,
      PRIMARY KEY (`ID`)
    ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci MAX_ROWS=1;
    
    1. Execute the following SQL statement to create global table stored procedures:
    DELIMITER $$
    CREATE DEFINER=`root`@`%` PROCEDURE `GetGlobal`()
    BEGIN
    SELECT 
        `global`.`Profit` AS `Profit`,
        `global`.`ProfitPct` AS `ProfitPct`,
        `global`.`TransactTime` AS `TransactTime`
    FROM
        `global`
    WHERE
        `global`.`ID` = 1
    LIMIT 1;
    END$$
    DELIMITER ;
    
    DELIMITER $$
    CREATE DEFINER=`root`@`%` PROCEDURE `SaveGlobal`(in_Profit float, in_ProfitPct float, in_TransactTime bigint)
    BEGIN
    INSERT INTO global (Profit, ProfitPct, TransactTime)
    VALUES (in_Profit, in_ProfitPct, in_TransactTime);
    END$$
    DELIMITER ;
    
    DELIMITER $$
    CREATE DEFINER=`root`@`%` PROCEDURE `UpdateGlobal`(in_Profit float, in_ProfitPct float, in_TransactTime bigint)
    BEGIN
    SET SQL_SAFE_UPDATES = 0;
    UPDATE global 
    SET 
        Profit = in_Profit,
        ProfitPct = in_ProfitPct,
        TransactTime = in_TransactTime
    WHERE
        ID = 1;
    SET SQL_SAFE_UPDATES = 1;
    END$$
    DELIMITER ;
    
    Source code(tar.gz)
    Source code(zip)
  • v1.7.2(Nov 13, 2021)

    This is a maintenance release with one new feature.

    • Telegram /report now also shows the total deployed funds.

    • Added 'Exit Mode' to the Buy Decision Tree Results

    • Improved error handling for Binance 'read: operation timed out'

    • Code improvements

    Source code(tar.gz)
    Source code(zip)
  • v1.7.1.1(Oct 30, 2021)

  • v1.7.1(Oct 30, 2021)

    • New order book column with difference between target and market price provide a visual cue as to the impact of an early market sale
    • New (updated) visual messages allow a better understanding of market data or configuration holding back Buy and Sell transactions
    • Address Binance error 1006 when WebSockets has been running for a long time
    • Documentation update
    • Couple of bugs squashed
    Source code(tar.gz)
    Source code(zip)
  • v1.7(Oct 17, 2021)

    • New decision algorithm with visual display allows a better understanding of market data or configuration holding back Buy and Sell transactions.
    • New rate counter displays the number of algorithmic operations completed per second on a 5-second rolling average.
    • HTML improvements
    • StaticCheck code improvements
    • Multiple code refactorings
    Source code(tar.gz)
    Source code(zip)
  • v1.6.4(Oct 12, 2021)

    • Added Return on Investment (ROI) to Telegram status report
    • Documentation improvements
    • Code refactoring for Snyk Security compliance
    • Code refactoring for StaticCheck compliance
    • Many under-the-covers improvements
    Source code(tar.gz)
    Source code(zip)
  • v1.6.3(Sep 24, 2021)

    • Added documentation on How to Compile
    • Added documentation on How to Install
    • Added documentation on How to Use
    • Added support for crypto pairs with 4 letters (example GALA)
    • Implemented Snyk Security Recommendations
    • Implemented Codacity Security Recommendations
    Source code(tar.gz)
    Source code(zip)
  • v1.6(Sep 10, 2021)

    • Added STOPLOSS function to execute a transaction sale when the price drops below a certain level. (0 to Disable)
    • New harnessed profit calculation method, with more accuracy.
    • Multiple code improvements and re-write of multiple functions.
    • Improvements to achieve more simultaneous transactions per second.
    • Implemented unit tests to support cloud-based builds.

    (Known Issue: Previous profit calculations won't show up in total profit)

    This new release requires a database update if you are already running Cryptopump in production. If you are deploying for the first time, simply use cryptopump.sql.

    1. Open the GetProfit Stored Procedure and replace its content with:
    CREATE DEFINER=`root`@`%` PROCEDURE `GetProfit`()
    BEGIN
    SELECT 
        SUM(`source`.`Profit`) AS `sum`,
        AVG(`source`.`Percentage`) AS `avg`
    FROM
        (SELECT 
            `orders`.`Side` AS `Side`,
                `Orders`.`Side` AS `Orders__Side`,
                `orders`.`Status` AS `Status`,
                `Orders`.`Status` AS `Orders__Status`,
                `orders`.`ThreadID` AS `ThreadID`,
                `Orders`.`CummulativeQuoteQty` AS `Orders__CummulativeQuoteQty`,
                `orders`.`CummulativeQuoteQty` AS `CummulativeQuoteQty`,
                (`Orders`.`CummulativeQuoteQty` - `orders`.`CummulativeQuoteQty`) AS `Profit`,
                ((`Orders`.`CummulativeQuoteQty` - `orders`.`CummulativeQuoteQty`) / CASE
                    WHEN `Orders`.`CummulativeQuoteQty` = 0 THEN NULL
                    ELSE `Orders`.`CummulativeQuoteQty`
                END) AS `Percentage`
        FROM
            `orders`
        INNER JOIN `orders` `Orders` ON `orders`.`OrderID` = `Orders`.`OrderIDSource`) `source`
    WHERE
        (`source`.`Side` = 'BUY'
            AND `source`.`Orders__Side` = 'SELL'
            AND `source`.`Status` = 'FILLED'
            AND `source`.`Orders__Status` = 'FILLED');
    END
    
    1. Open the GetProfitByThreadID Stored Procedure and replace its content with:
    CREATE DEFINER=`root`@`%` PROCEDURE `GetProfitByThreadID`(IN in_param_ThreadID varchar(45))
    BEGIN
    DECLARE declared_in_param_ThreadID CHAR(50);
        SET declared_in_param_ThreadID = in_param_ThreadID;
    SELECT 
        SUM(`source`.`Profit`) AS `sum`,
        AVG(`source`.`Percentage`) AS `avg`
    FROM
        (SELECT 
            `orders`.`Side` AS `Side`,
                `Orders`.`Side` AS `Orders__Side`,
                `orders`.`Status` AS `Status`,
                `Orders`.`Status` AS `Orders__Status`,
                `orders`.`ThreadID` AS `ThreadID`,
                `Orders`.`CummulativeQuoteQty` AS `Orders__CummulativeQuoteQty`,
                `orders`.`CummulativeQuoteQty` AS `CummulativeQuoteQty`,
                (`Orders`.`CummulativeQuoteQty` - `orders`.`CummulativeQuoteQty`) AS `Profit`,
                ((`Orders`.`CummulativeQuoteQty` - `orders`.`CummulativeQuoteQty`) / CASE
                    WHEN `Orders`.`CummulativeQuoteQty` = 0 THEN NULL
                    ELSE `Orders`.`CummulativeQuoteQty`
                END) AS `Percentage`
        FROM
            `orders`
        INNER JOIN `orders` `Orders` ON `orders`.`OrderID` = `Orders`.`OrderIDSource`) `source`
    WHERE
        (`source`.`Side` = 'BUY'
            AND `source`.`Orders__Side` = 'SELL'
            AND `source`.`Status` = 'FILLED'
            AND `source`.`Orders__Status` = 'FILLED'
            AND `source`.`ThreadID` = declared_in_param_ThreadID);
    END
    
    
    1. Create a new stored procedure called GetThreadTransactionByPriceHigher and replace it with the following content:
    CREATE DEFINER=`root`@`%` PROCEDURE `GetThreadTransactionByPriceHigher`(IN in_param_ThreadID varchar(45), IN in_param_Price float)
    BEGIN
        DECLARE declared_in_param_ThreadID CHAR(50);
        DECLARE declared_in_param_Price FLOAT;
        SET declared_in_param_ThreadID = in_param_ThreadID;
        SET declared_in_param_Price = in_param_Price;
        SELECT 
        `thread`.`CummulativeQuoteQty` AS `CummulativeQuoteQty`,
        `thread`.`OrderID` AS `OrderID`,
        `thread`.`Price` AS `Price`,
        `thread`.`ExecutedQuantity` AS `ExecutedQuantity`,
        `Orders`.`TransactTime` AS `TransactTime`
    FROM
        `thread`
            LEFT JOIN
        `orders` `Orders` ON `thread`.`OrderID` = `Orders`.`OrderID`
    WHERE
        (`thread`.`ThreadID` = declared_in_param_ThreadID
            AND `thread`.`Price` > declared_in_param_Price)
    ORDER BY `thread`.`Price` DESC
    LIMIT 1;
    END
    
    Source code(tar.gz)
    Source code(zip)
  • v1.5(Aug 28, 2021)

    • Websocket latency is now displayed on UI (best kept below 200ms)
    • Telegram bot reporting has been improved to display Fund, Profit, Thread Count, System Status, and Master Node
    • Telegram now proactively message you when a system fault is detected
    • An improved thread locking mechanism
    • Improved databased handling (database updated and new stored procedures)
    • Logging improvements
    • Fixed WebSocket restart issue
    • Added various Binance exchange error handlers for stability
    • Decommissioned Telegram individual commands for Fund, Profit, Thread Count, System Status, and Master Node
    • Multiple code improvements and re-write of multiple functions

    This new release requires a database update if you are already running Cryptopump in production. If you are deploying for the first time, simply use cryptopump.sql.

    1. Execute the following SQL query against the session table:
    ALTER TABLE `cryptopump`.`session` 
    ADD COLUMN `Status` TINYINT(1) NOT NULL AFTER `FiatFunds`;
    
    
    1. Open the UpdateSession Stored Procedure and replace its content with:
    CREATE DEFINER=`root`@`%` PROCEDURE `UpdateSession`(in_ThreadID varchar(45), in_ThreadIDSession varchar(45), in_Exchange varchar(45), in_FiatSymbol varchar(45), in_FiatFunds float, in_Status tinyint(1))
    BEGIN
    SET SQL_SAFE_UPDATES = 0;
    	UPDATE `session`
    	SET `session`.`FiatFunds` = in_FiatFunds,
    		`session`.`Status` = in_Status
    	WHERE `session`.`ThreadID` = in_ThreadID;
    SET SQL_SAFE_UPDATES = 1;
    END
    
    1. Open the SaveSession Stored Procedure and replace its content with:
    CREATE DEFINER=`root`@`%` PROCEDURE `SaveSession`(in_ThreadID varchar(45), in_ThreadIDSession varchar(45), in_Exchange varchar(45), in_FiatSymbol varchar(45), in_FiatFunds float, in_Status tinyint(1))
    BEGIN
    INSERT INTO session (ThreadID, ThreadIDSession, Exchange, FiatSymbol, FiatFunds, Status)
    VALUES (in_ThreadID, in_ThreadIDSession, in_Exchange, in_FiatSymbol, in_FiatFunds, in_Status);
    END
    
    
    1. Create a new stored procedure called GetSessionStatus and replace it with the following content:
    CREATE DEFINER=`root`@`%` PROCEDURE `GetSessionStatus`()
    BEGIN
    SELECT `session`.`ThreadID` AS `ThreadID`, `session`.`Status` AS `Status`
    FROM cryptopump.session
    WHERE `session`.`Status` = 1;
    END
    
    Source code(tar.gz)
    Source code(zip)
  • v1.4(Aug 18, 2021)

    • Various exchange error handlers were added for better stability
    • Cryptocurrency funds are now displayed on the UI
    • Executed Quantity not displayed for each transaction on the UI

    This new release requires a small database update if you are already running Cryptopump in production. Open the GetThreadTransactionByThreadID Stored Procedure ans replace its content with:

    CREATE DEFINER=root@%PROCEDUREGetThreadTransactionByThreadID(IN in_param_ThreadID varchar(45)) BEGIN DECLARE declared_in_param_ThreadID CHAR(50); SET declared_in_param_ThreadID = in_param_ThreadID; SELECTthread.OrderIDASOrderID,thread.CummulativeQuoteQtyASCummulativeQuoteQty,thread.PriceASPrice,thread.ExecutedQuantityASExecutedQuantityFROMthreadLEFT JOINordersOrdersONthread.OrderID=Orders.OrderIDWHEREthread.ThreadID= declared_in_param_ThreadID ORDER BYthread.PriceASC; END

    Source code(tar.gz)
    Source code(zip)
  • v1.3(Aug 11, 2021)

    • New Simple Moving Average line 7 and 14 plotting
    • Improved HTML interface
    • Improved error handling
    • Improved correlation between buy and sell transactions

    This new release requires a small database update if you are already running in production. Execute the following SQL:

    ALTER TABLE `cryptopump`.`orders` 
    ADD COLUMN `OrderIDSource` BIGINT NOT NULL AFTER `OrderID`;
    

    Open the SaveOrder Stored Procedure ans replace its content with:

    CREATE DEFINER=`root`@`%` PROCEDURE `SaveOrder`(ClientOrderId varchar(45), CummulativeQuoteQty float, ExecutedQuantity float, OrderID bigint, OrderIDSource bigint, Price float, Side varchar(45), Status varchar(45), Symbol varchar(45), TransactTime bigint, ThreadID varchar(45), ThreadIDSession varchar(45))
    BEGIN
    INSERT INTO orders (ClientOrderId, CummulativeQuoteQty, ExecutedQuantity, OrderID, OrderIDSource, Price, Side, Status, Symbol, TransactTime, ThreadID, ThreadIDSession)
    VALUES (ClientOrderId, CummulativeQuoteQty, ExecutedQuantity, OrderID, OrderIDSource, Price, Side, Status, Symbol, TransactTime, ThreadID, ThreadIDSession);
    END
    
    Source code(tar.gz)
    Source code(zip)
  • v1.2.2(Aug 7, 2021)

  • v1.2.1(Aug 1, 2021)

  • v1.2(Jul 30, 2021)

    Lot's of improvements in this release:

    • TestNet configuration moved from launch.json to config.yml and is displayed in UI
    • UI changes for better user experience, including real-time stats and price updates, and reactive buttons
    • Telegram bot now support /report command for a more comprehensive status report
    • Added option to start NEW thread processes on the UI.
    • Added option to hold a sale of RSI7 is above a certain threshold. This function help to increase profits for each transaction, not selling at the minimum profit level.
    • Default browser now open automatically for each thread
    • Fixed a browser memory leak and added additional error handlings
    • Add GitHub security analisys to the build process
    • MIT License now added to the project
    • Removed MACD settings, we will focus on RSI and Market Direction

    Important: This version include changes to config.yml and default_config.yml. Please, verify your configuration files upon updating to this release.

    Source code(tar.gz)
    Source code(zip)
  • v1.1(Jul 24, 2021)

Owner
null
The modern cryptocurrency trading bot written in Go.

bbgo A trading bot framework written in Go. The name bbgo comes from the BB8 bot in the Star Wars movie. aka Buy BitCoin Go! Current Status Features E

Yo-An Lin 769 Jan 2, 2023
A fast cryptocurrency trading bot implemented in Go

A fast cryptocurrency bot framework implemented in Go. Ninjabot permits users to create and test custom strategies for spot markets. ⚠️ Caution: Worki

Rodrigo Brito 1.1k Jan 1, 2023
A golang implementation of a console-based trading bot for cryptocurrency exchanges

Golang Crypto Trading Bot A golang implementation of a console-based trading bot for cryptocurrency exchanges. Usage Download a release or directly bu

Daniel Leon 6 Jun 4, 2022
Kelp is a free and open-source trading bot for the Stellar DEX and 100+ centralized exchanges

Kelp Kelp is a free and open-source trading bot for the Stellar universal marketplace and for centralized exchanges such as Binance, Kraken, CoinbaseP

Stellar 959 Jan 6, 2023
A telegram bot that fetches multiple RSS cryptocurrency news feeds for sentiment analysis

Crypto News Telegram Bot A simple telegram bot that will help you stay updated on your latest crypto news This bot will help you keep track of the lat

Cha 4 Aug 22, 2021
BlueBot is an open-source trading bot that can be customized to handle specific investment strategies.

BlueBot Quick Note BlueBot and all mentioned services are free to use, including supported financial APIs. Overview BlueBot is a self-healing trading

Coby Eastwood 18 Sep 7, 2022
Crypto signal trading bot

Crypto-signal-trading-bot Firstly a warning This project has the ability to spen

MoonR 6 Dec 15, 2022
Bot-template - A simple bot template for creating a bot which includes a config, postgresql database

bot-template This is a simple bot template for creating a bot which includes a c

Disgo 2 Sep 9, 2022
Cryptocurrency implemented using the Go programming language

Nomadcoin Making a Cryptocurrency using the Go programming language. Features Mining Transactions Database Backend Wallets REST API HTML Explorer P2P

Nomad Coders 28 Dec 7, 2022
Automated Trader (at). Framework for building trading bots.

Automated Trader (at) Purpose: Framework for building automated trading strategies in three steps: Build your own strategy. Verify it with the backtes

Simon Klinkert 61 Dec 14, 2022
Tripwire is trading platform interface

Tripwire A Golang SDK for binance API. All the REST APIs listed in binance API document are implemented, as well as the websocket APIs. For best compa

Workfoxes 0 Nov 28, 2021
A trading robot, that can submit basic orders in an automated fashion.

Source: https://github.com/harunnryd/btrade Issues: https://github.com/harunnryd/btrade/issues Twitter: @harunnryd LinkedIn: @harunnryd btrade is a ro

harun nur rasyid 2 Jan 26, 2022
A bot based on Telegram Bot API written in Golang allows users to download public Instagram photos, videos, and albums without receiving the user's credentials.

InstagramRobot InstagramRobot is a bot based on Telegram Bot API written in Golang that allows users to download public Instagram photos, videos, and

FTC Team 8 Dec 16, 2021
Sex-bot - The sex bot and its uncreative responses

Sex Bot The sex bot, made with golang! The sex bot can't hear the word "sexo" he

Marcos Vas 3 Nov 11, 2022
Dlercloud-telegram-bot - A Telegram bot for managing your Dler Cloud account

Dler Cloud Telegram Bot A Telegram bot for managing your Dler Cloud account. Usa

Beta Kuang 1 Dec 30, 2021
Quote-bot - Un bot utilisant l'API Twitter pour tweeter une citation par jour sur la programmation et les mathématiques.

Description Ceci est un simple bot programmé en Golang qui tweet une citation sur la programmation tout les jours. Ce bot est host sur le compte Twitt

Liam Cornu 0 Jan 1, 2022
Discord-bot - A Discord bot with golang

JS discord bots Install Clone repo git clone https://github.com/fu-js/discord-bo

JS Club 4 Aug 2, 2022
Bot - Telegram Music Bot in Go

Telegram Music Bot in Go An example bot using gotgcalls. Setup Install the serve

null 9 Jun 28, 2022
Pro-bot - A telegram bot to play around with the community telegram channels

pro-bot ?? Pro Bot A Telegram Bot to Play Around With The Community Telegram Cha

TechProber 1 Jan 24, 2022