@coingecko/coingecko-typescript 2.3.0 → 3.0.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.
Files changed (202) hide show
  1. package/CHANGELOG.md +100 -0
  2. package/LICENSE +1 -1
  3. package/README.md +23 -10
  4. package/client.d.mts +4 -3
  5. package/client.d.mts.map +1 -1
  6. package/client.d.ts +4 -3
  7. package/client.d.ts.map +1 -1
  8. package/client.js +15 -2
  9. package/client.js.map +1 -1
  10. package/client.mjs +15 -2
  11. package/client.mjs.map +1 -1
  12. package/internal/parse.d.mts.map +1 -1
  13. package/internal/parse.d.ts.map +1 -1
  14. package/internal/parse.js +5 -0
  15. package/internal/parse.js.map +1 -1
  16. package/internal/parse.mjs +5 -0
  17. package/internal/parse.mjs.map +1 -1
  18. package/package.json +1 -1
  19. package/resources/coins/circulating-supply-chart.d.mts +1 -1
  20. package/resources/coins/circulating-supply-chart.d.mts.map +1 -1
  21. package/resources/coins/circulating-supply-chart.d.ts +1 -1
  22. package/resources/coins/circulating-supply-chart.d.ts.map +1 -1
  23. package/resources/coins/coins.d.mts +158 -1
  24. package/resources/coins/coins.d.mts.map +1 -1
  25. package/resources/coins/coins.d.ts +158 -1
  26. package/resources/coins/coins.d.ts.map +1 -1
  27. package/resources/coins/coins.js.map +1 -1
  28. package/resources/coins/coins.mjs.map +1 -1
  29. package/resources/coins/contract/contract.d.mts +9 -1
  30. package/resources/coins/contract/contract.d.mts.map +1 -1
  31. package/resources/coins/contract/contract.d.ts +9 -1
  32. package/resources/coins/contract/contract.d.ts.map +1 -1
  33. package/resources/coins/contract/contract.js.map +1 -1
  34. package/resources/coins/contract/contract.mjs.map +1 -1
  35. package/resources/coins/contract/market-chart.d.mts +5 -1
  36. package/resources/coins/contract/market-chart.d.mts.map +1 -1
  37. package/resources/coins/contract/market-chart.d.ts +5 -1
  38. package/resources/coins/contract/market-chart.d.ts.map +1 -1
  39. package/resources/coins/contract/market-chart.js +5 -1
  40. package/resources/coins/contract/market-chart.js.map +1 -1
  41. package/resources/coins/contract/market-chart.mjs +5 -1
  42. package/resources/coins/contract/market-chart.mjs.map +1 -1
  43. package/resources/coins/history.d.mts +1 -1
  44. package/resources/coins/history.d.ts +1 -1
  45. package/resources/coins/market-chart.d.mts +5 -1
  46. package/resources/coins/market-chart.d.mts.map +1 -1
  47. package/resources/coins/market-chart.d.ts +5 -1
  48. package/resources/coins/market-chart.d.ts.map +1 -1
  49. package/resources/coins/market-chart.js +5 -1
  50. package/resources/coins/market-chart.js.map +1 -1
  51. package/resources/coins/market-chart.mjs +5 -1
  52. package/resources/coins/market-chart.mjs.map +1 -1
  53. package/resources/coins/markets.d.mts +9 -0
  54. package/resources/coins/markets.d.mts.map +1 -1
  55. package/resources/coins/markets.d.ts +9 -0
  56. package/resources/coins/markets.d.ts.map +1 -1
  57. package/resources/coins/tickers.d.mts +1 -1
  58. package/resources/coins/tickers.d.mts.map +1 -1
  59. package/resources/coins/tickers.d.ts +1 -1
  60. package/resources/coins/tickers.d.ts.map +1 -1
  61. package/resources/exchanges/exchanges.d.mts +3 -3
  62. package/resources/exchanges/exchanges.d.mts.map +1 -1
  63. package/resources/exchanges/exchanges.d.ts +3 -3
  64. package/resources/exchanges/exchanges.d.ts.map +1 -1
  65. package/resources/exchanges/tickers.d.mts +1 -1
  66. package/resources/exchanges/tickers.d.mts.map +1 -1
  67. package/resources/exchanges/tickers.d.ts +1 -1
  68. package/resources/exchanges/tickers.d.ts.map +1 -1
  69. package/resources/global/global.d.mts +4 -0
  70. package/resources/global/global.d.mts.map +1 -1
  71. package/resources/global/global.d.ts +4 -0
  72. package/resources/global/global.d.ts.map +1 -1
  73. package/resources/global/global.js.map +1 -1
  74. package/resources/global/global.mjs.map +1 -1
  75. package/resources/index.d.mts +1 -1
  76. package/resources/index.d.mts.map +1 -1
  77. package/resources/index.d.ts +1 -1
  78. package/resources/index.d.ts.map +1 -1
  79. package/resources/index.js.map +1 -1
  80. package/resources/index.mjs.map +1 -1
  81. package/resources/key.d.mts +10 -0
  82. package/resources/key.d.mts.map +1 -1
  83. package/resources/key.d.ts +10 -0
  84. package/resources/key.d.ts.map +1 -1
  85. package/resources/onchain/networks/dexes.d.mts +8 -0
  86. package/resources/onchain/networks/dexes.d.mts.map +1 -1
  87. package/resources/onchain/networks/dexes.d.ts +8 -0
  88. package/resources/onchain/networks/dexes.d.ts.map +1 -1
  89. package/resources/onchain/networks/new-pools.d.mts +16 -0
  90. package/resources/onchain/networks/new-pools.d.mts.map +1 -1
  91. package/resources/onchain/networks/new-pools.d.ts +16 -0
  92. package/resources/onchain/networks/new-pools.d.ts.map +1 -1
  93. package/resources/onchain/networks/pools/info.d.mts +2 -0
  94. package/resources/onchain/networks/pools/info.d.mts.map +1 -1
  95. package/resources/onchain/networks/pools/info.d.ts +2 -0
  96. package/resources/onchain/networks/pools/info.d.ts.map +1 -1
  97. package/resources/onchain/networks/pools/pools.d.mts +8 -0
  98. package/resources/onchain/networks/pools/pools.d.mts.map +1 -1
  99. package/resources/onchain/networks/pools/pools.d.ts +8 -0
  100. package/resources/onchain/networks/pools/pools.d.ts.map +1 -1
  101. package/resources/onchain/networks/pools/pools.js.map +1 -1
  102. package/resources/onchain/networks/pools/pools.mjs.map +1 -1
  103. package/resources/onchain/networks/tokens/index.d.mts +1 -0
  104. package/resources/onchain/networks/tokens/index.d.mts.map +1 -1
  105. package/resources/onchain/networks/tokens/index.d.ts +1 -0
  106. package/resources/onchain/networks/tokens/index.d.ts.map +1 -1
  107. package/resources/onchain/networks/tokens/index.js +3 -1
  108. package/resources/onchain/networks/tokens/index.js.map +1 -1
  109. package/resources/onchain/networks/tokens/index.mjs +1 -0
  110. package/resources/onchain/networks/tokens/index.mjs.map +1 -1
  111. package/resources/onchain/networks/tokens/info.d.mts +2 -0
  112. package/resources/onchain/networks/tokens/info.d.mts.map +1 -1
  113. package/resources/onchain/networks/tokens/info.d.ts +2 -0
  114. package/resources/onchain/networks/tokens/info.d.ts.map +1 -1
  115. package/resources/onchain/networks/tokens/multi.d.mts +6 -0
  116. package/resources/onchain/networks/tokens/multi.d.mts.map +1 -1
  117. package/resources/onchain/networks/tokens/multi.d.ts +6 -0
  118. package/resources/onchain/networks/tokens/multi.d.ts.map +1 -1
  119. package/resources/onchain/networks/tokens/ohlcv.d.mts +5 -0
  120. package/resources/onchain/networks/tokens/ohlcv.d.mts.map +1 -1
  121. package/resources/onchain/networks/tokens/ohlcv.d.ts +5 -0
  122. package/resources/onchain/networks/tokens/ohlcv.d.ts.map +1 -1
  123. package/resources/onchain/networks/tokens/pools.d.mts +14 -0
  124. package/resources/onchain/networks/tokens/pools.d.mts.map +1 -1
  125. package/resources/onchain/networks/tokens/pools.d.ts +14 -0
  126. package/resources/onchain/networks/tokens/pools.d.ts.map +1 -1
  127. package/resources/onchain/networks/tokens/tokens.d.mts +10 -0
  128. package/resources/onchain/networks/tokens/tokens.d.mts.map +1 -1
  129. package/resources/onchain/networks/tokens/tokens.d.ts +10 -0
  130. package/resources/onchain/networks/tokens/tokens.d.ts.map +1 -1
  131. package/resources/onchain/networks/tokens/tokens.js +4 -0
  132. package/resources/onchain/networks/tokens/tokens.js.map +1 -1
  133. package/resources/onchain/networks/tokens/tokens.mjs +4 -0
  134. package/resources/onchain/networks/tokens/tokens.mjs.map +1 -1
  135. package/resources/onchain/networks/tokens/top-holders.d.mts +12 -0
  136. package/resources/onchain/networks/tokens/top-holders.d.mts.map +1 -1
  137. package/resources/onchain/networks/tokens/top-holders.d.ts +12 -0
  138. package/resources/onchain/networks/tokens/top-holders.d.ts.map +1 -1
  139. package/resources/onchain/networks/tokens/top-traders.d.mts +77 -0
  140. package/resources/onchain/networks/tokens/top-traders.d.mts.map +1 -0
  141. package/resources/onchain/networks/tokens/top-traders.d.ts +77 -0
  142. package/resources/onchain/networks/tokens/top-traders.d.ts.map +1 -0
  143. package/resources/onchain/networks/tokens/top-traders.js +30 -0
  144. package/resources/onchain/networks/tokens/top-traders.js.map +1 -0
  145. package/resources/onchain/networks/tokens/top-traders.mjs +26 -0
  146. package/resources/onchain/networks/tokens/top-traders.mjs.map +1 -0
  147. package/resources/onchain/networks/trending-pools.d.mts +16 -0
  148. package/resources/onchain/networks/trending-pools.d.mts.map +1 -1
  149. package/resources/onchain/networks/trending-pools.d.ts +16 -0
  150. package/resources/onchain/networks/trending-pools.d.ts.map +1 -1
  151. package/resources/onchain/pools/megafilter.d.mts +13 -1
  152. package/resources/onchain/pools/megafilter.d.mts.map +1 -1
  153. package/resources/onchain/pools/megafilter.d.ts +13 -1
  154. package/resources/onchain/pools/megafilter.d.ts.map +1 -1
  155. package/resources/onchain/simple/networks/token-price.d.mts +20 -0
  156. package/resources/onchain/simple/networks/token-price.d.mts.map +1 -1
  157. package/resources/onchain/simple/networks/token-price.d.ts +20 -0
  158. package/resources/onchain/simple/networks/token-price.d.ts.map +1 -1
  159. package/resources/public-treasury.d.mts +286 -31
  160. package/resources/public-treasury.d.mts.map +1 -1
  161. package/resources/public-treasury.d.ts +286 -31
  162. package/resources/public-treasury.d.ts.map +1 -1
  163. package/resources/public-treasury.js +39 -4
  164. package/resources/public-treasury.js.map +1 -1
  165. package/resources/public-treasury.mjs +39 -4
  166. package/resources/public-treasury.mjs.map +1 -1
  167. package/src/client.ts +29 -4
  168. package/src/internal/parse.ts +6 -0
  169. package/src/resources/coins/circulating-supply-chart.ts +1 -1
  170. package/src/resources/coins/coins.ts +193 -1
  171. package/src/resources/coins/contract/contract.ts +11 -1
  172. package/src/resources/coins/contract/market-chart.ts +5 -1
  173. package/src/resources/coins/history.ts +1 -1
  174. package/src/resources/coins/market-chart.ts +5 -1
  175. package/src/resources/coins/markets.ts +11 -0
  176. package/src/resources/coins/tickers.ts +1 -1
  177. package/src/resources/exchanges/exchanges.ts +3 -3
  178. package/src/resources/exchanges/tickers.ts +1 -1
  179. package/src/resources/global/global.ts +5 -0
  180. package/src/resources/index.ts +5 -0
  181. package/src/resources/key.ts +12 -0
  182. package/src/resources/onchain/networks/dexes.ts +12 -0
  183. package/src/resources/onchain/networks/new-pools.ts +24 -0
  184. package/src/resources/onchain/networks/pools/info.ts +4 -0
  185. package/src/resources/onchain/networks/pools/pools.ts +12 -0
  186. package/src/resources/onchain/networks/tokens/index.ts +1 -0
  187. package/src/resources/onchain/networks/tokens/info.ts +4 -0
  188. package/src/resources/onchain/networks/tokens/multi.ts +8 -0
  189. package/src/resources/onchain/networks/tokens/ohlcv.ts +6 -0
  190. package/src/resources/onchain/networks/tokens/pools.ts +20 -0
  191. package/src/resources/onchain/networks/tokens/tokens.ts +18 -0
  192. package/src/resources/onchain/networks/tokens/top-holders.ts +21 -0
  193. package/src/resources/onchain/networks/tokens/top-traders.ts +116 -0
  194. package/src/resources/onchain/networks/trending-pools.ts +24 -0
  195. package/src/resources/onchain/pools/megafilter.ts +19 -0
  196. package/src/resources/onchain/simple/networks/token-price.ts +16 -0
  197. package/src/resources/public-treasury.ts +386 -35
  198. package/src/version.ts +1 -1
  199. package/version.d.mts +1 -1
  200. package/version.d.ts +1 -1
  201. package/version.js +1 -1
  202. package/version.mjs +1 -1
