ccdata_api/schemas/data_api/
on_chain_core.rs

1use serde::Deserialize;
2use crate::schemas::data_api::{CCPreviousAssetSymbol, CCAssetAlternativeId, CCAssetIndustry, CCSpecialAddress};
3
4
5#[derive(Deserialize, Debug)]
6pub struct CCOCCoreSupportedPlatforms {
7    #[serde(rename = "BLOCKCHAIN")]
8    /// This is linked to the asset representing a specific chain.
9    pub blockchain: Option<String>,
10    #[serde(rename = "BRIDGE_OPERATOR")]
11    pub bridge_oprator: Option<String>,
12    #[serde(rename = "TOKEN_STANDARD")]
13    /// This is linked to the Blockchain field and it is one of the SUPPORTED_STANDARDS available on that platform.
14    pub token_standard: Option<String>,
15    #[serde(rename = "SMART_CONTRACT_ADDRESS")]
16    /// Contract/smart contract/token address where this asset is stored / interacted with on the specific blockchain platform.
17    pub smart_contract_address: Option<String>,
18    #[serde(rename = "EXPLORER_URL")]
19    /// The URL for the token explorer website or tool.
20    pub explorer_url: Option<String>,
21    #[serde(rename = "DECIMALS")]
22    /// The number of decimal points on the specific blockchain platform for this token.
23    pub decimals: Option<i32>,
24    #[serde(rename = "IS_ASSET_ISSUER")]
25    pub is_asset_issuer: Option<bool>,
26    #[serde(rename = "TRADING_AS")]
27    /// The symbol/ticker this asset trades under on the specific blockchain platform.
28    pub trading_as: Option<String>,
29    #[serde(rename = "LAUNCH_DATE")]
30    /// The data the smart contract on the supported platform was deployed or when the token was added.
31    pub launch_date: Option<i64>,
32}
33
34
35// On-Chain Core: ETH Blocks
36
37
38#[derive(Deserialize, Debug)]
39pub struct CCOCCoreETHTrace {
40    #[serde(rename = "TYPE")]
41    /// Type of the message.
42    pub type_: String,
43    #[serde(rename = "ID")]
44    /// This is a unique identifier generated by combining the root trace type + transaction hash + trace addresses if available.
45    pub id: String,
46    #[serde(rename = "TRACE_TYPE")]
47    /// The type of trace being recorded. It could be either "call", "reward", "suicide", "create", etc. depending on the type of action being traced.
48    pub trace_type: Option<String>,
49    #[serde(rename = "ADDRESS")]
50    /// This represents the address associated with the trace. This could refer to the contract address, external user address, or any other relevant
51    /// address in the context of the blockchain transaction.
52    pub address: Option<Vec<i32>>,
53    #[serde(rename = "ACTION_FROM")]
54    /// This specifies the sender's address initiating the action.
55    pub action_from: Option<String>,
56    #[serde(rename = "ACTION_CALL_TYPE")]
57    /// The type of call made, such as "call", "delegate call", or "static call". This is relevant when one contract invokes another.
58    pub action_call_type: Option<String>,
59    #[serde(rename = "ACTION_GAS")]
60    /// The gas cost of executing the action. Gas is a measure of computational effort required for executing transactions and contract calls
61    /// on the blockchain network.
62    pub action_gas: Option<String>,
63    #[serde(rename = "ACTION_INIT")]
64    /// This is the bytecode that is executed to initialize the contract and determine its final code stored on the blockchain.
65    pub action_init: Option<String>,
66    #[serde(rename = "ACTION_INPUT")]
67    /// The input data for the action (encoded in hexadecimal). For contract calls, this data includes function signatures and parameters.
68    pub action_input: Option<String>,
69    #[serde(rename = "ACTION_TO")]
70    /// This specifies the recipient's address receiving the action, which could be a contract or an external address.
71    pub action_to: Option<String>,
72    #[serde(rename = "ACTION_VALUE")]
73    /// The value or amount of cryptocurrency involved in the action. This is particularly important for actions like transactions
74    /// where cryptocurrency is transferred.
75    pub action_value: Option<String>,
76    #[serde(rename = "ACTION_AUTHOR")]
77    /// This specifies the sender's address that initiated or triggered a specific action within a transaction.
78    /// It identifies the entity or account responsible for the action, such as a user or a smart contract.
79    pub action_author: Option<String>,
80    #[serde(rename = "ACTION_REWARD_TYPE")]
81    /// The type of reward associated with the action, which might include mining rewards, staking rewards, or other types of incentives.
82    pub action_reward_type: Option<String>,
83    #[serde(rename = "ACTION_ADDRESS")]
84    /// This is the contract whose code and storage are being removed from the blockchain.
85    pub action_address: Option<String>,
86    #[serde(rename = "ACTION_REFUND_ADDRESS")]
87    /// This is usually an external account or another contract that the remaining Ether is sent to.
88    pub action_refund_address: Option<String>,
89    #[serde(rename = "ACTION_BALANCE")]
90    /// This amount will be transferred to the ACTION_REFUND_ADDRESS. It's typically represented in wei (the smallest unit of Ether).
91    pub action_balance: Option<String>,
92    #[serde(rename = "RESULT_ADDRESS")]
93    /// The address where the new contract is deployed.
94    pub result_address: Option<String>,
95    #[serde(rename = "RESULT_CODE")]
96    /// This is the actual code that will be stored and executed on the blockchain, distinct from the init code that was used to generate it.
97    pub result_code: Option<String>,
98    #[serde(rename = "RESULT_GAS_USED")]
99    /// The amount of gas actually consumed by the action during execution. This can be compared with the initial gas estimate to measure efficiency.
100    pub result_gas_used: Option<String>,
101    #[serde(rename = "RESULT_OUTPUT")]
102    /// he output data produced by the action (encoded in hexadecimal), often used for reading the results of a contract call.
103    pub result_output: Option<String>,
104    #[serde(rename = "SUBTRACES")]
105    /// Indicates the number of subtraces created as a result of the action. Subtraces are typically generated when a complex transaction
106    /// or contract call triggers multiple internal calls.
107    pub subtraces: Option<i32>,
108    #[serde(rename = "ERROR")]
109    /// Records any errors encountered during the execution of the action, providing information about the nature of the error.
110    /// Example: *Reverted* or *invalid opcode*.
111    pub error: Option<String>,
112    #[serde(rename = "STATUS")]
113    /// The overall status of the trace. Common values include "1" which means success and "0" which means failure,
114    /// indicating whether the action was executed without errors.
115    pub status: Option<String>,
116}
117
118#[derive(Deserialize, Debug)]
119pub struct CCOCCoreETHMetadata {
120    #[serde(rename = "TYPE")]
121    /// Type of the message.
122    pub type_: String,
123    #[serde(rename = "NUMBER")]
124    /// The sequential order of the block within the blockchain. Each block's number is one greater than the number of the previous block.
125    pub number: i64,
126    #[serde(rename = "TIMESTAMP")]
127    /// The exact time when the block was mined. It's a crucial piece of information for tracking the chronological order of blocks.
128    pub timestamp: i64,
129    #[serde(rename = "HASH")]
130    /// The unique identifier for the block, generated using cryptographic algorithms.
131    /// It represents the content of the block and is used for verification and linking blocks together.
132    pub hash: String,
133    #[serde(rename = "PARENT_HASH")]
134    /// The hash of the previous block in the blockchain. It establishes the chronological link between blocks.
135    pub parent_hash: String,
136    #[serde(rename = "NONCE")]
137    /// This is a random number used in the process of mining. It's combined with other block data to create a hash that meets specific mining criteria.
138    pub nonce: String,
139    #[serde(rename = "SHA3_UNCLES")]
140    /// This stores the hash of the block's uncles, which are valid blocks that were not included in the main blockchain but can provide additional rewards to miners.
141    pub sha3_uncles: String,
142    #[serde(rename = "LOGS_BLOOM")]
143    /// This is a data structure that represents the presence of log entries in the block's transactions.
144    /// It's used for efficient retrieval of logs associated with transactions.
145    pub logs_bloom: String,
146    #[serde(rename = "TRANSACTIONS_ROOT")]
147    /// The hash of the root node of the Merkle tree that organizes the transactions in the block. It enables quick verification of included transactions.
148    pub transaction_root: String,
149    #[serde(rename = "STATE_ROOT")]
150    /// This hash represents the state of the blockchain after all transactions in the block have been executed.
151    /// It's used to ensure the consistency of the blockchain's state.
152    pub state_root: String,
153    #[serde(rename = "MERKLE_ROOT")]
154    /// The Merkle root hash, which summarizes all the transactions included in the block. It ensures the integrity of the transactions.
155    pub merkle_root: Option<String>,
156    #[serde(rename = "RECEIPTS_ROOT")]
157    /// This is similar to the transactions root, the receipts root hash is the root of a Merkle tree, but it stores the receipts of transactions,
158    /// including information about their success or failure.
159    pub receipts_root: String,
160    #[serde(rename = "MINER")]
161    /// This specifies the address of the miner who successfully mined the block. This miner is rewarded with cryptocurrency for their effort.
162    pub miner: String,
163    #[serde(rename = "MIX_HASH")]
164    /// This is a 256-bit hash value. It's essentially a part of the proof-of-work mechanism used in Ethereum to secure the blockchain.
165    /// This hash is derived from the mixing of various components of the block, including the nonce, timestamp, previous block's hash, and more.
166    pub mix_hash: String,
167    #[serde(rename = "DIFFICULTY")]
168    /// This indicates how hard it was to mine the block. It's adjusted based on the overall network's hash rate to maintain a consistent block generation rate.
169    pub difficulty: String,
170    #[serde(rename = "TOTAL_DIFFICULTY")]
171    /// This field accumulates the difficulty values of all previous blocks, providing a measure of the blockchain's security.
172    pub total_difficulty: String,
173    #[serde(rename = "CHAIN_WORK")]
174    /// The total cumulative amount of work in the blockchain up to and including this block. It's a measure of the blockchain's security.
175    pub chain_work: Option<String>,
176    #[serde(rename = "SIZE")]
177    /// The size of the block in bytes. It includes all the data and metadata within the block.
178    pub size: i64,
179    #[serde(rename = "WEIGHT")]
180    /// A metric for the block's size that considers both the non-SegWit and SegWit data, used to ensure blocks remain within the maximum block weight.
181    pub weight: Option<i64>,
182    #[serde(rename = "BLOCK_TIME")]
183    /// The time taken in seconds between mining the previous and current block. It's an important metric for understanding the network's performance and stability.
184    pub block_time: f64,
185    #[serde(rename = "MEDIAN_TIME")]
186    /// The median time of the last 11 blocks. It's used to ensure the network's time consistency.
187    pub median_time: Option<f64>,
188    #[serde(rename = "BLOB_GAS_USED")]
189    pub blob_gas_used: String,
190    #[serde(rename = "EXCESS_BLOB_GAS")]
191    pub excess_blob_gas: String,
192    #[serde(rename = "EXTRA_DATA")]
193    /// This allows miners to include arbitrary information in the block. It's often used to add contextual information or messages.
194    pub extra_data: String,
195    #[serde(rename = "GAS_LIMIT")]
196    /// The maximum amount of computational work a block can contain. Each transaction consumes a specific amount of gas, and this limit prevents abuse of the network's resources.
197    pub gas_limit: String,
198    #[serde(rename = "GAS_USED")]
199    /// The total amount of gas consumed by all transactions in the block. It helps in understanding the efficiency of transactions.
200    pub gas_used: String,
201    #[serde(rename = "TRANSACTION_COUNT")]
202    /// This indicates how many transactions are included in the block.
203    pub transaction_count: i64,
204    #[serde(rename = "BASE_FEE_PER_GAS")]
205    /// The base fee for each unit of gas in transactions. It's part of Ethereum's fee market mechanism.
206    pub base_fee_per_gas: String,
207    #[serde(rename = "WITHDRAWALS_ROOT")]
208    /// The hash value that represents a data structure containing information about the withdrawals that occurred in the block.
209    pub withdrawals_root: String,
210}
211
212#[derive(Deserialize, Debug)]
213/// This causes a transaction to warm (i.e. pre-cache) another addresses state and the specified storage keys, Available on EIP-2930 transactions.
214pub struct CCOCCoreETHTransactionAccessList {
215    #[serde(rename = "TYPE")]
216    /// Type of the message.
217    pub type_: Option<String>,
218    #[serde(rename = "ADDRESS")]
219    /// Internal mapped Block Transaction Access address state.
220    pub address: Option<String>,
221    #[serde(rename = "Storage_KEYS")]
222    /// An array of storage keys associated with the address mentioned above. Storage keys are unique identifiers used to access data within
223    /// a smart contract's storage on the blockchain. Smart contracts often store data in a key-value format, where the storage keys are used
224    /// to retrieve specific values.
225    pub storage_keys: Option<Vec<String>>,
226}
227
228#[derive(Deserialize, Debug)]
229/// The current transaction blobs, null when there are no blobs attached to the transaction.
230pub struct CCOCCoreETHTransactionBlob {
231    #[serde(rename = "TYPE")]
232    pub type_: Option<String>,
233    #[serde(rename = "INDEX")]
234    pub index: Option<i32>,
235    #[serde(rename = "VERSIONED_HASH")]
236    pub version_hash: Option<String>,
237    #[serde(rename = "KZG_COMMITMENT")]
238    pub kzg_commitment: Option<String>,
239    #[serde(rename = "KZG_PROOF")]
240    pub kzg_proof: Option<String>,
241    #[serde(rename = "KZG_COMMITMENT_INCLUSION_PROOF")]
242    pub kzg_commitment_inclusion_proof: Option<Vec<String>>,
243    #[serde(rename = "SIZE")]
244    pub size: Option<i32>,
245    #[serde(rename = "DATA")]
246    pub data: Option<String>,
247}
248
249#[derive(Deserialize, Debug)]
250/// The chronological records of all activities such as transaction executions, contract interactions, errors, and changes that occur within a blockchain network.
251pub struct CCOCCoreETHTransactionLog {
252    #[serde(rename = "TYPE")]
253    /// Type of the message.
254    pub type_: Option<String>,
255    #[serde(rename = "ADDRESS")]
256    /// The address of the contract or account that generated the log entry.
257    /// It serves as an identifier for the source of the event or action that triggered the log.
258    pub address: Option<String>,
259    #[serde(rename = "INDEX")]
260    /// The position of the log entry within the sequence of logs generated by a transaction.
261    /// It's usually an incremental integer starting from 0 for the first log in a transaction.
262    /// This field helps in distinguishing and organizing logs generated during a transaction.
263    pub index: Option<i32>,
264    #[serde(rename = "DATA")]
265    /// This contains the arbitrary data associated with the log entry.
266    /// This data can vary depending on the specific smart contract and event that generated the log.
267    /// It might include relevant information about the state change or action represented by the log.
268    pub data: Option<String>,
269    #[serde(rename = "TOPICS")]
270    /// An array of one or more indexed event topics. These topics are hash values of event signatures or indexed arguments.
271    /// They provide a way to filter and search for specific types of events within the logs efficiently.
272    pub topics: Option<Vec<String>>,
273    #[serde(rename = "REMOVED")]
274    /// A a boolean indicator that signals whether the log entry has been removed or undone due to a chain reorganization or a consensus rule change.
275    /// It helps applications differentiate between active and reverted logs. It is "true" if log was removed, otherwise false.
276    pub removed: Option<bool>,
277}
278
279#[derive(Deserialize, Debug)]
280pub struct CCOCCoreETHTransaction {
281    #[serde(rename = "TYPE")]
282    /// Type of the message.
283    pub type_: String,
284    #[serde(rename = "HASH")]
285    /// Transaction internal mapped hash. (For BTC transactions without SegWit data, this is the same as the txid. For SegWit transactions,
286    /// this represents the hash of the transaction including the witness data).
287    pub hash: String,
288    #[serde(rename = "TRANSACTION_TYPE")]
289    /// The EIP-2718 type of this transaction envelope.
290    pub transaction_type: i32,
291    #[serde(rename = "NONCE")]
292    /// The number of transactions made by the sender prior to this one encoded as hexadecimal.
293    /// It prevents duplicate transactions and maintains order in the blockchain.
294    pub nonce: i64,
295    #[serde(rename = "INDEX")]
296    /// The position of the transaction within the block. Helps in identifying the order of transactions in the block.
297    pub index: i32,
298    #[serde(rename = "FROM_ADDRESS")]
299    /// The address of the sender.
300    pub from_address: String,
301    #[serde(rename = "TO_ADDRESS")]
302    /// The address of the recipient. Null when its a contract creation transaction.
303    pub to_address: String,
304    #[serde(rename = "VALUE")]
305    /// The amount of cryptocurrency being transferred from the sender to the recipient.
306    pub value: String,
307    #[serde(rename = "GAS")]
308    /// The amount of computational work a transaction requires to be executed.
309    /// This is used to determine the fees paid by the sender to incentivize miners to include the transaction in a block.
310    pub gas: String,
311    #[serde(rename = "LOGS_BLOOM")]
312    pub logs_bloom: Option<String>,
313    #[serde(rename = "L1_GAS_USED")]
314    /// The amount of gas used specifically by the current transaction.
315    pub l1_gas_used: Option<i32>,
316    #[serde(rename = "L1_FEE")]
317    pub l1_fee: Option<i32>,
318    #[serde(rename = "L1_GAS_PRICE")]
319    pub l1_gas_price: Option<i32>,
320    #[serde(rename = "DEPOSIT_NONCE")]
321    pub deposit_nonce: Option<i64>,
322    #[serde(rename = "DEPOSIT_RECEIPT_VERSION")]
323    pub deposit_receipt_version: Option<i32>,
324    #[serde(rename = "GAS_PRICE")]
325    /// The price the sender is willing to pay for each unit of gas. Together with the gas limit, it determines the total fee for the transaction.
326    pub gas_price: String,
327    #[serde(rename = "INPUT")]
328    /// The data associated with the transaction, often used in smart contract interactions. It can contain parameters and instructions for contract execution.
329    pub input: String,
330    #[serde(rename = "RECEIPT_BLOB_GAS_PRICE")]
331    /// The total gas price of the transaction blobs.
332    pub receipt_blob_gas_price: Option<String>,
333    #[serde(rename = "RECEIPT_BLOB_GAS_USED")]
334    /// The total amount of gas used by the transaction blobs.
335    pub receipt_blob_gas_used: Option<String>,
336    #[serde(rename = "RECEIPT_CUMULATIVE_GAS_USED")]
337    /// The total amount of gas used by the transaction and all preceding transactions within the same block.
338    pub receipt_cumulative_gas_used: Option<String>,
339    #[serde(rename = "RECEIPT_GAS_USED")]
340    /// The amount of gas used specifically by the current transaction.
341    pub receipt_gas_used: Option<String>,
342    #[serde(rename = "RECEIPT_CONTACT_ADDRESS")]
343    /// This is the address created when a contract is deployed. The *TO* field should be null in this case.
344    pub receipt_contact_address: Option<String>,
345    #[serde(rename = "RECEIPT_ROOT")]
346    /// Only transactions included in blocks before the Byzantium Hard Fork have this field, as it was replaced by the *STATUS* field.
347    pub receipt_root: Option<String>,
348    #[serde(rename = "RECEIPT_STATUS")]
349    /// The status of a transaction is "1" if successful or "0" if it was a failure or reverted.
350    /// Only transactions included in blocks post-Byzantium Hard Fork have this field.
351    pub receipt_status: i32,
352    #[serde(rename = "MAX_FEE_PER_GAS")]
353    /// The maximum fee per gas unit that the sender is willing to pay for a transaction to be included promptly in a block.
354    pub max_fee_per_gas: Option<String>,
355    #[serde(rename = "MAX_PRIORITY_FEE_PER_GAS")]
356    /// The maximum fee per gas unit that the sender is willing to pay for higher priority processing of the transaction.
357    pub max_priority_fee_per_gas: Option<String>,
358    #[serde(rename = "MAX_FEE_PER_BLOB_GAS")]
359    /// The maximum fee per gas unit that the sender is willing to pay for higher priority processing of the transaction.
360    pub max_fee_per_blob_gas: Option<String>,
361    #[serde(rename = "RECEIPT_EFFECTIVE_GAS_PRICE")]
362    /// The total base charge plus tip paid for each unit of gas.
363    pub receipt_effective_gas_price: Option<String>,
364    #[serde(rename = "ACCESS_LIST")]
365    /// This causes a transaction to warm (i.e. pre-cache) another addresses state and the specified storage keys, Available on EIP-2930 transactions.
366    pub access_list: Option<Vec<CCOCCoreETHTransactionAccessList>>,
367    #[serde(rename = "BLOBS")]
368    /// The current transaction blobs, null when there are no blobs attached to the transaction.
369    pub blobs: Option<Vec<CCOCCoreETHTransactionBlob>>,
370    #[serde(rename = "ECDSA_V")]
371    /// This is part of ECDSA (Elliptic Curve Digital Signature Algorithm) signature.
372    /// This value helps to recover which public key was used to sign the transaction. Calculated as (CHAIN_ID * 2 + 35) or (CHAIN_ID * 2 + 36).
373    pub ecdsa_v: Option<i32>,
374    #[serde(rename = "ECDSA_R")]
375    /// This is part of ECDSA (Elliptic Curve Digital Signature Algorithm) signature. It is derived from the private key and the data to be signed.
376    pub ecdsa_r: Option<String>,
377    #[serde(rename = "ECDSA_S")]
378    /// This is part of ECDSA (Elliptic Curve Digital Signature Algorithm) signature. It is derived from the private key and the data to be signed.
379    pub ecdsa_s: Option<String>,
380    #[serde(rename = "Y_PARITY")]
381    /// This is a recent addition from July 2023 and could be used instead of the ECDSA_V. ECDSA_V would be used for backward compatibility.
382    pub y_parity: Option<String>,
383    #[serde(rename = "TRACES")]
384    /// The detailed records of the steps and interactions that occured during the execution of this transaction.
385    pub traces: Option<Vec<CCOCCoreETHTrace>>,
386    #[serde(rename = "LOGS")]
387    /// The chronological records of all activities such as transaction executions, contract interactions,
388    /// errors, and changes that occur within a blockchain network.
389    pub logs: Option<Vec<CCOCCoreETHTransactionLog>>,
390    #[serde(rename = "HEX")]
391    /// The raw hexadecimal representation of the entire transaction data.
392    pub hex: Option<String>,
393    #[serde(rename = "SOURCE_HASH")]
394    /// Transaction source hash.
395    pub source_hash: Option<String>,
396    #[serde(rename = "MINT")]
397    pub mint: Option<i32>,
398}
399
400#[derive(Deserialize, Debug)]
401pub struct CCOCCoreETHUncle {
402    #[serde(rename = "TYPE")]
403    /// Type of the message.
404    pub type_: String,
405}
406
407#[derive(Deserialize, Debug)]
408pub struct CCOCCoreETHWithdrawal {
409    #[serde(rename = "TYPE")]
410    /// Type of the message.
411    pub type_: String,
412    #[serde(rename = "INDEX")]
413    /// The unique identifier or index associated with a blockchain withdrawal transaction.
414    /// It helps in keeping track of individual withdrawals and organizing them in a sequential or ordered manner.
415    pub index: i32,
416    #[serde(rename = "VALIDATOR_INDEX")]
417    /// The identifier of the validator or node that approved or validated the withdrawal transaction.
418    /// In proof-of-stake or similar consensus mechanisms, validators play a crucial role in ensuring the legitimacy of transactions,
419    /// and this field ties a withdrawal to a specific validator.
420    pub validator_index: i32,
421    #[serde(rename = "ADDRESS")]
422    /// The destination address to which the withdrawn cryptocurrency is being sent. This address is usually a cryptographic
423    /// public key or a combination of alphanumeric characters that uniquely identifies the recipient's wallet or account on the blockchain.
424    pub address: String,
425    #[serde(rename = "AMOUNT")]
426    /// The quantity of cryptocurrency being withdrawn in the transaction. It specifies the numerical value of the cryptocurrency units
427    /// being transferred from the withdrawal source to the recipient's address.
428    pub amount: String,
429    #[serde(rename = "UNIT")]
430    /// The type of cryptocurrency being withdrawn. It could be a symbol or code that represents the specific cryptocurrency asset
431    /// being transferred, such as "BTC" for Bitcoin or "GWEI" for Ethereum.
432    pub unit: String,
433}
434
435/// ON-Chain Core: ETH Blocks
436#[derive(Deserialize, Debug)]
437pub struct CCOCCoreETHBlock {
438    #[serde(rename = "TYPE")]
439    /// Type of the message.
440    pub type_: String,
441    #[serde(rename = "ASSET_ID")]
442    /// The unique identifier for the asset the field is associated to.
443    pub asset_id: i32,
444    #[serde(rename = "SYMBOL")]
445    /// Internal mapped symbol for a specific asset.
446    pub symbol: String,
447    #[serde(rename = "PROVIDER_KEY")]
448    /// Internal mapped Blockchain provider key for a specific asset.
449    pub provider_key: String,
450    #[serde(rename = "CHAIN_ID")]
451    /// This is the Id of the blockchain.
452    pub chain_id: i32,
453    #[serde(rename = "IS_PART_OF_REORG")]
454    /// Is this block part of a reorg? this would happen when we get block reorgs due to a longer chain being published by some of the miners.
455    pub is_part_of_reorg: bool,
456    #[serde(rename = "NUMBER")]
457    /// The current block number.
458    pub number: i64,
459    #[serde(rename = "TIMESTAMP")]
460    /// The current block timestamp.
461    pub timestamp: i64,
462    #[serde(rename = "RECEIVED_TIMESTAMP")]
463    /// The current block received timestamp.
464    pub received_timestamp: i64,
465    #[serde(rename = "METADATA")]
466    /// The current block full metadata.
467    pub metadata: CCOCCoreETHMetadata,
468    #[serde(rename = "TRANSACTIONS")]
469    /// The current block transactions.
470    pub transactions: Option<Vec<CCOCCoreETHTransaction>>,
471    #[serde(rename = "ORPHAN_TRACES")]
472    /// Block traces not linked to a transaction.
473    pub orphan_traces: Option<Vec<CCOCCoreETHTrace>>,
474    #[serde(rename = "UNCLES")]
475    /// The current block uncles.
476    pub uncles: Option<Vec<CCOCCoreETHUncle>>,
477    #[serde(rename = "WITHDRAWALS")]
478    /// The current block withdrawal.
479    pub withdrawals: Option<Vec<CCOCCoreETHWithdrawal>>,
480}
481
482
483// On-Chain Core: Assets Summary By Chain
484
485
486#[derive(Deserialize, Debug)]
487pub struct CCChainAssetSummary {
488    #[serde(rename = "TYPE")]
489    /// Type of the message.
490    pub type_: String,
491    #[serde(rename = "ID")]
492    /// The unique identifier for the asset entry.
493    pub id: i32,
494    #[serde(rename = "SYMBOL")]
495    /// Internal mapped symbol for a specific asset.
496    pub symbol: String,
497    #[serde(rename = "ASSET_TYPE")]
498    /// he asset class/type.
499    pub asset_type: String,
500    #[serde(rename = "NAME")]
501    /// The full name of the asset, e.g. Bitcoin.
502    pub name: String,
503    #[serde(rename = "LOGO_URL")]
504    /// The image that appears when you see this asset.
505    pub logo_url: String,
506    #[serde(rename = "LAUNCH_DATE")]
507    /// The launch date of the asset is indicated as (yyyy-mm-dd). However, if the asset was initially established as a token before being integrated into
508    /// a blockchain, the launch date is reset to the creation of the first block when the blockchain is launched for the token.
509    pub launch_date: Option<i64>,
510}
511
512#[derive(Deserialize, Debug)]
513pub struct CCSupportedAsset {
514    #[serde(rename = "TYPE")]
515    /// Type of the message.
516    pub type_: String,
517    #[serde(rename = "ID")]
518    /// The unique identifier for the asset entry.
519    pub id: i32,
520    #[serde(rename = "SYMBOL")]
521    /// Internal mapped symbol for a specific asset.
522    pub symbol: String,
523    #[serde(rename = "ASSET_TYPE")]
524    /// he asset class/type.
525    pub asset_type: String,
526    #[serde(rename = "NAME")]
527    /// The full name of the asset, e.g. Bitcoin.
528    pub name: String,
529    #[serde(rename = "LOGO_URL")]
530    /// The image that appears when you see this asset.
531    pub logo_url: Option<String>,
532    #[serde(rename = "LAUNCH_DATE")]
533    /// The launch date of the asset is indicated as (yyyy-mm-dd). However, if the asset was initially established as a token before being integrated into
534    /// a blockchain, the launch date is reset to the creation of the first block when the blockchain is launched for the token.
535    pub launch_date: Option<i64>,
536    #[serde(rename = "FILTERED_SUPPORTED_PLATFORMS")]
537    pub filtered_supported_platforms: Option<Vec<CCOCCoreSupportedPlatforms>>,
538}
539
540/// On-Chain Core: Assets Summary By Chain
541#[derive(Deserialize, Debug)]
542pub struct CCOCCoreAssetByChain {
543    #[serde(rename = "CHAIN_ASSET_SUMMARY")]
544    /// The statistics of the current page.
545    pub chain_asset_summary: CCChainAssetSummary,
546    #[serde(rename = "ASSETS_SUPPORTED")]
547    /// The list of summary asset data.
548    pub assets_supported: Vec<CCSupportedAsset>,
549}
550
551
552// On-Chain Core: Asset by Address
553
554
555#[derive(Deserialize, Debug)]
556pub struct CCOCCoreSecurityMetric {
557    #[serde(rename = "NAME")]
558    pub name: String,
559    #[serde(rename = "OVERALL_SCORE")]
560    pub overall_score: f64,
561    #[serde(rename = "OVERALL_RANK")]
562    pub overall_rank: f64,
563    #[serde(rename = "UPDATED_AT")]
564    pub updated_at: i64,
565}
566
567#[derive(Deserialize, Debug)]
568/// A detailed breakdown of reserves backing a stablecoin asset, covering various categories such as cash, cryptocurrency, bonds, and
569    /// other investments for transparency.
570pub struct CCOCCoreReservesBreakdown {
571    #[serde(rename = "RESERVE_TYPE")]
572    /// The type of asset used for reserve collateralization, such as cash, crypto, or bonds.
573    pub reserve_type: String,
574    #[serde(rename = "HOLDING_ADDRESSES")]
575    /// An array of objects containing the blockchain chain and the holding address (wallet or smart contract) for proof of reserves.
576    pub holding_addresses: String,
577    #[serde(rename = "PERCENTAGE")]
578    /// The percentage of the total reserves allocated to this particular reserve type.
579    pub percentage: f64,
580    #[serde(rename = "DESCRIPTION")]
581    /// A brief description for the reserves, clarifying the nature of the reserve type.
582    pub description: String,
583    #[serde(rename = "COMMENTS")]
584    /// Any additional internal comments or information about the reserves.
585    pub comments: String,
586}
587
588#[derive(Deserialize, Debug)]
589/// Documents that might be relevant to the asset, they should all be .PDFs.
590pub struct CCOCCoreDocumentURLs {
591    #[serde(rename = "TYPE")]
592    pub type_: String,
593    #[serde(rename = "VERSION")]
594    pub version: i32,
595    #[serde(rename = "URL")]
596    pub url: String,
597    #[serde(rename = "COMMENT")]
598    pub comment: Option<String>,
599}
600
601#[derive(Deserialize, Debug)]
602/// Denotes the convesion asset ID, SYMBOL and ASSET_TYPE.
603pub struct CCOCCorePriceConversionAsset {
604    #[serde(rename = "ID")]
605    /// The unique identifier for the asset entry.
606    pub id: i32,
607    #[serde(rename = "SYMBOL")]
608    /// Internal mapped symbol for a specific asset.
609    pub symbol: String,
610    #[serde(rename = "ASSET_TYPE")]
611    /// The type of the asset (FIAT, BLOCKCHAIN, TOKEN, etc.).
612    pub asset_type: String,
613}
614
615#[derive(Deserialize, Debug)]
616/// Indicates the asset's position in our global asset ranking. There are multiple ranks, each is determined by at least one factor,
617/// such as asset launch date, market cap, trading volume, etc...
618pub struct CCOCCoreToplistRank {
619    #[serde(rename = "CREATED_ON")]
620    /// Rank based on CREATED_ON sorted ASC from earliest created to most recent one.
621    pub created_on: i64,
622    #[serde(rename = "LAUNCH_DATE")]
623    /// Rank based on LAUNCH_DATE sorted ASC from earliest launched to most recently launched one.
624    pub launch_date: i64,
625    #[serde(rename = "PRICE_USD")]
626    /// Rank based on PRICE_USD sorted DESC from most expensive asset to cheapest one.
627    pub price_usd: Option<f64>,
628    #[serde(rename = "CIRCULATING_MKT_CAP_USD")]
629    /// Rank based on CIRCULATING_MKT_CAP_USD sorted DESC from highest circulating market cap to lowest.
630    pub circulating_mkt_cap_usd: Option<f64>,
631    #[serde(rename = "TOTAL_MKT_CAP_USD")]
632    /// Rank based on TOTAL_MKT_CAP_USD sorted DESC from highest total market cap to lowest.
633    pub total_mkt_cap_usd: Option<f64>,
634    #[serde(rename = "SPOT_MOVING_24_HOUR_QUOTE_VOLUME_TOP_TIER_DIRECT_USD")]
635    /// Rank based on SPOT_MOVING_24_HOUR_QUOTE_VOLUME_TOP_TIER_DIRECT_USD sorted DESC from highest quote
636    /// volume accross top tier markets that trade directly to USD to lowest.
637    pub spot_moving_24_hour_quote_volume_top_tier_direct_usd: Option<f64>,
638    #[serde(rename = "SPOT_MOVING_24_HOUR_QUOTE_VOLUME_DIRECT_USD")]
639    /// Rank based on SPOT_MOVING_24_HOUR_QUOTE_VOLUME_DIRECT_USD sorted DESC from highest volume accross all markets that trade directly to USD to lowest.
640    pub spot_moving_24_hour_quote_volume_direct_usd: Option<f64>,
641    #[serde(rename = "SPOT_MOVING_24_HOUR_QUOTE_VOLUME_TOP_TIER_USD")]
642    /// Rank based on SPOT_MOVING_24_HOUR_QUOTE_VOLUME_TOP_TIER_USD sorted DESC from highest quote volume accross top tier markets to lowest.
643    pub spot_moving_24_hour_quote_volume_top_tier_usd: Option<f64>,
644    #[serde(rename = "SPOT_MOVING_24_HOUR_QUOTE_VOLUME_USD")]
645    /// Rank based on SPOT_MOVING_24_HOUR_QUOTE_VOLUME_USD sorted DESC from highest quote volume accross all markets to lowest.
646    pub spot_moving_24_hour_quote_volume_usd: Option<f64>,
647    #[serde(rename = "SPOT_MOVING_24_HOUR_CHANGE_USD")]
648    /// Rank based on SPOT_MOVING_24_HOUR_CHANGE_USD sorted DESC from highest change accross all markets to lowest.
649    pub spot_moving_24_hour_change_usd: Option<f64>,
650    #[serde(rename = "SPOT_MOVING_24_HOUR_CHANGE_PERCENTAGE_USD")]
651    /// Rank based on SPOT_MOVING_24_HOUR_CHANGE_PERCENTAGE_USD sorted DESC from highest percentage change accross all markets to lowest.
652    pub spot_moving_24_hour_change_percentage_usd: Option<f64>,
653    #[serde(rename = "SPOT_MOVING_7_DAY_QUOTE_VOLUME_TOP_TIER_DIRECT_USD")]
654    /// Rank based on SPOT_MOVING_7_DAY_QUOTE_VOLUME_TOP_TIER_DIRECT_USD sorted DESC from highest quote volume accross top tier markets that
655    /// trade directly to USD to lowest.
656    pub spot_moving_7_day_quote_volume_top_tier_direct_usd: Option<f64>,
657    #[serde(rename = "SPOT_MOVING_7_DAY_QUOTE_VOLUME_DIRECT_USD")]
658    /// Rank based on SPOT_MOVING_7_DAY_QUOTE_VOLUME_DIRECT_USD sorted DESC from highest volume accross all markets that trade directly to USD to lowest.
659    pub spot_moving_7_day_quote_volume_direct_usd: Option<f64>,
660    #[serde(rename = "SPOT_MOVING_7_DAY_QUOTE_VOLUME_TOP_TIER_USD")]
661    /// Rank based on SPOT_MOVING_7_DAY_QUOTE_VOLUME_TOP_TIER_USD sorted DESC from highest quote volume accross top tier markets to lowest.
662    pub spot_moving_7_day_quote_volume_top_tier_usd: Option<f64>,
663    #[serde(rename = "SPOT_MOVING_7_DAY_QUOTE_VOLUME_USD")]
664    /// Rank based on SPOT_MOVING_7_DAY_QUOTE_VOLUME_USD sorted DESC from highest quote volume accross all markets to lowest.
665    pub spot_moving_7_day_quote_volume_usd: Option<f64>,
666    #[serde(rename = "SPOT_MOVING_7_DAY_CHANGE_USD")]
667    /// Rank based on SPOT_MOVING_7_DAY_CHANGE_USD sorted DESC from highest change accross all markets to lowest.
668    pub spot_moving_7_day_change_usd: Option<f64>,
669    #[serde(rename = "SPOT_MOVING_7_DAY_CHANGE_PERCENTAGE_USD")]
670    /// Rank based on SPOT_MOVING_7_DAY_CHANGE_PERCENTAGE_USD sorted DESC from highest percentage change accross all markets to lowest.
671    pub spot_moving_7_day_change_percentage_usd: Option<f64>,
672    #[serde(rename = "SPOT_MOVING_30_DAY_QUOTE_VOLUME_TOP_TIER_DIRECT_USD")]
673    /// Rank based on SPOT_MOVING_30_DAY_QUOTE_VOLUME_TOP_TIER_DIRECT_USD sorted DESC from highest quote volume accross top tier markets
674    /// that trade directly to USD to lowest.
675    pub spot_moving_30_day_quote_volume_top_tier_direct_usd: Option<f64>,
676    #[serde(rename = "SPOT_MOVING_30_DAY_QUOTE_VOLUME_DIRECT_USD")]
677    /// Rank based on SPOT_MOVING_30_DAY_QUOTE_VOLUME_DIRECT_USD sorted DESC from highest volume accross all markets that trade directly to USD to lowest.
678    pub spot_moving_30_day_quote_volume_direct_usd: Option<f64>,
679    #[serde(rename = "SPOT_MOVING_30_DAY_QUOTE_VOLUME_TOP_TIER_USD")]
680    /// Rank based on SPOT_MOVING_30_DAY_QUOTE_VOLUME_TOP_TIER_USD sorted DESC from highest quote volume accross top tier markets to lowest.
681    pub spot_moving_30_day_quote_volume_top_tier_usd: Option<f64>,
682    #[serde(rename = "SPOT_MOVING_30_DAY_QUOTE_VOLUME_USD")]
683    /// Rank based on SPOT_MOVING_30_DAY_QUOTE_VOLUME_USD sorted DESC from highest quote volume accross all markets to lowest.
684    pub spot_moving_30_day_quote_volume_usd: Option<f64>,
685    #[serde(rename = "SPOT_MOVING_30_DAY_CHANGE_USD")]
686    /// Rank based on SPOT_MOVING_30_DAY_CHANGE_USD sorted DESC from highest change accross all markets to lowest.
687    pub spot_moving_30_day_change_usd: Option<f64>,
688    #[serde(rename = "SPOT_MOVING_30_DAY_CHANGE_PERCENTAGE_USD")]
689    /// Rank based on SPOT_MOVING_30_DAY_CHANGE_PERCENTAGE_USD sorted DESC from highest percentage change accross all markets to lowest.
690    pub spot_moving_30_day_change_percentage_usd: Option<f64>,
691}
692
693#[derive(Deserialize, Debug)]
694/// Individuals that contains founders, whitepaper authors, investors, resechers, and other important people related to a project.
695pub struct CCOCCoreProjectLeader {
696    #[serde(rename = "LEADER_TYPE")]
697    pub leader_type: String,
698    #[serde(rename = "FULL_NAME")]
699    pub fuill_name: String,
700}
701
702#[derive(Deserialize, Debug)]
703/// Associated contact addresses for the team members, employees or affiliated contacts.
704pub struct CCOCCoreContactDetails {
705    #[serde(rename = "CONTACT_TYPE")]
706    pub contact_type: String,
707    #[serde(rename = "CONTACT_MEDIUM")]
708    pub contact_medium: String,
709    #[serde(rename = "FULL_NAME")]
710    pub full_name: String,
711    #[serde(rename = "ADDRESS")]
712    /// The email / linkedin addres / twitter / other social media address.
713    pub address: String,
714    #[serde(rename = "COMMENTS")]
715    pub comments: String,
716}
717
718/// On-Chain Core: Asset by Address
719#[derive(Deserialize, Debug)]
720pub struct CCOCCoreAssetByAddress {
721    #[serde(rename = "ID")]
722    /// The unique identifier for the asset entry.
723    pub id: i32,
724    #[serde(rename = "TYPE")]
725    /// Type of the message.
726    pub type_: String,
727    #[serde(rename = "ID_LEGACY")]
728    /// The legacy previous asset management system ID.
729    pub id_legacy: i32,
730    #[serde(rename = "ID_PARENT_ASSET")]
731    /// 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.
732    /// 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
733    /// 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.
734    /// In order to remove the parent we need clear communication from the company who is in charge of keeping the peg.
735    /// We add add a plublic notice and the include the communication in the Other Document URLs.
736    pub id_parent_asset: i32,
737    #[serde(rename = "IS_ASSET_ISSUER")]
738    /// This field identifies the original creator of the token. It provides essential information about the entity, individual or contract rules responsible for
739    /// issuing the token initially and/or maintaining the supply. In the case of of bridged assets, this is the bridge operator and the parent will have
740    /// its own issuer. You can go up the parent chain and figure out what counterparty risk you are exposed to when trading a specific asset.
741    /// This clarification ensures that users can directly trace the origin of the token, understanding its issuance history and the primary issuer's credentials.
742    pub id_asset_issuer: Option<i32>,
743    #[serde(rename = "SYMBOL")]
744    /// Internal mapped symbol for a specific asset.
745    pub symbol: String,
746    #[serde(rename = "URI")]
747    /// The uri path that this asset will be found on / url-slug.
748    pub uri: String,
749    #[serde(rename = "ASSET_TYPE")]
750    /// The asset class/type.
751    pub asset_type: String,
752    #[serde(rename = "ASSET_ISSUER_NAME")]
753    /// This field identifies the original creator of the asset. It provides essential information about the entity, individual or contract rules responsible for
754    /// issuing the asset initially and/or maintaining the supply. In the case of of bridged assets, this is the bridge operator and the parent will have its
755    /// own issuer. You can go up the parent chain and figure out what counterparty risk you are exposed to when trading a specific asset.
756    /// This clarification ensures that users can directly trace the origin of the asset, understanding its issuance history and the primary issuer's credentials.
757    pub asset_issuer_name: Option<String>,
758    #[serde(rename = "PARENT_ASSET_SYMBOL")]
759    /// his 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. 
760    /// 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
761    /// 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.
762    /// In order to remove the parent we need clear communication from the company who is in charge of keeping the peg.
763    /// We add add a plublic notice and the include the communication in the Other Document URLs.
764    pub parent_asset_symbol: Option<String>,
765    #[serde(rename = "ROOT_ASSET_ID")]
766    /// Identifies the root asset in a chain of derived or related assets, essential for tracing asset lineage. Null if the asset does not have a parent.
767    /// For example, the fiat USD (id: 5) would be the root asset for the tokens CUSDC (id: 1623) or USDCE (id: 1728).
768    pub root_asset_id: i32,
769    #[serde(rename = "ROOT_ASSET_SYMBOL")]
770    /// The symbol of the root asset, facilitating recognition and correlation within asset hierarchies. Null if the asset does not have a parent.
771    /// For example, the fiat USD (id: 5) would be the root asset for the tokens CUSDC (id: 1623) or USDCE (id: 1728).
772    pub root_asset_symbol: String,
773    #[serde(rename = "ROOT_ASSET_TYPE")]
774    /// Specifies the fundamental category of the root asset, crucial for understanding the base or origin of an asset's classification.
775    /// Null if the asset does not have a parent. For example, the fiat USD would be the root asset for tokens CUSDC or USDCE, and in this case,
776    /// the ROOT_ASSET_TYPE would be fiat.
777    pub root_asset_type: String,
778    #[serde(rename = "CREATED_ON")]
779    /// Asset internal creation unix ts in our system.
780    pub created_on: i64,
781    #[serde(rename = "UPDATED_ON")]
782    /// Asset internal last updated unix ts in our system.
783    pub updated_on: i64,
784    #[serde(rename = "PUBLIC_NOTICE")]
785    /// A public notice for this asset.
786    pub public_notice: Option<String>,
787    #[serde(rename = "NAME")]
788    /// The full name of the asset, e.g. Bitcoin.
789    pub name: String,
790    #[serde(rename = "LOGO_URL")]
791    /// The image that appears when you see this asset.
792    pub logo_url: String,
793    #[serde(rename = "LAUNCH_DATE")]
794    /// The launch date of the asset is indicated as (yyyy-mm-dd). However, if the asset was initially established as a token before being integrated into
795    /// a blockchain, the launch date is reset to the creation of the first block when the blockchain is launched for the token.
796    pub launch_date: i64,
797    #[serde(rename = "PERIOUS_ASSET_SYMBOLS")]
798    /// A list of symbols that were previously associated with this asset.
799    pub previous_asset_symbols: Option<Vec<CCPreviousAssetSymbol>>,
800    #[serde(rename = "ASSET_ALTERNATIVE_IDS")]
801    /// Alternative data platforms that also support this asset with their specific asset id.
802    pub asset_laternative_ids: Option<Vec<CCAssetAlternativeId>>,
803    #[serde(rename = "ASSET_DESCRIPTION_SNIPPET")]
804    /// 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.
805    pub asset_description_snippet: Option<String>,
806    #[serde(rename = "SUPPORTED_PLATFORMS")]
807    /// When an asset (token, fiat, cryptocurrency, commodity) can be used on multiple blockchains, we refer to those blockchains as supported platforms.
808    /// There are two types of assets that can be used on multiple blockchains: native tokens and bridged tokens.
809    /// Native tokens are assets that are natively supported by a particular blockchain, while bridged tokens are assets that are "bridged" or "pegged"
810    /// to another asset on a different blockchain.
811    pub supported_platforms: Option<Vec<CCOCCoreSupportedPlatforms>>,
812    #[serde(rename = "ASSET_SECURITY_METRICS")]
813    pub asset_security_metrics: Option<Vec<CCOCCoreSecurityMetric>>,
814    #[serde(rename = "SUPPLY_MAX")]
815    /// The maximum number of asset parts (coins/tokens) that will ever be issued (supply_circulating + supply_burnt + supply_locked + all supply that
816    /// 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.
817    pub supply_max: f64,
818    #[serde(rename = "SUPPLY_ISSUED")]
819    /// The number of asset parts (coins/tokens) that have been issued so far. (supply_circulating + supply_locked + supply_burnt).
820    pub supply_issued: Option<f64>,
821    #[serde(rename = "SUPPLY_TOTAL")]
822    /// The number of asset parts (coins/tokens) that have been issued so far excluding burnt tokens. (supply_circulating + supply_locked).
823    pub supply_total: Option<f64>,
824    #[serde(rename = "SUPPLY_CIRCULATING")]
825    /// Also referred to as free float or public float. The number of asset parts (coins/tokens) that are available to be traded and it
826    /// excludes burnt supply and locked supply.
827    pub supply_circulating: Option<f64>,
828    #[serde(rename = "SUPPLY_FUTURE")]
829    /// The number of asset parts (coins/tokens) that are planned to be issued in the future. (supply_max - supply_issued).
830    pub supply_future: f64,
831    #[serde(rename = "SUPPLY_LOCKED")]
832    /// The number of asset parts (coins/tokens) that are currently not transferable until certain conditions are met.
833    /// Locked supply is generally held by team members, DAOs, foundations, bridges, stakers, liquidity pools, etc.
834    pub supply_locked: Option<f64>,
835    #[serde(rename = "SUPPY_BURNT")]
836    /// The number of asset parts (coins/tokens) that have been sent to addresses/locations that are no longer accessible.
837    /// They are permanently removed from the circulating supply on purpose, this does not include lost tokens sent to wallets that do not exist or
838    // sent to wallets that users no longer have access to, the address of burnt tokens is determined by the project team.
839    pub supply_burnt: Option<f64>,
840    #[serde(rename = "SUPPLY_STAKED")]
841    /// The current number of asset parts (coins/tokens) that are locked as part of PoS and PoS partial chains.
842    pub supply_staked: Option<f64>,
843    #[serde(rename = "BURN_ADDRESSES")]
844    /// The list of addresses that are considered burn addresses for this asset.
845    pub burn_addresses: Option<Vec<CCSpecialAddress>>,
846    #[serde(rename = "LOCKED_ADDRESSES")]
847    /// The list of addresses that are considered locked addresses for this asset.
848    pub locked_addresses: Option<Vec<CCSpecialAddress>>,
849    #[serde(rename = "RESERVES_BREAKDOWN")]
850    /// A detailed breakdown of reserves backing a stablecoin asset, covering various categories such as cash, cryptocurrency, bonds, and
851    /// other investments for transparency.
852    pub reserves_breakdown: Option<Vec<CCOCCoreReservesBreakdown>>,
853    #[serde(rename = "WEBSITE_URL")]
854    /// The link for the official project website.
855    pub website_url: Option<String>,
856    #[serde(rename = "BLOG_URL")]
857    /// The link for the official blog.
858    pub blog_url: Option<String>,
859    #[serde(rename = "WHITE_PAPER_URL")]
860    /// A white paper, also written as "whitepaper", a document released by the project that gives investors technical information about its concept,
861    /// its purpose, how it works, etc.
862    pub white_paper_url: Option<String>,
863    #[serde(rename = "OTHER_DOCUMENT_URLS")]
864    /// Other documents that might be relevant to the asset, they should all be .PDFs.
865    pub other_document_urls: Option<Vec<CCOCCoreDocumentURLs>>,
866    #[serde(rename = "ASSET_INDUSTRIES")]
867    /// The asset industries that asset operates in.
868    pub asset_industries: Option<Vec<CCAssetIndustry>>,
869    #[serde(rename = "PRICE_USD")]
870    /// Denotes the current value / price of the asset in USD. This value is used to populate toplists and is calculated based on real-time market data.
871    pub price_usd: f64,
872    #[serde(rename = "PRICE_USD_SOURCE")]
873    /// Denotes the source we used for the USD value / price.
874    pub price_usd_source: String,
875    #[serde(rename = "PRICE_USD_LAST_UPDATE_TS")]
876    /// The Unix timestamp of the last update to the USD value / price of the asset.
877    pub price_usd_last_update_ts: i64,
878    #[serde(rename = "PRICE_CONVERSION_ASSET")]
879    /// Denotes the convesion asset ID, SYMBOL and ASSET_TYPE.
880    pub price_conversion_asset: Option<CCOCCorePriceConversionAsset>,
881    #[serde(rename = "PRICE_CONVERSION_RATE")]
882    /// Denotes the current value / price of USD in the requested quote asset.
883    pub price_conversion_rate: Option<f64>,
884    #[serde(rename = "PRICE_CONVERSION_VALUE")]
885    /// Denotes the current value / price of the asset in the requested quote currency.
886    pub price_conversion_value: Option<f64>,
887    #[serde(rename = "PRICE_CONVERSION_SOURCE")]
888    /// Denotes the source we used for the conversion asset value / price.
889    pub price_conversion_source: Option<String>,
890    #[serde(rename = "PRICE_CONVERSION_LAST_UPDATE_TS")]
891    /// The Unix timestamp of the last update to the conversion asset value / price.
892    pub price_conversion_last_update_ts: Option<i64>,
893    #[serde(rename = "MKT_CAP_PENALTY")]
894    /// The total penalty applied to the mkt cap due to liquidity or quality of data. Comment example: The value is reduced to 0.01% of the original due to
895    /// low volume on B+ ranked exchanges or because it is only trading on a limited number of exchanges.
896    pub mkt_cap_penalty: Option<f64>,
897    #[serde(rename = "CIRCULATING_MKT_CAP_USD")]
898    /// Calculated as the product of the asset's circulating supply and its current price quoted in USD (we sometimes apply a MKT_CAP_PENALTY depending on
899    /// liquidity conditions). This is used to rank assets in toplists based on their circulating market capitalization.
900    pub circulating_mkt_cap_usd: f64,
901    #[serde(rename = "TOTAL_MKT_CAP_USD")]
902    /// Calculated as the product of the asset's total supply and its current price quoted in USD (we sometimes apply a MKT_CAP_PENALTY depending on
903    /// liquidity conditions). This figure gives an overview of the total value of all issued tokens for a given asset.
904    pub total_mkt_cap_usd: f64,
905    #[serde(rename = "CIRCULATING_MKT_CAP_CONVERSION")]
906    /// Calculated as the product of the asset's circulating supply and its current price quoted in conversion asset (we sometimes apply a MKT_CAP_PENALTY
907    /// depending on liquidity conditions). We calculate this field by multiplying the CIRCULATING_MKT_CAP_USD and the PRICE_CONVERSION_VALUE.
908    pub circulating_mkt_cap_conversion: Option<f64>,
909    #[serde(rename = "TOTAL_MKT_CAP_CONVERSION")]
910    /// Calculated as the product of the asset's total supply and its current price quoted in conversion asset (we sometimes apply a MKT_CAP_PENALTY
911    /// depending on liquidity conditions). We calculate this field by multiplying the TOTAL_MKT_CAP_USD and the PRICE_CONVERSION_VALUE.
912    pub total_mkt_cap_conversion: Option<f64>,
913    #[serde(rename = "SPOT_MOVING_24_HOUR_QUOTE_VOLUME_TOP_TIER_DIRECT_USD")]
914    /// Aggregated 24 hours volume of the asset traded accross instruments that are quoted in USD on spot markets that we consider top tier, quoted in USD.
915    /// Provides insights into the USD liquidity and trading activity of the asset on top tier spot markets.
916    pub spot_moving_24_hour_quote_volume_top_tier_direct_usd: f64,
917    #[serde(rename = "SPOT_MOVING_24_HOUR_QUOTE_VOLUME_DIRECT_USD")]
918    /// Aggregated 24 hours volume of the asset traded accross instruments that are quoted in USD on all the intergarted spot markets, quoted in USD.
919    /// Provides insights into the USD liquidity and trading activity of the asset.
920    pub spot_moving_24_hour_quote_volume_direct_usd: f64,
921    #[serde(rename = "SPOT_MOVING_24_HOUR_QUOTE_VOLUME_TOP_TIER_USD")]
922    /// Aggregated 24 hours volume of the asset traded accross all instruments on spot markets that we consider top tier, quoted in USD.
923    /// This is the sum of all the trade volumes on all the spot top tier markets, every trade volume is converted to USD using the most accuarte
924    /// conversion price at the time of the trade. These markets meet specific quality criteria, offering a more curated view of trading activity.
925    pub spot_moving_24_hour_quote_volume_top_tier_usd: f64,
926    #[serde(rename = "SPOT_MOVING_24_HOUR_QUOTE_VOLUME_USD")]
927    /// Aggregated 24 hours volume of the asset traded accross all instruments on all the integrated spot markets, quoted in USD.
928    /// This is the sum of all the trade volumes on all the spot markets, every trade volume is converted to USD using the most accuarte conversion
929    /// price at the time of the trade. Useful for understanding demand and trading interest.
930    pub spot_moving_24_hour_quote_volume_usd: f64,
931    #[serde(rename = "SPOT_MOVING_24_HOUR_QUOTE_VOLUME_TOP_TIER_CONVERSION")]
932    /// Aggregated 24 hours volume of the asset traded accross all instruments on spot markets that we consider top tier, quoted in conversion asset.
933    /// We calculate this field by multiplying the SPOT_MOVING_24_HOUR_QUOTE_VOLUME_TOP_TIER_USD and the PRICE_CONVERSION_VALUE.
934    pub spot_moving_24_hour_quote_volume_top_tier_conversion: Option<f64>,
935    #[serde(rename = "SPOT_MOVING_24_HOUR_QUOTE_VOLUME_CONVERSION")]
936    /// Aggregated 24 hours volume of the asset traded accross all instruments on all the integrated spot markets.
937    /// We calculate this field by multiplying the SPOT_MOVING_24_HOUR_QUOTE_VOLUME_USD and the PRICE_CONVERSION_VALUE.
938    pub spot_moving_24_hour_quote_volume_conversion: Option<f64>,
939    #[serde(rename = "SPOT_MOVING_7_DAY_QUOTE_VOLUME_TOP_TIER_DIRECT_USD")]
940    /// Aggregated 7 days volume of the asset traded accross instruments that are quoted in USD on spot markets that we consider top tier, quoted in USD.
941    /// Provides insights into the USD liquidity and trading activity of the asset on top tier spot markets.
942    pub spot_moving_7_day_quote_volume_top_tier_direct_usd: f64,
943    #[serde(rename = "SPOT_MOVING_7_DAY_QUOTE_VOLUME_DIRECT_USD")]
944    /// Aggregated 7 days volume of the asset traded accross instruments that are quoted in USD on all the intergarted spot markets, quoted in USD.
945    /// Provides insights into the USD liquidity and trading activity of the asset.
946    pub spot_moving_7_day_quote_volume_direct_usd: f64,
947    #[serde(rename = "SPOT_MOVING_7_DAY_QUOTE_VOLUME_TOP_TIER_USD")]
948    /// Aggregated 7 days volume of the asset traded accross all instruments on spot markets that we consider top tier, quoted in USD.
949    /// This is the sum of all the trade volumes on all the spot top tier markets, every trade volume is converted to USD using the most accuarte
950    /// conversion price at the time of the trade. These markets meet specific quality criteria, offering a more curated view of trading activity.
951    pub spot_moving_7_day_quote_volume_top_tier_usd: f64,
952    #[serde(rename = "SPOT_MOVING_7_DAY_QUOTE_VOLUME_USD")]
953    /// Aggregated 7 days volume of the asset traded accross all instruments on all the integrated spot markets, quoted in USD.
954    /// This is the sum of all the trade volumes on all the spot markets, every trade volume is converted to USD using the most accuarte conversion
955    /// price at the time of the trade. Useful for understanding demand and trading interest.
956    pub spot_moving_7_day_quote_volume_usd: f64,
957    #[serde(rename = "SPOT_MOVING_7_DAY_QUOTE_VOLUME_TOP_TIER_CONVERSION")]
958    /// Aggregated 7 days volume of the asset traded accross all instruments on spot markets that we consider top tier, quoted in conversion asset.
959    /// We calculate this field by multiplying the SPOT_MOVING_7_DAY_QUOTE_VOLUME_TOP_TIER_USD and the PRICE_CONVERSION_VALUE.
960    pub spot_moving_7_day_quote_volume_top_tier_conversion: Option<f64>,
961    #[serde(rename = "SPOT_MOVING_7_DAY_QUOTE_VOLUME_CONVERSION")]
962    /// Aggregated 7 days volume of the asset traded accross all instruments on all the integrated spot markets.
963    /// We calculate this field by multiplying the SPOT_MOVING_7_DAY_QUOTE_VOLUME_USD and the PRICE_CONVERSION_VALUE.
964    pub spot_moving_7_day_quote_volume_conversion: Option<f64>,
965    #[serde(rename = "SPOT_MOVING_30_DAY_QUOTE_VOLUME_TOP_TIER_DIRECT_USD")]
966    /// Aggregated 30 days volume of the asset traded accross instruments that are quoted in USD on spot markets that we consider top tier, quoted in USD.
967    /// Provides insights into the USD liquidity and trading activity of the asset on top tier spot markets.
968    pub spot_moving_30_day_quote_volume_top_tier_direct_usd: f64,
969    #[serde(rename = "SPOT_MOVING_30_DAY_QUOTE_VOLUME_DIRECT_USD")]
970    /// Aggregated 30 days volume of the asset traded accross instruments that are quoted in USD on all the intergarted spot markets, quoted in USD.
971    /// Provides insights into the USD liquidity and trading activity of the asset.
972    pub spot_moving_30_day_quote_volume_direct_usd: f64,
973    #[serde(rename = "SPOT_MOVING_30_DAY_QUOTE_VOLUME_TOP_TIER_USD")]
974    /// Aggregated 30 days volume of the asset traded accross all instruments on spot markets that we consider top tier, quoted in USD.
975    /// This is the sum of all the trade volumes on all the spot top tier markets, every trade volume is converted to USD using the most accuarte
976    /// conversion price at the time of the trade. These markets meet specific quality criteria, offering a more curated view of trading activity.
977    pub spot_moving_30_day_quote_volume_top_tier_usd: f64,
978    #[serde(rename = "SPOT_MOVING_30_DAY_QUOTE_VOLUME_USD")]
979    /// Aggregated 30 days volume of the asset traded accross all instruments on all the integrated spot markets, quoted in USD.
980    /// This is the sum of all the trade volumes on all the spot markets, every trade volume is converted to USD using the most accuarte conversion
981    /// price at the time of the trade. Useful for understanding demand and trading interest.
982    pub spot_moving_30_day_quote_volume_usd: f64,
983    #[serde(rename = "SPOT_MOVING_30_DAY_QUOTE_VOLUME_TOP_TIER_CONVERSION")]
984    /// Aggregated 30 days volume of the asset traded accross all instruments on spot markets that we consider top tier, quoted in conversion asset.
985    /// We calculate this field by multiplying the SPOT_MOVING_30_DAY_QUOTE_VOLUME_TOP_TIER_USD and the PRICE_CONVERSION_VALUE.
986    pub spot_moving_30_day_quote_volume_top_tier_conversion: Option<f64>,
987    #[serde(rename = "SPOT_MOVING_30_DAY_QUOTE_VOLUME_CONVERSION")]
988    /// Aggregated 30 days volume of the asset traded accross all instruments on all the integrated spot markets.
989    /// We calculate this field by multiplying the SPOT_MOVING_30_DAY_QUOTE_VOLUME_USD and the PRICE_CONVERSION_VALUE.
990    pub spot_moving_30_day_quote_volume_conversion: Option<f64>,
991    #[serde(rename = "SPOT_MOVING_24_HOUR_CHANGE_USD")]
992    /// The difference between the value of the asset quoted in USD 24 hours ago and the latest USD price.
993    pub spot_moving_24_hour_change_usd: f64,
994    #[serde(rename = "SPOT_MOVING_24_HOUR_CHANGE_PERCENTAGE_USD")]
995    /// The percentage difference between the value of the asset quoted in USD 24 hours ago and the latest USD price.
996    pub spot_moving_24_hour_change_percentage_usd: f64,
997    #[serde(rename = "SPOT_MOVING_24_HOUR_CHANGE_CONVERSION")]
998    /// The approximate difference between the value of the asset quoted conversion currency 23 hours ago and now.
999    /// We calculate this field by multiplying the SPOT_MOVING_24_HOUR_CHANGE_USD and the PRICE_CONVERSION_VALUE.
1000    /// This figure does not take into account the volatility of the conversion asset quoted in USD.
1001    pub spot_moving_24_hour_change_conversion: Option<f64>,
1002    #[serde(rename = "SPOT_MOVING_24_HOUR_CHANGE_PERCENTAGE_CONVERSION")]
1003    /// The percentage difference between the value of the asset quoted in USD 24 hours ago and the latest USD price.
1004    /// This is the same as the SPOT_MOVING_24_HOUR_CHANGE_PERCENTAGE_USD just adding it here for easier access.
1005    pub spot_moving_24_hour_change_percentage_conversion: Option<f64>,
1006    #[serde(rename = "SPOT_MOVING_7_DAY_CHANGE_USD")]
1007    /// The difference between the value of the asset quoted in USD 7 days ago and the latest USD price.
1008    pub spot_moving_7_day_change_usd: f64,
1009    #[serde(rename = "SPOT_MOVING_7_DAY_CHANGE_PERCENTAGE_USD")]
1010    /// The percentage difference between the value of the asset quoted in USD 7 days ago and the latest USD price.
1011    pub spot_moving_7_day_change_percentage_usd: f64,
1012    #[serde(rename = "SPOT_MOVING_7_DAY_CHANGE_CONVERSION")]
1013    /// The approximate difference between the value of the asset quoted conversion currency 6 days ago and current day.
1014    /// We calculate this field by multiplying the SPOT_MOVING_7_DAY_CHANGE_USD and the PRICE_CONVERSION_VALUE.
1015    /// This figure does not take into account the volatility of the conversion asset quoted in USD.
1016    pub spot_moving_7_day_change_conversion: Option<f64>,
1017    #[serde(rename = "SPOT_MOVING_7_DAY_CHANGE_PERCENTAGE_CONVERSION")]
1018    /// The percentage difference between the value of the asset quoted in USD 7 days ago and the latest USD price.
1019    /// This is the same as the SPOT_MOVING_7_DAY_CHANGE_PERCENTAGE_USD just adding it here for easier access.
1020    pub spot_moving_7_day_change_percentage_conversion: Option<f64>,
1021    #[serde(rename = "SPOT_MOVING_30_DAY_CHANGE_USD")]
1022    /// The difference between the value of the asset quoted in USD 30 days ago and the latest USD price.
1023    pub spot_moving_30_day_change_usd: f64,
1024    #[serde(rename = "SPOT_MOVING_30_DAY_CHANGE_PERCENTAGE_USD")]
1025    /// The percentage difference between the value of the asset quoted in USD 30 days ago and the latest USD price.
1026    pub spot_moving_30_day_change_percentage_usd: f64,
1027    #[serde(rename = "SPOT_MOVING_30_DAY_CHANGE_CONVERSION")]
1028    /// The approximate difference between the value of the asset quoted conversion currency 29 days ago and current day.
1029    /// We calculate this field by multiplying the SPOT_MOVING_30_DAY_CHANGE_USD and the PRICE_CONVERSION_VALUE.
1030    /// This figure does not take into account the volatility of the conversion asset quoted in USD.
1031    pub spot_moving_30_day_change_conversion: Option<f64>,
1032    #[serde(rename = "SPOT_MOVING_30_DAY_CHANGE_PERCENTAGE_CONVERSION")]
1033    /// The percentage difference between the value of the asset quoted in USD 30 days ago and the latest USD price.
1034    /// This is the same as the SPOT_MOVING_30_DAY_CHANGE_PERCENTAGE_USD just adding it here for easier access.
1035    pub spot_moving_30_day_change_percentage_conversion: Option<f64>,
1036    #[serde(rename = "TOPLIST_BASE_RANK")]
1037    /// Indicates the asset's position in our global asset ranking. There are multiple ranks, each is determined by at least one factor,
1038    /// such as asset launch date, market cap, trading volume, etc...
1039    pub toplist_base_rank: Option<CCOCCoreToplistRank>,
1040    #[serde(rename = "ASSET_DESCRIPTION")]
1041    /// The long form description in markdown for this asset.
1042    pub asset_description: String,
1043    #[serde(rename = "ASSET_DESCRIPTION_SUMMARY")]
1044    /// The short form description text only for this asset.
1045    pub asset_description_summary: String,
1046    #[serde(rename = "PROJECT_LEADERS")]
1047    /// An array of individuals that contains founders, whitepaper authors, investors, resechers, and other important people related to a project.
1048    pub project_leaders: Option<Vec<CCOCCoreProjectLeader>>,
1049    #[serde(rename = "ASSOCIATED_CONTACT_DETAILS")]
1050    /// Associated contact addresses for the team members, employees or affiliated contacts.
1051    pub associated_contact_details: Option<CCOCCoreContactDetails>,
1052    #[serde(rename = "SEO_TITLE")]
1053    /// The title that appears when you post this page on social media.
1054    pub seo_title: String,
1055    #[serde(rename = "SEO_DESCRIPTION")]
1056    /// The description that appears when you post this page on social media.
1057    pub seo_description: String, 
1058}
1059
1060
1061// On-Chain Core: Historical Supply Day
1062
1063
1064/// On-Chain Core: Historical Supply Day
1065#[derive(Deserialize, Debug)]
1066pub struct CCOCCoreSupply {
1067    #[serde(rename = "UNIT")]
1068    /// The unit of the historical period update: HOUR for hour and DAY for day.
1069    pub unit: String,
1070    #[serde(rename = "TYPE")]
1071    /// The type of the message.
1072    pub type_: String,
1073    #[serde(rename = "ASSET_ID")]
1074    /// The unique identifier for the asset.
1075    pub asset_id: i32,
1076    #[serde(rename = "SYMBOL")]
1077    /// The unique identifier for the asset.
1078    pub symbol: String,
1079    #[serde(rename = "TIMESTAMP")]
1080    /// The unix timestamp when this asset historical supply day data was saved.
1081    pub timestamp: i64,
1082    #[serde(rename = "SUPPLY_CIRCULATING")]
1083    /// Also referred to as free float or public float. The number of asset parts (coins/tokens) that are available to be traded and it excludes burnt
1084    /// supply and locked supply.
1085    pub supply_circulating: Option<f64>,
1086    #[serde(rename = "SUPPLY_TOTAL")]
1087    /// The number of asset parts (coins/tokens) that have been issued so far excluding burnt tokens. (supply_circulating + supply_locked).
1088    pub supply_total: Option<f64>,
1089    #[serde(rename = "SUPPLY_BURNT")]
1090    /// The number of asset parts (coins/tokens) that have been sent to addresses/locations that are no longer accessible.
1091    /// They are permanently removed from the circulating supply on purpose, this does not include lost tokens sent to wallets that do not exist
1092    /// or sent to wallets that users no longer have access to, the address of burnt tokens is determined by the project team.
1093    pub supply_burnt: Option<f64>,
1094    #[serde(rename = "SUPPLY_MAX")]
1095    /// The maximum number of asset parts (coins/tokens) that will ever be issued (supply_circulating + supply_burnt + supply_locked + all supply that
1096    /// 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.
1097    pub supply_max: Option<f64>,
1098    #[serde(rename = "SUPPLY_STAKED")]
1099    /// The current number of asset parts (coins/tokens) that are locked as part of PoS and PoS partial chains.
1100    pub supply_staked: Option<f64>,
1101    #[serde(rename = "SUPPLY_FUTURE")]
1102    /// The number of asset parts (coins/tokens) that are planned to be issued in the future. (supply_max - supply_issued).
1103    pub supply_future: Option<f64>,
1104    #[serde(rename = "SUPPLY_ISSUED")]
1105    /// The number of asset parts (coins/tokens) that have been issued so far. (supply_circulating + supply_locked + supply_burnt).
1106    pub supply_issued: Option<f64>,
1107    #[serde(rename = "SUPPLY_LOCKED")]
1108    /// The number of asset parts (coins/tokens) that are currently not transferable until certain conditions are met. Locked supply is generally held by
1109    /// team members, DAOs, foundations, bridges, stakers, liquidity pools, etc.
1110    pub supply_locked: Option<f64>,
1111}