@@ -60,7 +60,7 @@ await api.fetchLive('USD', ['XAU', 'XAG', 'XPD', 'XPT']);
6060- ` currencies ` <[ Array] <[ string] >> Optional. Pass in an array of currencies to return values for.
6161
6262``` js
63- await api .fetchHistorical (' 2021-04 -05' , ' USD' , [' XAU' , ' XAG' , ' XPD' , ' XPT' ]);
63+ await api .fetchHistorical (' 2024-02 -05' , ' USD' , [' XAU' , ' XAG' , ' XPD' , ' XPT' ]);
6464```
6565
6666[ Link] ( https://metalpriceapi.com/documentation#api_historical )
@@ -74,7 +74,7 @@ await api.fetchHistorical('2021-04-05', 'USD', ['XAU', 'XAG', 'XPD', 'XPT']);
7474- ` 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.
7575
7676``` js
77- await api .convert (' USD' , ' EUR' , 100 , ' 2021-04 -05' );
77+ await api .convert (' USD' , ' EUR' , 100 , ' 2024-02 -05' );
7878```
7979
8080[ Link] ( https://metalpriceapi.com/documentation#api_convert )
@@ -88,7 +88,7 @@ await api.convert('USD', 'EUR', 100, '2021-04-05');
8888- ` currencies ` <[ Array] <[ string] >> Optional. Pass in an array of currencies to return values for.
8989
9090``` js
91- await api .timeframe (' 2021-04 -05' , ' 2021-04 -06' , ' USD' , [' XAU' , ' XAG' , ' XPD' , ' XPT' ]);
91+ await api .timeframe (' 2024-02 -05' , ' 2024-02 -06' , ' USD' , [' XAU' , ' XAG' , ' XPD' , ' XPT' ]);
9292```
9393
9494[ Link] ( https://metalpriceapi.com/documentation#api_timeframe )
@@ -102,11 +102,23 @@ await api.timeframe('2021-04-05', '2021-04-06', 'USD', ['XAU', 'XAG', 'XPD', 'XP
102102- ` currencies ` <[ Array] <[ string] >> Optional. Pass in an array of currencies to return values for.
103103
104104``` js
105- await api .change (' 2021-04 -05' , ' 2021-04 -06' , ' USD' , [' XAU' , ' XAG' , ' XPD' , ' XPT' ]);
105+ await api .change (' 2024-02 -05' , ' 2024-02 -06' , ' USD' , [' XAU' , ' XAG' , ' XPD' , ' XPT' ]);
106106```
107107
108108[ Link] ( https://metalpriceapi.com/documentation#api_change )
109109
110+ ---
111+ #### carat(base, date)
112+
113+ - ` base ` <[ string] > Optional. Pass in a base currency, defaults to USD.
114+ - ` date ` <[ string] > Optional. Specify date to get Carat using format ` YYYY-MM-DD ` . If not specified, uses live rates.
115+
116+ ``` js
117+ await api .carat (' USD' , ' 2024-02-06' );
118+ ```
119+
120+ [ Link] ( https://metalpriceapi.com/documentation#api_carat )
121+
110122---
111123** [ Official documentation] ( https://metalpriceapi.com/documentation ) **
112124
0 commit comments