ccdata_api/schemas/data_api/asset.rs
1use serde::{Serialize, Deserialize};
2use crate::schemas::data_api::{PreviousAssetSymbol, AssetAlternativeId, AssetIndustry, SpecialAddress};
3
4
5// Asset: Full Asset Metadata
6
7
8#[derive(Clone, Debug, Serialize, Deserialize)]
9pub struct ConsensusMechanism {
10 #[serde(rename = "NAME")]
11 /// The type of consensus this blockhain / networks uses.
12 pub name: Option<String>,
13}
14
15#[derive(Clone, Debug, Serialize, Deserialize)]
16pub struct ConsensusAlgorithmType {
17 #[serde(rename = "NAME")]
18 /// The name of the algorithm this blockchain uses for the consensus mechanism.
19 pub name: Option<String>,
20 #[serde(rename = "DESCRIPTION")]
21 /// A description for the algorithm type.
22 pub description: Option<String>,
23}
24
25#[derive(Clone, Debug, Serialize, Deserialize)]
26pub struct HashingAlgorithmType {
27 #[serde(rename = "NAME")]
28 /// The types of algorithms this blockchain uses for hashing blocks, transactions etc.
29 pub name: Option<String>,
30}
31
32/// Asset: Full Asset Metadata
33#[derive(Clone, Debug, Serialize, Deserialize)]
34pub struct AssetMetadata {
35 #[serde(rename = "ID")]
36 /// The unique identifier for the asset entry.
37 pub id: i32,
38 #[serde(rename = "TYPE")]
39 /// Type of the message.
40 pub type_: String,
41 #[serde(rename = "ID_LEGACY")]
42 /// The legacy previous asset management system ID.
43 pub id_legacy: Option<i32>,
44 #[serde(rename = "ID_PARENT_ASSET")]
45 /// This refers to the base, parent, or main asset to which a token is linked or pegged, signifying that the token acts as a representation of the parent asset.
46 /// When a token loses its connection to a parent asset due to events such as hacks or the issuing entity's decision to not honor the peg—similar to how
47 /// TerraUSD detached from its USD peg—the PARENT_ASSET_SYMBOL is removed because the token no longer serves as a true representation of the parent asset.
48 /// In order to remove the parent we need clear communication from the company who is in charge of keeping the peg.
49 /// We add add a plublic notice and the include the communication in the Other Document URLs.
50 pub id_parent_asset: Option<i32>,
51 #[serde(rename = "ID_ASSET_ISSUER")]
52 /// This field identifies the original creator of the token.
53 /// It provides essential information about the entity, individual or contract rules responsible for issuing the token initially and/or maintaining the supply.
54 /// In the case of of bridged assets, this is the bridge operator and the parent will have its own issuer.
55 /// You can go up the parent chain and figure out what counterparty risk you are exposed to when trading a specific asset.
56 /// This clarification ensures that users can directly trace the origin of the token, understanding its issuance history and the primary issuer's credentials.
57 pub id_asset_issuer: Option<i32>,
58 #[serde(rename = "SYMBOL")]
59 /// Internal mapped symbol for a specific asset.
60 pub symbol: String,
61 #[serde(rename = "URI")]
62 /// The uri path that this asset will be found on / url-slug.
63 pub uri: String,
64 #[serde(rename = "ASSET_TYPE")]
65 /// The asset class/type.
66 pub asset_type: String,
67 #[serde(rename = "ASSET_ISSUER_NAME")]
68 /// This field identifies the original creator of the asset. It provides essential information about the entity
69 /// individual or contract rules responsible for issuing the asset initially and/or maintaining the supply.
70 /// In the case of of bridged assets, this is the bridge operator and the parent will have its own issuer.
71 /// You can go up the parent chain and figure out what counterparty risk you are exposed to when trading a specific asset.
72 /// This clarification ensures that users can directly trace the origin of the asset, understanding its issuance history and the primary issuer's credentials.
73 pub asset_issuer_name: Option<String>,
74 #[serde(rename = "PARENT_ASSET_SYMBOL")]
75 /// This refers to the base, parent, or main asset to which a token is linked or pegged, signifying that the token acts as a representation of the parent asset.
76 /// When a token loses its connection to a parent asset due to events such as hacks or the issuing entity's decision to not honor the peg—similar to how
77 /// TerraUSD detached from its USD peg—the PARENT_ASSET_SYMBOL is removed because the token no longer serves as a true representation of the parent asset.
78 /// In order to remove the parent we need clear communication from the company who is in charge of keeping the peg.
79 /// We add add a plublic notice and the include the communication in the Other Document URLs.
80 pub parent_asset_symbol: Option<String>,
81 #[serde(rename = "CREATED_ON")]
82 /// Asset internal creation unix ts in our system.
83 pub created_on: i64,
84 #[serde(rename = "UPDATED_ON")]
85 /// Asset internal last updated unix ts in our system.
86 pub updated_on: i64,
87 #[serde(rename = "PUBLIC_NOTICE")]
88 /// A public notice for this asset.
89 pub public_notice: Option<String>,
90 #[serde(rename = "NAME")]
91 /// The full name of the asset, e.g. Bitcoin.
92 pub name: String,
93 #[serde(rename = "LOGO_URL")]
94 /// The image that appears when you see this asset.
95 pub logo_url: String,
96 #[serde(rename = "LAUNCH_DATE")]
97 /// The launch date of the asset is indicated as (yyyy-mm-dd).
98 /// However, if the asset was initially established as a token before being integrated into a blockchain,
99 /// the launch date is reset to the creation of the first block when the blockchain is launched for the token.
100 pub launch_date: i64,
101 #[serde(rename = "PREVIOUS_ASSET_SYMBOLS")]
102 /// A list of symbols that were previously associated with this asset.
103 pub previous_asset_symbols: Option<Vec<PreviousAssetSymbol>>,
104 #[serde(rename = "ASSET_ALTERNATIVE_IDS")]
105 /// Alternative data platforms that also support this asset with their specific asset id.
106 pub asset_alternative_ids: Option<Vec<AssetAlternativeId>>,
107 #[serde(rename = "ASSET_DESCRIPTION_SNIPPET")]
108 /// The shortest form description text only for this asset. This is a lot more limited than the summary. Generally this is a one or maximum two sentences.
109 pub asset_description_snippet: Option<String>,
110 #[serde(rename = "ASSET_DECIMAL_POINTS")]
111 /// The total decimal places this asset can be divided into. E.g. 8 for BTC (1 Satoshi), 18 for ETH (1 Wei).
112 /// Generally blockchains store all units as integers and this is the number you need to divide the lowest unit of accounting by to get the common unit
113 /// of measure used for the asset.
114 pub asset_decimal_points: Option<i32>,
115 #[serde(rename = "SUPPLY_MAX")]
116 /// The maximum number of asset parts (coins/tokens) that will ever be issued (supply_circulating + supply_burnt + supply_locked + all supply that
117 /// has not been issued yet but is planned to be issued in the future). For assets (coins/tokens) that have infinite supply, we use -1.
118 pub supply_max: f64,
119 #[serde(rename = "SUPPLY_ISSUED")]
120 /// The number of asset parts (coins/tokens) that have been issued so far. (supply_circulating + supply_locked + supply_burnt).
121 pub supply_issued: Option<f64>,
122 #[serde(rename = "SUPPLY_TOTAL")]
123 /// The number of asset parts (coins/tokens) that have been issued so far excluding burnt tokens. (supply_circulating + supply_locked).
124 pub supply_total: Option<f64>,
125 #[serde(rename = "SUPPLY_CIRCULATING")]
126 /// Also referred to as free float or public float. The number of asset parts (coins/tokens) that are available to be traded and
127 /// it excludes burnt supply and locked supply.
128 pub supply_circulating: Option<f64>,
129 #[serde(rename = "SUPPLY_FUTURE")]
130 /// The number of asset parts (coins/tokens) that are planned to be issued in the future. (supply_max - supply_issued).
131 pub supply_future: f64,
132 #[serde(rename = "SUPPLY_LOCKED")]
133 /// The number of asset parts (coins/tokens) that are currently not transferable until certain conditions are met.
134 /// Locked supply is generally held by team members, DAOs, foundations, bridges, stakers, liquidity pools, etc.
135 pub supply_locked: Option<f64>,
136 #[serde(rename = "SUPPY_BURNT")]
137 /// The number of asset parts (coins/tokens) that have been sent to addresses/locations that are no longer accessible.
138 /// They are permanently removed from the circulating supply on purpose, this does not include lost tokens sent to wallets that do not exist or
139 /// sent to wallets that users no longer have access to, the address of burnt tokens is determined by the project team.
140 pub supply_burnt: Option<f64>,
141 #[serde(rename = "SUPPLY_STAKED")]
142 /// The current number of asset parts (coins/tokens) that are locked as part of PoS and PoS partial chains.
143 pub supply_staked: Option<f64>,
144 #[serde(rename = "LAST_BLOCK_MINT")]
145 /// New asset parts (coins/tokens) created in the most recently issued block.
146 pub last_block_mint: Option<f64>,
147 #[serde(rename = "LAST_BLOCK_BURN")]
148 /// The total amount of asset parts (coins/tokens) that were taken out of circulation in the most recently issued block.
149 pub last_block_burn: Option<f64>,
150 #[serde(rename = "BURN_ADDRESSES")]
151 /// The list of addresses that are considered burn addresses for this asset.
152 pub burn_addresses: Option<Vec<SpecialAddress>>,
153 #[serde(rename = "LOCKED_ADDRESSES")]
154 /// The list of addresses that are considered locked addresses for this asset.
155 pub locked_addresses: Option<Vec<SpecialAddress>>,
156 #[serde(rename = "ASSET_STATUS")]
157 /// The current operational status of the asset and its underlying project
158 pub asset_status: Option<String>,
159 #[serde(rename = "ASSET_SYMBOL_GLYPH")]
160 /// The Asset Symbol Glyph represents the visual or typographic mark associated with an asset, such as "$" for USD or "₿" for Bitcoin.
161 /// It is distinct from the asset symbol (e.g., USD, BTC) and provides a recognizable representation used in financial contexts,
162 /// UIs, and documentation.
163 pub asset_symbol_glyph: Option<String>,
164 #[serde(rename = "IS_EXCLUDED_FROM_PRICE_TOPLIST")]
165 /// Indicates whether the asset should be excluded from the overall and asset type price toplist rankings.
166 /// But this will still be included in the industry ones.
167 pub is_excluded_from_price_toplist: Option<bool>,
168 #[serde(rename = "IS_EXCLUDED_FROM_VOLUME_TOPLIST")]
169 /// Indicates whether the asset should be excluded from the overall and asset type volume toplist rankings
170 /// But this will still be included in the industry ones.
171 pub is_excluded_from_volume_toplist: Option<bool>,
172 #[serde(rename = "IS_EXCLUDED_FROM_MKT_CAP_TOPLIST")]
173 /// Indicates whether the asset should be excluded from the overall and asset type market capitalization toplist rankings.
174 /// But this will still be included in the industry ones.
175 pub is_excluded_from_mkt_cap_totlist: Option<bool>,
176 #[serde(rename = "ASSET_INDUSTRIES")]
177 /// The asset industries that asset operates in.
178 pub asset_industries: Option<Vec<AssetIndustry>>,
179 #[serde(rename = "CONSENSUS_MECHANISMS")]
180 /// The types of consensus mechanisms this network / blockchain / token uses. This is a list of the fault-tolerant mechanism families that
181 /// are used to achieve the necessary agreement on a single data value or a single state of the network among distributed processes or multi-agent systems.
182 pub consensus_mechanisms: Option<Vec<ConsensusMechanism>>,
183 #[serde(rename = "CONSENSUS_ALGORITHM_TYPES")]
184 /// The types of consensus algorithms this blockchain uses. This is dependent on the consensus mechanisms used by the network / blockchain / token.
185 /// For blockchains that are proof of work this would in most cases have the mining algorithm. For hybrid assets,
186 /// this would be a list of mining and proof of stake and other algorithm used for reaching consensus.
187 pub consensus_algorithm_types: Option<Vec<ConsensusAlgorithmType>>,
188 #[serde(rename = "HASHING_ALGORITHM_TYPES")]
189 /// The types of algorithms this blockchain uses for hashing blocks, transactions etc.
190 pub hashing_algorithm_types: Option<Vec<HashingAlgorithmType>>,
191}
192
193
194// Asset: Events
195
196
197/// Asset: Events
198#[derive(Clone, Debug, Serialize, Deserialize)]
199pub struct AssetEvent {
200 #[serde(rename = "TYPE")]
201 /// Type of the message.
202 pub type_: String,
203 #[serde(rename = "ID")]
204 /// The unique identifier for the asset event entry.
205 pub id: i32,
206 #[serde(rename = "ASSET_ID")]
207 /// The unique identifier for the asset the event entry is associated to.
208 pub asset_id: i32,
209 #[serde(rename = "EVENT_TYPE")]
210 /// The event type, one of the following: SECURITY-INCIDENT, HARD-FORK, SOFT-FORK, TICKER-CHANGE, MIGRATION, SUPPLY-BURN, SUPPLY-LOCK, SPLIT,
211 /// REVERSE-SPLIT, TOKEN-LISTING, TOKEN-DELISTING, NETWORK-CONTROL-CHANGE, OTHER
212 pub event_type: String,
213 #[serde(rename = "ANNOUNCED_ON")]
214 /// The unix timestamp when we were notified of the event.
215 pub announced_on: i64,
216 #[serde(rename = "IMPLEMENTATION_START_DATE")]
217 /// The unix timestamp when the event was triggered.
218 pub implementation_start_date: i64,
219 #[serde(rename = "IMPLEMENTATION_END_DATE")]
220 /// The unix timestamp when the event finished.
221 pub implementation_end_date: Option<i64>,
222 #[serde(rename = "NAME")]
223 /// Name text.
224 pub name: String,
225 #[serde(rename = "DESCRIPTION")]
226 /// Description text.
227 pub description: String,
228 #[serde(rename = "CREATED_ON")]
229 /// Asset Event internal creation unix ts in our system.
230 pub created_on: i64,
231 #[serde(rename = "UPDATED_ON")]
232 /// Asset Event internal last updated unix ts in our system.
233 pub updated_on: Option<i64>,
234}
235
236
237// Asset: Historical: Code Repository Metrics Day
238
239
240#[derive(Clone, Debug, Serialize, Deserialize)]
241pub struct AssetCodeRepository {
242 #[serde(rename = "URL")]
243 /// The URL of the code repository used to retrieve social metrics.
244 pub url: String,
245 #[serde(rename = "CONTRIBUTORS")]
246 /// The number of contributors to the code repository.
247 pub contributors: i32,
248 #[serde(rename = "FORKS")]
249 /// The number of forks of the code repository.
250 pub forks: i32,
251 #[serde(rename = "STARS")]
252 /// The number of stars received by the code repository.
253 pub stars: i32,
254 #[serde(rename = "SUBSCRIBERS")]
255 /// The number of subscribers to the code repository.
256 pub subscribers: i32,
257 #[serde(rename = "OPEN_ISSUES")]
258 /// The number of open issues in the code repository.
259 pub open_issues: Option<i32>,
260 #[serde(rename = "CLOSED_ISSUES")]
261 /// The number of closed issues in the code repository.
262 pub closed_issues: i32,
263 #[serde(rename = "OPEN_PULL_REQUESTS")]
264 /// The number of open pull requests in the code repository.
265 pub open_pull_requests: i32,
266 #[serde(rename = "CLOSED_PULL_REQUESTS")]
267 /// The number of closed pull requests in the code repository.
268 pub closed_pull_requests: i32,
269}
270
271/// Asset: Historical: Code Repository Metrics Day
272#[derive(Clone, Debug, Serialize, Deserialize)]
273pub struct AssetCodeRepoMetrics {
274 #[serde(rename = "UNIT")]
275 /// The unit of the historical period update: HOUR for hour and DAY for day.
276 pub unit: String,
277 #[serde(rename = "TIMESTAMP")]
278 /// The timestamp in seconds of the histo period, for hour it would be start of the hour and for daily it is 00:00 GMT/UTC.
279 pub timestamp: i64,
280 #[serde(rename = "TYPE")]
281 /// The type of the message.
282 pub type_: String,
283 #[serde(rename = "ASSET_ID")]
284 /// The unique identifier for the asset.
285 pub asset_id: i32,
286 #[serde(rename = "ASSET_SYMBOL")]
287 /// Internal mapped symbol for a specific asset.
288 pub asset_symbol: String,
289 #[serde(rename = "TOTAL_CONTRIBUTORS")]
290 /// The total number of contributors across all code repositories associated with this asset.
291 /// A contributor is a users who has contributed to a project by making changes or improvements to the project's codebase,
292 /// having their changes accepted and merged, and is acknowledged for their contributions in the project's development history.
293 pub total_contributors: i32,
294 #[serde(rename = "TOTAL_FORKS")]
295 /// The total number of forks across all code repositories associated with this asset.
296 /// A fork in GitHub is a feature that allows users to create a personal copy of another repository, enabling them to modify,
297 /// experiment with, or contribute to the project without affecting the original work.
298 pub total_forks: i32,
299 #[serde(rename = "TOTAL_STARS")]
300 /// The total number of stars received across all code repositories associated with this asset.
301 /// A star is when a GitHub user bookmarks or wants to show appreciation for a particular repository,
302 /// much like a "like" or "favorite" function on other social media platforms.
303 pub total_stars: i32,
304 #[serde(rename = "TOTAL_SUBSCRIBERS")]
305 /// The total number of subscribers across all code repositories associated with this asset.
306 /// A subscriber is a user who has chosen to receive notifications for updates or changes made to a specific repository,
307 /// allowing them to closely follow the development and discussions of a project.
308 pub total_subscribers: i32,
309 #[serde(rename = "TOTAL_OPEN_ISSUES")]
310 /// The total number of open issues across all code repositories associated with this asset.
311 /// An open issue is a reported problem, suggestion, or task related to a repository that has not been resolved or closed yet,
312 /// providing a platform for users to track and discuss the ongoing development and improvements of a project.
313 pub total_open_issues: Option<i32>,
314 #[serde(rename = "TOTAL_CLOSED_ISSUES")]
315 /// The total number of closed issues across all code repositories associated with this asset.
316 /// A closed issue is a reported problem, suggestion, or task related to a repository that have been resolved or deemed no longer relevant,
317 /// providing a record of past challenges and solutions within the project development.
318 pub total_closed_issues: i32,
319 #[serde(rename = "TOTAL_OPEN_PULL_REQUESTS")]
320 /// The total number of open pull requests across all code repositories associated with this asset.
321 /// An open pull request on GitHub is a proposed change to a repository's codebase that is open for review and discussion,
322 // offering contributors an opportunity to improve the project and maintainers to accept, reject, or request changes before
323 /// integrating the proposed modifications.
324 pub total_open_pull_requests: i32,
325 #[serde(rename = "TOTAL_CLOSED_PULL_REQUESTS")]
326 /// The total number of closed pull requests across all code repositories associated with this asset.
327 /// A closed pull request is a proposed change to a repository's codebase that has been either accepted and merged into the codebase,
328 /// rejected by the maintainers, or withdrawn by the submitter, providing a record of changes that were suggested and their outcomes in
329 /// the project's development history.
330 pub total_closed_pull_requests: i32,
331 #[serde(rename = "CODE_REPOSITORIES")]
332 /// An array with all the data for each code repository used to calculate the total stats.
333 pub code_repositories: Vec<AssetCodeRepository>,
334}
335
336
337// Asset: Historical Discord
338
339
340#[derive(Clone, Debug, Serialize, Deserialize)]
341pub struct AssetDiscordServer {
342 #[serde(rename = "URL")]
343 /// The URL of the Discord server used to retrieve social metrics.
344 pub url: Option<String>,
345 #[serde(rename = "NAME")]
346 /// The name of the Discord server.
347 pub name: Option<String>,
348 #[serde(rename = "TOTAL_MEMBERS")]
349 /// The total number of users/members in this Discord server.
350 pub total_members: Option<i32>,
351 #[serde(rename = "CURRENT_ACTIVE_USERS")]
352 /// The number of online users in this Discord server.
353 pub total_closed_pull_requests: Option<i32>,
354 #[serde(rename = "PREMIUM_SUBSCRIBERS")]
355 /// The number of premium subscribers in this Discord server.
356 pub premium_subscribers: Option<i32>,
357}
358
359/// Asset: Historical Discord
360#[derive(Clone, Debug, Serialize, Deserialize)]
361pub struct AssetDiscord {
362 #[serde(rename = "UNIT")]
363 /// The unit of the historical period update: HOUR for hour and DAY for day.
364 pub unit: String,
365 #[serde(rename = "TIMESTAMP")]
366 /// The timestamp in seconds of the histo period, for hour it would be start of the hour and for daily it is 00:00 GMT/UTC.
367 pub timestamp: i64,
368 #[serde(rename = "TYPE")]
369 /// The type of the message.
370 pub type_: String,
371 #[serde(rename = "ASSET_ID")]
372 /// The unique identifier for the asset.
373 pub asset_id: i32,
374 #[serde(rename = "ASSET_SYMBOL")]
375 /// Symbol for a specific asset.
376 pub asset_symbol: String,
377 #[serde(rename = "TOTAL_MEMBERS")]
378 /// The total number of users/members in this Discord server.
379 pub total_members: Option<i32>,
380 #[serde(rename = "TOTAL_CURRENT_ACTIVE_USERS")]
381 /// The number of online users in this Discord server.
382 pub total_current_active_users: Option<i32>,
383 #[serde(rename = "TOTAL_PREMIUM_SUBSCRIBERS")]
384 /// The number of premium subscribers in this Discord server.
385 pub total_premium_subscribers: Option<i32>,
386 #[serde(rename = "DISCORD_SERVERS")]
387 /// An array with all the data for each Discord server used to calculate the total stats.
388 pub discord_servers: Vec<Option<AssetDiscordServer>>,
389}
390
391
392// Asset: Historical Reddit
393
394
395#[derive(Clone, Debug, Serialize, Deserialize)]
396pub struct AssetSubreddit {
397 #[serde(rename = "URL")]
398 /// The URL of the Subreddit used to retrieve social metrics.
399 pub url: Option<String>,
400 #[serde(rename = "NAME")]
401 /// The name of the subreddit.
402 pub name: Option<String>,
403 #[serde(rename = "CURRENT_ACTIVE_USERS")]
404 /// The number of currently active users in the subreddit.
405 pub current_active_users: Option<i32>,
406 #[serde(rename = "AVERAGE_POSTS_PER_DAY")]
407 /// The average number of posts per day in the subreddit.
408 pub average_posts_per_day: Option<f32>,
409 #[serde(rename = "AVERAGE_POSTS_PER_HOUR")]
410 /// The average number of posts per hour in the subreddit.
411 pub average_posts_per_hour: Option<f32>,
412 #[serde(rename = "AVERAGE_COMMENTS_PER_DAY")]
413 /// The average number of comments per day in the subreddit.
414 pub average_comments_per_day: Option<f32>,
415 #[serde(rename = "AVERAGE_COMMENTS_PER_HOUR")]
416 /// The average number of comments per hour in the subreddit.
417 pub average_comments_per_hour: Option<f32>,
418 #[serde(rename = "SUBSCRIBERS")]
419 /// The number of subscribers to the subreddit.
420 pub subscribers: Option<i32>,
421}
422
423/// Asset: Historical Reddit
424#[derive(Clone, Debug, Serialize, Deserialize)]
425pub struct AssetReddit {
426 #[serde(rename = "UNIT")]
427 /// The unit of the historical period update: HOUR for hour and DAY for day.
428 pub unit: String,
429 #[serde(rename = "TIMESTAMP")]
430 /// The timestamp in seconds of the histo period, for hour it would be start of the hour and for daily it is 00:00 GMT/UTC.
431 pub timestamp: i64,
432 #[serde(rename = "TYPE")]
433 /// The type of the message.
434 pub type_: String,
435 #[serde(rename = "ASSET_ID")]
436 /// The unique identifier for the asset.
437 pub asset_id: i32,
438 #[serde(rename = "ASSET_SYMBOL")]
439 /// Internal mapped symbol for a specific asset.
440 pub asset_symbol: String,
441 #[serde(rename = "TOTAL_SUBSCRIBERS")]
442 /// The number of subscribers to the subreddit.
443 pub total_subscribers: i32,
444 #[serde(rename = "TOTAL_ACTIVE_USERS")]
445 /// The number of currently active users in the subreddit.
446 pub total_active_users: Option<i32>,
447 #[serde(rename = "TOTAL_AVERAGE_POSTS_PER_DAY")]
448 /// The average number of posts per day in the subreddit.
449 pub total_average_posts_per_day: f64,
450 #[serde(rename = "TOTAL_AVERAGE_POSTS_PER_HOUR")]
451 /// The average number of posts per hour in the subreddit.
452 pub total_average_posts_per_hour: f64,
453 #[serde(rename = "TOTAL_AVERAGE_COMMENTS_PER_DAY")]
454 /// The average number of comments per day in the subreddit.
455 pub total_average_comments_per_day: f64,
456 #[serde(rename = "TOTAL_AVERAGE_COMMENTS_PER_HOUR")]
457 /// The average number of comments per hour in the subreddit.
458 pub total_average_comments_per_hour: f64,
459 #[serde(rename = "SUBREDDITS")]
460 /// An array with all the data for each Subreddit used to calculate the total stats.
461 pub subreddits: Option<Vec<AssetSubreddit>>,
462}
463
464
465// Asset: Historical Telegram
466
467
468#[derive(Clone, Debug, Serialize, Deserialize)]
469pub struct AssetTelegramGroup {
470 #[serde(rename = "URL")]
471 /// The URL of the Telegram group used to retrieve social metrics.
472 pub url: String,
473 #[serde(rename = "NAME")]
474 /// The name of the Telegram group.
475 pub name: String,
476 #[serde(rename = "USERNAME")]
477 /// The username of the Telegram group.
478 pub username: String,
479 #[serde(rename = "MEMBERS")]
480 /// The total number of users/members in this Telegram group.
481 pub members: i32,
482}
483
484/// Asset: Historical Telegram
485#[derive(Clone, Debug, Serialize, Deserialize)]
486pub struct AssetTelegram {
487 #[serde(rename = "UNIT")]
488 /// The unit of the historical period update: HOUR for hour and DAY for day.
489 pub unit: String,
490 #[serde(rename = "TIMESTAMP")]
491 /// The timestamp in seconds of the histo period, for hour it would be start of the hour and for daily it is 00:00 GMT/UTC.
492 pub timestamp: i64,
493 #[serde(rename = "TYPE")]
494 /// The type of the message.
495 pub type_: String,
496 #[serde(rename = "ASSET_ID")]
497 /// The unique identifier for the asset.
498 pub asset_id: i32,
499 #[serde(rename = "ASSET_SYMBOL")]
500 /// Internal mapped symbol for a specific asset.
501 pub asset_symbol: String,
502 #[serde(rename = "TOTAL_MEMBERS")]
503 /// The total number of users/members in this Telegram group.
504 pub total_members: i32,
505 #[serde(rename = "TELEGRAM_GROUPS")]
506 /// An array with all the data for each Telegram group used to calculate the total stats.
507 pub telegram_groups: Vec<AssetTelegramGroup>,
508}
509
510
511// Asset: Historical X (Twitter)
512
513
514#[derive(Clone, Debug, Serialize, Deserialize)]
515pub struct AssetTwitterAccount {
516 #[serde(rename = "URL")]
517 /// The URL of the X account used to retrieve social metrics.
518 pub url: Option<String>,
519 #[serde(rename = "NAME")]
520 /// The name of the X account.
521 pub name: Option<String>,
522 #[serde(rename = "USERNAME")]
523 /// The username of the X account.
524 pub username: Option<String>,
525 #[serde(rename = "VERIFIED")]
526 /// The verification status of the X account.
527 pub verified: Option<bool>,
528 #[serde(rename = "VERIFIED_TYPE")]
529 /// The verification type of the X account.
530 pub verifyied_type: Option<String>,
531 #[serde(rename = "FOLLOWING")]
532 /// The number of accounts followed by this X account.
533 pub following: Option<i32>,
534 #[serde(rename = "FOLLOWERS")]
535 /// The number of followers of this X account.
536 pub followers: Option<i32>,
537 #[serde(rename = "FAVOURITES")]
538 /// The number of tweets favorited by this X account.
539 pub favourites: Option<i32>,
540 #[serde(rename = "LISTS")]
541 /// The number of lists this X account is a member of.
542 pub lists: Option<i32>,
543 #[serde(rename = "STATUSES")]
544 /// The number of tweets and retweets made by this X account.
545 pub statuses: Option<i32>,
546}
547
548
549/// Asset: Historical X (Twitter)
550#[derive(Clone, Debug, Serialize, Deserialize)]
551pub struct AssetTwitter {
552 #[serde(rename = "UNIT")]
553 /// The unit of the historical period update: HOUR for hour and DAY for day.
554 pub unit: String,
555 #[serde(rename = "TIMESTAMP")]
556 /// The timestamp in seconds of the histo period, for hour it would be start of the hour and for daily it is 00:00 GMT/UTC.
557 pub timestamp: i64,
558 #[serde(rename = "TYPE")]
559 /// The type of the message.
560 pub type_: String,
561 #[serde(rename = "ASSET_ID")]
562 /// The unique identifier for the asset.
563 pub asset_id: i32,
564 #[serde(rename = "ASSET_SYMBOL")]
565 /// Internal mapped symbol for a specific asset.
566 pub asset_symbol: String,
567 #[serde(rename = "TOTAL_FOLLOWING")]
568 /// The total number of accounts followed by this X account.
569 pub total_following: i32,
570 #[serde(rename = "TOTAL_FOLLOWERS")]
571 /// The total number of followers of this X account.
572 pub total_followers: i32,
573 #[serde(rename = "TOTAL_FAVOURITES")]
574 /// The total number of tweets favorited by this X account.
575 pub total_favourites: i32,
576 #[serde(rename = "TOTAL_LISTS")]
577 /// The total number of lists this X account is a member of.
578 pub total_lists: i32,
579 #[serde(rename = "TOTAL_STATUSES")]
580 /// The total number of tweets and retweets made by this X account.
581 pub total_statuses: i32,
582 #[serde(rename = "TWITTER_ACCOUNTS")]
583 /// An array with all the data for each X account used to calculate the total stats.
584 pub twitter_accounts: Option<Vec<AssetTwitterAccount>>,
585}