Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
.claude
.git
.github
.vscode
config.jsonc
config.test.jsonc
coverage
dist
docs
logs
node_modules
npm-debug.log*
Expand Down
Binary file modified .github/banner-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .github/banner-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions .github/wiki/API-specification.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# API specification β€” moved

> [!IMPORTANT]
> This page is **deprecated** and no longer updated. The maintained API reference is at **<https://currencyinfo.docs.adamant.im/reference/api>**.

- [`GET /get`](https://currencyinfo.docs.adamant.im/reference/api#get) β€” current merged rates
- [`GET /getHistory`](https://currencyinfo.docs.adamant.im/reference/api#gethistory) β€” stored snapshots by interval, point in time, or pair
- [`GET /status`](https://currencyinfo.docs.adamant.im/reference/api#status) β€” readiness and refresh schedule

## What changed since this page was written

- The examples on this page used port **`36668`**. The default port is **`36661`**
- The `/get` parameter is **`rateLifetime`**, not `rateLiftime`
- Historical `coin` filters use the documented **`BASE/QUOTE`** order. A deployment carrying a client-side pair reversal workaround must remove it
- The new reference documents **validation errors, units, freshness semantics, and pair-order guarantees**, none of which this page covered
- `timestamp` combined with `coin` now resolves to the closest snapshot **that contains the requested pair**, instead of the globally closest snapshot filtered afterwards
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Dealing with rate differences from multiple sources β€” moved

> [!IMPORTANT]
> This page is **deprecated** and no longer updated. The maintained documentation is at **<https://currencyinfo.docs.adamant.im/guide/rate-calculation>**.

- [Grouping: `rateDifferencePercentThreshold`](https://currencyinfo.docs.adamant.im/guide/rate-calculation#grouping-ratedifferencepercentthreshold)
- [Choosing the dominant group: `groupPercentage`](https://currencyinfo.docs.adamant.im/guide/rate-calculation#choosing-the-dominant-group-grouppercentage)
- [Resolving a rate: `strategy`](https://currencyinfo.docs.adamant.im/guide/rate-calculation#resolving-a-rate-strategy)
- [Coverage gate: `minSources`](https://currencyinfo.docs.adamant.im/guide/rate-calculation#coverage-gate-minsources)

## What changed since this page was written

> [!WARNING]
> This page described **`groupPercentage` incorrectly**. It called it "the percentage of sources needed in a group to consider it trustworthy". That is not what the code does.
>
> `groupPercentage` is the **minimum relative distance between the weights of the two heaviest groups**, measured with the same mean-based percentage formula used for grouping. The dominant group wins only when it outweighs the runner-up by more than `groupPercentage`; otherwise the pair is rejected as ambiguous and an alert is dispatched.
>
> Consequently `groupPercentage: 200` rejects every pair that splits into more than one group, and `groupPercentage: 0` accepts the heavier group unless the two are exactly tied.

- The source names in the examples predate the current connector set, which now includes **CoinPaprika, CoinLore, Binance, and ExchangeRate-API**, and treats **CryptoCompare** as deprecated
- The new page documents the exact percentage-difference formula, the group-overlap behaviour, and how the strategies interact with weights and priorities
33 changes: 33 additions & 0 deletions .github/wiki/Home.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This wiki has moved

> [!IMPORTANT]
> The Currencyinfo wiki is **deprecated** and is no longer updated. The maintained documentation lives at **<https://currencyinfo.docs.adamant.im>**.
>
> It is version-controlled in the [`docs/`](https://github.com/Adamant-im/currencyinfo/tree/master/docs) directory of the repository, so it is reviewed with the code it documents and corrected in the same pull request.

This page is kept so that existing links keep working.

## Where everything went

| You were looking for | Go to |
| --- | --- |
| Installation | [Installation](https://currencyinfo.docs.adamant.im/guide/installation) and [Quick start with Docker](https://currencyinfo.docs.adamant.im/guide/quick-start) |
| API documentation | [REST API reference](https://currencyinfo.docs.adamant.im/reference/api) |
| Saved rates format | [Rate history](https://currencyinfo.docs.adamant.im/guide/history) |
| Notifications | [Notifications](https://currencyinfo.docs.adamant.im/guide/notifications) |
| Dealing with rate differences | [Rate calculation](https://currencyinfo.docs.adamant.im/guide/rate-calculation) |
| Rate life time | [Freshness](https://currencyinfo.docs.adamant.im/guide/rate-calculation#freshness-ratelifetime) |
| Contributing | [Contributing](https://currencyinfo.docs.adamant.im/project/contributing) |
| Migration from v4.0.0 or v3.x.x | [Upgrade and rollback](https://currencyinfo.docs.adamant.im/guide/upgrading) |
| Every configuration option | [Configuration reference](https://currencyinfo.docs.adamant.im/reference/configuration) |
| Rate sources, quotas, and terms | [Rate sources](https://currencyinfo.docs.adamant.im/reference/sources/) |

The complete mapping, including what was corrected during the migration, is published at [Documentation map](https://currencyinfo.docs.adamant.im/project/documentation-map).

## Other project links

- Landing page: <https://currencyinfo.dev>
- Source code: <https://github.com/Adamant-im/currencyinfo>
- Releases: <https://github.com/Adamant-im/currencyinfo/releases>
- Container image: <https://github.com/Adamant-im/currencyinfo/pkgs/container/currencyinfo>
- Issues: <https://github.com/Adamant-im/currencyinfo/issues>
15 changes: 15 additions & 0 deletions .github/wiki/Installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Installation β€” moved

> [!IMPORTANT]
> This page is **deprecated** and no longer updated. The maintained installation guide is at **<https://currencyinfo.docs.adamant.im/guide/installation>**.

- **[Quick start with Docker](https://currencyinfo.docs.adamant.im/guide/quick-start)** β€” the fastest working instance, using the published image
- **[Installation](https://currencyinfo.docs.adamant.im/guide/installation)** β€” the published container image, building from a checkout, a source installation, and a systemd unit
- **[Upgrade and rollback](https://currencyinfo.docs.adamant.im/guide/upgrading)** β€” backups, version upgrades, index rebuilds, and database migrations

## What changed since this page was written

- Currencyinfo requires **Node.js 22 or newer**. This page said v20
- A **published container image** exists at `ghcr.io/adamant-im/currencyinfo`, covering `linux/amd64` and `linux/arm64`. Building the image locally is no longer the recommended path
- The contributing guide is [`CONTRIBUTING.md`](https://github.com/Adamant-im/currencyinfo/blob/master/CONTRIBUTING.md) at the repository root, not `.github/CONTRIBUTING.md`
- The container runs as the unprivileged `node` user with UID and GID `1000`, so a bind-mounted `config.jsonc` needs `sudo chown 1000:1000 config.jsonc` on Linux before the first start
19 changes: 19 additions & 0 deletions .github/wiki/Notifications.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Notifications β€” moved

> [!IMPORTANT]
> This page is **deprecated** and no longer updated. The maintained documentation is at **<https://currencyinfo.docs.adamant.im/guide/notifications>**.

- [Slack](https://currencyinfo.docs.adamant.im/guide/notifications#slack)
- [Discord](https://currencyinfo.docs.adamant.im/guide/notifications#discord)
- [ADAMANT Messenger](https://currencyinfo.docs.adamant.im/guide/notifications#adamant-messenger)

## What changed since this page was written

> [!CAUTION]
> The examples on this page were **secret-shaped**: they used a realistic 12-word passphrase and plausible webhook URLs. Every example credential in the new documentation is unmistakably synthetic and will not authenticate anywhere.
>
> If you ever copied a credential from a wiki page, an issue, or a pull request into a live configuration, rotate it.

- Slack and Discord webhook URLs and ADAMANT addresses are **validated at startup**, so a malformed entry fails the configuration instead of failing silently at the first alert
- The shipped `notify.adamantPassphrase` placeholder is recognised as a placeholder and treated as **no passphrase at all**, so listing ADAMANT addresses without replacing it fails loudly at startup
- The new page documents which conditions actually trigger a notification, and how to reduce the volume when a channel is noisy
54 changes: 54 additions & 0 deletions .github/wiki/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Wiki tombstones

The GitHub Wiki at <https://github.com/Adamant-im/currencyinfo/wiki> is **deprecated**. Its content has been migrated into the version-controlled documentation site at <https://currencyinfo.docs.adamant.im>, corrected against the current code along the way.

This directory holds the replacement content for the wiki. The wiki lives in a separate git repository that GitHub does not let a normal pull request touch, so these files are kept here, reviewed here, and pushed from here.

## Why the wiki is kept at all

Deleting it would break every inbound deep link that exists in issues, forum posts, and third-party articles. Each page below keeps its original slug and redirects the reader to the canonical destination, so old links stay useful. The wiki is a tombstone, not a documentation surface: it receives no further content.

## What each page becomes

| Wiki page | Canonical destination |
| --- | --- |
| `Home` | <https://currencyinfo.docs.adamant.im/> |
| `Installation` | <https://currencyinfo.docs.adamant.im/guide/installation> |
| `API-specification` | <https://currencyinfo.docs.adamant.im/reference/api> |
| `Saved-rates-format` | <https://currencyinfo.docs.adamant.im/guide/history> |
| `Dealing-with-Rate-Differences-from-Multiple-Sources` | <https://currencyinfo.docs.adamant.im/guide/rate-calculation> |
| `Rate-life-time` | <https://currencyinfo.docs.adamant.im/guide/rate-calculation#freshness-ratelifetime> |
| `Notifications` | <https://currencyinfo.docs.adamant.im/guide/notifications> |

The full mapping, including what was corrected during migration, is published at <https://currencyinfo.docs.adamant.im/project/documentation-map>.

## Corrections made during migration

The old pages were not merely moved. These were wrong and are fixed in the new documentation:

- **`groupPercentage` was described backwards.** The wiki called it "the share of sources a group must contain". It is the minimum relative distance between the weights of the two heaviest groups
- **The API examples used port `36668`.** The default is `36661`
- **`rateLiftime` was a typo** for `rateLifetime`
- **Installation required Node.js v20.** The service requires v22 or newer
- **The contributing link pointed at `.github/CONTRIBUTING.md`**, which no longer exists; it is `CONTRIBUTING.md` at the repository root
- **`Saved-rates-format` claimed USD is the only base coin by default.** The shipped template configures seven base coins
- **`Notifications` carried secret-shaped examples**, including a realistic 12-word passphrase. Every example credential in the new documentation is unmistakably synthetic
- **The source list predated the current connector set**, which now includes CoinPaprika, CoinLore, Binance, and ExchangeRate-API, and treats CryptoCompare as deprecated

## Publishing these pages

The wiki is a separate repository. Publishing requires push access to it, and is a manual step performed once, after the documentation site is live at its custom domain.

```bash
git clone https://github.com/Adamant-im/currencyinfo.wiki.git /tmp/currencyinfo-wiki
cp .github/wiki/*.md /tmp/currencyinfo-wiki/
rm /tmp/currencyinfo-wiki/README.md # this file is not a wiki page
cd /tmp/currencyinfo-wiki
git add -A
git commit -m "docs: deprecate the wiki in favour of currencyinfo.docs.adamant.im"
git push
```

Order matters: publish the documentation site and verify HTTPS on `currencyinfo.docs.adamant.im` **before** pushing these pages, so the links they point at resolve.

Do not disable the wiki afterwards. Disabling it makes every deep link a 404, which is the outcome these tombstones exist to prevent. Revisit that only once inbound traffic to the wiki has stopped.
13 changes: 13 additions & 0 deletions .github/wiki/Rate-life-time.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Rate life time β€” moved

> [!IMPORTANT]
> This page is **deprecated** and no longer updated. The maintained documentation is at **<https://currencyinfo.docs.adamant.im/guide/rate-calculation#freshness-ratelifetime>**.

- [Freshness: `rateLifetime`](https://currencyinfo.docs.adamant.im/guide/rate-calculation#freshness-ratelifetime) β€” how long a quote stays usable, and the per-request override
- [Coverage gate: `minSources`](https://currencyinfo.docs.adamant.im/guide/rate-calculation#coverage-gate-minsources) β€” how freshness interacts with the source-count requirement
- [`GET /get`](https://currencyinfo.docs.adamant.im/reference/api#get) β€” the `rateLifetime` query parameter

## What changed since this page was written

- A `rateLifetime` override on `/get` **re-runs the whole merge pipeline** against the stricter window rather than filtering the finished table, so it also tightens the `minSources` gate
- The fallback to a previous rate applies **only while that quote is still inside `rateLifetime`**. Once every quote for a pair is stale, the pair is dropped rather than served at an unknown age
15 changes: 15 additions & 0 deletions .github/wiki/Saved-rates-format.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Saved rates format β€” moved

> [!IMPORTANT]
> This page is **deprecated** and no longer updated. The maintained documentation is at **<https://currencyinfo.docs.adamant.im/guide/history>**.

- [Rate history](https://currencyinfo.docs.adamant.im/guide/history) β€” what a snapshot contains, the MongoDB collections and indexes, retention, and reading the collections directly
- [Pair direction](https://currencyinfo.docs.adamant.im/guide/rate-calculation#pair-direction) β€” `BASE/QUOTE` semantics
- [Base coins and triangulation](https://currencyinfo.docs.adamant.im/guide/rate-calculation#base-coins-and-triangulation) β€” how cross-rates are derived
- [Symbol mappings](https://currencyinfo.docs.adamant.im/guide/rate-calculation#symbol-mappings) β€” the `mappings` option

## What changed since this page was written

- This page said USD is the only base coin by default. The shipped `config.default.jsonc` configures **seven**: `USD`, `RUB`, `EUR`, `CNY`, `JPY`, `BTC`, and `ETH`
- The new documentation explains that a snapshot is **every pair considered current**, not only the pairs quoted in that cycle
- Storage layout, index design, and retention guidance are documented, none of which this page covered
3 changes: 3 additions & 0 deletions .github/wiki/_Footer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

πŸ“¦ **This wiki is deprecated.** The maintained documentation lives at **[currencyinfo.docs.adamant.im](https://currencyinfo.docs.adamant.im)**.
Loading