@currencycore/sdk 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +34 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -8,6 +8,9 @@ Generated from the CurrencyCore OpenAPI 3.1 spec with
8
8
  [OpenAPI Generator](https://openapi-generator.tech) (`typescript-fetch`), plus a
9
9
  thin hand-written `createClient` helper for API-key and version handling.
10
10
 
11
+ - **Website:** https://currency-core.com
12
+ - **Documentation:** https://currency-core.com/docs
13
+
11
14
  ## Install
12
15
 
13
16
  ```bash
@@ -31,6 +34,37 @@ const api = createClient();
31
34
  const currencies = await api.currencies();
32
35
  ```
33
36
 
37
+ ## Endpoints
38
+
39
+ All 14 endpoints are methods on the `api` client. `*` marks a required argument; the rest are optional. **Public** = no key; **Free** = any plan with a key; **Growth** = Growth plan or higher.
40
+
41
+ | Endpoint | Call | Plan |
42
+ | --- | --- | --- |
43
+ | Convert an amount (optional PPP) | `api.convert({ from*, to*, amount, ppp, date })` | Free |
44
+ | Rate snapshot for a date (USD base) | `api.rates({ date })` | Free |
45
+ | Rate snapshot in any base | `api.ratesByBase({ base*, date })` | Free |
46
+ | One currency's daily time series | `api.history({ currency*, from, to, base, interval })` | Growth |
47
+ | Trends, comparisons & movers | `api.historyAnalysis({ base, currencies, from, to, period, sort, assetClass, limit, interval, stats })` | Growth |
48
+ | PPP factor over time / movers | `api.pppAnalysis({ countries, from, to, period, sort, limit, stats })` | Growth |
49
+ | Volatility or stability ranking | `api.volatility({ currency, base, from, to, sort, universe, limit })` | Growth |
50
+ | Return correlation vs a base | `api.correlation({ currencies*, base, from, to })` | Growth |
51
+ | Max drawdown or ranking | `api.drawdown({ currency, base, from, to, sort, universe, limit })` | Growth |
52
+ | Safe-haven score ranking | `api.safeHaven({ currencies, base, from, to, limit })` | Growth |
53
+ | Mean-reversion ranking | `api.meanReversion({ currencies, base, from, to, limit })` | Growth |
54
+ | Supported countries + currencies | `api.countries()` | Public |
55
+ | Supported ISO 4217 currencies | `api.currencies()` | Public |
56
+ | Natural-language question | `api.ai({ q* })` | Free |
57
+
58
+ More calls:
59
+
60
+ ```ts
61
+ await api.rates(); // latest snapshot (USD base)
62
+ await api.ratesByBase({ base: 'EUR' }); // same snapshot, EUR base
63
+ await api.history({ currency: 'INR', from: '2024-01-01' });
64
+ await api.volatility({ universe: 'majors', sort: 'volatile' }); // most-volatile majors
65
+ await api.ai({ q: 'How has the rupee moved this year?' });
66
+ ```
67
+
34
68
  ## API key
35
69
 
36
70
  `createClient` resolves the key as `options.apiKey` → `CURRENCYCORE_API_KEY`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@currencycore/sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Official CurrencyCore API client for TypeScript, Node.js, and React Native.",
5
5
  "license": "MIT",
6
6
  "repository": {