SkillAgentSearch skills...

Kelp

Kelp is a free and open-source trading bot for the Stellar DEX and 100+ centralized exchanges

Install / Use

/learn @stellar-deprecated/Kelp

README

Kelp

Kelp logo

[GitHub last commit][github-last-commit] [Github All Releases][github-releases] [license][license-apache]

Godoc Go Report Card Build Status Contributors

Kelp is a free and open-source trading bot for the [Stellar universal marketplace][stellarx] and for centralized exchanges such as Binance, Kraken, CoinbasePro, etc.

Kelp includes several configurable trading strategies and exchange integrations. You can define your own parameters or use the sample configurations to quickly get up and running with a trading bot in a matter of minutes. The modular design allows you to easily create new trading strategies, exchange integrations, and assets to give you full control over the bot.

Kelp is built to:

  • Make spreads and make markets
  • Create liquidity and facilitate price-discovery for ICOs
  • Price and trade custom [stablecoins][stablecoin]
  • Mimic orderbooks from other exchanges

To learn more about the Stellar protocol check out [Stellar Videos on Coinbase Earn][stellar coinbase earn], or [this video about the Stellar DEX created by Lumenauts][sdex explainer video], or read more about it on the [Stellar Website][intro to stellar].

Be Smart and Go Slow

Important Disclaimer: Be Smart and Go Slow. Whenever you trade on Stellar, you are trading with volatile assets, in volatile markets, and you risk losing money. Kelp is an experimental software that contains bugs. Use Kelp at your own risk. There is no guarantee you'll make a profit from using our bots or strategies. In fact, if you set bad parameters or market conditions change, Kelp might help you lose money very fast. So be smart and go slow.

Your use of Kelp is governed by the Apache 2.0 open-source license. Please note that SDF’s interactions with you are governed by the SDF [Terms of Service][tos] and [Privacy Policy][privacy-policy].

Kelp GUI screenshot

Table of Contents

Getting Started

How To Get Kelp

To get started with Kelp, either download the pre-compiled binary for your platform from the [Github Releases Page][github-releases] or compile Kelp from source.

There is one binary associated with this project: kelp. Once the binary is downloaded, run the bot by following the instructions in Running Kelp.

Download Kelp Binary

You can find the pre-compiled binary for your platform from the [Github Releases Page][github-releases].

GUI

Here is a list of binaries for the most recent release v1.0.0-rc2 (v1.12.0):

| Platform | Architecture | Binary File Name | | -------------- | ------------ | ---------------- | | MacOS (Darwin) | 64-bit | kelp-v1.12.0-darwin-amd64.tar | | Windows | 64-bit | kelp-v1.12.0-windows-amd64.tar | | Linux | 64-bit | kelp-v1.12.0-linux-amd64.tar |

CLI

Here is a list of binaries for the most recent release v1.12.0:

| Platform | Architecture | Binary File Name | | -------------- | ------------ | ---------------- | | MacOS (Darwin) | 64-bit | kelp-v1.12.0-darwin-amd64.tar | | Windows | 64-bit | kelp-v1.12.0-windows-amd64.tar | | Linux | 64-bit | kelp-v1.12.0-linux-amd64.tar | | Linux | 64-bit arm | kelp-v1.12.0-linux-arm64.tar | | Linux | 32-bit arm5 | kelp-v1.12.0-linux-arm5.tar | | Linux | 32-bit arm6 | kelp-v1.12.0-linux-arm6.tar | | Linux | 32-bit arm7 | kelp-v1.12.0-linux-arm7.tar |

After you untar the downloaded file, change to the generated directory (kelp-v1.12.0) and invoke the kelp binary.

Here's an example to get you started (replace filename with the name of the file that you download):

tar xvf filename
cd kelp-v1.12.0
./kelp

To run the bot in simulation mode, try this command:

./kelp trade -c sample_trader.cfg -s buysell -f sample_buysell.cfg --sim

Run With Docker

This docker image (nikhilsaraf/kelp:latest) points to the latest pre-compiled version of the kelp binary v1.12.0, which can be run like this:

docker run nikhilsaraf/kelp:latest version docker run nikhilsaraf/kelp:latest trade -c sample_trader.cfg -s buysell -f sample_buysell.cfg --sim docker run nikhilsaraf/kelp:latest exchanges docker run nikhilsaraf/kelp:latest strategies

Compile from Source

Note for Windows Users: You should use a [Bash Shell][bash] to follow the steps below. This will give you a UNIX environment in which to run your commands and will enable the ./scripts/build.sh bash script to work correctly.

To compile Kelp from source:

  1. [Download][golang-download] and [setup][golang-setup] Golang v1.13 or later
    1. Set environment variable export GOPROXY=https://goproxy.io,https://proxy.golang.org,https://goproxy.cn
  2. Install [Yarn][yarn-install] and [NodeJs][nodejs-install] (Node v12.3.1 via [nvm][nvm]) to build the Kelp GUI
  3. Clone the kelp repository git clone git@github.com:stellar/kelp.git
  4. Install the [astilectron-bundler][astilectron-bundler] binary
    • go install github.com/asticode/go-astilectron-bundler/astilectron-bundler
  5. Build the binaries using the provided build script (the go install command will produce a faulty binary):
    • ./scripts/build.sh (this must be invoked from root directory i.e. kelp)
  6. Confirm one new binary file exists with version information.
    • ./bin/kelp version
  7. Set up CCXT to use an expanded set of priceFeeds and orderbooks (see the Using CCXT section for details)
    • sudo docker run -p 3000:3000 -d franzsee/ccxt-rest:v0.0.4

Running Kelp

Kelp places orders on the [Stellar marketplace][stellarx] based on the selected strategy. Configuration files specify the Stellar account and strategy details.

These are the following commands available from the kelp binary:

  • trade: Trades with a specific strategy against the Stellar universal marketplace
  • exchanges: Lists the available exchange integrations along with capabilities
  • strategies: Lists the available strategies along with details
  • version: Version and build information
  • help: Help about any command

The trade command has three required parameters which are:

  • botConf: full path to the .cfg file with the account details, sample file here.
  • strategy: the strategy you want to run (sell, sell_twap, buysell, balanced, pendulum, mirror, delete).
  • stratConf: full path to the .cfg file specific to your chosen strategy, sample files here.

Kelp sets the X-App-Name and X-App-Version headers on requests made to Horizon. These headers help us track overall Kelp usage, so that we can learn about general usage patterns and adapt Kelp to be more useful in the future. Kelp also uses Amplitude for metric tracking. These can be turned off using the --no-headers flag. See kelp trade --help for more information.

Here's an example of how to start the trading bot with the buysell strategy:

kelp trade --botConf ./path/trader.cfg --strategy buysell --stratConf ./path/buysell.cfg

If you are ever stuck, just run kelp help to bring up the help section or type kelp help [command] for help with a specific comm

View on GitHub
GitHub Stars1.1k
CategoryDevelopment
Updated3d ago
Forks264

Languages

Go

Security Score

85/100

Audited on Mar 28, 2026

No findings