Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
K

Krypto-trading-bot

> 数据库
Open source

Self-hosted crypto trading bot (automated high frequency market making) written in C++

3.7K stars0 likes2 views
WebsiteGitHub

About

Self-hosted crypto trading bot (automated high frequency market making) written in C++

self reminder:
patience is the mother of science


\*\*\* REFUGEES WELCOME! \*\*\*
     \*\*\* FATAL ROUTES? \*\*\*
[`K`](https://github.com/ctubio/Krypto-trading-bot) is a family of (very customizable) very low latency [market making](https://github.com/ctubio/Krypto-trading-bot/blob/master/doc/MANUAL.md#what-is-market-making) trading bots with a fully featured [web interface](https://github.com/ctubio/Krypto-trading-bot#web-ui).
It can place or cancel orders on [compatible exchanges](https://github.com/ctubio/Krypto-trading-bot#compatible-exchanges) in less than a few milliseconds per order on a decent machine.

If you don't want to configure or hardcode your own trading strategies in your own machine,
you can fund liquidity pools of automated market makers at tinyman.org (or at any other defi out there),
just remember:

  • never write on any defi website your private keys (you have to sign transactions, not to share your wallet keys)
  • never tell anyone on any chat your private keys (if you have questions, use a public forum and reject impostors)

Latest version at https://github.com/ctubio/Krypto-trading-bot

Our bots run on unix-like systems. Persistence is achieved through a built-in server-less SQLite C++ interface.
Data transfers are directly done from your machine to the exchange using the latest CURL and OpenSSL versions.
Installation in a dedicated Debian, Raspberry, Red Hat, CentOS or macOS instance without Docker is recommended.

The web UI is compatible with most web browsers/resolutions, but Brave or Firefox at 1600px are recommended.
Doesn't require configuration of any web server (unless installed behind your own reverse proxy).

K-trading-bot (web UI + CLI) to control a fully configurable high frequency trading engine, with all features suggested by the community:
K-+portfolios (web UI + CLI) to show all balances from one exchange, with buttons to create, edit or cancel orders and links to go to markets:
K-hello-world (CLI) to print the current value of a given currency to stdout:
bash

 _________________________________________
/ Hello, WORLD!                           \
|                                         |
\ pssst.. 1.00000000 BTC = 56683.49 EUR.  /
 -----------------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
K-scaling-bot, K-stable--bot (CLI) to easy mod and start developing a new custom bot.

Compatible Exchanges

All currency pairs are supported (use --list argument to see all currently tradable pairs on a given exchange).

under maintenanceunder development or abandoned
Spot TradingCoinbase (fees)
⟿ REST + 2 WebSockets

Binance (fees)
Binance.US (fees)
⟿ REST + 1 WebSocket

BitMEX (fees)
⟿ REST + 1 WebSocket
Kraken (fees)
⟿ REST + 2 WebSockets

KuCoin (fees)
⟿ REST + 1 WebSocket

Bitfinex (fees)
Ethfinex (fees)
⟿ REST + 1 WebSocket
Gate.io (fees)
⟿ REST + 1 WebSocket

HitBTC (fees)
Bequant (fees)
⟿ REST + 2 WebSockets

Poloniex (fees)
⟿ REST + 1 WebSocket
Margin Tradingnonenone

If you ask me, is the best and most secure by far, so here is my referral link for both of us to enjoy.

In case you are looking for referral links to other exchanges, feel free to post a new issue asking to other active users.

README

  • Documentation
    • README
    • MANUAL
  • Installation
    • Docker Installation
    • Windows Installation
    • Manual GIT Installation
    • Manual ZIP Installation
    • Configuration After Manual Installation
    • Upgrade to the latest commit
    • Multiple instances party time
  • Information
    • Compatible Exchanges
    • Application Usage
    • Web UI
    • Databases
    • Charts
    • Cloud Hosting
  • Development
    • Build notes
    • Changelogs
  • Humans and Milk Mammals
    • Unlock
    • Donations
    • General Discussion
    • Very Special Thanks
    • Help
    • Issues

Docker Installation

See etc/Dockerfile file.

Windows Installation

Before starting with a manual installation, ensure your target machine has Windows 7 or greater and MSYS2 installed.

Use MSYS2 Terminal to install make (with command pacman -S make), then proceed as usual with the installation.

Manual GIT Installation

  1. Ensure you agree to install collaborative non-free software (see Unlock section).

  2. Ensure your target machine has git and make installed.

  3. Download it wherever you want (feel free to customize the suggested folder name K) and execute the installer:

 $ git clone ssh://[email protected]/ctubio/Krypto-trading-bot K
 $ cd K
 $ make install
  1. Open and edit the config file K.sh in your favorite text editor:
 $ vim K.sh

To upgrade anytime see Upgrade to the latest commit section.

Manual ZIP Installation

  1. Ensure you agree to install collaborative non-free software (see Unlock section).

  2. Ensure your target machine has curl and make installed.

  3. Download it wherever you want (feel free to customize the suggested folder name K) and execute the installer:

 $ mkdir K
 $ cd K
 $ curl -O krypto.ninja/Makefile
 $ make install
  1. Open and edit the config file K.sh in your favorite text editor:
 $ vim K.sh

To upgrade anytime to the latest release just run make reinstall.

Configuration After Manual Installation

See etc/K.sh.dist file or better your own copy of K.sh file located in the top level path.

It just contains a few variables with examples. The very end of the file contains the code that starts the bot.

Once your config file is ready, you can execute it to start the bot:

 $ ./K.sh

Alternatively use make start to run K.sh in the background using screen (to see the output, attach the screen with make screen [or run all at once with make start screen]).

Feel free to run make stop or make restart anytime, and don't forget to read the fucking manual.

Troubleshooting:

  • If there is no wallet data on a given exchange, double-check the currency symbols with --list argument.

Optional:

  • See at least once ./K.sh --help to trade or make help to develop.

  • Use your own HTTP Basic Authentication credentials with --user and --pass arguments.

  • Use your own SSL certificate with --ssl-crt and --ssl-key arguments.
    Otherwise, the insecure built-in certificate is fully featured, but you may need to authorise it in your browser.
    If you want to generate your own certificate see SSL for internal usage.
    In case you really want to use plain HTTP, use --without-ssl argument.

Upgrade to the latest commit

If you upgrade while having any instance running in the background, you will need to manually restart it using make restart or make restartall to start using the latest version.

Upgrade under Manual ZIP Installation:

Please run make reinstall to download the upgraded source and executable files.

Upgrade under Manual GIT Installation:

Feel free anytime to check if there are new upgrades with make diff.

Once you decide that it is time to upgrade, execute make upgrade (or directly make reinstall to skip the validation of new commits).

If you only use git to pull the latest source files from the remote branch, you will still need to upgrade or recompile your executable files.

To not upgrade but instead recompile your own modified source files, use make lib K or just make (see Build notes).

Multiple instances party time

Please note, an "instance" is in fact a *.sh config file; using a single machine with a single installation, you can run as many instances as *.sh files you have (limited by the available free RAM).

You can list the current running instances with make list.

If you haven't defined a config file, make start, make screen, make stop and make restart will use the default config file K.sh.

To run multiple instances using a collection of config files:

  1. Create a new config file with cp etc/K.sh.dist X.sh && chmod +x X.sh (use X.sh or any name but keep .sh extension).

  2. Edit the new config file vim X.sh

  3. Run the new instance with ./X.sh or to run in the background, use K=X.sh make start. To attach to the new instance's screen, use K=X.sh make screen. To stop the new instance, use K=X.sh make stop and to restart it, use K=X.sh make restart. The environment variable K specifies the filename of the config file that yo

Issues· 64 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C++binancebitcoinbitfinexbitmex

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库