ccdata_api/schemas/data_api/
asset.rs

1use serde::Deserialize;
2use crate::schemas::data_api::{CCPreviousAssetSymbol, CCAssetAlternativeId, CCAssetIndustry, CCSpecialAddress};
3
4
5// Asset: Full Asset Metadata
6
7
8#[derive(Deserialize, Debug)]
9pub struct CCConsensusMechanism {
10    #[serde(rename = "NAME")]
11    /// The type of consensus this blockhain / networks uses.
12    pub name: Option<String>,
13}
14
15#[derive(Deserialize, Debug)]
16pub struct CCConsensusAlgorithmType {
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(Deserialize, Debug)]
26pub struct CCHashingAlgorithmType {
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(Deserialize, Debug)]
34pub struct CCAssetMetadata {
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<CCPreviousAssetSymbol>>,
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<CCAssetAlternativeId>>,
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<CCSpecialAddress>>,
153    #[serde(rename = "LOCKED_ADDRESSES")]
154    /// The list of addresses that are considered locked addresses for this asset.
155    pub locked_addresses: Option<Vec<CCSpecialAddress>>,
156    #[serde(rename = "ASSET_INDUSTRIES")]
157    /// The asset industries that asset operates in.
158    pub asset_industries: Option<Vec<CCAssetIndustry>>,
159    #[serde(rename = "CONSENSUS_MECHANISMS")]
160    /// The types of consensus mechanisms this network / blockchain / token uses. This is a list of the fault-tolerant mechanism families that
161    /// 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.
162    pub consensus_mechanisms: Option<Vec<CCConsensusMechanism>>,
163    #[serde(rename = "CONSENSUS_ALGORITHM_TYPES")]
164    /// The types of consensus algorithms this blockchain uses. This is dependent on the consensus mechanisms used by the network / blockchain / token.
165    /// For blockchains that are proof of work this would in most cases have the mining algorithm. For hybrid assets,
166    /// this would be a list of mining and proof of stake and other algorithm used for reaching consensus.
167    pub consensus_algorithm_types: Option<Vec<CCConsensusAlgorithmType>>,
168    #[serde(rename = "HASHING_ALGORITHM_TYPES")]
169    /// The types of algorithms this blockchain uses for hashing blocks, transactions etc.
170    pub hashing_algorithm_types: Option<Vec<CCHashingAlgorithmType>>,
171}
172
173
174// Asset: Events
175
176
177/// Asset: Events
178#[derive(Deserialize, Debug)]
179pub struct CCAssetEvent {
180    #[serde(rename = "TYPE")]
181    /// Type of the message.
182    pub type_: String,
183    #[serde(rename = "ID")]
184    /// The unique identifier for the asset event entry.
185    pub id: i32,
186    #[serde(rename = "ASSET_ID")]
187    /// The unique identifier for the asset the event entry is associated to.
188    pub asset_id: i32,
189    #[serde(rename = "EVENT_TYPE")]
190    /// The event type, one of the following: SECURITY-INCIDENT, HARD-FORK, SOFT-FORK, TICKER-CHANGE, MIGRATION, SUPPLY-BURN, SUPPLY-LOCK, SPLIT,
191    /// REVERSE-SPLIT, TOKEN-LISTING, TOKEN-DELISTING, NETWORK-CONTROL-CHANGE, OTHER
192    pub event_type: String,
193    #[serde(rename = "ANNOUNCED_ON")]
194    /// The unix timestamp when we were notified of the event.
195    pub announced_on: i64,
196    #[serde(rename = "IMPLEMENTATION_START_DATE")]
197    /// The unix timestamp when the event was triggered.
198    pub implementation_start_date: i64,
199    #[serde(rename = "IMPLEMENTATION_END_DATE")]
200    /// The unix timestamp when the event finished.
201    pub implementation_end_date: Option<i64>,
202    #[serde(rename = "NAME")]
203    /// Name text.
204    pub name: String,
205    #[serde(rename = "DESCRIPTION")]
206    /// Description text.
207    pub description: String,
208    #[serde(rename = "CREATED_ON")]
209    /// Asset Event internal creation unix ts in our system.
210    pub created_on: i64,
211    #[serde(rename = "UPDATED_ON")]
212    /// Asset Event internal last updated unix ts in our system.
213    pub updated_on: Option<i64>,
214}
215
216
217// Asset: Historical: Code Repository Metrics Day
218
219
220#[derive(Deserialize, Debug)]
221pub struct CCAssetCodeRepository {
222    #[serde(rename = "URL")]
223    /// The URL of the code repository used to retrieve social metrics.
224    pub url: String,
225    #[serde(rename = "CONTRIBUTORS")]
226    /// The number of contributors to the code repository.
227    pub contributors: i32,
228    #[serde(rename = "FORKS")]
229    /// The number of forks of the code repository.
230    pub forks: i32,
231    #[serde(rename = "STARS")]
232    /// The number of stars received by the code repository.
233    pub stars: i32,
234    #[serde(rename = "SUBSCRIBERS")]
235    /// The number of subscribers to the code repository.
236    pub subscribers: i32,
237    #[serde(rename = "OPEN_ISSUES")]
238    /// The number of open issues in the code repository.
239    pub open_issues: Option<i32>,
240    #[serde(rename = "CLOSED_ISSUES")]
241    /// The number of closed issues in the code repository.
242    pub closed_issues: i32,
243    #[serde(rename = "OPEN_PULL_REQUESTS")]
244    /// The number of open pull requests in the code repository.
245    pub open_pull_requests: i32,
246    #[serde(rename = "CLOSED_PULL_REQUESTS")]
247    /// The number of closed pull requests in the code repository.
248    pub closed_pull_requests: i32,
249}
250
251/// Asset: Historical: Code Repository Metrics Day
252#[derive(Deserialize, Debug)]
253pub struct CCAssetCodeRepoMetrics {
254    #[serde(rename = "UNIT")]
255    /// The unit of the historical period update: HOUR for hour and DAY for day.
256    pub unit: String,
257    #[serde(rename = "TIMESTAMP")]
258    /// 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.
259    pub timestamp: i64,
260    #[serde(rename = "TYPE")]
261    /// The type of the message.
262    pub type_: String,
263    #[serde(rename = "ASSET_ID")]
264    /// The unique identifier for the asset.
265    pub asset_id: i32,
266    #[serde(rename = "ASSET_SYMBOL")]
267    /// Internal mapped symbol for a specific asset.
268    pub asset_symbol: String,
269    #[serde(rename = "TOTAL_CONTRIBUTORS")]
270    /// The total number of contributors across all code repositories associated with this asset.
271    /// A contributor is a users who has contributed to a project by making changes or improvements to the project's codebase,
272    /// having their changes accepted and merged, and is acknowledged for their contributions in the project's development history.
273    pub total_contributors: i32,
274    #[serde(rename = "TOTAL_FORKS")]
275    /// The total number of forks across all code repositories associated with this asset.
276    /// A fork in GitHub is a feature that allows users to create a personal copy of another repository, enabling them to modify,
277    /// experiment with, or contribute to the project without affecting the original work.
278    pub total_forks: i32,
279    #[serde(rename = "TOTAL_STARS")]
280    /// The total number of stars received across all code repositories associated with this asset.
281    /// A star is when a GitHub user bookmarks or wants to show appreciation for a particular repository,
282    /// much like a "like" or "favorite" function on other social media platforms.
283    pub total_stars: i32,
284    #[serde(rename = "TOTAL_SUBSCRIBERS")]
285    /// The total number of subscribers across all code repositories associated with this asset.
286    /// A subscriber is a user who has chosen to receive notifications for updates or changes made to a specific repository,
287    /// allowing them to closely follow the development and discussions of a project.
288    pub total_subscribers: i32,
289    #[serde(rename = "TOTAL_OPEN_ISSUES")]
290    /// The total number of open issues across all code repositories associated with this asset.
291    /// An open issue is a reported problem, suggestion, or task related to a repository that has not been resolved or closed yet,
292    /// providing a platform for users to track and discuss the ongoing development and improvements of a project.
293    pub total_open_issues: Option<i32>,
294    #[serde(rename = "TOTAL_CLOSED_ISSUES")]
295    /// The total number of closed issues across all code repositories associated with this asset.
296    /// A closed issue is a reported problem, suggestion, or task related to a repository that have been resolved or deemed no longer relevant,
297    /// providing a record of past challenges and solutions within the project development.
298    pub total_closed_issues: i32,
299    #[serde(rename = "TOTAL_OPEN_PULL_REQUESTS")]
300    /// The total number of open pull requests across all code repositories associated with this asset.
301    /// An open pull request on GitHub is a proposed change to a repository's codebase that is open for review and discussion,
302    // offering contributors an opportunity to improve the project and maintainers to accept, reject, or request changes before
303    /// integrating the proposed modifications.
304    pub total_open_pull_requests: i32,
305    #[serde(rename = "TOTAL_CLOSED_PULL_REQUESTS")]
306    /// The total number of closed pull requests across all code repositories associated with this asset.
307    /// A closed pull request is a proposed change to a repository's codebase that has been either accepted and merged into the codebase,
308    /// rejected by the maintainers, or withdrawn by the submitter, providing a record of changes that were suggested and their outcomes in
309    /// the project's development history.
310    pub total_closed_pull_requests: i32,
311    #[serde(rename = "CODE_REPOSITORIES")]
312    /// An array with all the data for each code repository used to calculate the total stats.
313    pub code_repositories: Vec<CCAssetCodeRepository>,
314}
315
316
317// Asset: Historical Discord
318
319
320#[derive(Deserialize, Debug)]
321pub struct CCAssetDiscordServer {
322    #[serde(rename = "URL")]
323    /// The URL of the Discord server used to retrieve social metrics.
324    pub url: Option<String>,
325    #[serde(rename = "NAME")]
326    /// The name of the Discord server.
327    pub name: Option<String>,
328    #[serde(rename = "TOTAL_MEMBERS")]
329    /// The total number of users/members in this Discord server.
330    pub total_members: Option<i32>,
331    #[serde(rename = "CURRENT_ACTIVE_USERS")]
332    /// The number of online users in this Discord server.
333    pub total_closed_pull_requests: Option<i32>,
334    #[serde(rename = "PREMIUM_SUBSCRIBERS")]
335    /// The number of premium subscribers in this Discord server.
336    pub premium_subscribers: Option<i32>,
337}
338
339/// Asset: Historical Discord
340#[derive(Deserialize, Debug)]
341pub struct CCAssetDiscord {
342    #[serde(rename = "UNIT")]
343    /// The unit of the historical period update: HOUR for hour and DAY for day.
344    pub unit: String,
345    #[serde(rename = "TIMESTAMP")]
346    /// 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.
347    pub timestamp: i64,
348    #[serde(rename = "TYPE")]
349    /// The type of the message.
350    pub type_: String,
351    #[serde(rename = "ASSET_ID")]
352    /// The unique identifier for the asset.
353    pub asset_id: i32,
354    #[serde(rename = "ASSET_SYMBOL")]
355    /// Symbol for a specific asset.
356    pub asset_symbol: String,
357    #[serde(rename = "TOTAL_MEMBERS")]
358    /// The total number of users/members in this Discord server.
359    pub total_members: Option<i32>,
360    #[serde(rename = "TOTAL_CURRENT_ACTIVE_USERS")]
361    /// The number of online users in this Discord server.
362    pub total_current_active_users: Option<i32>,
363    #[serde(rename = "TOTAL_PREMIUM_SUBSCRIBERS")]
364    /// The number of premium subscribers in this Discord server.
365    pub total_premium_subscribers: Option<i32>,
366    #[serde(rename = "DISCORD_SERVERS")]
367    /// An array with all the data for each Discord server used to calculate the total stats.
368    pub discord_servers: Vec<Option<CCAssetDiscordServer>>,
369}
370
371
372// Asset: Historical Reddit
373
374
375#[derive(Deserialize, Debug)]
376pub struct CCAssetSubreddit {
377    #[serde(rename = "URL")]
378    /// The URL of the Subreddit used to retrieve social metrics.
379    pub url: Option<String>,
380    #[serde(rename = "NAME")]
381    /// The name of the subreddit.
382    pub name: Option<String>,
383    #[serde(rename = "CURRENT_ACTIVE_USERS")]
384    /// The number of currently active users in the subreddit.
385    pub current_active_users: Option<i32>,
386    #[serde(rename = "AVERAGE_POSTS_PER_DAY")]
387    /// The average number of posts per day in the subreddit.
388    pub average_posts_per_day: Option<f32>,
389    #[serde(rename = "AVERAGE_POSTS_PER_HOUR")]
390    /// The average number of posts per hour in the subreddit.
391    pub average_posts_per_hour: Option<f32>,
392    #[serde(rename = "AVERAGE_COMMENTS_PER_DAY")]
393    /// The average number of comments per day in the subreddit.
394    pub average_comments_per_day: Option<f32>,
395    #[serde(rename = "AVERAGE_COMMENTS_PER_HOUR")]
396    /// The average number of comments per hour in the subreddit.
397    pub average_comments_per_hour: Option<f32>,
398    #[serde(rename = "SUBSCRIBERS")]
399    /// The number of subscribers to the subreddit.
400    pub subscribers: Option<i32>,
401}
402
403/// Asset: Historical Reddit
404#[derive(Deserialize, Debug)]
405pub struct CCAssetReddit {
406    #[serde(rename = "UNIT")]
407    /// The unit of the historical period update: HOUR for hour and DAY for day.
408    pub unit: String,
409    #[serde(rename = "TIMESTAMP")]
410    /// 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.
411    pub timestamp: i64,
412    #[serde(rename = "TYPE")]
413    /// The type of the message.
414    pub type_: String,
415    #[serde(rename = "ASSET_ID")]
416    /// The unique identifier for the asset.
417    pub asset_id: i32,
418    #[serde(rename = "ASSET_SYMBOL")]
419    /// Internal mapped symbol for a specific asset.
420    pub asset_symbol: String,
421    #[serde(rename = "TOTAL_SUBSCRIBERS")]
422    /// The number of subscribers to the subreddit.
423    pub total_subscribers: i32,
424    #[serde(rename = "TOTAL_ACTIVE_USERS")]
425    /// The number of currently active users in the subreddit.
426    pub total_active_users: i32,
427    #[serde(rename = "TOTAL_AVERAGE_POSTS_PER_DAY")]
428    /// The average number of posts per day in the subreddit.
429    pub total_average_posts_per_day: f64,
430    #[serde(rename = "TOTAL_AVERAGE_POSTS_PER_HOUR")]
431    /// The average number of posts per hour in the subreddit.
432    pub total_average_posts_per_hour: f64,
433    #[serde(rename = "TOTAL_AVERAGE_COMMENTS_PER_DAY")]
434    /// The average number of comments per day in the subreddit.
435    pub total_average_comments_per_day: f64,
436    #[serde(rename = "TOTAL_AVERAGE_COMMENTS_PER_HOUR")]
437    /// The average number of comments per hour in the subreddit.
438    pub total_average_comments_per_hour: f64,
439    #[serde(rename = "SUBREDDITS")]
440    /// An array with all the data for each Subreddit used to calculate the total stats.
441    pub subreddits: Option<Vec<CCAssetSubreddit>>,
442}
443
444
445// Asset: Historical Telegram
446
447
448#[derive(Deserialize, Debug)]
449pub struct CCAssetTelegramGroup {
450    #[serde(rename = "URL")]
451    /// The URL of the Telegram group used to retrieve social metrics.
452    pub url: String,
453    #[serde(rename = "NAME")]
454    /// The name of the Telegram group.
455    pub name: String,
456    #[serde(rename = "USERNAME")]
457    /// The username of the Telegram group.
458    pub username: String,
459    #[serde(rename = "MEMBERS")]
460    /// The total number of users/members in this Telegram group.
461    pub members: i32,
462}
463
464/// Asset: Historical Telegram
465#[derive(Deserialize, Debug)]
466pub struct CCAssetTelegram {
467    #[serde(rename = "UNIT")]
468    /// The unit of the historical period update: HOUR for hour and DAY for day.
469    pub unit: String,
470    #[serde(rename = "TIMESTAMP")]
471    /// 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.
472    pub timestamp: i64,
473    #[serde(rename = "TYPE")]
474    /// The type of the message.
475    pub type_: String,
476    #[serde(rename = "ASSET_ID")]
477    /// The unique identifier for the asset.
478    pub asset_id: i32,
479    #[serde(rename = "ASSET_SYMBOL")]
480    /// Internal mapped symbol for a specific asset.
481    pub asset_symbol: String,
482    #[serde(rename = "TOTAL_MEMBERS")]
483    /// The total number of users/members in this Telegram group.
484    pub total_members: i32,
485    #[serde(rename = "TELEGRAM_GROUPS")]
486    /// An array with all the data for each Telegram group used to calculate the total stats.
487    pub telegram_groups: Vec<CCAssetTelegramGroup>,
488}
489
490
491// Asset: Historical X (Twitter)
492
493
494#[derive(Deserialize, Debug)]
495pub struct CCAssetTwitterAccount {
496    #[serde(rename = "URL")]
497    /// The URL of the X account used to retrieve social metrics.
498    pub url: Option<String>,
499    #[serde(rename = "NAME")]
500    /// The name of the X account.
501    pub name: Option<String>,
502    #[serde(rename = "USERNAME")]
503    /// The username of the X account.
504    pub username: Option<String>,
505    #[serde(rename = "VERIFIED")]
506    /// The verification status of the X account.
507    pub verified: Option<bool>,
508    #[serde(rename = "VERIFIED_TYPE")]
509    /// The verification type of the X account.
510    pub verifyied_type: Option<String>,
511    #[serde(rename = "FOLLOWING")]
512    /// The number of accounts followed by this X account.
513    pub following: Option<i32>,
514    #[serde(rename = "FOLLOWERS")]
515    /// The number of followers of this X account.
516    pub followers: Option<i32>,
517    #[serde(rename = "FAVOURITES")]
518    /// The number of tweets favorited by this X account.
519    pub favourites: Option<i32>,
520    #[serde(rename = "LISTS")]
521    /// The number of lists this X account is a member of.
522    pub lists: Option<i32>,
523    #[serde(rename = "STATUSES")]
524    /// The number of tweets and retweets made by this X account.
525    pub statuses: Option<i32>,
526}
527
528
529/// Asset: Historical X (Twitter)
530#[derive(Deserialize, Debug)]
531pub struct CCAssetTwitter {
532    #[serde(rename = "UNIT")]
533    /// The unit of the historical period update: HOUR for hour and DAY for day.
534    pub unit: String,
535    #[serde(rename = "TIMESTAMP")]
536    /// 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.
537    pub timestamp: i64,
538    #[serde(rename = "TYPE")]
539    /// The type of the message.
540    pub type_: String,
541    #[serde(rename = "ASSET_ID")]
542    /// The unique identifier for the asset.
543    pub asset_id: i32,
544    #[serde(rename = "ASSET_SYMBOL")]
545    /// Internal mapped symbol for a specific asset.
546    pub asset_symbol: String,
547    #[serde(rename = "TOTAL_FOLLOWING")]
548    /// The total number of accounts followed by this X account.
549    pub total_following: i32,
550    #[serde(rename = "TOTAL_FOLLOWERS")]
551    /// The total number of followers of this X account.
552    pub total_followers: i32,
553    #[serde(rename = "TOTAL_FAVOURITES")]
554    /// The total number of tweets favorited by this X account.
555    pub total_favourites: i32,
556    #[serde(rename = "TOTAL_LISTS")]
557    /// The total number of lists this X account is a member of.
558    pub total_lists: i32,
559    #[serde(rename = "TOTAL_STATUSES")]
560    /// The total number of tweets and retweets made by this X account.
561    pub total_statuses: i32,
562    #[serde(rename = "TWITTER_ACCOUNTS")]
563    /// An array with all the data for each X account used to calculate the total stats.
564    pub twitter_accounts: Option<Vec<CCAssetTwitterAccount>>,
565}