@coingecko/coingecko-typescript 1.7.2 → 1.8.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 +16 -0
- package/client.d.mts +2 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -0
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/internal/request-options.d.mts +42 -0
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts +42 -0
- package/internal/request-options.d.ts.map +1 -1
- package/internal/request-options.js.map +1 -1
- package/internal/request-options.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/coins/coins.d.mts +11 -1
- package/resources/coins/coins.d.mts.map +1 -1
- package/resources/coins/coins.d.ts +11 -1
- package/resources/coins/coins.d.ts.map +1 -1
- package/resources/coins/coins.js.map +1 -1
- package/resources/coins/coins.mjs.map +1 -1
- package/resources/coins/contract/contract.d.mts +11 -1
- package/resources/coins/contract/contract.d.mts.map +1 -1
- package/resources/coins/contract/contract.d.ts +11 -1
- package/resources/coins/contract/contract.d.ts.map +1 -1
- package/resources/coins/contract/contract.js.map +1 -1
- package/resources/coins/contract/contract.mjs.map +1 -1
- package/resources/coins/markets.d.mts +128 -103
- package/resources/coins/markets.d.mts.map +1 -1
- package/resources/coins/markets.d.ts +128 -103
- package/resources/coins/markets.d.ts.map +1 -1
- package/resources/coins/markets.js +1 -1
- package/resources/coins/markets.mjs +1 -1
- package/resources/exchanges/exchanges.d.mts +12 -9
- package/resources/exchanges/exchanges.d.mts.map +1 -1
- package/resources/exchanges/exchanges.d.ts +12 -9
- package/resources/exchanges/exchanges.d.ts.map +1 -1
- package/resources/exchanges/exchanges.js.map +1 -1
- package/resources/exchanges/exchanges.mjs.map +1 -1
- package/resources/simple/price.d.mts +26 -21
- package/resources/simple/price.d.mts.map +1 -1
- package/resources/simple/price.d.ts +26 -21
- package/resources/simple/price.d.ts.map +1 -1
- package/src/client.ts +2 -0
- package/src/internal/request-options.ts +53 -0
- package/src/resources/coins/coins.ts +13 -1
- package/src/resources/coins/contract/contract.ts +13 -1
- package/src/resources/coins/markets.ts +156 -127
- package/src/resources/exchanges/exchanges.ts +13 -9
- package/src/resources/simple/price.ts +29 -25
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -127,7 +127,7 @@ export interface CoinGetIDResponse {
|
|
|
127
127
|
/**
|
|
128
128
|
* detailed coin asset platform and contract address
|
|
129
129
|
*/
|
|
130
|
-
detail_platforms?: { [key: string]:
|
|
130
|
+
detail_platforms?: { [key: string]: CoinGetIDResponse.DetailPlatforms };
|
|
131
131
|
|
|
132
132
|
/**
|
|
133
133
|
* coin developer data
|
|
@@ -261,6 +261,18 @@ export namespace CoinGetIDResponse {
|
|
|
261
261
|
telegram_channel_user_count?: number;
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
+
export interface DetailPlatforms {
|
|
265
|
+
/**
|
|
266
|
+
* contract address on the platform
|
|
267
|
+
*/
|
|
268
|
+
contract_address?: string;
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* decimal places for the token
|
|
272
|
+
*/
|
|
273
|
+
decimal_place?: number | null;
|
|
274
|
+
}
|
|
275
|
+
|
|
264
276
|
/**
|
|
265
277
|
* coin developer data
|
|
266
278
|
*/
|
|
@@ -84,7 +84,7 @@ export interface ContractGetResponse {
|
|
|
84
84
|
/**
|
|
85
85
|
* detailed coin asset platform and contract address
|
|
86
86
|
*/
|
|
87
|
-
detail_platforms?: { [key: string]:
|
|
87
|
+
detail_platforms?: { [key: string]: ContractGetResponse.DetailPlatforms };
|
|
88
88
|
|
|
89
89
|
/**
|
|
90
90
|
* coin developer data
|
|
@@ -218,6 +218,18 @@ export namespace ContractGetResponse {
|
|
|
218
218
|
telegram_channel_user_count?: number;
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
+
export interface DetailPlatforms {
|
|
222
|
+
/**
|
|
223
|
+
* contract address on the platform
|
|
224
|
+
*/
|
|
225
|
+
contract_address?: string;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* decimal places for the token
|
|
229
|
+
*/
|
|
230
|
+
decimal_place?: number | null;
|
|
231
|
+
}
|
|
232
|
+
|
|
221
233
|
/**
|
|
222
234
|
* coin developer data
|
|
223
235
|
*/
|
|
@@ -11,7 +11,7 @@ export class Markets extends APIResource {
|
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
13
|
* ```ts
|
|
14
|
-
* const
|
|
14
|
+
* const markets = await client.coins.markets.get({
|
|
15
15
|
* vs_currency: 'usd',
|
|
16
16
|
* });
|
|
17
17
|
* ```
|
|
@@ -21,133 +21,162 @@ export class Markets extends APIResource {
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
export
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
24
|
+
export type MarketGetResponse = Array<MarketGetResponse.MarketGetResponseItem>;
|
|
25
|
+
|
|
26
|
+
export namespace MarketGetResponse {
|
|
27
|
+
export interface MarketGetResponseItem {
|
|
28
|
+
/**
|
|
29
|
+
* coin ID
|
|
30
|
+
*/
|
|
31
|
+
id?: string;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* coin all time high (ATH) in currency
|
|
35
|
+
*/
|
|
36
|
+
ath?: number | null;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* coin all time high (ATH) change in percentage
|
|
40
|
+
*/
|
|
41
|
+
ath_change_percentage?: number | null;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* coin all time high (ATH) date
|
|
45
|
+
*/
|
|
46
|
+
ath_date?: string | null;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* coin all time low (atl) in currency
|
|
50
|
+
*/
|
|
51
|
+
atl?: number | null;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* coin all time low (atl) change in percentage
|
|
55
|
+
*/
|
|
56
|
+
atl_change_percentage?: number | null;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* coin all time low (atl) date
|
|
60
|
+
*/
|
|
61
|
+
atl_date?: string | null;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* coin circulating supply
|
|
65
|
+
*/
|
|
66
|
+
circulating_supply?: number | null;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* coin current price in currency
|
|
70
|
+
*/
|
|
71
|
+
current_price?: number | null;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* coin fully diluted valuation (fdv) in currency
|
|
75
|
+
*/
|
|
76
|
+
fully_diluted_valuation?: number | null;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* coin 24hr price high in currency
|
|
80
|
+
*/
|
|
81
|
+
high_24h?: number | null;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* coin image url
|
|
85
|
+
*/
|
|
86
|
+
image?: string;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* coin last updated timestamp
|
|
90
|
+
*/
|
|
91
|
+
last_updated?: string;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* coin 24hr price low in currency
|
|
95
|
+
*/
|
|
96
|
+
low_24h?: number | null;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* coin market cap in currency
|
|
100
|
+
*/
|
|
101
|
+
market_cap?: number | null;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* coin 24hr market cap change in currency
|
|
105
|
+
*/
|
|
106
|
+
market_cap_change_24h?: number | null;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* coin 24hr market cap change in percentage
|
|
110
|
+
*/
|
|
111
|
+
market_cap_change_percentage_24h?: number | null;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* coin rank by market cap
|
|
115
|
+
*/
|
|
116
|
+
market_cap_rank?: number | null;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* coin max supply
|
|
120
|
+
*/
|
|
121
|
+
max_supply?: number | null;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* coin name
|
|
125
|
+
*/
|
|
126
|
+
name?: string;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* coin 24hr price change in currency
|
|
130
|
+
*/
|
|
131
|
+
price_change_24h?: number | null;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* coin 24hr price change in percentage
|
|
135
|
+
*/
|
|
136
|
+
price_change_percentage_24h?: number | null;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* return on investment data
|
|
140
|
+
*/
|
|
141
|
+
roi?: MarketGetResponseItem.Roi | null;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* coin symbol
|
|
145
|
+
*/
|
|
146
|
+
symbol?: string;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* coin total supply
|
|
150
|
+
*/
|
|
151
|
+
total_supply?: number | null;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* coin total trading volume in currency
|
|
155
|
+
*/
|
|
156
|
+
total_volume?: number | null;
|
|
157
|
+
}
|
|
146
158
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
159
|
+
export namespace MarketGetResponseItem {
|
|
160
|
+
/**
|
|
161
|
+
* return on investment data
|
|
162
|
+
*/
|
|
163
|
+
export interface Roi {
|
|
164
|
+
/**
|
|
165
|
+
* ROI currency
|
|
166
|
+
*/
|
|
167
|
+
currency: string;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* ROI percentage
|
|
171
|
+
*/
|
|
172
|
+
percentage: number;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* ROI multiplier
|
|
176
|
+
*/
|
|
177
|
+
times: number;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
151
180
|
}
|
|
152
181
|
|
|
153
182
|
export interface MarketGetParams {
|
|
@@ -398,16 +398,20 @@ export namespace ExchangeGetIDResponse {
|
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
400
|
|
|
401
|
-
export
|
|
402
|
-
/**
|
|
403
|
-
* exchange ID
|
|
404
|
-
*/
|
|
405
|
-
id?: string;
|
|
401
|
+
export type ExchangeGetListResponse = Array<ExchangeGetListResponse.ExchangeGetListResponseItem>;
|
|
406
402
|
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
403
|
+
export namespace ExchangeGetListResponse {
|
|
404
|
+
export interface ExchangeGetListResponseItem {
|
|
405
|
+
/**
|
|
406
|
+
* exchange ID
|
|
407
|
+
*/
|
|
408
|
+
id: string;
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* exchange name
|
|
412
|
+
*/
|
|
413
|
+
name: string;
|
|
414
|
+
}
|
|
411
415
|
}
|
|
412
416
|
|
|
413
417
|
export interface ExchangeGetParams {
|
|
@@ -21,31 +21,35 @@ export class Price extends APIResource {
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
export
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
24
|
+
export type PriceGetResponse = { [key: string]: PriceGetResponse.item };
|
|
25
|
+
|
|
26
|
+
export namespace PriceGetResponse {
|
|
27
|
+
export interface item {
|
|
28
|
+
/**
|
|
29
|
+
* last updated timestamp
|
|
30
|
+
*/
|
|
31
|
+
last_updated_at?: number;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* price in USD
|
|
35
|
+
*/
|
|
36
|
+
usd?: number;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* 24hr change in USD
|
|
40
|
+
*/
|
|
41
|
+
usd_24h_change?: number;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* 24hr volume in USD
|
|
45
|
+
*/
|
|
46
|
+
usd_24h_vol?: number;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* market cap in USD
|
|
50
|
+
*/
|
|
51
|
+
usd_market_cap?: number;
|
|
52
|
+
}
|
|
49
53
|
}
|
|
50
54
|
|
|
51
55
|
export interface PriceGetParams {
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.8.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.8.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.8.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.8.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|