forked from xeroc/bitshares-pricefeed
-
Notifications
You must be signed in to change notification settings - Fork 19
/
composite.yaml
137 lines (117 loc) · 3.3 KB
/
composite.yaml
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
128
129
130
131
132
133
134
135
136
137
# This is an example configuration file that showcase the use of composite source.
# If true, a new price feed needs manual confirmation
confirm: True
# The producer name(s)
producer: $PRODUCER
# Exchange settings (Here, you may need to add API keys)
exchanges:
# Select the maximum BTC/USD price from multiple sources.
best_btc_price:
klass: Composite
aggregation_type: 'max'
exchanges:
worldcoinindex:
klass: WorldCoinIndex
api_key: $WORLDCOININDEX_API_KEY
free_subscription: True
quotes:
- BTC
bases:
- USD
coinmarketcap:
klass: Coinmarketcap
quotes:
- BTC
bases:
- USD
coindesk:
klass: Coindesk
quotes:
- BTC
bases:
- USD
average_fiat_price:
klass: Composite
aggregation_type: 'mean'
exchanges:
fixer:
klass: Fixer
api_key: $FIXER_API_KEY
free_subscription: True
quotes:
- EUR
- CNY
bases:
- USD
openexchangerates:
klass: OpenExchangeRates
api_key: $OPENEXCHANGERATE_API_KEY
free_subscription: True
quotes:
- EUR
- CNY
bases:
# Only USD with free subscription
- USD
currencylayer:
klass: CurrencyLayer
api_key: $CURRENCYLAYER_API_KEY
free_subscription: True
quotes:
- EUR
- CNY
bases:
# Only USD with free subscription
- USD
huobi:
klass: Huobi
quotes:
- BTS
bases:
- BTC
# default settings
default:
# max age of a feed
maxage: 43200
# minimum percentage that forces a publish
min_change: 0.5
# warn if price change goes above this percentage
warn_change: 1.5
# skip publishing a feed if price goes above this percentage
skip_change: 3
# how to derive a single price from several sources
# Choose from: "median", "mean", or "weighted" (by volume)
metric: weighted
# Select sources for this particular asset. Each source
# has its own fetch() method and collects several markets
# any market of an exchanges is considered but only the
# current asset's price is derived
#
# Choose from: - "*": all,
# - loaded exchanges (see below)
sources:
- '*'
# Core exchange factor for paying transaction fees in
# non-BTS assets. Premium of 5%
core_exchange_factor: 1.05
# maintenance collateral ratio (percentage)
maintenance_collateral_ratio: 175.0
# Maximum short squeeze ratio
maximum_short_squeeze_ratio: 110.0
# If set to True, prices are also derived via 3
# markets instead of just two:
# E.g.: GOLD:USD -> USD:BTC -> BTC:BTS = GOLD:BTS
derive_across_3markets: True
# Enabled assets that are derived if no asset is provided via command
# line
assets:
USD:
CNY:
core_exchange_factor: 1.2
# Intermediate assets are useful for 2 and 3 market price derivation
# E.g.: USD:BTC -> BTC:BTS = USD:BTS
# GOLD:USD -> USD:BTC -> BTC:BTS = GOLD:BTS
intermediate_assets:
- CNY
- USD
- BTC