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

docs(analytics): add setup instructions for currency_conversion service #6516

Merged
merged 1 commit into from
Nov 13, 2024
Merged
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
38 changes: 38 additions & 0 deletions crates/analytics/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,44 @@ source = "kafka"

After making this change, save the file and restart your application for the changes to take effect.

## Setting up Forex APIs

To use Forex services, you need to sign up and get your API keys from the following providers:

1. Primary Service
- Sign up for a free account and get your Primary API key [here](https://openexchangerates.org/).
- It will be in dashboard, labeled as `app_id`.

2. Fallback Service
- Sign up for a free account and get your Fallback API key [here](https://apilayer.com/marketplace/exchangerate_host-api).
- It will be in dashboard, labeled as `access key`.

### Configuring Forex APIs

To configure the Forex APIs, update the `config/development.toml` or `config/docker_compose.toml` file with your API keys:

```toml
[forex_api]
api_key = "YOUR API KEY HERE" # Replace the placeholder with your Primary API Key
fallback_api_key = "YOUR API KEY HERE" # Replace the placeholder with your Fallback API Key
```
### Important Note
```bash
ERROR router::services::api: error: {"error":{"type":"api","message":"Failed to fetch currency exchange rate","code":"HE_00"}}
├─▶ Failed to fetch currency exchange rate
╰─▶ Could not acquire the lock for cache entry
```

_If you get the above error after setting up, simply remove the `redis` key `"{forex_cache}_lock"` by running this in shell_

```bash
redis-cli del "{forex_cache}_lock"
```

After making these changes, save the file and restart your application for the changes to take effect.

## Enabling Data Features in Dashboard

To check the data features in the dashboard, you need to enable them in the `config/dashboard.toml` configuration file.
Expand Down
Loading