Skip to content

Commit 137e142

Browse files
committed
Change source for forex and metals
1 parent 57663bd commit 137e142

File tree

7 files changed

+188
-97
lines changed

7 files changed

+188
-97
lines changed

.env-example

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
SERVER_HOST="0.0.0.0"
33
SERVER_PORT=3000
44

5-
# Metals.dev API Configuration
6-
# Get your API key from https://metals.dev
7-
# Required for fetching exchange rates
8-
METALS_DEV_API_KEY="your_api_key_here"
5+
# Wise API Configuration
6+
# Get your API key from https://wise.com (Read Only)
7+
# Required for fetching forex rates
8+
WISE_API_KEY="your_wise_api_key_here"
99

1010
# Update Interval (in seconds)
11-
# How often to fetch new exchange rates from Metals.dev API
11+
# How often to fetch new exchange rates from Wise API
1212
# Default: 60 (1 minute)
1313
UPDATE_INTERVAL=60
1414

README.md

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ A high-performance foreign exchange (Forex), precious metals, and cryptocurrency
88
- 💱 Real-time Forex Data - Automatically updates exchange rates at configurable intervals
99
- ₿ Cryptocurrency Support - Real-time crypto prices from multiple exchanges (Binance, Kraken, Gate, KuCoin, BingX, ByBit, Crypto.com, Bitfinex)
1010
- 🌍 Multi-currency Support - Convert between 150+ currencies with accurate cross-rates
11-
- 🥇 Precious & Base Metals - Gold, Silver, Platinum, Palladium, Copper, Aluminum, Lead, Nickel, Zinc
12-
- 📊 Metals.dev Data - Reliable source for both currency exchange rates and metal prices
11+
- 🥇 Metals - Gold, Silver, Palladium, Copper
12+
- 📊 Wise - Reliable source for exchange rates
1313
- 🔄 Smart Price Aggregation - Combines multiple crypto exchanges for optimal pricing with outlier detection
1414
- 🐳 Docker Ready - Easy deployment with Docker and Docker Compose
1515
- 🏥 Health Checks - Built-in monitoring and health endpoints
@@ -31,13 +31,13 @@ Create a `.env` file in your project root:
3131
SERVER_HOST="0.0.0.0"
3232
SERVER_PORT=3000
3333

34-
# Metals.dev API Configuration
35-
# Get your API key from https://metals.dev
36-
# Required for fetching exchange rates
37-
METALS_DEV_API_KEY="your_api_key_here"
34+
# Wise API Configuration
35+
# Get your API key from https://wise.com (Read Only)
36+
# Required for fetching forex rates
37+
WISE_API_KEY="your_wise_api_key_here"
3838

3939
# Update Interval (in seconds)
40-
# How often to fetch new exchange rates from Metals.dev API
40+
# How often to fetch new exchange rates from Wise API
4141
# Default: 60 (1 minute)
4242
UPDATE_INTERVAL=60
4343

@@ -86,7 +86,7 @@ docker-compose up -d
8686
docker run -d \
8787
--name rabbitforexapi \
8888
-p 3000:3000 \
89-
-e METALS_DEV_API_KEY="your_api_key_here" \
89+
-e WISE_API_KEY="your_api_key_here" \
9090
-e UPDATE_INTERVAL=60 \
9191
-e CRYPTO_UPDATE_INTERVAL=30 \
9292
-e ENABLED_CRYPTOS="BTC,ETH,SOL,ADA,XRP" \
@@ -104,13 +104,13 @@ Health Check and Statistics
104104
```json
105105
{
106106
"program": "RabbitForexAPI",
107-
"version": "3.0.1",
107+
"version": "3.1.0",
108108
"sourceCode": "https://github.com/Rabbit-Company/RabbitForexAPI",
109109
"monitorStats": {
110-
"currencyCount": 174,
111-
"metalCount": 9,
110+
"currencyCount": 162,
111+
"metalCount": 4,
112112
"cryptoCount": 2885,
113-
"totalAssetCount": 3068,
113+
"totalAssetCount": 3051,
114114
"updateInterval": "60s"
115115
},
116116
"httpStats": {
@@ -271,7 +271,7 @@ Get lists of all supported currencies, metals and cryptocurrencies
271271
```json
272272
{
273273
"currencies": ["AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "EUR", "USD", "GBP", "JPY", "CHF", "CAD", "..."],
274-
"metals": ["ALUMINUM", "COPPER", "GOLD", "LEAD", "NICKEL", "PALLADIUM", "PLATINUM", "SILVER", "ZINC"],
274+
"metals": ["GOLD", "SILVER", "PALLADIUM", "COPPER"],
275275
"cryptocurrencies": ["BTC", "ETH", "SOL", "ADA", "XRP", "DOT", "DOGE", "AVAX", "LINK", "..."],
276276
"timestamps": {
277277
"currency": "2025-11-07T07:06:10.544Z",
@@ -299,20 +299,10 @@ The API supports 150+ currencies, including:
299299

300300
### Metals (9)
301301

302-
**Precious Metals**:
303-
304302
- **GOLD** - Gold (per gram)
305303
- **SILVER** - Silver (per gram)
306-
- **PLATINUM** - Platinum (per gram)
307304
- **PALLADIUM** - Palladium (per gram)
308-
309-
**Base Metals**:
310-
311305
- **COPPER** - Copper (per gram)
312-
- **ALUMINUM** - Aluminum (per gram)
313-
- **LEAD** - Lead (per gram)
314-
- **NICKEL** - Nickel (per gram)
315-
- **ZINC** - Zinc (per gram)
316306

317307
### Cryptocurrencies (2500+)
318308

@@ -331,10 +321,10 @@ The API supports 2500+ major cryptocurrencies, including:
331321

332322
### Forex & Metals Rates
333323

334-
Exchange rates are calculated using USD as the reference currency from metals.dev data:
324+
Exchange rates are calculated using USD as the reference currency from Wise data:
335325

336-
- **USD to X**: Inverse of metals.dev rate (1 / rate)
337-
- **X to USD**: Direct rate from metals.dev
326+
- **USD to X**: Inverse of Wise rate (1 / rate)
327+
- **X to USD**: Direct rate from Wise
338328
- **X to Y**: Cross-rate calculation (USD/X ÷ USD/Y)
339329

340330
Rates are rounded intelligently based on their magnitude:

docker-compose.override.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ services:
77
ports:
88
- "3000:3000"
99
environment:
10-
- METALS_DEV_API_KEY
10+
- WISE_API_KEY
1111
- UPDATE_INTERVAL
1212
- USE_KRAKEN
1313
- USE_BINANCE

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
ports:
77
- "3000:3000"
88
environment:
9-
- METALS_DEV_API_KEY
9+
- WISE_API_KEY
1010
- UPDATE_INTERVAL
1111
- USE_KRAKEN
1212
- USE_BINANCE

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rabbitforexapi",
3-
"version": "3.0.1",
3+
"version": "3.1.0",
44
"module": "src/index.ts",
55
"type": "module",
66
"private": true,

0 commit comments

Comments
 (0)