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.
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:
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 ;
Fix for mysql/mysql.go:1080:6: GetGlobal redeclared in this block
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 ;
;
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.
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;
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 ;
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
Fix