Repository navigation
Expand file tree
/
Copy pathconfig.default.jsonc
More file actions
365 lines (341 loc) · 14.1 KB
/
Copy pathconfig.default.jsonc
File metadata and controls
365 lines (341 loc) · 14.1 KB
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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
{
"name": "Currencyinfo", // Name of the Currencyinfo instance that will be used for notifications (optional)
"decimals": 12, // Number of decimal places for rate values
// Read how disagreeing quotes become a single rate:
// https://currencyinfo.docs.adamant.im/guide/rate-calculation
// Every option below is documented at:
// https://currencyinfo.docs.adamant.im/reference/configuration
"strategy": "priority", // Strategy to handle rates with close prices
"rateDifferencePercentThreshold": 25, // Percentage from 0 to 200 used to group close rates; use 200 to disable rate-distance splitting
"groupPercentage": 65, // Percentage from 0 to 200 used to notify about significant group deviations
"refreshInterval": 10, // Positive update interval in minutes (optional). Frequent refreshes may require paid API keys
// Upper bound on the number of independent sources required per pair. The effective threshold is
// min(minSources, number of enabled sources advertising the pair), so a pair offered by a single
// provider is still served. Pairs below the configured value are listed in a startup warning
"minSources": 2,
// Specifies the duration (in minutes) for which the rates are considered relevant
// Rates this old can be saved in history
"rateLifetime": 60, // Must be greater than zero
// Source resolution order for the "priority" strategy, highest priority first.
// CryptoCompare is intentionally absent: its free tier was retired on 21 May 2026
// and the source is disabled by default. Add it back when running with a subscription
"priorities": [
"ExchangeRateHost",
"Coinmarketcap",
"Coingecko",
"CoinPaprika",
"CoinLore",
"Binance",
"ExchangeRateApi",
"CurrencyApi",
"MOEX"
],
"server": {
"port": 36661, // Port number for the API service, e.g., http://localhost:36661
"mongodb": {
"host": "mongodb",
"port": 27017,
"db": "tickersdb"
}
},
"notify": {
// Array of Slack webhook URLs for sending notifications (optional)
"slack": [
// "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"
],
// Array of Discord webhook URLs for sending notifications (optional)
"discord": [
// "https://discord.com/api/webhooks/123456789012345678/aBCdeFg9h0iJKl1-_mNoPqRST2uvwXYZ3ab4cDefgH5ijklmnOPQrsTuvWxYZaBC-de_"
],
// Secret passphrase for ADAMANT notifications (optional)
"adamantPassphrase": "apple banana...",
// Array of ADAMANT addresses for sending notifications (optional)
"adamant": [
// "U12345678901234567890"
]
},
"log_level": "log", // Specifies the verbosity of logs (none, error, warn, log, info)
// Non-empty list of base coins for calculating all available pairs
"base_coins": ["USD", "RUB", "EUR", "CNY", "JPY", "BTC", "ETH"],
// A mapping of symbols to their standardized names for consistency across different sources
"mappings": {
"CWIF": "$CWIF"
},
// Optional per-source weights must be non-negative; zero gives a source no group weight
// Free Moscow Exchange (https://moex.com) API configuration. Fiat currencies mostly.
// Using a Russian proxy server because MOEX may block requests from hostile countries. The proxy updates data every 3 minutes.
// The direct source link is https://iss.moex.com/iss/engines/currency/markets/selt/securities.jsonp
// USD, EUR, JPY, and some other currencies are probably outdated because trading them on MOEX has been prohibited since June 2024
// This source is disabled by default as it is not possible to get rate calculations against USD base
"moex": {
// Enable or disable Moex API (optional)
"enabled": false,
// API URL
"url": "https://rusdoor.adamant.im/securities.jsonp",
// Record of fiat pairs and their codes to fetch rates from MOEX
"codes": {
"USD/RUB": "USDRUB_TOM",
"EUR/RUB": "EURRUB_TOM",
"CNY/RUB": "CNYRUB_TOM"
// ...
}
},
// Free CurrencyAPI (https://github.com/fawazahmed0/exchange-api) configuration
// The API updates data once a day, only fiat currencies are advised
"currency_api": {
// Enable or disable CurrencyApi (optional)
"enabled": true,
// API URL
"url": "https://cdn.jsdelivr.net/npm/@fawazahmed0/currency-api@latest/v1/currencies/usd.json",
"codes": [
// List of currency and coin codes to fetch rates from CurrencyAPI (optional)
"USD",
"EUR",
"RUB",
"CNY",
"JPY"
// ...
]
},
// Free ExchangeRate-API (https://www.exchangerate-api.com) open endpoint configuration
// Keyless, no signup, 166 currencies, updated once a day
// Fiat only: BTC and ETH are covered by the crypto sources and must not be listed here
//
// USAGE TERMS. Keyless access is not permission to republish the rates.
// - Private or development instance, rates consumed by you: permitted, add the attribution
// link <a href="https://www.exchangerate-api.com">Rates By Exchange Rate API</a> where the
// rates are shown
// - Public or commercial instance serving these rates onwards: contact the provider for
// written redistribution permission, or set "enabled": false
"exchange_rate_api": {
// Enable or disable ExchangeRateApi (optional)
"enabled": true,
// API URL. The base currency is part of the path and must stay USD
"url": "https://open.er-api.com/v6/latest/USD",
"codes": [
// List of fiat currency codes to fetch rates from ExchangeRate-API (optional)
"USD",
"RUB",
"EUR",
"CNY",
"JPY"
// ...
]
},
// ExchangeRate (https://exchangerate.host) configuration
// The API supports world currencies, precious metals and Bitcoin: https://exchangerate.host/currencies
// Spot exchange rate data is retrieved from several major forex data providers in real-time, validated, processed and delivered hourly, every 10 minutes, or even within the 60-second market window.
"exchange_rate_host": {
"enabled": false, // Set explicitly; when omitted, a configured source is treated as enabled
"api_key": "API key for ExchangeRate", // obligatory
"codes": [
// List of currency and coin codes to fetch rates from ExchangeRateHost (optional)
"USD",
"EUR",
"RUB",
"CNY",
"JPY",
"BTC"
// ...
]
},
// CoinMarketCap (https://coinmarketcap.com) configuration
// Comprehensive coin list with most endpoints update every 1 minute
"coinmarketcap": {
"enabled": false, // Set explicitly; when omitted, a configured source is treated as enabled
"api_key": "API key for CoinMarketCap", // obligatory
"coins": [
// List of coins to fetch rates from CoinMarketCap (optional, deprecated)
"BTC",
"ETH",
"ADM"
// ...
],
"ids": {
// Record of CoinMarketCap SymbolId/UCID pairs for specific coin rates (optional, preferred)
// Search for UCID on a specific coin page, e.g., https://coinmarketcap.com/currencies/adamant-messenger/
"BTC": 1,
"ETH": 1027,
"ADM": 3703
// ...
}
},
// CryptoCompare, now CoinDesk Data (https://developers.coindesk.com) configuration
// DEPRECATED and disabled by default. The free tier was retired on 21 May 2026 and
// min-api.cryptocompare.com answers 401 without a paid subscription, so leaving this
// source enabled fails on every refresh cycle and raises a notification every interval
// Kept for operators who hold a subscription: set "enabled": true and provide "api_key",
// then add "CryptoCompare" back to "priorities"
"cryptocompare": {
"enabled": false, // Enable or disable CryptoCompare API (optional)
"api_key": "API key for CoinDesk Data (CryptoCompare)", // obligatory when enabled
"coins": [
// List of coins to fetch rates from CryptoCompare (optional)
"USD",
"EUR",
"RUB",
"CNY",
"JPY",
"BTC",
"ETH",
"ADM"
// ...
]
},
// CoinGecko (https://coingecko.com) configuration
// Comprehensive coin list. Endpoints are all cached to around 1 to 5 minutes and you can expect most data to be updated at similar intervals.
// Disabled by default because the keyless public plan is throttled to 5-15 calls per minute
// and rate limits unpredictably. The free Demo plan gives 10,000 calls per month at
// 100 calls per minute with no credit card: https://www.coingecko.com/en/developers/dashboard
// Get a Demo key, put it in "api_key", and set "enabled": true
"coingecko": {
"enabled": false, // Enable or disable CoinGecko API (optional)
"api_key": "Demo API key for CoinGecko", // obligatory when enabled
"coins": [
// List of coins to fetch rates from CoinGecko (optional, deprecated)
// Symbols are ambiguous on CoinGecko; prefer "ids" below
"BTC",
"ETH",
"ADM"
// ...
],
"ids": [
// Array of CoinGecko coin IDs for specific coin rates (optional, preferred)
// Search for API ID on a specific coin page, e.g., https://www.coingecko.com/en/coins/adamant-messenger
"bitcoin",
"ethereum",
"binancecoin",
"ripple",
"solana",
"dogecoin",
"cardano",
"tron",
"litecoin",
"dash",
"tether",
"usd-coin",
"adamant-messenger"
// ...
]
},
// Free CoinPaprika (https://coinpaprika.com) configuration
// Keyless, no signup, 20,000 calls per month and 10 requests per second
//
// USAGE TERMS. The plan matrix marks the Free plan
// as "Personal" usage with redistribution unavailable; redistribution is offered on the
// Enterprise plan only
// - Private or development instance, rates consumed by you: permitted on the free plan
// - Public or commercial instance serving these rates onwards: an Enterprise agreement is
// required, or set "enabled": false
// CoinPaprika has no batch-by-ids ticker endpoint, so a cycle costs one ranked bulk call
// plus one call per configured ID that ranks outside "bulk_limit". With the defaults below
// that is two calls per cycle: ~8,900 calls in a 31-day month at "refreshInterval": 10, and
// the free quota is exhausted below a ~4.5 minute interval
"coinpaprika": {
// Enable or disable CoinPaprika API (optional)
"enabled": true,
"coins": [
// List of coins to fetch rates from CoinPaprika (optional, deprecated)
// CoinPaprika symbols are ambiguous (ADM matches two active coins), so prefer "ids"
"BTC",
"ETH",
"ADM"
// ...
],
"ids": [
// Array of CoinPaprika coin IDs for specific coin rates (optional, preferred)
// Search for the ID on a specific coin page, e.g., https://coinpaprika.com/coin/adm-adamant-messenger/
"btc-bitcoin",
"eth-ethereum",
"bnb-binance-coin",
"xrp-xrp",
"sol-solana",
"doge-dogecoin",
"ada-cardano",
"trx-tron",
"ltc-litecoin",
"dash-dash",
"usdt-tether",
"usdc-usd-coin",
"adm-adamant-messenger"
// ...
],
// "limit" of the single ranked bulk call, up to 2000 (optional, defaults to 200)
// Every ID above except ADM ranks inside the top 100; 200 leaves headroom
"bulk_limit": 200,
// Upper bound on per-coin calls (optional, defaults to 5, 0 keeps only bulk-range coins)
// At startup, out-of-range/unranked coins beyond this cap are excluded from requests
// and source coverage, with a warning. Explicit IDs take precedence over symbols
// Raise this cap or adjust "bulk_limit", then restart to reconsider excluded coins
// The same cap limits fallback calls when a bulk response temporarily omits a coin
"max_individual_requests": 5
},
// Free CoinLore (https://coinlore.com) configuration
// Keyless, no signup. The whole coin set is covered by a single multi-ID request per cycle
"coinlore": {
// Enable or disable CoinLore API (optional)
"enabled": true,
"coins": [
// List of coins to fetch rates from CoinLore (optional)
// Symbols listed here without an entry in "ids" are resolved at startup from the
// lightweight /api/assets/ directory, in a single request
"BTC",
"ETH",
"ADM"
// ...
],
"ids": {
// Record of CoinLore Symbol/ID pairs for specific coin rates (optional, preferred)
// Numeric CoinLore IDs are reassigned across listings, so a stale ID is rejected at
// runtime when the returned symbol does not match. Find the ID in the API response of
// https://api.coinlore.net/api/tickers/
"BTC": 90,
"ETH": 80,
"BNB": 2710,
"XRP": 58,
"SOL": 48543,
"DOGE": 2,
"ADA": 257,
"TRX": 2713,
"LTC": 1,
"DASH": 8,
"USDT": 518,
"USDC": 33285,
"ADM": 33250
// ...
}
},
// Free Binance (https://binance.com) public market data configuration
// Keyless, no signup, high rate limits. Binance is an exchange rather than an aggregator,
// so it adds genuine source independence from CoinGecko, CoinMarketCap, CoinPaprika and
// CoinLore, which partly share upstream data
// Binance geo-blocks some regions with HTTP 451; the connector disables itself and alerts
// once instead of failing every cycle
// ADM is not listed on Binance, so ADM coverage comes from the aggregator sources
"binance": {
// Enable or disable Binance API (optional)
"enabled": true,
// Binance has no direct USD pairs, only stablecoin pairs. Rates are requested against
// this asset and served as USD, so a depeg of the quote asset shifts every Binance rate
// by the depeg magnitude. The divergence machinery covers that: the affected rates split
// into their own group and "strategy" resolves the pair from the healthy one. Switch to
// "USDC" without a code change if preferred. Do NOT express this as a global "mappings"
// entry: that would rewrite the genuine USDT/USD quote into a degenerate USD/USD and
// hide the very depeg this assumption needs to stay observable
"quote_asset": "USDT",
"coins": [
// List of coins to fetch rates from Binance (optional)
"BTC",
"ETH",
"BNB",
"XRP",
"SOL",
"DOGE",
"ADA",
"TRX",
"LTC",
"DASH"
// ...
]
}
}