@@ -23,8 +23,8 @@ export class PublicTreasury extends APIResource {
23
23
  params: PublicTreasuryGetCoinIDParams,
24
24
  options?: RequestOptions,
25
25
  ): APIPromise<PublicTreasuryGetCoinIDResponse> {
26
- const { entity } = params;
27
- return this._client.get(path`/${entity}/public_treasury/${coinID}`, options);
26
+ const { entity, ...query } = params;
27
+ return this._client.get(path`/${entity}/public_treasury/${coinID}`, { query, ...options });
28
28
  }
29
29
 
30
30
  /**
@@ -38,66 +38,179 @@ export class PublicTreasury extends APIResource {
38
38
  * );
39
39
  * ```
40
40
  */
41
- getEntityID(entityID: string, options?: RequestOptions): APIPromise<PublicTreasuryGetEntityIDResponse> {
42
- return this._client.get(path`/public_treasury/${entityID}`, options);
41
+ getEntityID(
42
+ entityID: string,
43
+ query: PublicTreasuryGetEntityIDParams | null | undefined = {},
44
+ options?: RequestOptions,
45
+ ): APIPromise<PublicTreasuryGetEntityIDResponse> {
46
+ return this._client.get(path`/public_treasury/${entityID}`, { query, ...options });
43
47
  }
44
- }
45
-
46
- export interface PublicTreasuryGetCoinIDResponse {
47
- companies?: Array<PublicTreasuryGetCoinIDResponse.Company>;
48
-
49
- /**
50
- * market cap dominance
51
- */
52
- market_cap_dominance?: number;
53
48
 
54
49
  /**
55
- * total crypto holdings of companies or government
50
+ * This endpoint allows you to **query historical cryptocurrency holdings chart of
51
+ * public companies & governments** by Entity ID and Coin ID
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * const response =
56
+ * await client.publicTreasury.getHoldingChart('bitcoin', {
57
+ * entity_id: 'strategy',
58
+ * days: 'days',
59
+ * });
60
+ * ```
56
61
  */
57
- total_holdings?: number;
62
+ getHoldingChart(
63
+ coinID: string,
64
+ params: PublicTreasuryGetHoldingChartParams,
65
+ options?: RequestOptions,
66
+ ): APIPromise<PublicTreasuryGetHoldingChartResponse> {
67
+ const { entity_id, ...query } = params;
68
+ return this._client.get(path`/public_treasury/${entity_id}/${coinID}/holding_chart`, {
69
+ query,
70
+ ...options,
71
+ });
72
+ }
58
73
 
59
74
  /**
60
- * total crypto holdings value in usd
75
+ * This endpoint allows you **query public companies & governments' cryptocurrency
76
+ * transaction history** by Entity ID
77
+ *
78
+ * @example
79
+ * ```ts
80
+ * const response =
81
+ * await client.publicTreasury.getTransactionHistory(
82
+ * 'strategy',
83
+ * );
84
+ * ```
61
85
  */
62
- total_value_usd?: number;
86
+ getTransactionHistory(
87
+ entityID: string,
88
+ query: PublicTreasuryGetTransactionHistoryParams | null | undefined = {},
89
+ options?: RequestOptions,
90
+ ): APIPromise<PublicTreasuryGetTransactionHistoryResponse> {
91
+ return this._client.get(path`/public_treasury/${entityID}/transaction_history`, { query, ...options });
92
+ }
63
93
  }
