Skip to content

Instantly share code, notes, and snippets.

@pauliusuza
Last active October 26, 2018 18:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pauliusuza/1dc0181c6ca42399f7088a544f984fca to your computer and use it in GitHub Desktop.
Save pauliusuza/1dc0181c6ca42399f7088a544f984fca to your computer and use it in GitHub Desktop.
Kelp v1.1.1 setup for STEEM and SBD on Stellar
# Trader Config file for SBD
# ADD YOUR SECRET KEY BELOW for the trading account, this is the account that "owns" the trades
TRADING_SECRET_SEED="S............................................"
# (optional) the source account, this is the account used to deduct fees and consume the sequence number (GBHXGGUD3LIAWJHFO7737C4TFNDDDLZ74C6VBEPF5H53XNRCVIUWZA5I)
# SOURCE_SECRET_SEED=""
# Asset information
ASSET_CODE_A="XLM"
ASSET_CODE_B="SBD"
ISSUER_B="GB3KBOFUCVTWEZ7YIZ7PAKLQMKPCTGWU3LOMANMCT7V6I3AAK4USTEEM"
# How often you want the bot to run
TICK_INTERVAL_SECONDS=300
# Network
HORIZON_URL="https://horizon.stellar.org"
# Trader Config file for STEEM
# ADD YOUR SECRET KEY BELOW for the trading account, this is the account that "owns" the trades
TRADING_SECRET_SEED="S............................................"
# (optional) the source account, this is the account used to deduct fees and consume the sequence number (GBHXGGUD3LIAWJHFO7737C4TFNDDDLZ74C6VBEPF5H53XNRCVIUWZA5I)
# SOURCE_SECRET_SEED=""
# Asset information
ASSET_CODE_A="XLM"
ASSET_CODE_B="STEEM"
ISSUER_B="GB3KBOFUCVTWEZ7YIZ7PAKLQMKPCTGWU3LOMANMCT7V6I3AAK4USTEEM"
# How often you want the bot to run
TICK_INTERVAL_SECONDS=300
# Network
HORIZON_URL="https://horizon.stellar.org"
# BUYSELL strategy for SBD on Stellar
# Market: https://www.stellarx.com/markets/SBD:GB3KBOFUCVTWEZ7YIZ7PAKLQMKPCTGWU3LOMANMCT7V6I3AAK4USTEEM
# For detailed instructions about modifying this config and other examples, please see https://github.com/lightyeario/kelp
# sample priceFeed with the "crypto" type
DATA_TYPE_A="crypto"
# this is the URL to a coinmarketcap feed which the bot understands.
DATA_FEED_A_URL="https://api.coinmarketcap.com/v1/ticker/stellar/"
# sample priceFeed with the "crypto" type
DATA_TYPE_B="crypto"
# this is the URL to a coinmarketcap feed which the bot understands.
DATA_FEED_B_URL="https://api.coinmarketcap.com/v1/ticker/steem-dollars/"
# what value of a price change triggers re-creating an offer. Price change refers to the existing price of the offer vs. what price we want to set. value is a percentage specified as a decimal number (0 < value < 1.00)
PRICE_TOLERANCE=0.001
# what value of an amount change triggers re-creating an offer. Amount change refers to the existing amount of the offer vs. what amount we want to set. value is a percentage specified as a decimal number (0 < value < 1.00)
AMOUNT_TOLERANCE=0.001
# how much percent to offset your rates by, specified as a decimal (ex: 0.05 = 5%). Can be used in conjunction with RATE_OFFSET below.
# A positive value indicates that your base asset (ASSET_A) has a higher rate than the rate received from your price feed
# A negative value indicates that your base asset (ASSET_A) has a lower rate than the rate received from your price feed
RATE_OFFSET_PERCENT=0.0
# how much to offset your rates by, specified in number of units of the quote asset (ASSET_B) as a decimal.
# Can be used in conjunction with RATE_OFFSET_PERCENT above.
# A positive value indicates that your base asset (ASSET_A) has a higher rate than the rate received from your price feed
# A negative value indicates that your base asset (ASSET_A) has a lower rate than the rate received from your price feed
RATE_OFFSET=0.0
# specifies the order in which to offset the rates. If true then we apply the RATE_OFFSET_PERCENT first otherwise we apply the RATE_OFFSET first
# example rate calculation when set to true: ((rate_from_price_feed_a/rate_from_price_feed_b) * (1 + rate_offset_percent)) + rate_offset
# example rate calculation when set to false: ((rate_from_price_feed_a/rate_from_price_feed_b) + rate_offset) * (1 + rate_offset_percent)
RATE_OFFSET_PERCENT_FIRST=true
# scale factor for the amount we want to set (0 < value), can be greater than 1.
AMOUNT_OF_A_BASE=10.0
# levels are mirrored on the buy and sell side. spread is a percentage specified as a decimal number (0 < spread < 1.00)
# first level
[[LEVELS]]
SPREAD=0.025 # distance from center price = 0.025%, i.e. bid/ask spread = 0.05%
AMOUNT=1.0 # multiple of base amount = 10.0 * 100 units of base asset
# second level
[[LEVELS]]
SPREAD=0.030 # distance from center price = 0.030%, i.e. bid/ask spread = 0.06%
AMOUNT=1.0 # multiple of base amount = 10.0 * 100 units of base asset
# add as many levels as you like below
# BUYSELL strategy for STEEM on Stellar
# Market: https://www.stellarx.com/markets/STEEM:GB3KBOFUCVTWEZ7YIZ7PAKLQMKPCTGWU3LOMANMCT7V6I3AAK4USTEEM
# For detailed instructions about modifying this config and other examples, please see https://github.com/lightyeario/kelp
# sample priceFeed with the "crypto" type
DATA_TYPE_A="crypto"
# this is the URL to a coinmarketcap feed which the bot understands.
DATA_FEED_A_URL="https://api.coinmarketcap.com/v1/ticker/stellar/"
# sample priceFeed with the "crypto" type
DATA_TYPE_B="crypto"
# this is the URL to a coinmarketcap feed which the bot understands.
DATA_FEED_B_URL="https://api.coinmarketcap.com/v1/ticker/steem/"
# what value of a price change triggers re-creating an offer. Price change refers to the existing price of the offer vs. what price we want to set. value is a percentage specified as a decimal number (0 < value < 1.00)
PRICE_TOLERANCE=0.001
# what value of an amount change triggers re-creating an offer. Amount change refers to the existing amount of the offer vs. what amount we want to set. value is a percentage specified as a decimal number (0 < value < 1.00)
AMOUNT_TOLERANCE=0.001
# how much percent to offset your rates by, specified as a decimal (ex: 0.05 = 5%). Can be used in conjunction with RATE_OFFSET below.
# A positive value indicates that your base asset (ASSET_A) has a higher rate than the rate received from your price feed
# A negative value indicates that your base asset (ASSET_A) has a lower rate than the rate received from your price feed
RATE_OFFSET_PERCENT=0.0
# how much to offset your rates by, specified in number of units of the quote asset (ASSET_B) as a decimal.
# Can be used in conjunction with RATE_OFFSET_PERCENT above.
# A positive value indicates that your base asset (ASSET_A) has a higher rate than the rate received from your price feed
# A negative value indicates that your base asset (ASSET_A) has a lower rate than the rate received from your price feed
RATE_OFFSET=0.0
# specifies the order in which to offset the rates. If true then we apply the RATE_OFFSET_PERCENT first otherwise we apply the RATE_OFFSET first
# example rate calculation when set to true: ((rate_from_price_feed_a/rate_from_price_feed_b) * (1 + rate_offset_percent)) + rate_offset
# example rate calculation when set to false: ((rate_from_price_feed_a/rate_from_price_feed_b) + rate_offset) * (1 + rate_offset_percent)
RATE_OFFSET_PERCENT_FIRST=true
# scale factor for the amount we want to set (0 < value), can be greater than 1.
AMOUNT_OF_A_BASE=10.0
# levels are mirrored on the buy and sell side. spread is a percentage specified as a decimal number (0 < spread < 1.00)
# first level
[[LEVELS]]
SPREAD=0.025 # distance from center price = 0.025%, i.e. bid/ask spread = 0.05%
AMOUNT=1.0 # multiple of base amount = 10.0 * 100 units of base asset
# second level
[[LEVELS]]
SPREAD=0.030 # distance from center price = 0.030%, i.e. bid/ask spread = 0.06%
AMOUNT=1.0 # multiple of base amount = 10.0 * 100 units of base asset
# add as many levels as you like below

Hello!

For those of you interested in providing liquidity to STEEM/SBD market on Stellar Network, you can automate the setup using Kelp bot

To get started:

  1. Build Kelp from source or download a pre-built binary from Github
  2. Download the config files and modify them to your liking
  3. Add your trading account's private key to the c_trader... files
  4. Run the Bot:
  • For SBD: kelp trade -s buysell -c c_trader_sbd.cfg -f f_buysell_sbd.cfg
  • For STEEM: kelp trade -s buysell -c c_trader_steem.cfg -f f_buysell_steem.cfg

If you want to simulate the trades without submitting to the network, add --sim to the parameters: kelp trade -s buysell -c c_trader_steem.cfg -f f_buysell_steem.cfg --sim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment