forked from stellar-deprecated/kelp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample_buysell.cfg
96 lines (80 loc) · 5.15 KB
/
sample_buysell.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Sample config file for the "buysell" strategy
# this defines a "priceFeed" type, i.e. where to get the data from
# types supported:
# crypto
# fiat
# fixed
# exchange
# sdex
#
# We take the values from both feeds and divide them to get the center price.
DATA_TYPE_A="exchange"
# the format is <exchange name>/<base-asset-code-defined-by-exchange>/<quote-asset-code-defined-by-exchange>
# use "kraken" or any of the ccxt-exchanges (run `kelp exchanges` for full list)
# examples: "kraken", "ccxt-kraken", "ccxt-binance", "ccxt-poloniex", "ccxt-bittrex"
DATA_FEED_A_URL="kraken/XXLM/ZUSD"
# uncomment to use binance, poloniex, or bittrex as your price feed. You will need to set up CCXT to use this, see the "Using CCXT" section in the README for details.
# be careful about using USD vs. USDT since some exchanges support only one, or both, or in some cases neither.
#DATA_FEED_A_URL="ccxt-kraken/XLM/USD"
#DATA_FEED_A_URL="ccxt-binance/XLM/USDT"
#DATA_FEED_A_URL="ccxt-poloniex/XLM/USDT"
# bittrex does not have an XLM/USD market so this config lists XLM/BTC instead; you should NOT use this when trying to price an asset based on the XLM/USD price (unless you know what you are doing).
#DATA_FEED_A_URL="ccxt-bittrex/XLM/BTC"
# 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/"
# this is a fixed value of 1 here because the exchange and sdex priceFeeds provides a ratio of two assets.
DATA_TYPE_B="fixed"
DATA_FEED_B_URL="1.0"
# sample priceFeed with the "fiat" type.
#DATA_TYPE_B="fiat"
# you can use a service like apilayer.net to get prices for fiat if you want real-time updates. You will need to fill in the access_key in this url
#DATA_FEED_B_URL="http://apilayer.net/api/live?access_key=¤cies=NGN"
# sample priceFeed with the "sdex" type
# this feed pulls from the SDEX, you can use the asset you're trading or something else, like the same coin from another issuer
# DATA_TYPE_A = "sdex"
# this is a string representing a SDEX pair; the format is CODE:ISSUER/CODE:ISSUER
# for XLM leave the issuer string blank
# DATA_FEED_A_URL="COUPON:GBMMZMK2DC4FFP4CAI6KCVNCQ7WLO5A7DQU7EC7WGHRDQBZB763X4OQI/XLM:"
# 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.00010 # distance from center price = 0.010%, i.e. bid/ask spread = 0.02%
AMOUNT=100.0 # multiple of base amount = 10.0 * 100 units of base asset
# second level
[[LEVELS]]
SPREAD=0.00015 # distance from center price = 0.015%, i.e. bid/ask spread = 0.03%
AMOUNT=100.0 # multiple of base amount = 10.0 * 100 units of base asset
# third level
[[LEVELS]]
SPREAD=0.00020 # distance from center price = 0.020%, i.e. bid/ask spread = 0.04%
AMOUNT=100.0 # multiple of base amount = 10.0 * 100 units of base asset
# fourth level
[[LEVELS]]
SPREAD=0.00025 # distance from center price = 0.025%, i.e. bid/ask spread = 0.05%
AMOUNT=100.0 # multiple of base amount = 10.0 * 100 units of base asset
# fifth level
[[LEVELS]]
SPREAD=0.00030 # distance from center price = 0.030%, i.e. bid/ask spread = 0.06%
AMOUNT=100.0 # multiple of base amount = 10.0 * 100 units of base asset
# you can have as many levels as you want, just create more entries here