@coingecko/coingecko-typescript 1.2.1 → 1.4.0

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.4.0 (2025-06-13)
4
+
5
+ Full Changelog: [v1.3.0...v1.4.0](https://github.com/coingecko/coingecko-typescript/compare/v1.3.0...v1.4.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** manual updates ([e9c62ee](https://github.com/coingecko/coingecko-typescript/commit/e9c62ee20051912ed4a7c00e7ef0991fd44441c9))
10
+
11
+ ## 1.3.0 (2025-06-13)
12
+
13
+ Full Changelog: [v1.2.1...v1.3.0](https://github.com/coingecko/coingecko-typescript/compare/v1.2.1...v1.3.0)
14
+
15
+ ### Features
16
+
17
+ * **api:** Update example response ([d163a61](https://github.com/coingecko/coingecko-typescript/commit/d163a61aa6392059cd65eb496f6926405b00ec27))
18
+
3
19
  ## 1.2.1 (2025-06-10)
4
20
 
5
21
  Full Changelog: [v1.2.0...v1.2.1](https://github.com/coingecko/coingecko-typescript/compare/v1.2.0...v1.2.1)
package/README.md CHANGED
@@ -23,13 +23,17 @@ The full API of this library can be found in [api.md](api.md).
23
23
  import Coingecko from '@coingecko/coingecko-typescript';
24
24
 
25
25
  const client = new Coingecko({
26
- proAPIKey: process.env['COINGECKO_PRO_API_KEY'], // This is the default and can be omitted
27
- environment: 'demo', // defaults to 'pro'
26
+ proAPIKey: process.env['COINGECKO_PRO_API_KEY'],
27
+ // demoAPIKey: process.env['COINGECKO_DEMO_API_KEY'], // Optional, for Demo API access
28
+ environment: 'pro', // 'demo' to initialize the client with Demo API access
28
29
  });
29
30
 
30
- const price = await client.simple.price.get({ vs_currencies: 'usd', ids: 'bitcoin' });
31
+ async function main() {
32
+ const price = await client.simple.price.get({ vs_currencies: 'usd', ids: 'bitcoin' });
33
+ console.log(price);
34
+ }
31
35
 
32
- console.log(price.last_updated_at);
36
+ main()
33
37
  ```
34
38
 
35
39
  ### Request & Response types
@@ -41,8 +45,9 @@ This library includes TypeScript definitions for all request params and response
41
45
  import Coingecko from '@coingecko/coingecko-typescript';
42
46
 
43
47
  const client = new Coingecko({
44
- proAPIKey: process.env['COINGECKO_PRO_API_KEY'], // This is the default and can be omitted
45
- environment: 'demo', // defaults to 'pro'
48
+ proAPIKey: process.env['COINGECKO_PRO_API_KEY'],
49
+ // demoAPIKey: process.env['COINGECKO_DEMO_API_KEY'], // Optional, for Demo API access
50
+ environment: 'pro', // 'demo' to initialize the client with Demo API access
46
51
  });
47
52
 
48
53
  const params: Coingecko.Simple.PriceGetParams = { vs_currencies: 'usd', ids: 'bitcoin' };
@@ -147,7 +152,7 @@ const { data: price, response: raw } = await client.simple.price
147
152
  .get({ vs_currencies: 'usd', ids: 'bitcoin' })
148
153
  .withResponse();
149
154
  console.log(raw.headers.get('X-My-Header'));
150
- console.log(price.last_updated_at);
155
+ console.log(price);
151
156
  ```
152
157
 
153
158
  ### Logging
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coingecko/coingecko-typescript",
3
- "version": "1.2.1",
3
+ "version": "1.4.0",
4
4
  "description": "The official TypeScript library for the Coingecko API",
5
5
  "author": "Coingecko <eason.lim@coingecko.com>",
6
6
  "types": "./index.d.ts",
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.2.1'; // x-release-please-version
1
+ export const VERSION = '1.4.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.2.1";
1
+ export declare const VERSION = "1.4.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.2.1";
1
+ export declare const VERSION = "1.4.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '1.2.1'; // x-release-please-version
4
+ exports.VERSION = '1.4.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '1.2.1'; // x-release-please-version
1
+ export const VERSION = '1.4.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map