@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.
- package/CHANGELOG.md +100 -0
- package/LICENSE +1 -1
- package/README.md +23 -10
- package/client.d.mts +4 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -3
- package/client.d.ts.map +1 -1
- package/client.js +15 -2
- package/client.js.map +1 -1
- package/client.mjs +15 -2
- package/client.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +5 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -0
- package/internal/parse.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/coins/circulating-supply-chart.d.mts +1 -1
- package/resources/coins/circulating-supply-chart.d.mts.map +1 -1
- package/resources/coins/circulating-supply-chart.d.ts +1 -1
- package/resources/coins/circulating-supply-chart.d.ts.map +1 -1
- package/resources/coins/coins.d.mts +158 -1
- package/resources/coins/coins.d.mts.map +1 -1
- package/resources/coins/coins.d.ts +158 -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 +9 -1
- package/resources/coins/contract/contract.d.mts.map +1 -1
- package/resources/coins/contract/contract.d.ts +9 -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/contract/market-chart.d.mts +5 -1
- package/resources/coins/contract/market-chart.d.mts.map +1 -1
- package/resources/coins/contract/market-chart.d.ts +5 -1
- package/resources/coins/contract/market-chart.d.ts.map +1 -1
- package/resources/coins/contract/market-chart.js +5 -1
- package/resources/coins/contract/market-chart.js.map +1 -1
- package/resources/coins/contract/market-chart.mjs +5 -1
- package/resources/coins/contract/market-chart.mjs.map +1 -1
- package/resources/coins/history.d.mts +1 -1
- package/resources/coins/history.d.ts +1 -1
- package/resources/coins/market-chart.d.mts +5 -1
- package/resources/coins/market-chart.d.mts.map +1 -1
- package/resources/coins/market-chart.d.ts +5 -1
- package/resources/coins/market-chart.d.ts.map +1 -1
- package/resources/coins/market-chart.js +5 -1
- package/resources/coins/market-chart.js.map +1 -1
- package/resources/coins/market-chart.mjs +5 -1
- package/resources/coins/market-chart.mjs.map +1 -1
- package/resources/coins/markets.d.mts +9 -0
- package/resources/coins/markets.d.mts.map +1 -1
- package/resources/coins/markets.d.ts +9 -0
- package/resources/coins/markets.d.ts.map +1 -1
- package/resources/coins/tickers.d.mts +1 -1
- package/resources/coins/tickers.d.mts.map +1 -1
- package/resources/coins/tickers.d.ts +1 -1
- package/resources/coins/tickers.d.ts.map +1 -1
- package/resources/exchanges/exchanges.d.mts +3 -3
- package/resources/exchanges/exchanges.d.mts.map +1 -1
- package/resources/exchanges/exchanges.d.ts +3 -3
- package/resources/exchanges/exchanges.d.ts.map +1 -1
- package/resources/exchanges/tickers.d.mts +1 -1
- package/resources/exchanges/tickers.d.mts.map +1 -1
- package/resources/exchanges/tickers.d.ts +1 -1
- package/resources/exchanges/tickers.d.ts.map +1 -1
- package/resources/global/global.d.mts +4 -0
- package/resources/global/global.d.mts.map +1 -1
- package/resources/global/global.d.ts +4 -0
- package/resources/global/global.d.ts.map +1 -1
- package/resources/global/global.js.map +1 -1
- package/resources/global/global.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/key.d.mts +10 -0
- package/resources/key.d.mts.map +1 -1
- package/resources/key.d.ts +10 -0
- package/resources/key.d.ts.map +1 -1
- package/resources/onchain/networks/dexes.d.mts +8 -0
- package/resources/onchain/networks/dexes.d.mts.map +1 -1
- package/resources/onchain/networks/dexes.d.ts +8 -0
- package/resources/onchain/networks/dexes.d.ts.map +1 -1
- package/resources/onchain/networks/new-pools.d.mts +16 -0
- package/resources/onchain/networks/new-pools.d.mts.map +1 -1
- package/resources/onchain/networks/new-pools.d.ts +16 -0
- package/resources/onchain/networks/new-pools.d.ts.map +1 -1
- package/resources/onchain/networks/pools/info.d.mts +2 -0
- package/resources/onchain/networks/pools/info.d.mts.map +1 -1
- package/resources/onchain/networks/pools/info.d.ts +2 -0
- package/resources/onchain/networks/pools/info.d.ts.map +1 -1
- package/resources/onchain/networks/pools/pools.d.mts +8 -0
- package/resources/onchain/networks/pools/pools.d.mts.map +1 -1
- package/resources/onchain/networks/pools/pools.d.ts +8 -0
- package/resources/onchain/networks/pools/pools.d.ts.map +1 -1
- package/resources/onchain/networks/pools/pools.js.map +1 -1
- package/resources/onchain/networks/pools/pools.mjs.map +1 -1
- package/resources/onchain/networks/tokens/index.d.mts +1 -0
- package/resources/onchain/networks/tokens/index.d.mts.map +1 -1
- package/resources/onchain/networks/tokens/index.d.ts +1 -0
- package/resources/onchain/networks/tokens/index.d.ts.map +1 -1
- package/resources/onchain/networks/tokens/index.js +3 -1
- package/resources/onchain/networks/tokens/index.js.map +1 -1
- package/resources/onchain/networks/tokens/index.mjs +1 -0
- package/resources/onchain/networks/tokens/index.mjs.map +1 -1
- package/resources/onchain/networks/tokens/info.d.mts +2 -0
- package/resources/onchain/networks/tokens/info.d.mts.map +1 -1
- package/resources/onchain/networks/tokens/info.d.ts +2 -0
- package/resources/onchain/networks/tokens/info.d.ts.map +1 -1
- package/resources/onchain/networks/tokens/multi.d.mts +6 -0
- package/resources/onchain/networks/tokens/multi.d.mts.map +1 -1
- package/resources/onchain/networks/tokens/multi.d.ts +6 -0
- package/resources/onchain/networks/tokens/multi.d.ts.map +1 -1
- package/resources/onchain/networks/tokens/ohlcv.d.mts +5 -0
- package/resources/onchain/networks/tokens/ohlcv.d.mts.map +1 -1
- package/resources/onchain/networks/tokens/ohlcv.d.ts +5 -0
- package/resources/onchain/networks/tokens/ohlcv.d.ts.map +1 -1
- package/resources/onchain/networks/tokens/pools.d.mts +14 -0
- package/resources/onchain/networks/tokens/pools.d.mts.map +1 -1
- package/resources/onchain/networks/tokens/pools.d.ts +14 -0
- package/resources/onchain/networks/tokens/pools.d.ts.map +1 -1
- package/resources/onchain/networks/tokens/tokens.d.mts +10 -0
- package/resources/onchain/networks/tokens/tokens.d.mts.map +1 -1
- package/resources/onchain/networks/tokens/tokens.d.ts +10 -0
- package/resources/onchain/networks/tokens/tokens.d.ts.map +1 -1
- package/resources/onchain/networks/tokens/tokens.js +4 -0
- package/resources/onchain/networks/tokens/tokens.js.map +1 -1
- package/resources/onchain/networks/tokens/tokens.mjs +4 -0
- package/resources/onchain/networks/tokens/tokens.mjs.map +1 -1
- package/resources/onchain/networks/tokens/top-holders.d.mts +12 -0
- package/resources/onchain/networks/tokens/top-holders.d.mts.map +1 -1
- package/resources/onchain/networks/tokens/top-holders.d.ts +12 -0
- package/resources/onchain/networks/tokens/top-holders.d.ts.map +1 -1
- package/resources/onchain/networks/tokens/top-traders.d.mts +77 -0
- package/resources/onchain/networks/tokens/top-traders.d.mts.map +1 -0
- package/resources/onchain/networks/tokens/top-traders.d.ts +77 -0
- package/resources/onchain/networks/tokens/top-traders.d.ts.map +1 -0
- package/resources/onchain/networks/tokens/top-traders.js +30 -0
- package/resources/onchain/networks/tokens/top-traders.js.map +1 -0
- package/resources/onchain/networks/tokens/top-traders.mjs +26 -0
- package/resources/onchain/networks/tokens/top-traders.mjs.map +1 -0
- package/resources/onchain/networks/trending-pools.d.mts +16 -0
- package/resources/onchain/networks/trending-pools.d.mts.map +1 -1
- package/resources/onchain/networks/trending-pools.d.ts +16 -0
- package/resources/onchain/networks/trending-pools.d.ts.map +1 -1
- package/resources/onchain/pools/megafilter.d.mts +13 -1
- package/resources/onchain/pools/megafilter.d.mts.map +1 -1
- package/resources/onchain/pools/megafilter.d.ts +13 -1
- package/resources/onchain/pools/megafilter.d.ts.map +1 -1
- package/resources/onchain/simple/networks/token-price.d.mts +20 -0
- package/resources/onchain/simple/networks/token-price.d.mts.map +1 -1
- package/resources/onchain/simple/networks/token-price.d.ts +20 -0
- package/resources/onchain/simple/networks/token-price.d.ts.map +1 -1
- package/resources/public-treasury.d.mts +286 -31
- package/resources/public-treasury.d.mts.map +1 -1
- package/resources/public-treasury.d.ts +286 -31
- package/resources/public-treasury.d.ts.map +1 -1
- package/resources/public-treasury.js +39 -4
- package/resources/public-treasury.js.map +1 -1
- package/resources/public-treasury.mjs +39 -4
- package/resources/public-treasury.mjs.map +1 -1
- package/src/client.ts +29 -4
- package/src/internal/parse.ts +6 -0
- package/src/resources/coins/circulating-supply-chart.ts +1 -1
- package/src/resources/coins/coins.ts +193 -1
- package/src/resources/coins/contract/contract.ts +11 -1
- package/src/resources/coins/contract/market-chart.ts +5 -1
- package/src/resources/coins/history.ts +1 -1
- package/src/resources/coins/market-chart.ts +5 -1
- package/src/resources/coins/markets.ts +11 -0
- package/src/resources/coins/tickers.ts +1 -1
- package/src/resources/exchanges/exchanges.ts +3 -3
- package/src/resources/exchanges/tickers.ts +1 -1
- package/src/resources/global/global.ts +5 -0
- package/src/resources/index.ts +5 -0
- package/src/resources/key.ts +12 -0
- package/src/resources/onchain/networks/dexes.ts +12 -0
- package/src/resources/onchain/networks/new-pools.ts +24 -0
- package/src/resources/onchain/networks/pools/info.ts +4 -0
- package/src/resources/onchain/networks/pools/pools.ts +12 -0
- package/src/resources/onchain/networks/tokens/index.ts +1 -0
- package/src/resources/onchain/networks/tokens/info.ts +4 -0
- package/src/resources/onchain/networks/tokens/multi.ts +8 -0
- package/src/resources/onchain/networks/tokens/ohlcv.ts +6 -0
- package/src/resources/onchain/networks/tokens/pools.ts +20 -0
- package/src/resources/onchain/networks/tokens/tokens.ts +18 -0
- package/src/resources/onchain/networks/tokens/top-holders.ts +21 -0
- package/src/resources/onchain/networks/tokens/top-traders.ts +116 -0
- package/src/resources/onchain/networks/trending-pools.ts +24 -0
- package/src/resources/onchain/pools/megafilter.ts +19 -0
- package/src/resources/onchain/simple/networks/token-price.ts +16 -0
- package/src/resources/public-treasury.ts +386 -35
- 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
|
@@ -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(
|
|
42
|
-
|
|
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
|
-
*
|
|
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
|
-
|
|
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
|
-
*
|
|
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
|
-
|
|
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
|
|
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
|
-
*
|
|
104
|
+
* market cap dominance
|
|
74
105
|
*/
|
|
75
|
-
|
|
106
|
+
market_cap_dominance: number;
|
|
76
107
|
|
|
77
108
|
/**
|
|
78
|
-
*
|
|
109
|
+
* total crypto holdings of companies
|
|
79
110
|
*/
|
|
80
|
-
|
|
111
|
+
total_holdings: number;
|
|
81
112
|
|
|
82
113
|
/**
|
|
83
|
-
*
|
|
114
|
+
* total crypto holdings value in usd
|
|
84
115
|
*/
|
|
85
|
-
|
|
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
|
-
*
|
|
162
|
+
* market cap dominance
|
|
89
163
|
*/
|
|
90
|
-
|
|
164
|
+
market_cap_dominance: number;
|
|
91
165
|
|
|
92
166
|
/**
|
|
93
|
-
* total
|
|
167
|
+
* total crypto holdings of governments
|
|
94
168
|
*/
|
|
95
|
-
|
|
169
|
+
total_holdings: number;
|
|
96
170
|
|
|
97
171
|
/**
|
|
98
|
-
* total crypto holdings
|
|
172
|
+
* total crypto holdings value in usd
|
|
99
173
|
*/
|
|
100
|
-
|
|
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 = '
|
|
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 = "
|
|
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 = "
|
|
1
|
+
export declare const VERSION = "3.0.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
|
+
export const VERSION = '3.0.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|