Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Exchange #353

Merged
merged 15 commits into from
Jul 12, 2024
Merged

feat: Exchange #353

merged 15 commits into from
Jul 12, 2024

Conversation

aleksasiriski
Copy link
Member

@aleksasiriski aleksasiriski commented Jul 11, 2024

Adds a new endpoint e.g. /exchange?from=BTC&to=RSD&amount=1 that uses the configured base currency (EUR) to achieve the conversion. The conversion rates for the base currency are pulled from all engines and stored in cache db with the default TTL of 24h.

The response looks like this:

{
  "version": "dev",
  "duration": 501,
  "base": "EUR",
  "from": "BTC",
  "to": "RSD",
  "amount": 1,
  "result": 6887344.831246245
}
  • Configurable TTL
  • Configurable base currency
  • Configurable enabled engines
  • Generated exchanger code like how it's done for searcher & suggester (enginer).

@aleksasiriski aleksasiriski added the enhancement New feature or request label Jul 11, 2024
@aleksasiriski aleksasiriski self-assigned this Jul 11, 2024
@aleksasiriski aleksasiriski marked this pull request as draft July 11, 2024 12:21
@aleksasiriski aleksasiriski marked this pull request as ready for review July 11, 2024 14:30
@aleksasiriski aleksasiriski merged commit e41144c into main Jul 12, 2024
5 of 6 checks passed
@aleksasiriski aleksasiriski deleted the as/feat/exchange branch July 12, 2024 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant