Cryptopump Versions Save

CryptoPump is a free, open source cryptocurrency trading tool that focuses on high speed and flexibility. The algorithms utilize Go Language and WebSockets to react in real-time to market movements based on Bollinger statistical analysis and pre-defined profit margins.

v2.0

2 years ago
  • 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.

v1.9.2

2 years ago
  • 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

v1.9

2 years ago
  • 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 ;

v1.8.1.1

2 years ago

Fix for mysql/mysql.go:1080:6: GetGlobal redeclared in this block

v1.8.1

2 years ago
  • 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 ;
;

v1.8

2 years ago
  • 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 ;

v1.7.2

2 years ago

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

v1.7.1.1

2 years ago

Fix

v1.7.1

2 years ago
  • 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

v1.7

2 years ago
  • 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