forked from xeroc/bitshares-pricefeed
-
Notifications
You must be signed in to change notification settings - Fork 19
/
baip2.yaml
238 lines (218 loc) · 5.8 KB
/
baip2.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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
# 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:
####################################
# Intermediate assets exchange rates
####################################
btc_and_eth_price:
klass: Composite
aggregation_type: 'weighted_mean'
exchanges:
coinbase:
klass: Coinbase
quotes:
- BTC
- ETH
bases:
- USD
kraken:
klass: Kraken
quotes:
- XXBT
- XETH
bases:
- ZUSD
aliases:
XXBT: BTC
XETH: ETH
ZUSD: USD
bitstamp:
klass: Bitstamp
quotes:
- BTC
- ETH
bases:
- USD
usdt_price:
klass: Composite
aggregation_type: 'weighted_mean'
exchanges:
bittrex:
klass: Bittrex
quotes:
- USDT
bases:
- USD
kraken:
klass: Kraken
quotes:
- USDT
bases:
- ZUSD
aliases:
ZUSD: USD
####################################
# Crypto Exchange Rates
####################################
aex:
klass: Aex
quotes:
- BTS
bases:
- USDT
- CNC
aliases:
CNC: CNY
binance:
klass: Binance
quotes:
- BTS
bases:
- BTC
openledger:
klass: Graphene
quotes:
- BTS
bases:
- OPEN.BTC
aliases:
OPEN.BTC: BTC
gdex:
klass: Graphene
quotes:
- BTS
bases:
- GDEX.BTC
aliases:
GDEX.BTC: BTC
bitshares:
klass: Graphene
quotes:
- CNY
bases:
- BTS
aliases:
CNY: BITCNY
cointiger:
klass: CoinTiger
quotes:
- BTS
- BITCNY
bases:
- BTC
- ETH
gateio:
klass: GateIo
enable: False
quotes:
- BTS
bases:
- BTC
- USDT
huobi:
klass: Huobi
quotes:
- BTS
bases:
- BTC
- USDT
- ETH
lbank:
klass: Lbank
quotes:
- BTS
bases:
- BTC
- ETH
poloniex:
klass: Poloniex
quotes:
- BTS
bases:
- BTC
zb:
klass: Zb
quotes:
- BTS
- BITCNY
bases:
- BTC
- USDT
- QC
qc_fees:
klass: Manual
feed:
CNY:
QC:
price: 0.995
volume: 1.0
# default settings
default:
# max age of a feed (2h)
maxage: 7200
# minimum percentage that forces a publish
min_change: 0.2
# warn if price change goes above this percentage
warn_change: 10
# skip publishing a feed if price goes above this percentage
skip_change: 20
# skip publishing a feed if producer is not an active witness.
skip_inactive_witness: True
# 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.2
# 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
# Activate loopholes protection
# Specify how many days should be used to compute the moving average.
# See BAIP-2: https://github.com/bitshares/baips/blob/master/baip-0002.md
loopholes_protection_days: 2
# Enabled assets that are derived if no asset is provided via command
# line
assets:
USD:
global_settlement_protection: 2
maximum_short_squeeze_ratio: 101.0
maintenance_collateral_ratio: 150.0
price_threshold: 0.0350
CNY:
global_settlement_protection: 2
maximum_short_squeeze_ratio: 101.0
maintenance_collateral_ratio: 160.0
price_threshold: 0.2200
intermediate_assets:
- USD
- BTC
- USDT
- BITCNY
- ETH
- QC
# Historical computed prices storage, to be used in next runs to compute the moving average.
history:
# Save as CSV files in a (local) directory
klass: FileHistory
dirname: prices_db
# Save in a (remote) database
#klass: SqlHistory
#url: "postgres+pypostgresql://user:pass@localhost:5432/postgres"