Skip to content

Commit

Permalink
v1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
forexrateapi committed Feb 22, 2024
1 parent 867b32d commit 58db8fe
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ await api.fetchLive('USD', ['AUD', 'CAD', 'GBP', 'JPY']);
- `currencies` <[Array]<[string]>> Optional. Pass in an array of currencies to return values for.

```js
await api.fetchHistorical('2021-04-05', 'USD', ['AUD', 'CAD', 'GBP', 'JPY']);
await api.fetchHistorical('2024-02-05', 'USD', ['AUD', 'CAD', 'GBP', 'JPY']);
```

[Link](https://forexrateapi.com/documentation#api_historical)
Expand All @@ -74,7 +74,7 @@ await api.fetchHistorical('2021-04-05', 'USD', ['AUD', 'CAD', 'GBP', 'JPY']);
- `date` <[string]> Optional. Specify date to use historical midpoint value for conversion with format `YYYY-MM-DD`. Otherwise, it will use live exchange rate date if value not passed in.

```js
await api.convert('USD', 'EUR', 100, '2021-04-05');
await api.convert('USD', 'EUR', 100, '2024-02-05');
```

[Link](https://forexrateapi.com/documentation#api_convert)
Expand All @@ -88,7 +88,7 @@ await api.convert('USD', 'EUR', 100, '2021-04-05');
- `currencies` <[Array]<[string]>> Optional. Pass in an array of currencies to return values for.

```js
await api.timeframe('2021-04-05', '2021-04-06', 'USD', ['AUD', 'CAD', 'GBP', 'JPY']);
await api.timeframe('2024-02-05', '2024-02-06', 'USD', ['AUD', 'CAD', 'GBP', 'JPY']);
```

[Link](https://forexrateapi.com/documentation#api_timeframe)
Expand All @@ -102,7 +102,7 @@ await api.timeframe('2021-04-05', '2021-04-06', 'USD', ['AUD', 'CAD', 'GBP', 'JP
- `currencies` <[Array]<[string]>> Optional. Pass in an array of currencies to return values for.

```js
await api.change('2021-04-05', '2021-04-06', 'USD', ['AUD', 'CAD', 'GBP', 'JPY']);
await api.change('2024-02-05', '2024-02-06', 'USD', ['AUD', 'CAD', 'GBP', 'JPY']);
```

[Link](https://forexrateapi.com/documentation#api_change)
Expand Down
8 changes: 4 additions & 4 deletions example/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ const apiKey = 'REPLACE_ME';
result = await api.fetchLive('USD', ['AUD', 'CAD', 'GBP', 'JPY']);
console.log(result.data);

result = await api.fetchHistorical('2021-04-05', 'USD', ['AUD', 'CAD', 'GBP', 'JPY']);
result = await api.fetchHistorical('2024-02-05', 'USD', ['AUD', 'CAD', 'GBP', 'JPY']);
console.log(result.data);

result = await api.convert('USD', 'EUR', 100, '2021-04-05');
result = await api.convert('USD', 'EUR', 100, '2024-02-05');
console.log(result.data);

result = await api.timeframe('2021-04-05', '2021-04-06', 'USD', ['AUD', 'CAD', 'GBP', 'JPY']);
result = await api.timeframe('2024-02-05', '2024-02-06', 'USD', ['AUD', 'CAD', 'GBP', 'JPY']);
console.log(result.data);

result = await api.change('2021-04-05', '2021-04-06', 'USD', ['AUD', 'CAD', 'GBP', 'JPY']);
result = await api.change('2024-02-05', '2024-02-06', 'USD', ['AUD', 'CAD', 'GBP', 'JPY']);
console.log(result.data);
})();
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "forexrateapi",
"version": "1.0.1",
"version": "1.0.2",
"description": "Official Node.js Library for ForexRateAPI",
"main": "index.js",
"scripts": {
Expand All @@ -9,7 +9,7 @@
"author": "ForexRateAPI",
"license": "GNU GPLv3",
"dependencies": {
"axios": "^0.24.0"
"axios": "^1.6.7"
},
"homepage": "https://forexrateapi.com",
"repository": {
Expand Down

0 comments on commit 58db8fe

Please sign in to comment.