1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
#![allow(missing_docs)]
use serde::{Deserialize, Serialize};
use serde_json::Value;

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Localization {
    pub en: Option<String>,
    pub de: Option<String>,
    pub es: Option<String>,
    pub fr: Option<String>,
    pub it: Option<String>,
    pub pl: Option<String>,
    pub ro: Option<String>,
    pub hu: Option<String>,
    pub nl: Option<String>,
    pub pt: Option<String>,
    pub sv: Option<String>,
    pub vi: Option<String>,
    pub tr: Option<String>,
    pub ru: Option<String>,
    pub ja: Option<String>,
    pub zh: Option<String>,
    #[serde(rename = "zh-tw")]
    pub zh_tw: Option<String>,
    pub ko: Option<String>,
    pub ar: Option<String>,
    pub th: Option<String>,
    pub id: Option<String>,
}

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Image {
    pub thumb: Option<String>,
    pub small: Option<String>,
    pub large: Option<String>,
}

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct CurrentPrice {
    pub aed: Option<f64>,
    pub ars: Option<f64>,
    pub aud: Option<f64>,
    pub bch: Option<f64>,
    pub bdt: Option<f64>,
    pub bhd: Option<f64>,
    pub bmd: Option<f64>,
    pub bnb: Option<f64>,
    pub brl: Option<f64>,
    pub btc: Option<f64>,
    pub cad: Option<f64>,
    pub chf: Option<f64>,
    pub clp: Option<f64>,
    pub cny: Option<f64>,
    pub czk: Option<f64>,
    pub dkk: Option<f64>,
    pub dot: Option<f64>,
    pub eos: Option<f64>,
    pub eth: Option<f64>,
    pub eur: Option<f64>,
    pub gbp: Option<f64>,
    pub hkd: Option<f64>,
    pub huf: Option<f64>,
    pub idr: Option<f64>,
    pub ils: Option<f64>,
    pub inr: Option<f64>,
    pub jpy: Option<f64>,
    pub krw: Option<f64>,
    pub kwd: Option<f64>,
    pub lkr: Option<f64>,
    pub ltc: Option<f64>,
    pub mmk: Option<f64>,
    pub mxn: Option<f64>,
    pub myr: Option<f64>,
    pub ngn: Option<f64>,
    pub nok: Option<f64>,
    pub nzd: Option<f64>,
    pub php: Option<f64>,
    pub pkr: Option<f64>,
    pub pln: Option<f64>,
    pub rub: Option<f64>,
    pub sar: Option<f64>,
    pub sek: Option<f64>,
    pub sgd: Option<f64>,
    pub thb: Option<f64>,
    #[serde(rename = "try")]
    pub try_field: Option<f64>,
    pub twd: Option<f64>,
    pub uah: Option<f64>,
    pub usd: Option<f64>,
    pub vef: Option<f64>,
    pub vnd: Option<f64>,
    pub xag: Option<f64>,
    pub xau: Option<f64>,
    pub xdr: Option<f64>,
    pub xlm: Option<f64>,
    pub xrp: Option<f64>,
    pub yfi: Option<f64>,
    pub zar: Option<f64>,
    pub bits: Option<f64>,
    pub link: Option<f64>,
    pub sats: Option<f64>,
}

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct MarketCap {
    pub aed: Option<f64>,
    pub ars: Option<f64>,
    pub aud: Option<f64>,
    pub bch: Option<f64>,
    pub bdt: Option<f64>,
    pub bhd: Option<f64>,
    pub bmd: Option<f64>,
    pub bnb: Option<f64>,
    pub brl: Option<f64>,
    pub btc: Option<f64>,
    pub cad: Option<f64>,
    pub chf: Option<f64>,
    pub clp: Option<f64>,
    pub cny: Option<f64>,
    pub czk: Option<f64>,
    pub dkk: Option<f64>,
    pub dot: Option<f64>,
    pub eos: Option<f64>,
    pub eth: Option<f64>,
    pub eur: Option<f64>,
    pub gbp: Option<f64>,
    pub hkd: Option<f64>,
    pub huf: Option<f64>,
    pub idr: Option<f64>,
    pub ils: Option<f64>,
    pub inr: Option<f64>,
    pub jpy: Option<f64>,
    pub krw: Option<f64>,
    pub kwd: Option<f64>,
    pub lkr: Option<f64>,
    pub ltc: Option<f64>,
    pub mmk: Option<f64>,
    pub mxn: Option<f64>,
    pub myr: Option<f64>,
    pub ngn: Option<f64>,
    pub nok: Option<f64>,
    pub nzd: Option<f64>,
    pub php: Option<f64>,
    pub pkr: Option<f64>,
    pub pln: Option<f64>,
    pub rub: Option<f64>,
    pub sar: Option<f64>,
    pub sek: Option<f64>,
    pub sgd: Option<f64>,
    pub thb: Option<f64>,
    #[serde(rename = "try")]
    pub try_field: Option<f64>,
    pub twd: Option<f64>,
    pub uah: Option<f64>,
    pub usd: Option<f64>,
    pub vef: Option<f64>,
    pub vnd: Option<f64>,
    pub xag: Option<f64>,
    pub xau: Option<f64>,
    pub xdr: Option<f64>,
    pub xlm: Option<f64>,
    pub xrp: Option<f64>,
    pub yfi: Option<f64>,
    pub zar: Option<f64>,
    pub bits: Option<f64>,
    pub link: Option<f64>,
    pub sats: Option<f64>,
}

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct TotalVolume {
    pub aed: Option<f64>,
    pub ars: Option<f64>,
    pub aud: Option<f64>,
    pub bch: Option<f64>,
    pub bdt: Option<f64>,
    pub bhd: Option<f64>,
    pub bmd: Option<f64>,
    pub bnb: Option<f64>,
    pub brl: Option<f64>,
    pub btc: Option<f64>,
    pub cad: Option<f64>,
    pub chf: Option<f64>,
    pub clp: Option<f64>,
    pub cny: Option<f64>,
    pub czk: Option<f64>,
    pub dkk: Option<f64>,
    pub dot: Option<f64>,
    pub eos: Option<f64>,
    pub eth: Option<f64>,
    pub eur: Option<f64>,
    pub gbp: Option<f64>,
    pub hkd: Option<f64>,
    pub huf: Option<f64>,
    pub idr: Option<f64>,
    pub ils: Option<f64>,
    pub inr: Option<f64>,
    pub jpy: Option<f64>,
    pub krw: Option<f64>,
    pub kwd: Option<f64>,
    pub lkr: Option<f64>,
    pub ltc: Option<f64>,
    pub mmk: Option<f64>,
    pub mxn: Option<f64>,
    pub myr: Option<f64>,
    pub ngn: Option<f64>,
    pub nok: Option<f64>,
    pub nzd: Option<f64>,
    pub php: Option<f64>,
    pub pkr: Option<f64>,
    pub pln: Option<f64>,
    pub rub: Option<f64>,
    pub sar: Option<f64>,
    pub sek: Option<f64>,
    pub sgd: Option<f64>,
    pub thb: Option<f64>,
    #[serde(rename = "try")]
    pub try_field: Option<f64>,
    pub twd: Option<f64>,
    pub uah: Option<f64>,
    pub usd: Option<f64>,
    pub vef: Option<f64>,
    pub vnd: Option<f64>,
    pub xag: Option<f64>,
    pub xau: Option<f64>,
    pub xdr: Option<f64>,
    pub xlm: Option<f64>,
    pub xrp: Option<f64>,
    pub yfi: Option<f64>,
    pub zar: Option<f64>,
    pub bits: Option<f64>,
    pub link: Option<f64>,
    pub sats: Option<f64>,
}

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct CommunityData {
    pub facebook_likes: Option<f64>,
    pub twitter_followers: Option<f64>,
    #[serde(rename = "reddit_average_posts_48h")]
    pub reddit_average_posts48_h: Option<f64>,
    #[serde(rename = "reddit_average_comments_48h")]
    pub reddit_average_comments48_h: Option<f64>,
    pub reddit_subscribers: Option<f64>,
    #[serde(rename = "reddit_accounts_active_48h")]
    pub reddit_accounts_active48_h: Option<Value>,
    pub telegram_channel_user_count: Option<Value>,
}

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct DeveloperData {
    pub forks: Option<f64>,
    pub stars: Option<f64>,
    pub subscribers: Option<f64>,
    pub total_issues: Option<f64>,
    pub closed_issues: Option<f64>,
    pub pull_requests_merged: Option<f64>,
    pub pull_request_contributors: Option<f64>,
    #[serde(rename = "code_additions_deletions_4_weeks")]
    pub code_additions_deletions4_weeks: CodeAdditionsDeletions4Weeks,
    #[serde(rename = "commit_count_4_weeks")]
    pub commit_count4_weeks: Option<f64>,
    #[serde(rename = "last_4_weeks_commit_activity_series")]
    pub last4_weeks_commit_activity_series: Option<Vec<f64>>,
}

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct PublicInterestStats {
    pub alexa_rank: Option<f64>,
    pub bing_matches: Option<f64>,
}

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct CodeAdditionsDeletions4Weeks {
    pub additions: Option<f64>,
    pub deletions: Option<f64>,
}

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Links {
    pub homepage: Vec<String>,
    pub blockchain_site: Vec<String>,
    pub official_forum_url: Vec<String>,
    pub chat_url: Vec<String>,
    pub announcement_url: Vec<String>,
    pub twitter_screen_name: Value,
    pub facebook_username: Value,
    pub bitcointalk_thread_identifier: Value,
    pub telegram_channel_identifier: Value,
    pub subreddit_url: Value,
    pub repos_url: ReposUrl,
}

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct ReposUrl {
    pub github: Vec<String>,
    pub bitbucket: Vec<Value>,
}

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Tickers {
    pub name: String,
    pub tickers: Vec<Ticker>,
}

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Ticker {
    pub base: String,
    pub target: String,
    pub market: Market,
    pub last: f64,
    pub volume: f64,
    pub converted_last: ConvertedLast,
    pub converted_volume: ConvertedVolume,
    pub cost_to_move_up_usd: Option<f64>,
    pub cost_to_move_down_usd: Option<f64>,
    pub trust_score: Option<String>,
    pub bid_ask_spread_percentage: Option<f64>,
    pub timestamp: Option<String>,
    pub last_traded_at: Option<String>,
    pub last_fetch_at: Option<String>,
    pub is_anomaly: bool,
    pub is_stale: bool,
    pub trade_url: Option<String>,
    pub token_info_url: Option<String>,
    pub coin_id: String,
    pub target_coin_id: Option<String>,
}

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Market {
    pub name: String,
    pub identifier: String,
    pub has_trading_incentive: bool,
    pub logo: Option<String>,
}

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct ConvertedLast {
    pub btc: f64,
    pub eth: f64,
    pub usd: f64,
}

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct ConvertedVolume {
    pub btc: f64,
    pub eth: f64,
    pub usd: f64,
}

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct StatusUpdates {
    pub status_updates: Vec<StatusUpdate>,
}

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct StatusUpdate {
    pub description: Option<String>,
    pub category: Option<String>,
    pub created_at: Option<String>,
    pub user: Option<String>,
    pub user_title: Option<String>,
    pub pin: Option<bool>,
    pub project: Option<Project>,
}

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Project {
    #[serde(rename = "type")]
    pub type_field: Option<String>,
    pub id: Option<String>,
    pub name: Option<String>,
    pub symbol: Option<String>,
    pub image: Image,
}