This repository has been archived by the owner on Feb 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 262
/
sample_selltwap.cfg
127 lines (110 loc) · 8.6 KB
/
sample_selltwap.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# Sample config file for the "sell twap" strategy
# This strategy requires the database and the fill handler to be enabled in the trader.cfg file
# We are selling the base asset here, i.e. ASSET_CODE_A as defined in the trader config
# Price Feeds
# Note: we take the value from the A feed and divide it by the value retrieved from the B feed below.
# the type of feeds can be one of crypto, fiat, fixed, exchange, sdex, function.
# specification of feed type "exchange"
START_ASK_FEED_TYPE="exchange"
# the specification of the A feed
# the format is <exchange name>/<base-asset-code-defined-by-exchange>/<quote-asset-code-defined-by-exchange>/<modifier>
# exchange name:
# use "kraken" or any of the ccxt-exchanges (run `kelp exchanges` for full list)
# examples: "kraken", "ccxt-kraken", "ccxt-binance", "ccxt-poloniex", "ccxt-bittrex"
# base asset code defined by exchange:
# this is the asset code defined by the exchange for the asset whose price you want to fetch (base asset).
# this code can be retrieved from the exchange's website or from the ccxt manual for ccxt-based exchanges.
# quote asset code defined by exchange:
# this is the asset code defined by the exchange for asset in which you want to quote the price (quote asset).
# this code can be retrieved from the exchange's website or from the ccxt manual for ccxt-based exchanges.
# modifier:
# this is a modifier that can be included only for feed type "exchange".
# a modifier allows you to fetch the "mid" price, "ask" price, "bid" price, or "last" price for now.
# if left unspecified then this is defaulted to "mid" for backwards compatibility (until v2.0 is released) (LOH-2)
# uncomment below 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.
#START_ASK_FEED_URL="ccxt-kraken/XLM/USD/last"
#START_ASK_FEED_URL="ccxt-binance/XLM/USDT/ask"
#START_ASK_FEED_URL="ccxt-poloniex/XLM/USDT/bid"
# 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).
#START_ASK_FEED_URL="ccxt-bittrex/XLM/BTC"
START_ASK_FEED_URL="kraken/XXLM/ZUSD/mid"
# sample priceFeed with the "crypto" type
#START_ASK_FEED_TYPE="crypto"
# this is the URL to a coinmarketcap feed which the bot understands.
#START_ASK_FEED_URL="https://api.coinmarketcap.com/v1/ticker/stellar/"
# 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
# START_ASK_FEED_TYPE = "sdex"
# this is a string representing a SDEX pair; the format is CODE:ISSUER/CODE:ISSUER
# for XLM leave the issuer string blank
# START_ASK_FEED_URL="COUPON:GBMMZMK2DC4FFP4CAI6KCVNCQ7WLO5A7DQU7EC7WGHRDQBZB763X4OQI/XLM:"
# sample priceFeed of type "function"
# this feed type uses one of the pre-defined functions to recursively operate on other price feeds
# all URLs for this type of feed are formatted like so: function_name(feed_type/feed_url[,feed_type/feed_url])
#START_ASK_FEED_TYPE = "function"
# the supported functions for now are only the "max" and "invert" functions, example usage:
# "max": max(exchange/ccxt-kraken/XLM/USD/mid,exchange/ccxt-binance/XLM/USDT/mid) -- will give you the larger price
# between kraken's mid price and binance's mid price
# "invert": invert(exchange/ccxt-kraken/XLM/USD/mid) -- will give you the effective USD/XLM price
#START_ASK_FEED_URL = "max(exchange/ccxt-kraken/XLM/USD/mid,exchange/ccxt-binance/XLM/USDT/mid)"
# 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
# NUM_HOURS_TO_SELL is an integer that defines the number of hours in which to complete the sales
NUM_HOURS_TO_SELL = 23
# PARENT_BUCKET_SIZE_SECONDS is an integer value which represents the number of seconds to count as a single parent bucket.
# this should perfectly divide the number of seconds in a day (24 * 60 * 60)
# TODO how does this handle leap days?
PARENT_BUCKET_SIZE_SECONDS = 600
# DISTRIBUTE_SURPLUS_OVER_REMAINING_INTERVALS_PERCENT_CEILING is specified as a decimal value from 0.0-1.0 inclusive.
# we take the percent of remaining bucket intervals (ceiling of that number) to arrive at the number of intervals over which to distribute the surplus.
# ceiling(4.5) = 5
# ceiling(5.1) = 6
# example: a value of 0.05 here will distribute the surplus over 1/20th of the remaining bucket intervals
# if there are 345 bucket intervals remaining and this value is set to 0.05, the bot will use this calculation:
# ceiling(0.05 * 345)
# = ceiling(17.25)
# = 17 buckets over which to distribute the excess surplus
# therefore, the bot will distribute the surplus over the remaining 17 bucket intervals (of total 345 bucket intervals)
# Note that setting this to 0.0 will discard any surplus and setting it to 1.0 will distribute over all remaining bucket intervals
DISTRIBUTE_SURPLUS_OVER_REMAINING_INTERVALS_PERCENT_CEILING = 0.05
# EXPONENTIAL_SMOOTHING_FACTOR is a decimal (0 <= x <= 1)
# a larger number results in a smoother distribution across the remaining intervals
# set this to 1.0 for a linear distribution over the chosen bucket intervals and 0.0 to sell the entire surplus in the next bucket interval
EXPONENTIAL_SMOOTHING_FACTOR = 0.50
# MIN_CHILD_ORDER_SIZE_PERCENT_OF_PARENT is a decimal value (0 <= x <= 1) which defines the lower bound of the randomization function to be
# used when picking the size of the order to be placed in a bot update cycle. The randomized number is then multiplied by the total capacity
# for the current bucket interval. If the available capacity for the interval is less than this amount then we will use the available capacity.
MIN_CHILD_ORDER_SIZE_PERCENT_OF_PARENT = 0.2
####################################################################################################
############################## ALL LISTS AND OBJECTS BELOW THIS LINE ###############################
####################################################################################################
# DAY_OF_WEEK_DAILY_CAP is a volume filter specified individually for every day of the week.
# see documenntation in sample_trader.cfg for details.
# Note that we only support the following filters here (for now):
# - volume/daily/sell/base
# i.e. we only support volume filters constrained on the base asset. In the future we may consider supporting constraints on the quote asset.
# make sure any filters in your trader.cfg file is compliant with this configuration.
[DAY_OF_WEEK_DAILY_CAP]
Mo = "volume/daily/sell/base/10000.0/exact"
Tu = "volume/daily/sell/base/10000.0/exact"
We = "volume/daily/sell/base/10000.0/exact"
Th = "volume/daily/sell/base/10000.0/exact"
Fr = "volume/daily/sell/base/10000.0/exact"
Sa = "volume/daily/sell/base/10000.0/exact"
Su = "volume/daily/sell/base/10000.0/exact"