64
94
 
95
+ export type PublicTreasuryGetCoinIDResponse =
96
+ | PublicTreasuryGetCoinIDResponse.CompaniesTreasury
97
+ | PublicTreasuryGetCoinIDResponse.GovernmentsTreasury;
98
+
65
99
  export namespace PublicTreasuryGetCoinIDResponse {
66
- export interface Company {
67
- /**
68
- * company incorporated or government country
69
- */
70
- country?: string;
100
+ export interface CompaniesTreasury {
101
+ companies: Array<CompaniesTreasury.Company>;
71
102
 
72
103
  /**
73
- * company or government name
104
+ * market cap dominance
74
105
  */
75
- name?: string;
106
+ market_cap_dominance: number;
76
107
 
77
108
  /**
78
- * percentage of total crypto supply
109
+ * total crypto holdings of companies
79
110
  */
80
- percentage_of_total_supply?: number;
111
+ total_holdings: number;
81
112
 
82
113
  /**
83
- * company symbol
114
+ * total crypto holdings value in usd
84
115
  */
85
- symbol?: string;
116
+ total_value_usd: number;
117
+ }
118
+
119
+ export namespace CompaniesTreasury {
120
+ export interface Company {
121
+ /**
122
+ * company incorporated or government country
123
+ */
124
+ country?: string;
125
+
126
+ /**
127
+ * company or government name
128
+ */
129
+ name?: string;
130
+
131
+ /**
132
+ * percentage of total crypto supply
133
+ */
134
+ percentage_of_total_supply?: number;
135
+
136
+ /**
137
+ * company symbol
138
+ */
139
+ symbol?: string;
140
+
141
+ /**
142
+ * total current value of crypto holdings in usd
143
+ */
144
+ total_current_value_usd?: number;
145
+
146
+ /**
147
+ * total entry value in usd
148
+ */
149
+ total_entry_value_usd?: number;
150
+
151
+ /**
152
+ * total crypto holdings
153
+ */
154
+ total_holdings?: number;
155
+ }
156
+ }
157
+
158
+ export interface GovernmentsTreasury {
159
+ governments: Array<GovernmentsTreasury.Government>;
86
160
 
87
161
  /**
88
- * total current value of crypto holdings in usd
162
+ * market cap dominance
89
163
  */
90
- total_current_value_usd?: number;
164
+ market_cap_dominance: number;
91
165
 
92
166
  /**
93
- * total entry value in usd
167
+ * total crypto holdings of governments
94
168
  */
95
- total_entry_value_usd?: number;
169
+ total_holdings: number;
96
170
 
97
171
  /**
98
- * total crypto holdings of company
172
+ * total crypto holdings value in usd
99
173
  */
100
- total_holdings?: number;
174
+ total_value_usd: number;
175
+ }
176
+
177
+ export namespace GovernmentsTreasury {
178
+ export interface Government {
179
+ /**
180
+ * company incorporated or government country
181
+ */
182
+ country?: string;
183
+
184
+ /**
185
+ * company or government name
186
+ */
187
+ name?: string;
188
+
189
+ /**
190
+ * percentage of total crypto supply
191
+ */
192
+ percentage_of_total_supply?: number;
193
+
194
+ /**
195
+ * company symbol
196
+ */
197
+ symbol?: string;
198
+
199
+ /**
200
+ * total current value of crypto holdings in usd
201
+ */
202
+ total_current_value_usd?: number;
203
+
204
+ /**
205
+ * total entry value in usd
206
+ */
207
+ total_entry_value_usd?: number;
208
+
209
+ /**
210
+ * total crypto holdings
211
+ */
212
+ total_holdings?: number;
213
+ }
101
214
  }
102
215
  }
103
216
 
@@ -117,6 +230,11 @@ export interface PublicTreasuryGetEntityIDResponse {
117
230
  */
118
231
  holdings?: Array<PublicTreasuryGetEntityIDResponse.Holding>;
119
232
 
233
+ /**
234
+ * market to net asset value ratio
235
+ */
236
+ m_nav?: number;
237
+
120
238
  /**
121
239
  * entity name
122
240
  */
@@ -127,6 +245,16 @@ export interface PublicTreasuryGetEntityIDResponse {
127
245
  */
128
246
  symbol?: string;
129
247
 
248
+ /**
249
+ * total asset value per share in USD
250
+ */
251
+ total_asset_value_per_share_usd?: number;
252
+
253
+ /**
254
+ * total current value of all holdings in USD
255
+ */
256
+ total_treasury_value_usd?: number;
257
+
130
258
  /**
131
259
  * official Twitter handle of the entity
132
260
  */
@@ -137,6 +265,11 @@ export interface PublicTreasuryGetEntityIDResponse {
137
265
  */
138
266
  type?: string;
139
267
 
268
+ /**
269
+ * unrealized profit and loss (current value - total entry value)
270
+ */
271
+ unrealized_pnl?: number;
272
+
140
273
  /**
141
274
  * official website URL of the entity
142
275
  */
@@ -150,29 +283,247 @@ export namespace PublicTreasuryGetEntityIDResponse {
150
283
  */
151
284
  amount?: number;
152
285
 
286
+ /**
287
+ * amount of cryptocurrency per share
288
+ */
289
+ amount_per_share?: number;
290
+
291
+ /**
292
+ * average entry cost per unit in USD
293
+ */
294
+ average_entry_value_usd?: number;
295
+
153
296
  /**
154
297
  * coin ID
155
298
  */
156
299
  coin_id?: string;
157
300
 
301
+ /**
302
+ * current value of holdings in USD
303
+ */
304
+ current_value_usd?: number;
305
+
306
+ /**
307
+ * percentage of entity's total treasury value
308
+ */
309
+ entity_value_usd_percentage?: number;
310
+
311
+ /**
312
+ * holding amount changes over different timeframes (only present if
313
+ * holding_amount_change param is used)
314
+ */
315
+ holding_amount_change?: Holding.HoldingAmountChange;
316
+
317
+ /**
318
+ * holding change percentages over different timeframes (only present if
319
+ * holding_change_percentage param is used)
320
+ */
321
+ holding_change_percentage?: Holding.HoldingChangePercentage;
322
+
158
323
  /**
159
324
  * percentage of total crypto supply
160
325
  */
161
326
  percentage_of_total_supply?: number;
327
+
328
+ /**
329
+ * total entry cost/purchase value in USD
330
+ */
331
+ total_entry_value_usd?: number;
332
+
333
+ /**
334
+ * unrealized profit and loss for this holding
335
+ */
336
+ unrealized_pnl?: number;
337
+ }
338
+
339
+ export namespace Holding {
340
+ /**
341
+ * holding amount changes over different timeframes (only present if
342
+ * holding_amount_change param is used)
343
+ */
344
+ export interface HoldingAmountChange {
345
+ '14d'?: number;
346
+
347
+ '1y'?: number;
348
+
349
+ '30d'?: number;
350
+
351
+ '7d'?: number;
352
+
353
+ '90d'?: number;
354
+
355
+ ytd?: number;
356
+ }
357
+
358
+ /**
359
+ * holding change percentages over different timeframes (only present if
360
+ * holding_change_percentage param is used)
361
+ */
362
+ export interface HoldingChangePercentage {
363
+ '14d'?: number;
364
+
365
+ '1y'?: number;
366
+
367
+ '30d'?: number;
368
+
369
+ '7d'?: number;
370
+
371
+ '90d'?: number;
372
+
373
+ ytd?: number;
374
+ }
375
+ }
376
+ }
377
+
378
+ export interface PublicTreasuryGetHoldingChartResponse {
379
+ holding_value_in_usd?: Array<Array<number>>;
380
+
381
+ holdings?: Array<Array<number>>;
382
+ }
383
+
384
+ export interface PublicTreasuryGetTransactionHistoryResponse {
385
+ transactions?: Array<PublicTreasuryGetTransactionHistoryResponse.Transaction>;
386
+ }
387
+
388
+ export namespace PublicTreasuryGetTransactionHistoryResponse {
389
+ export interface Transaction {
390
+ /**
391
+ * average entry value in usd after the transaction
392
+ */
393
+ average_entry_value_usd?: number;
394
+
395
+ /**
396
+ * coin ID
397
+ */
398
+ coin_id?: string;
399
+
400
+ /**
401
+ * transaction date in UNIX timestamp
402
+ */
403
+ date?: number;
404
+
405
+ /**
406
+ * total holding balance after the transaction
407
+ */
408
+ holding_balance?: number;
409
+
410
+ /**
411
+ * net change in holdings after the transaction
412
+ */
413
+ holding_net_change?: number;
414
+
415
+ /**
416
+ * source document URL
417
+ */
418
+ source_url?: string;
419
+
420
+ /**
421
+ * transaction value in usd
422
+ */
423
+ transaction_value_usd?: number;
424
+
425
+ /**
426
+ * transaction type: buy or sell
427
+ */
428
+ type?: 'buy' | 'sell';
162
429
  }
163
430
  }
164
431
 
165
432
  export interface PublicTreasuryGetCoinIDParams {
166
433
  /**
167
- * public company or government entity
434
+ * Path param: public company or government entity
168
435
  */
169
436
  entity: 'companies' | 'governments';
437
+
438
+ /**
439
+ * Query param: Sort order for results
440
+ */
441
+ order?: 'total_holdings_usd_desc' | 'total_holdings_usd_asc';
442
+
443
+ /**
444
+ * Query param: Page number to return
445
+ */
446
+ page?: number;
447
+
448
+ /**
449
+ * Query param: Number of results to return per page
450
+ */
451
+ per_page?: number;
452
+ }
453
+
454
+ export interface PublicTreasuryGetEntityIDParams {
455
+ /**
456
+ * include holding amount change for specified timeframes, comma-separated if
457
+ * querying more than 1 timeframe Valid values: 7d, 14d, 30d, 90d, 1y, ytd
458
+ */
459
+ holding_amount_change?: string;
460
+
461
+ /**
462
+ * include holding change percentage for specified timeframes, comma-separated if
463
+ * querying more than 1 timeframe Valid values: 7d, 14d, 30d, 90d, 1y, ytd
464
+ */
465
+ holding_change_percentage?: string;
466
+ }
467
+
468
+ export interface PublicTreasuryGetHoldingChartParams {
469
+ /**
470
+ * Path param: public company or government entity ID \*refers to
471
+ * [`/entities/list`](/reference/entities-list).
472
+ */
473
+ entity_id: string;
474
+
475
+ /**
476
+ * Query param: data up to number of days ago Valid values:
477
+ * `7, 14, 30, 90, 180, 365, 730, max`
478
+ */
479
+ days: string;
480
+
481
+ /**
482
+ * Query param: include empty intervals with no transaction data, default: false
483
+ */
484
+ include_empty_intervals?: boolean;
485
+ }
486
+
487
+ export interface PublicTreasuryGetTransactionHistoryParams {
488
+ /**
489
+ * filter transactions by coin IDs, comma-separated if querying more than 1 coin
490
+ * \*refers to [`/coins/list`](/reference/coins-list).
491
+ */
492
+ coin_ids?: string;
493
+
494
+ /**
495
+ * use this to sort the order of transactions, default: `date_desc`
496
+ */
497
+ order?:
498
+ | 'date_desc'
499
+ | 'date_asc'
500
+ | 'holding_net_change_desc'
501
+ | 'holding_net_change_asc'
502
+ | 'transaction_value_usd_desc'
503
+ | 'transaction_value_usd_asc'
504
+ | 'average_cost_desc'
505
+ | 'average_cost_asc';
506
+
507
+ /**
508
+ * page through results, default: `1`
509
+ */
510
+ page?: number;
511
+
512
+ /**
513
+ * total results per page, default: `100` Valid values: 1...250
514
+ */
515
+ per_page?: number;
170
516
  }
171
517
 
172
518
  export declare namespace PublicTreasury {
173
519
  export {
174
520
  type PublicTreasuryGetCoinIDResponse as PublicTreasuryGetCoinIDResponse,
175
521
  type PublicTreasuryGetEntityIDResponse as PublicTreasuryGetEntityIDResponse,
522
+ type PublicTreasuryGetHoldingChartResponse as PublicTreasuryGetHoldingChartResponse,
523
+ type PublicTreasuryGetTransactionHistoryResponse as PublicTreasuryGetTransactionHistoryResponse,
176
524
  type PublicTreasuryGetCoinIDParams as PublicTreasuryGetCoinIDParams,
525
+ type PublicTreasuryGetEntityIDParams as PublicTreasuryGetEntityIDParams,
526
+ type PublicTreasuryGetHoldingChartParams as PublicTreasuryGetHoldingChartParams,
527
+ type PublicTreasuryGetTransactionHistoryParams as PublicTreasuryGetTransactionHistoryParams,
177
528
  };
178
529
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '2.3.0'; // x-release-please-version
1
+ export const VERSION = '3.0.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.3.0";
1
+ export declare const VERSION = "3.0.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.3.0";
1
+ export declare const VERSION = "3.0.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 = '2.3.0'; // x-release-please-version
4
+ exports.VERSION = '3.0.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '2.3.0'; // x-release-please-version
1
+ export const VERSION = '3.0.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map