1#![allow(missing_docs)]
14#![allow(rustdoc::bare_urls, rustdoc::broken_intra_doc_links, rustdoc::invalid_html_tags)]
15#![allow(clippy::doc_lazy_continuation, clippy::large_enum_variant)]
16
17use serde::{Deserialize, Deserializer, Serialize, Serializer, de};
18
19#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
20#[non_exhaustive]
21pub struct AccountIdentity {
22 pub object: String,
23 pub data: AccountIdentityData,
24 pub meta: ResponseMeta,
25}
26
27#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
28#[non_exhaustive]
29pub struct AccountIdentityData {
30 pub user_id: i64,
31 pub credential_id: i64,
32 pub credential_kind: CredentialKind,
34 pub credential_status: String,
36 pub entitlement: AccountIdentityDataEntitlement,
37 #[serde(default)]
39 pub scopes: Option<Vec<String>>,
40}
41
42#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
43#[non_exhaustive]
44pub struct AccountIdentityDataEntitlement {
45 pub paid_data_access: PaidDataAccess,
46 #[serde(default)]
48 pub recovery_action: Option<String>,
49}
50
51#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
53#[non_exhaustive]
54pub enum Action {
55 #[serde(rename = "buy")]
57 Buy,
58 #[serde(rename = "sell")]
60 Sell,
61 #[serde(untagged)]
63 Other(String),
64}
65
66impl Action {
67 pub fn as_str(&self) -> &str {
69 match self {
70 Self::Buy => "buy",
71 Self::Sell => "sell",
72 Self::Other(value) => value,
73 }
74 }
75}
76
77impl From<&str> for Action {
78 fn from(value: &str) -> Self {
79 match value {
80 "buy" => Self::Buy,
81 "sell" => Self::Sell,
82 other => Self::Other(other.to_owned()),
83 }
84 }
85}
86
87impl std::fmt::Display for Action {
88 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
89 f.write_str(self.as_str())
90 }
91}
92
93impl AsRef<str> for Action {
94 fn as_ref(&self) -> &str {
95 self.as_str()
96 }
97}
98
99#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
100#[non_exhaustive]
101pub struct ActivateWebhookSecretResponse {
102 pub object: String,
103 pub data: WebhookEndpoint,
104 pub meta: ResponseMeta,
105}
106
107#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
109#[non_exhaustive]
110pub enum ActiveWithin {
111 #[serde(rename = "all")]
113 All,
114 #[serde(rename = "7d")]
116 V7d,
117 #[serde(rename = "30d")]
119 V30d,
120 #[serde(rename = "90d")]
122 V90d,
123 #[serde(untagged)]
125 Other(String),
126}
127
128impl ActiveWithin {
129 pub fn as_str(&self) -> &str {
131 match self {
132 Self::All => "all",
133 Self::V7d => "7d",
134 Self::V30d => "30d",
135 Self::V90d => "90d",
136 Self::Other(value) => value,
137 }
138 }
139}
140
141impl From<&str> for ActiveWithin {
142 fn from(value: &str) -> Self {
143 match value {
144 "all" => Self::All,
145 "7d" => Self::V7d,
146 "30d" => Self::V30d,
147 "90d" => Self::V90d,
148 other => Self::Other(other.to_owned()),
149 }
150 }
151}
152
153impl std::fmt::Display for ActiveWithin {
154 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
155 f.write_str(self.as_str())
156 }
157}
158
159impl AsRef<str> for ActiveWithin {
160 fn as_ref(&self) -> &str {
161 self.as_str()
162 }
163}
164
165#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
167#[non_exhaustive]
168pub enum Activity {
169 #[serde(rename = "all")]
171 All,
172 #[serde(rename = "active")]
174 Active,
175 #[serde(rename = "inactive")]
177 Inactive,
178 #[serde(untagged)]
180 Other(String),
181}
182
183impl Activity {
184 pub fn as_str(&self) -> &str {
186 match self {
187 Self::All => "all",
188 Self::Active => "active",
189 Self::Inactive => "inactive",
190 Self::Other(value) => value,
191 }
192 }
193}
194
195impl From<&str> for Activity {
196 fn from(value: &str) -> Self {
197 match value {
198 "all" => Self::All,
199 "active" => Self::Active,
200 "inactive" => Self::Inactive,
201 other => Self::Other(other.to_owned()),
202 }
203 }
204}
205
206impl std::fmt::Display for Activity {
207 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
208 f.write_str(self.as_str())
209 }
210}
211
212impl AsRef<str> for Activity {
213 fn as_ref(&self) -> &str {
214 self.as_str()
215 }
216}
217
218#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
220#[non_exhaustive]
221pub enum Admission {
222 #[serde(rename = "most_held_48h")]
224 MostHeld48h,
225 #[serde(rename = "most_held_48h_by_type")]
227 MostHeld48hByType,
228 #[serde(untagged)]
230 Other(String),
231}
232
233impl Admission {
234 pub fn as_str(&self) -> &str {
236 match self {
237 Self::MostHeld48h => "most_held_48h",
238 Self::MostHeld48hByType => "most_held_48h_by_type",
239 Self::Other(value) => value,
240 }
241 }
242}
243
244impl From<&str> for Admission {
245 fn from(value: &str) -> Self {
246 match value {
247 "most_held_48h" => Self::MostHeld48h,
248 "most_held_48h_by_type" => Self::MostHeld48hByType,
249 other => Self::Other(other.to_owned()),
250 }
251 }
252}
253
254impl std::fmt::Display for Admission {
255 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
256 f.write_str(self.as_str())
257 }
258}
259
260impl AsRef<str> for Admission {
261 fn as_ref(&self) -> &str {
262 self.as_str()
263 }
264}
265
266#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
268#[non_exhaustive]
269pub enum AdmittedBy {
270 #[serde(rename = "most_held")]
272 MostHeld,
273 #[serde(rename = "soonest_kickoff")]
275 SoonestKickoff,
276 #[serde(rename = "most_held_48h")]
278 MostHeld48h,
279 #[serde(rename = "most_held_48h_by_type")]
281 MostHeld48hByType,
282 #[serde(untagged)]
284 Other(String),
285}
286
287impl AdmittedBy {
288 pub fn as_str(&self) -> &str {
290 match self {
291 Self::MostHeld => "most_held",
292 Self::SoonestKickoff => "soonest_kickoff",
293 Self::MostHeld48h => "most_held_48h",
294 Self::MostHeld48hByType => "most_held_48h_by_type",
295 Self::Other(value) => value,
296 }
297 }
298}
299
300impl From<&str> for AdmittedBy {
301 fn from(value: &str) -> Self {
302 match value {
303 "most_held" => Self::MostHeld,
304 "soonest_kickoff" => Self::SoonestKickoff,
305 "most_held_48h" => Self::MostHeld48h,
306 "most_held_48h_by_type" => Self::MostHeld48hByType,
307 other => Self::Other(other.to_owned()),
308 }
309 }
310}
311
312impl std::fmt::Display for AdmittedBy {
313 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
314 f.write_str(self.as_str())
315 }
316}
317
318impl AsRef<str> for AdmittedBy {
319 fn as_ref(&self) -> &str {
320 self.as_str()
321 }
322}
323
324#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
326#[non_exhaustive]
327pub struct AgentRegistration {
328 pub api_key: String,
330 pub livemode: bool,
332 pub environment: String,
333 pub created_at: String,
334 pub sandbox: AgentRegistrationSandbox,
335 pub live_access: AgentRegistrationLiveAccess,
337}
338
339#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
341#[non_exhaustive]
342pub struct AgentRegistrationLiveAccess {
343 pub api_base_url: String,
345 pub requirement: String,
347 pub api_keys_url: String,
349 pub oauth_authorization_server_metadata_url: String,
351 pub oauth_registration_endpoint: String,
353 pub pricing_url: String,
355 pub auth_guide_url: String,
357}
358
359#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
360#[non_exhaustive]
361pub struct AgentRegistrationSandbox {
362 pub api_base_url: String,
364 pub first_request_url: String,
366 pub openapi_url: String,
368}
369
370#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
372#[non_exhaustive]
373pub enum Allocation {
374 #[serde(rename = "exact")]
376 Exact,
377 #[serde(rename = "degraded")]
379 Degraded,
380 #[serde(untagged)]
382 Other(String),
383}
384
385impl Allocation {
386 pub fn as_str(&self) -> &str {
388 match self {
389 Self::Exact => "exact",
390 Self::Degraded => "degraded",
391 Self::Other(value) => value,
392 }
393 }
394}
395
396impl From<&str> for Allocation {
397 fn from(value: &str) -> Self {
398 match value {
399 "exact" => Self::Exact,
400 "degraded" => Self::Degraded,
401 other => Self::Other(other.to_owned()),
402 }
403 }
404}
405
406impl std::fmt::Display for Allocation {
407 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
408 f.write_str(self.as_str())
409 }
410}
411
412impl AsRef<str> for Allocation {
413 fn as_ref(&self) -> &str {
414 self.as_str()
415 }
416}
417
418#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
420#[non_exhaustive]
421pub struct AnalyticInteger {
422 pub state: AnalyticNumberState,
423 pub source: TrustSourceKind,
424 #[serde(default, skip_serializing_if = "Option::is_none")]
425 pub value: Option<i64>,
426 #[serde(default, skip_serializing_if = "Option::is_none")]
427 pub freshness_at: Option<String>,
428}
429
430#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
432#[non_exhaustive]
433pub struct AnalyticNumber {
434 pub state: AnalyticNumberState,
436 pub source: TrustSourceKind,
438 #[serde(default, skip_serializing_if = "Option::is_none")]
439 pub value: Option<f64>,
440 #[serde(default, skip_serializing_if = "Option::is_none")]
442 pub freshness_at: Option<String>,
443}
444
445#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
447#[non_exhaustive]
448pub enum AnalyticNumberState {
449 #[serde(rename = "computed")]
451 Computed,
452 #[serde(rename = "known_zero")]
454 KnownZero,
455 #[serde(rename = "not_computed")]
457 NotComputed,
458 #[serde(rename = "not_applicable")]
460 NotApplicable,
461 #[serde(rename = "stale")]
463 Stale,
464 #[serde(rename = "unavailable")]
466 Unavailable,
467 #[serde(rename = "insufficient_data")]
469 InsufficientData,
470 #[serde(untagged)]
472 Other(String),
473}
474
475impl AnalyticNumberState {
476 pub fn as_str(&self) -> &str {
478 match self {
479 Self::Computed => "computed",
480 Self::KnownZero => "known_zero",
481 Self::NotComputed => "not_computed",
482 Self::NotApplicable => "not_applicable",
483 Self::Stale => "stale",
484 Self::Unavailable => "unavailable",
485 Self::InsufficientData => "insufficient_data",
486 Self::Other(value) => value,
487 }
488 }
489}
490
491impl From<&str> for AnalyticNumberState {
492 fn from(value: &str) -> Self {
493 match value {
494 "computed" => Self::Computed,
495 "known_zero" => Self::KnownZero,
496 "not_computed" => Self::NotComputed,
497 "not_applicable" => Self::NotApplicable,
498 "stale" => Self::Stale,
499 "unavailable" => Self::Unavailable,
500 "insufficient_data" => Self::InsufficientData,
501 other => Self::Other(other.to_owned()),
502 }
503 }
504}
505
506impl std::fmt::Display for AnalyticNumberState {
507 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
508 f.write_str(self.as_str())
509 }
510}
511
512impl AsRef<str> for AnalyticNumberState {
513 fn as_ref(&self) -> &str {
514 self.as_str()
515 }
516}
517
518#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
519#[non_exhaustive]
520pub struct ApiDiscovery {
521 pub api_base_url: String,
523 pub docs_url: String,
525 pub openapi_url: String,
527 pub health_url: String,
529 pub authentication: String,
530 pub protected_resource_metadata_url: String,
532 pub authenticated_routes: Vec<String>,
534}
535
536#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
537#[non_exhaustive]
538pub struct ApiError {
539 pub object: String,
540 pub error: ApiErrorError,
541 pub meta: ResponseMeta,
542}
543
544#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
545#[non_exhaustive]
546pub struct ApiErrorBody {
547 pub code: ErrorCode,
549 pub message: String,
550 #[serde(default, skip_serializing_if = "Option::is_none")]
551 pub doc_url: Option<String>,
552 #[serde(default, skip_serializing_if = "Option::is_none")]
553 pub param: Option<String>,
554 #[serde(default, skip_serializing_if = "Option::is_none")]
556 pub retry_at: Option<String>,
557 #[serde(default, skip_serializing_if = "Option::is_none")]
558 pub freshness: Option<FreshnessFailure>,
559 #[serde(default, skip_serializing_if = "Option::is_none")]
561 pub billing_url: Option<String>,
562 #[serde(default, skip_serializing_if = "Option::is_none")]
564 pub reason: Option<ErrorReason>,
565}
566
567#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
568#[non_exhaustive]
569pub struct ApiErrorError {
570 pub code: ErrorCode,
572 pub message: String,
573 #[serde(default, skip_serializing_if = "Option::is_none")]
574 pub doc_url: Option<String>,
575 #[serde(default, skip_serializing_if = "Option::is_none")]
576 pub param: Option<String>,
577 #[serde(default, skip_serializing_if = "Option::is_none")]
579 pub retry_at: Option<String>,
580 #[serde(default, skip_serializing_if = "Option::is_none")]
581 pub freshness: Option<FreshnessFailure>,
582 #[serde(default, skip_serializing_if = "Option::is_none")]
584 pub billing_url: Option<String>,
585 #[serde(default, skip_serializing_if = "Option::is_none")]
587 pub reason: Option<ErrorReason>,
588}
589
590#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
592#[non_exhaustive]
593pub enum Basis {
594 #[serde(rename = "game_lines")]
596 GameLines,
597 #[serde(rename = "event_total")]
599 EventTotal,
600 #[serde(untagged)]
602 Other(String),
603}
604
605impl Basis {
606 pub fn as_str(&self) -> &str {
608 match self {
609 Self::GameLines => "game_lines",
610 Self::EventTotal => "event_total",
611 Self::Other(value) => value,
612 }
613 }
614}
615
616impl From<&str> for Basis {
617 fn from(value: &str) -> Self {
618 match value {
619 "game_lines" => Self::GameLines,
620 "event_total" => Self::EventTotal,
621 other => Self::Other(other.to_owned()),
622 }
623 }
624}
625
626impl std::fmt::Display for Basis {
627 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
628 f.write_str(self.as_str())
629 }
630}
631
632impl AsRef<str> for Basis {
633 fn as_ref(&self) -> &str {
634 self.as_str()
635 }
636}
637
638#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
639#[non_exhaustive]
640pub struct BatchGameHoldersItem {
641 pub index: i64,
643 pub input: String,
644 pub status: BatchTraderItemStatus,
645 #[serde(default, skip_serializing_if = "Option::is_none")]
646 pub data: Option<GameHoldersItem>,
647 #[serde(default, skip_serializing_if = "Option::is_none")]
648 pub error: Option<ApiErrorBody>,
649}
650
651#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
652pub struct BatchGetMarketFlowBody {
653 pub condition_ids: Vec<String>,
655 #[serde(default, skip_serializing_if = "Option::is_none")]
657 pub timeframe: Option<Timeframe>,
658}
659
660#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
661#[non_exhaustive]
662pub struct BatchGetMarketFlowResponse {
663 pub object: String,
664 pub data: Vec<BatchMarketFlowItem>,
665 pub meta: BatchResponseMeta,
666}
667
668#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
669pub struct BatchGetMarketIntelBody {
670 pub condition_ids: Vec<String>,
672 #[serde(default, skip_serializing_if = "Option::is_none")]
674 pub timeframe: Option<Timeframe>,
675}
676
677#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
678#[non_exhaustive]
679pub struct BatchGetMarketIntelResponse {
680 pub object: String,
681 pub data: Vec<BatchMarketFlowItem>,
682 pub meta: BatchResponseMeta,
683}
684
685#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
686pub struct BatchGetTradersBody {
687 pub traders: Vec<String>,
689 #[serde(default, skip_serializing_if = "Option::is_none")]
691 pub expand: Option<Vec<BatchGetTradersBodyExpand>>,
692}
693
694#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
696#[non_exhaustive]
697pub enum BatchGetTradersBodyExpand {
698 #[serde(rename = "strategy")]
700 Strategy,
701 #[serde(rename = "categories")]
703 Categories,
704 #[serde(rename = "quant_metrics")]
706 QuantMetrics,
707 #[serde(rename = "trust")]
709 Trust,
710 #[serde(untagged)]
712 Other(String),
713}
714
715impl BatchGetTradersBodyExpand {
716 pub fn as_str(&self) -> &str {
718 match self {
719 Self::Strategy => "strategy",
720 Self::Categories => "categories",
721 Self::QuantMetrics => "quant_metrics",
722 Self::Trust => "trust",
723 Self::Other(value) => value,
724 }
725 }
726}
727
728impl From<&str> for BatchGetTradersBodyExpand {
729 fn from(value: &str) -> Self {
730 match value {
731 "strategy" => Self::Strategy,
732 "categories" => Self::Categories,
733 "quant_metrics" => Self::QuantMetrics,
734 "trust" => Self::Trust,
735 other => Self::Other(other.to_owned()),
736 }
737 }
738}
739
740impl std::fmt::Display for BatchGetTradersBodyExpand {
741 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
742 f.write_str(self.as_str())
743 }
744}
745
746impl AsRef<str> for BatchGetTradersBodyExpand {
747 fn as_ref(&self) -> &str {
748 self.as_str()
749 }
750}
751
752#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
753#[non_exhaustive]
754pub struct BatchGetTradersResponse {
755 pub object: String,
756 pub data: Vec<BatchTraderItem>,
757 pub meta: BatchResponseMeta,
758}
759
760#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
761#[non_exhaustive]
762pub struct BatchMarketFlowItem {
763 pub index: i64,
765 pub input: String,
766 pub status: BatchTraderItemStatus,
767 #[serde(default, skip_serializing_if = "Option::is_none")]
768 pub data: Option<MarketFlow>,
769 #[serde(default, skip_serializing_if = "Option::is_none")]
770 pub error: Option<ApiErrorBody>,
771}
772
773#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
774#[non_exhaustive]
775pub struct BatchRateLimitMeta {
776 pub basis: String,
777 pub limit: i64,
779 pub remaining: i64,
780 pub reset: i64,
782}
783
784#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
785#[non_exhaustive]
786pub struct BatchResponseMeta {
787 pub request_id: String,
789 pub cached: bool,
790 pub total_items: i64,
791 pub successful_items: i64,
792 pub failed_items: i64,
793 pub request_cost: i64,
795 pub rate_limit: BatchRateLimitMeta,
796}
797
798#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
799#[non_exhaustive]
800pub struct BatchTraderItem {
801 pub index: i64,
803 pub input: String,
804 pub status: BatchTraderItemStatus,
805 #[serde(default, skip_serializing_if = "Option::is_none")]
806 pub data: Option<Trader>,
807 #[serde(default, skip_serializing_if = "Option::is_none")]
808 pub error: Option<ApiErrorBody>,
809}
810
811#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
813#[non_exhaustive]
814pub enum BatchTraderItemStatus {
815 #[serde(rename = "ok")]
817 Ok,
818 #[serde(rename = "error")]
820 Error,
821 #[serde(untagged)]
823 Other(String),
824}
825
826impl BatchTraderItemStatus {
827 pub fn as_str(&self) -> &str {
829 match self {
830 Self::Ok => "ok",
831 Self::Error => "error",
832 Self::Other(value) => value,
833 }
834 }
835}
836
837impl From<&str> for BatchTraderItemStatus {
838 fn from(value: &str) -> Self {
839 match value {
840 "ok" => Self::Ok,
841 "error" => Self::Error,
842 other => Self::Other(other.to_owned()),
843 }
844 }
845}
846
847impl std::fmt::Display for BatchTraderItemStatus {
848 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
849 f.write_str(self.as_str())
850 }
851}
852
853impl AsRef<str> for BatchTraderItemStatus {
854 fn as_ref(&self) -> &str {
855 self.as_str()
856 }
857}
858
859#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
861#[non_exhaustive]
862pub enum BoardUpcomingStatus {
863 #[serde(rename = "unknown")]
865 Unknown,
866 #[serde(rename = "not_configured")]
868 NotConfigured,
869 #[serde(rename = "available")]
871 Available,
872 #[serde(rename = "capacity_limited")]
874 CapacityLimited,
875 #[serde(rename = "source_unavailable")]
877 SourceUnavailable,
878 #[serde(rename = "cold_unavailable")]
880 ColdUnavailable,
881 #[serde(rename = "deadline_unavailable")]
883 DeadlineUnavailable,
884 #[serde(untagged)]
886 Other(String),
887}
888
889impl BoardUpcomingStatus {
890 pub fn as_str(&self) -> &str {
892 match self {
893 Self::Unknown => "unknown",
894 Self::NotConfigured => "not_configured",
895 Self::Available => "available",
896 Self::CapacityLimited => "capacity_limited",
897 Self::SourceUnavailable => "source_unavailable",
898 Self::ColdUnavailable => "cold_unavailable",
899 Self::DeadlineUnavailable => "deadline_unavailable",
900 Self::Other(value) => value,
901 }
902 }
903}
904
905impl From<&str> for BoardUpcomingStatus {
906 fn from(value: &str) -> Self {
907 match value {
908 "unknown" => Self::Unknown,
909 "not_configured" => Self::NotConfigured,
910 "available" => Self::Available,
911 "capacity_limited" => Self::CapacityLimited,
912 "source_unavailable" => Self::SourceUnavailable,
913 "cold_unavailable" => Self::ColdUnavailable,
914 "deadline_unavailable" => Self::DeadlineUnavailable,
915 other => Self::Other(other.to_owned()),
916 }
917 }
918}
919
920impl std::fmt::Display for BoardUpcomingStatus {
921 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
922 f.write_str(self.as_str())
923 }
924}
925
926impl AsRef<str> for BoardUpcomingStatus {
927 fn as_ref(&self) -> &str {
928 self.as_str()
929 }
930}
931
932#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
934#[non_exhaustive]
935pub enum BoardUpcomingUnavailableScopes {
936 #[serde(rename = "category")]
938 Category,
939 #[serde(rename = "nfl")]
941 Nfl,
942 #[serde(rename = "cfb")]
944 Cfb,
945 #[serde(rename = "nba")]
947 Nba,
948 #[serde(rename = "wnba")]
950 Wnba,
951 #[serde(rename = "euroleague-basketball")]
953 EuroleagueBasketball,
954 #[serde(rename = "ncaa-basketball")]
956 NcaaBasketball,
957 #[serde(rename = "cwbb")]
959 Cwbb,
960 #[serde(rename = "nhl")]
962 Nhl,
963 #[serde(rename = "mls")]
965 Mls,
966 #[serde(rename = "valorant")]
968 Valorant,
969 #[serde(rename = "league-of-legends")]
971 LeagueOfLegends,
972 #[serde(rename = "counter-strike-2")]
974 CounterStrike2,
975 #[serde(rename = "dota-2")]
977 Dota2,
978 #[serde(rename = "registry")]
980 Registry,
981 #[serde(rename = "union")]
983 Union,
984 #[serde(rename = "wave")]
986 Wave,
987 #[serde(untagged)]
989 Other(String),
990}
991
992impl BoardUpcomingUnavailableScopes {
993 pub fn as_str(&self) -> &str {
995 match self {
996 Self::Category => "category",
997 Self::Nfl => "nfl",
998 Self::Cfb => "cfb",
999 Self::Nba => "nba",
1000 Self::Wnba => "wnba",
1001 Self::EuroleagueBasketball => "euroleague-basketball",
1002 Self::NcaaBasketball => "ncaa-basketball",
1003 Self::Cwbb => "cwbb",
1004 Self::Nhl => "nhl",
1005 Self::Mls => "mls",
1006 Self::Valorant => "valorant",
1007 Self::LeagueOfLegends => "league-of-legends",
1008 Self::CounterStrike2 => "counter-strike-2",
1009 Self::Dota2 => "dota-2",
1010 Self::Registry => "registry",
1011 Self::Union => "union",
1012 Self::Wave => "wave",
1013 Self::Other(value) => value,
1014 }
1015 }
1016}
1017
1018impl From<&str> for BoardUpcomingUnavailableScopes {
1019 fn from(value: &str) -> Self {
1020 match value {
1021 "category" => Self::Category,
1022 "nfl" => Self::Nfl,
1023 "cfb" => Self::Cfb,
1024 "nba" => Self::Nba,
1025 "wnba" => Self::Wnba,
1026 "euroleague-basketball" => Self::EuroleagueBasketball,
1027 "ncaa-basketball" => Self::NcaaBasketball,
1028 "cwbb" => Self::Cwbb,
1029 "nhl" => Self::Nhl,
1030 "mls" => Self::Mls,
1031 "valorant" => Self::Valorant,
1032 "league-of-legends" => Self::LeagueOfLegends,
1033 "counter-strike-2" => Self::CounterStrike2,
1034 "dota-2" => Self::Dota2,
1035 "registry" => Self::Registry,
1036 "union" => Self::Union,
1037 "wave" => Self::Wave,
1038 other => Self::Other(other.to_owned()),
1039 }
1040 }
1041}
1042
1043impl std::fmt::Display for BoardUpcomingUnavailableScopes {
1044 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1045 f.write_str(self.as_str())
1046 }
1047}
1048
1049impl AsRef<str> for BoardUpcomingUnavailableScopes {
1050 fn as_ref(&self) -> &str {
1051 self.as_str()
1052 }
1053}
1054
1055#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1057#[non_exhaustive]
1058pub struct Candle {
1059 pub t: i64,
1061 pub o: f64,
1063 pub h: f64,
1065 pub l: f64,
1067 pub c: f64,
1069}
1070
1071#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1073#[non_exhaustive]
1074pub enum Category {
1075 #[serde(rename = "Basketball")]
1077 Basketball,
1078 #[serde(rename = "Football")]
1080 Football,
1081 #[serde(rename = "Baseball")]
1083 Baseball,
1084 #[serde(rename = "Hockey")]
1086 Hockey,
1087 #[serde(rename = "MMA")]
1089 Mma,
1090 #[serde(rename = "Boxing")]
1092 Boxing,
1093 #[serde(rename = "Soccer")]
1095 Soccer,
1096 #[serde(rename = "Cricket")]
1098 Cricket,
1099 #[serde(rename = "Golf")]
1101 Golf,
1102 #[serde(rename = "Tennis")]
1104 Tennis,
1105 #[serde(rename = "Esports")]
1107 Esports,
1108 #[serde(rename = "Racing")]
1110 Racing,
1111 #[serde(rename = "Table Tennis")]
1113 TableTennis,
1114 #[serde(rename = "Pickleball")]
1116 Pickleball,
1117 #[serde(untagged)]
1119 Other(String),
1120}
1121
1122impl Category {
1123 pub fn as_str(&self) -> &str {
1125 match self {
1126 Self::Basketball => "Basketball",
1127 Self::Football => "Football",
1128 Self::Baseball => "Baseball",
1129 Self::Hockey => "Hockey",
1130 Self::Mma => "MMA",
1131 Self::Boxing => "Boxing",
1132 Self::Soccer => "Soccer",
1133 Self::Cricket => "Cricket",
1134 Self::Golf => "Golf",
1135 Self::Tennis => "Tennis",
1136 Self::Esports => "Esports",
1137 Self::Racing => "Racing",
1138 Self::TableTennis => "Table Tennis",
1139 Self::Pickleball => "Pickleball",
1140 Self::Other(value) => value,
1141 }
1142 }
1143}
1144
1145impl From<&str> for Category {
1146 fn from(value: &str) -> Self {
1147 match value {
1148 "Basketball" => Self::Basketball,
1149 "Football" => Self::Football,
1150 "Baseball" => Self::Baseball,
1151 "Hockey" => Self::Hockey,
1152 "MMA" => Self::Mma,
1153 "Boxing" => Self::Boxing,
1154 "Soccer" => Self::Soccer,
1155 "Cricket" => Self::Cricket,
1156 "Golf" => Self::Golf,
1157 "Tennis" => Self::Tennis,
1158 "Esports" => Self::Esports,
1159 "Racing" => Self::Racing,
1160 "Table Tennis" => Self::TableTennis,
1161 "Pickleball" => Self::Pickleball,
1162 other => Self::Other(other.to_owned()),
1163 }
1164 }
1165}
1166
1167impl std::fmt::Display for Category {
1168 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1169 f.write_str(self.as_str())
1170 }
1171}
1172
1173impl AsRef<str> for Category {
1174 fn as_ref(&self) -> &str {
1175 self.as_str()
1176 }
1177}
1178
1179#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1180#[non_exhaustive]
1181pub struct CategoryLeader {
1182 pub address: String,
1183 pub as_of: String,
1184 pub category: String,
1185 #[serde(default)]
1186 pub edge_lower_bound: Option<f64>,
1187 #[serde(default)]
1188 pub grade: Option<Grade>,
1189 pub id: String,
1190 pub independent_events: i64,
1191 #[serde(default)]
1192 pub n_resolved: Option<i64>,
1193 pub platform: String,
1194 #[serde(default)]
1195 pub pnl: Option<f64>,
1196 pub rank: i64,
1197 pub unresolved_events: i64,
1198 #[serde(default)]
1199 pub username: Option<String>,
1200 #[serde(default)]
1201 pub win_rate: Option<f64>,
1202}
1203
1204#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1206#[non_exhaustive]
1207pub struct CategorySkillModelReadiness {
1208 pub status: Status,
1209 pub model_version: String,
1210 pub taxonomy_version: String,
1211 pub observation_started_at: String,
1212 pub as_of: String,
1213 #[serde(default)]
1214 pub source_last_success_at: Option<String>,
1215}
1216
1217#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1219#[non_exhaustive]
1220pub enum CategorySkillSource {
1221 #[serde(rename = "live")]
1223 Live,
1224 #[serde(rename = "partial")]
1226 Partial,
1227 #[serde(rename = "degraded")]
1229 Degraded,
1230 #[serde(rename = "unavailable")]
1232 Unavailable,
1233 #[serde(untagged)]
1235 Other(String),
1236}
1237
1238impl CategorySkillSource {
1239 pub fn as_str(&self) -> &str {
1241 match self {
1242 Self::Live => "live",
1243 Self::Partial => "partial",
1244 Self::Degraded => "degraded",
1245 Self::Unavailable => "unavailable",
1246 Self::Other(value) => value,
1247 }
1248 }
1249}
1250
1251impl From<&str> for CategorySkillSource {
1252 fn from(value: &str) -> Self {
1253 match value {
1254 "live" => Self::Live,
1255 "partial" => Self::Partial,
1256 "degraded" => Self::Degraded,
1257 "unavailable" => Self::Unavailable,
1258 other => Self::Other(other.to_owned()),
1259 }
1260 }
1261}
1262
1263impl std::fmt::Display for CategorySkillSource {
1264 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1265 f.write_str(self.as_str())
1266 }
1267}
1268
1269impl AsRef<str> for CategorySkillSource {
1270 fn as_ref(&self) -> &str {
1271 self.as_str()
1272 }
1273}
1274
1275#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1277#[non_exhaustive]
1278pub struct CategorySkillV2 {
1279 pub status: Status,
1280 pub model_version: String,
1281 #[serde(default)]
1282 pub taxonomy_version: Option<String>,
1283 pub platform: String,
1284 pub scope: String,
1285 pub source_coverage: SourceCoverage,
1286 pub canonical_category: String,
1287 pub as_of: String,
1288 #[serde(default)]
1289 pub source_last_success_at: Option<String>,
1290 pub observation_started_at: String,
1291 #[serde(default)]
1292 pub latest_observation_at: Option<String>,
1293 pub independent_event_count: i64,
1294 pub resolved_condition_count: i64,
1295 pub unresolved_observation_count: i64,
1296 #[serde(default)]
1297 pub edge_mean: Option<f64>,
1298 #[serde(default)]
1299 pub edge_sd: Option<f64>,
1300 #[serde(default)]
1301 pub edge_se: Option<f64>,
1302 #[serde(default)]
1303 pub edge_lower_95: Option<f64>,
1304 #[serde(default)]
1305 pub brier_event_avg: Option<f64>,
1306}
1307
1308#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1310#[non_exhaustive]
1311pub enum CategoryWinRateStatus {
1312 #[serde(rename = "measured")]
1314 Measured,
1315 #[serde(rename = "not_enough_data")]
1317 NotEnoughData,
1318 #[serde(rename = "unavailable")]
1320 Unavailable,
1321 #[serde(rename = "untracked")]
1323 Untracked,
1324 #[serde(untagged)]
1326 Other(String),
1327}
1328
1329impl CategoryWinRateStatus {
1330 pub fn as_str(&self) -> &str {
1332 match self {
1333 Self::Measured => "measured",
1334 Self::NotEnoughData => "not_enough_data",
1335 Self::Unavailable => "unavailable",
1336 Self::Untracked => "untracked",
1337 Self::Other(value) => value,
1338 }
1339 }
1340}
1341
1342impl From<&str> for CategoryWinRateStatus {
1343 fn from(value: &str) -> Self {
1344 match value {
1345 "measured" => Self::Measured,
1346 "not_enough_data" => Self::NotEnoughData,
1347 "unavailable" => Self::Unavailable,
1348 "untracked" => Self::Untracked,
1349 other => Self::Other(other.to_owned()),
1350 }
1351 }
1352}
1353
1354impl std::fmt::Display for CategoryWinRateStatus {
1355 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1356 f.write_str(self.as_str())
1357 }
1358}
1359
1360impl AsRef<str> for CategoryWinRateStatus {
1361 fn as_ref(&self) -> &str {
1362 self.as_str()
1363 }
1364}
1365
1366#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1368#[non_exhaustive]
1369pub enum Changed {
1370 #[serde(rename = "scores")]
1372 Scores,
1373 #[serde(rename = "status")]
1375 Status,
1376 #[serde(rename = "period")]
1378 Period,
1379 #[serde(rename = "live")]
1381 Live,
1382 #[serde(rename = "ended")]
1384 Ended,
1385 #[serde(untagged)]
1387 Other(String),
1388}
1389
1390impl Changed {
1391 pub fn as_str(&self) -> &str {
1393 match self {
1394 Self::Scores => "scores",
1395 Self::Status => "status",
1396 Self::Period => "period",
1397 Self::Live => "live",
1398 Self::Ended => "ended",
1399 Self::Other(value) => value,
1400 }
1401 }
1402}
1403
1404impl From<&str> for Changed {
1405 fn from(value: &str) -> Self {
1406 match value {
1407 "scores" => Self::Scores,
1408 "status" => Self::Status,
1409 "period" => Self::Period,
1410 "live" => Self::Live,
1411 "ended" => Self::Ended,
1412 other => Self::Other(other.to_owned()),
1413 }
1414 }
1415}
1416
1417impl std::fmt::Display for Changed {
1418 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1419 f.write_str(self.as_str())
1420 }
1421}
1422
1423impl AsRef<str> for Changed {
1424 fn as_ref(&self) -> &str {
1425 self.as_str()
1426 }
1427}
1428
1429#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1431#[non_exhaustive]
1432pub enum ClvApplicability {
1433 #[serde(rename = "applicable")]
1435 Applicable,
1436 #[serde(rename = "not_applicable")]
1438 NotApplicable,
1439 #[serde(untagged)]
1441 Other(String),
1442}
1443
1444impl ClvApplicability {
1445 pub fn as_str(&self) -> &str {
1447 match self {
1448 Self::Applicable => "applicable",
1449 Self::NotApplicable => "not_applicable",
1450 Self::Other(value) => value,
1451 }
1452 }
1453}
1454
1455impl From<&str> for ClvApplicability {
1456 fn from(value: &str) -> Self {
1457 match value {
1458 "applicable" => Self::Applicable,
1459 "not_applicable" => Self::NotApplicable,
1460 other => Self::Other(other.to_owned()),
1461 }
1462 }
1463}
1464
1465impl std::fmt::Display for ClvApplicability {
1466 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1467 f.write_str(self.as_str())
1468 }
1469}
1470
1471impl AsRef<str> for ClvApplicability {
1472 fn as_ref(&self) -> &str {
1473 self.as_str()
1474 }
1475}
1476
1477#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1479#[non_exhaustive]
1480pub enum ClvState {
1481 #[serde(rename = "measured")]
1483 Measured,
1484 #[serde(rename = "pending")]
1486 Pending,
1487 #[serde(rename = "unavailable")]
1489 Unavailable,
1490 #[serde(rename = "not_applicable")]
1492 NotApplicable,
1493 #[serde(rename = "none")]
1495 None,
1496 #[serde(untagged)]
1498 Other(String),
1499}
1500
1501impl ClvState {
1502 pub fn as_str(&self) -> &str {
1504 match self {
1505 Self::Measured => "measured",
1506 Self::Pending => "pending",
1507 Self::Unavailable => "unavailable",
1508 Self::NotApplicable => "not_applicable",
1509 Self::None => "none",
1510 Self::Other(value) => value,
1511 }
1512 }
1513}
1514
1515impl From<&str> for ClvState {
1516 fn from(value: &str) -> Self {
1517 match value {
1518 "measured" => Self::Measured,
1519 "pending" => Self::Pending,
1520 "unavailable" => Self::Unavailable,
1521 "not_applicable" => Self::NotApplicable,
1522 "none" => Self::None,
1523 other => Self::Other(other.to_owned()),
1524 }
1525 }
1526}
1527
1528impl std::fmt::Display for ClvState {
1529 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1530 f.write_str(self.as_str())
1531 }
1532}
1533
1534impl AsRef<str> for ClvState {
1535 fn as_ref(&self) -> &str {
1536 self.as_str()
1537 }
1538}
1539
1540#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1542#[non_exhaustive]
1543pub enum Cohort {
1544 #[serde(rename = "wider_holder")]
1546 WiderHolder,
1547 #[serde(rename = "in_play")]
1549 InPlay,
1550 #[serde(rename = "emerging_pile")]
1552 EmergingPile,
1553 #[serde(untagged)]
1555 Other(String),
1556}
1557
1558impl Cohort {
1559 pub fn as_str(&self) -> &str {
1561 match self {
1562 Self::WiderHolder => "wider_holder",
1563 Self::InPlay => "in_play",
1564 Self::EmergingPile => "emerging_pile",
1565 Self::Other(value) => value,
1566 }
1567 }
1568}
1569
1570impl From<&str> for Cohort {
1571 fn from(value: &str) -> Self {
1572 match value {
1573 "wider_holder" => Self::WiderHolder,
1574 "in_play" => Self::InPlay,
1575 "emerging_pile" => Self::EmergingPile,
1576 other => Self::Other(other.to_owned()),
1577 }
1578 }
1579}
1580
1581impl std::fmt::Display for Cohort {
1582 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1583 f.write_str(self.as_str())
1584 }
1585}
1586
1587impl AsRef<str> for Cohort {
1588 fn as_ref(&self) -> &str {
1589 self.as_str()
1590 }
1591}
1592
1593#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1594#[non_exhaustive]
1595pub struct Combo {
1596 pub condition_id: String,
1598 #[serde(default)]
1599 pub leg_count: Option<i64>,
1600 #[serde(default)]
1601 pub prepared_at: Option<String>,
1602 pub legs_known: bool,
1604 pub legs: Vec<ComboLeg>,
1605 #[serde(default)]
1606 pub window: Option<ComboWindowStats>,
1607 #[serde(default)]
1608 pub totals: Option<ComboTotals>,
1609 pub status: ComboStatus,
1611 #[serde(default)]
1613 pub status_reason: Option<String>,
1614}
1615
1616#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1617#[non_exhaustive]
1618pub struct ComboCoverage {
1619 pub state: ComboCoverageState,
1620 pub ingest_enabled: bool,
1621 pub cursors: Vec<ComboCoverageCursor>,
1622 #[serde(default)]
1623 pub max_lag_blocks: Option<i64>,
1624 #[serde(default)]
1625 pub oldest_cursor_update: Option<String>,
1626 #[serde(default)]
1627 pub lifecycle_lag_blocks: Option<i64>,
1628 pub lifecycle_backfilling: bool,
1629 pub computed_at: String,
1631}
1632
1633#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1634#[non_exhaustive]
1635pub struct ComboCoverageCursor {
1636 pub contract: String,
1638 pub last_block: i64,
1639 pub seed_block: i64,
1640 pub seed_origin: String,
1641 #[serde(default)]
1642 pub chain_finalized_block: Option<i64>,
1643 #[serde(default)]
1644 pub lag_blocks: Option<i64>,
1645 pub updated_at: String,
1646}
1647
1648#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1650#[non_exhaustive]
1651pub enum ComboCoverageState {
1652 #[serde(rename = "paused")]
1654 Paused,
1655 #[serde(rename = "uninitialized")]
1657 Uninitialized,
1658 #[serde(rename = "stale")]
1660 Stale,
1661 #[serde(rename = "backfilling")]
1663 Backfilling,
1664 #[serde(rename = "live")]
1666 Live,
1667 #[serde(untagged)]
1669 Other(String),
1670}
1671
1672impl ComboCoverageState {
1673 pub fn as_str(&self) -> &str {
1675 match self {
1676 Self::Paused => "paused",
1677 Self::Uninitialized => "uninitialized",
1678 Self::Stale => "stale",
1679 Self::Backfilling => "backfilling",
1680 Self::Live => "live",
1681 Self::Other(value) => value,
1682 }
1683 }
1684}
1685
1686impl From<&str> for ComboCoverageState {
1687 fn from(value: &str) -> Self {
1688 match value {
1689 "paused" => Self::Paused,
1690 "uninitialized" => Self::Uninitialized,
1691 "stale" => Self::Stale,
1692 "backfilling" => Self::Backfilling,
1693 "live" => Self::Live,
1694 other => Self::Other(other.to_owned()),
1695 }
1696 }
1697}
1698
1699impl std::fmt::Display for ComboCoverageState {
1700 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1701 f.write_str(self.as_str())
1702 }
1703}
1704
1705impl AsRef<str> for ComboCoverageState {
1706 fn as_ref(&self) -> &str {
1707 self.as_str()
1708 }
1709}
1710
1711#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1713#[non_exhaustive]
1714pub struct ComboDetail {
1715 pub access: String,
1716 pub combo: Combo,
1717 pub fills: Vec<ComboFill>,
1718 #[serde(default)]
1719 pub lifecycle: Option<ComboLifecycleStats>,
1720 pub coverage: ComboCoverage,
1721}
1722
1723#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1724#[non_exhaustive]
1725pub struct ComboFill {
1726 pub id: String,
1728 pub block_number: i64,
1729 pub log_index: i64,
1730 pub block_timestamp: String,
1731 pub tx_hash: String,
1732 #[serde(default)]
1734 pub trader: Option<String>,
1735 #[serde(default)]
1736 pub trader_name: Option<String>,
1737 #[serde(default)]
1738 pub trader_grade: Option<Grade>,
1739 #[serde(default)]
1741 pub last_traded_at: Option<String>,
1742 pub action: Action,
1743 pub condition_id: String,
1745 pub outcome_index: i64,
1747 pub shares: String,
1749 pub collateral_usdc: String,
1751 #[serde(default)]
1753 pub price: Option<String>,
1754 #[serde(default)]
1756 pub price_yes: Option<String>,
1757 pub fee_usdc: String,
1759 #[serde(default)]
1760 pub leg_count: Option<i64>,
1761 pub status: ComboStatus,
1763 #[serde(default)]
1764 pub status_reason: Option<String>,
1765 pub won_legs: i64,
1766 #[serde(default)]
1768 pub payout_multiplier: Option<String>,
1769 pub legs: Vec<ComboLeg>,
1770}
1771
1772#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1773#[non_exhaustive]
1774pub struct ComboFillsResponse {
1775 pub object: String,
1776 pub data: Vec<ComboFill>,
1777 pub sort: ComboFillsResponseSort,
1778 pub window: Window,
1779 pub limit: i64,
1780 pub coverage: ComboCoverage,
1781 pub has_more: bool,
1783 #[serde(default, skip_serializing_if = "Option::is_none")]
1785 pub next_cursor: Option<String>,
1786 #[serde(default, skip_serializing_if = "Option::is_none")]
1788 pub next_offset: Option<i64>,
1789 pub meta: ResponseMeta,
1790}
1791
1792#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1794#[non_exhaustive]
1795pub enum ComboFillsResponseSort {
1796 #[serde(rename = "recent")]
1798 Recent,
1799 #[serde(rename = "largest")]
1801 Largest,
1802 #[serde(rename = "payout")]
1804 Payout,
1805 #[serde(untagged)]
1807 Other(String),
1808}
1809
1810impl ComboFillsResponseSort {
1811 pub fn as_str(&self) -> &str {
1813 match self {
1814 Self::Recent => "recent",
1815 Self::Largest => "largest",
1816 Self::Payout => "payout",
1817 Self::Other(value) => value,
1818 }
1819 }
1820}
1821
1822impl From<&str> for ComboFillsResponseSort {
1823 fn from(value: &str) -> Self {
1824 match value {
1825 "recent" => Self::Recent,
1826 "largest" => Self::Largest,
1827 "payout" => Self::Payout,
1828 other => Self::Other(other.to_owned()),
1829 }
1830 }
1831}
1832
1833impl std::fmt::Display for ComboFillsResponseSort {
1834 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1835 f.write_str(self.as_str())
1836 }
1837}
1838
1839impl AsRef<str> for ComboFillsResponseSort {
1840 fn as_ref(&self) -> &str {
1841 self.as_str()
1842 }
1843}
1844
1845#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1846#[non_exhaustive]
1847pub struct ComboLeg {
1848 pub leg_index: i64,
1849 pub outcome_index: i64,
1850 pub module_id: i64,
1851 pub state: ComboLegState,
1852 #[serde(default)]
1853 pub market: Option<ComboLegMarket>,
1854}
1855
1856#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1857#[non_exhaustive]
1858pub struct ComboLegMarket {
1859 pub source: ComboLegMarketSource,
1861 pub condition_id: String,
1863 #[serde(default)]
1864 pub title: Option<String>,
1865 #[serde(default)]
1866 pub slug: Option<String>,
1867 #[serde(default)]
1868 pub event_slug: Option<String>,
1869 #[serde(default, skip_serializing_if = "Option::is_none")]
1871 pub polymarket_url: Option<String>,
1872 #[serde(default)]
1873 pub outcome_label: Option<String>,
1874 #[serde(default)]
1875 pub image: Option<String>,
1876 #[serde(default)]
1877 pub category: Option<String>,
1878 #[serde(default)]
1880 pub winning_outcome: Option<i64>,
1881 #[serde(default)]
1882 pub resolved_at: Option<String>,
1883 #[serde(default)]
1885 pub market_closed: Option<bool>,
1886 #[serde(default)]
1888 pub pick_price_daily: Option<f64>,
1889 #[serde(default)]
1891 pub pick_price_as_of: Option<String>,
1892 #[serde(default)]
1894 pub pick_price_age_days: Option<i64>,
1895 #[serde(default)]
1897 pub provider_leg_status: Option<String>,
1898}
1899
1900#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1902#[non_exhaustive]
1903pub enum ComboLegMarketSource {
1904 #[serde(rename = "markets")]
1906 Markets,
1907 #[serde(rename = "provider")]
1909 Provider,
1910 #[serde(untagged)]
1912 Other(String),
1913}
1914
1915impl ComboLegMarketSource {
1916 pub fn as_str(&self) -> &str {
1918 match self {
1919 Self::Markets => "markets",
1920 Self::Provider => "provider",
1921 Self::Other(value) => value,
1922 }
1923 }
1924}
1925
1926impl From<&str> for ComboLegMarketSource {
1927 fn from(value: &str) -> Self {
1928 match value {
1929 "markets" => Self::Markets,
1930 "provider" => Self::Provider,
1931 other => Self::Other(other.to_owned()),
1932 }
1933 }
1934}
1935
1936impl std::fmt::Display for ComboLegMarketSource {
1937 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1938 f.write_str(self.as_str())
1939 }
1940}
1941
1942impl AsRef<str> for ComboLegMarketSource {
1943 fn as_ref(&self) -> &str {
1944 self.as_str()
1945 }
1946}
1947
1948#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
1950#[non_exhaustive]
1951pub enum ComboLegState {
1952 #[serde(rename = "pending")]
1954 Pending,
1955 #[serde(rename = "won")]
1957 Won,
1958 #[serde(rename = "lost")]
1960 Lost,
1961 #[serde(rename = "void")]
1963 Void,
1964 #[serde(rename = "unknown")]
1966 Unknown,
1967 #[serde(untagged)]
1969 Other(String),
1970}
1971
1972impl ComboLegState {
1973 pub fn as_str(&self) -> &str {
1975 match self {
1976 Self::Pending => "pending",
1977 Self::Won => "won",
1978 Self::Lost => "lost",
1979 Self::Void => "void",
1980 Self::Unknown => "unknown",
1981 Self::Other(value) => value,
1982 }
1983 }
1984}
1985
1986impl From<&str> for ComboLegState {
1987 fn from(value: &str) -> Self {
1988 match value {
1989 "pending" => Self::Pending,
1990 "won" => Self::Won,
1991 "lost" => Self::Lost,
1992 "void" => Self::Void,
1993 "unknown" => Self::Unknown,
1994 other => Self::Other(other.to_owned()),
1995 }
1996 }
1997}
1998
1999impl std::fmt::Display for ComboLegState {
2000 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2001 f.write_str(self.as_str())
2002 }
2003}
2004
2005impl AsRef<str> for ComboLegState {
2006 fn as_ref(&self) -> &str {
2007 self.as_str()
2008 }
2009}
2010
2011#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2012#[non_exhaustive]
2013pub struct ComboLifecycleStats {
2014 pub splits: i64,
2015 pub merges: i64,
2016 pub redeems: i64,
2017 pub compresses: i64,
2018 pub split_usdc: String,
2020 pub merge_usdc: String,
2022 pub redeemed_shares: String,
2024 pub redeemed_usdc: String,
2026 pub compressed_usdc: String,
2028 pub last_event_at: String,
2029}
2030
2031#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2032#[non_exhaustive]
2033pub struct ComboLiveCount {
2034 pub count: i64,
2036 pub computed_at: String,
2038}
2039
2040#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2041#[non_exhaustive]
2042pub struct ComboResponse {
2043 pub object: String,
2044 pub data: ComboDetail,
2045 pub meta: ResponseMeta,
2046}
2047
2048#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
2050#[non_exhaustive]
2051pub enum ComboStatus {
2052 #[serde(rename = "pending")]
2054 Pending,
2055 #[serde(rename = "won")]
2057 Won,
2058 #[serde(rename = "lost")]
2060 Lost,
2061 #[serde(rename = "unknown")]
2063 Unknown,
2064 #[serde(untagged)]
2066 Other(String),
2067}
2068
2069impl ComboStatus {
2070 pub fn as_str(&self) -> &str {
2072 match self {
2073 Self::Pending => "pending",
2074 Self::Won => "won",
2075 Self::Lost => "lost",
2076 Self::Unknown => "unknown",
2077 Self::Other(value) => value,
2078 }
2079 }
2080}
2081
2082impl From<&str> for ComboStatus {
2083 fn from(value: &str) -> Self {
2084 match value {
2085 "pending" => Self::Pending,
2086 "won" => Self::Won,
2087 "lost" => Self::Lost,
2088 "unknown" => Self::Unknown,
2089 other => Self::Other(other.to_owned()),
2090 }
2091 }
2092}
2093
2094impl std::fmt::Display for ComboStatus {
2095 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2096 f.write_str(self.as_str())
2097 }
2098}
2099
2100impl AsRef<str> for ComboStatus {
2101 fn as_ref(&self) -> &str {
2102 self.as_str()
2103 }
2104}
2105
2106#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2107#[non_exhaustive]
2108pub struct ComboTotals {
2109 pub fills: i64,
2110 pub volume_usdc: String,
2112 pub largest_fill_usdc: String,
2114 pub first_fill_at: String,
2115 pub last_fill_at: String,
2116 #[serde(default)]
2118 pub last_fill_price_yes: Option<String>,
2119 pub last_fill_outcome_index: i64,
2120 pub last_fill_action: Action,
2121}
2122
2123#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2124#[non_exhaustive]
2125pub struct ComboWindowStats {
2126 pub fills: i64,
2127 pub volume_usdc: String,
2129 pub distinct_traders: i64,
2130 pub largest_fill_usdc: String,
2132}
2133
2134#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2136#[non_exhaustive]
2137pub struct CombosSummary {
2138 #[serde(default)]
2139 pub live: Option<ComboLiveCount>,
2140}
2141
2142#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2143#[non_exhaustive]
2144pub struct CombosSummaryResponse {
2145 pub object: String,
2146 pub data: CombosSummary,
2147 pub meta: ResponseMeta,
2148}
2149
2150#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
2152#[non_exhaustive]
2153pub enum Competitors {
2154 #[serde(rename = "provider_ids")]
2156 ProviderIds,
2157 #[serde(rename = "labels")]
2159 Labels,
2160 #[serde(rename = "unavailable")]
2162 Unavailable,
2163 #[serde(untagged)]
2165 Other(String),
2166}
2167
2168impl Competitors {
2169 pub fn as_str(&self) -> &str {
2171 match self {
2172 Self::ProviderIds => "provider_ids",
2173 Self::Labels => "labels",
2174 Self::Unavailable => "unavailable",
2175 Self::Other(value) => value,
2176 }
2177 }
2178}
2179
2180impl From<&str> for Competitors {
2181 fn from(value: &str) -> Self {
2182 match value {
2183 "provider_ids" => Self::ProviderIds,
2184 "labels" => Self::Labels,
2185 "unavailable" => Self::Unavailable,
2186 other => Self::Other(other.to_owned()),
2187 }
2188 }
2189}
2190
2191impl std::fmt::Display for Competitors {
2192 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2193 f.write_str(self.as_str())
2194 }
2195}
2196
2197impl AsRef<str> for Competitors {
2198 fn as_ref(&self) -> &str {
2199 self.as_str()
2200 }
2201}
2202
2203#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
2205#[non_exhaustive]
2206pub enum Consistency {
2207 #[serde(rename = "live")]
2209 Live,
2210 #[serde(rename = "snapshot")]
2212 Snapshot,
2213 #[serde(untagged)]
2215 Other(String),
2216}
2217
2218impl Consistency {
2219 pub fn as_str(&self) -> &str {
2221 match self {
2222 Self::Live => "live",
2223 Self::Snapshot => "snapshot",
2224 Self::Other(value) => value,
2225 }
2226 }
2227}
2228
2229impl From<&str> for Consistency {
2230 fn from(value: &str) -> Self {
2231 match value {
2232 "live" => Self::Live,
2233 "snapshot" => Self::Snapshot,
2234 other => Self::Other(other.to_owned()),
2235 }
2236 }
2237}
2238
2239impl std::fmt::Display for Consistency {
2240 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2241 f.write_str(self.as_str())
2242 }
2243}
2244
2245impl AsRef<str> for Consistency {
2246 fn as_ref(&self) -> &str {
2247 self.as_str()
2248 }
2249}
2250
2251#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
2253#[non_exhaustive]
2254pub enum ContentKind {
2255 #[serde(rename = "learn")]
2257 Learn,
2258 #[serde(rename = "glossary")]
2260 Glossary,
2261 #[serde(rename = "comparison")]
2263 Comparison,
2264 #[serde(rename = "research")]
2266 Research,
2267 #[serde(rename = "strategy")]
2269 Strategy,
2270 #[serde(untagged)]
2272 Other(String),
2273}
2274
2275impl ContentKind {
2276 pub fn as_str(&self) -> &str {
2278 match self {
2279 Self::Learn => "learn",
2280 Self::Glossary => "glossary",
2281 Self::Comparison => "comparison",
2282 Self::Research => "research",
2283 Self::Strategy => "strategy",
2284 Self::Other(value) => value,
2285 }
2286 }
2287}
2288
2289impl From<&str> for ContentKind {
2290 fn from(value: &str) -> Self {
2291 match value {
2292 "learn" => Self::Learn,
2293 "glossary" => Self::Glossary,
2294 "comparison" => Self::Comparison,
2295 "research" => Self::Research,
2296 "strategy" => Self::Strategy,
2297 other => Self::Other(other.to_owned()),
2298 }
2299 }
2300}
2301
2302impl std::fmt::Display for ContentKind {
2303 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2304 f.write_str(self.as_str())
2305 }
2306}
2307
2308impl AsRef<str> for ContentKind {
2309 fn as_ref(&self) -> &str {
2310 self.as_str()
2311 }
2312}
2313
2314#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2315#[non_exhaustive]
2316pub struct ContentSearchResult {
2317 pub content_id: String,
2319 pub kind: ContentKind,
2321 pub slug: String,
2323 pub title: String,
2325 pub excerpt: String,
2327 pub url: String,
2329}
2330
2331#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
2333#[non_exhaustive]
2334pub enum ContentType {
2335 #[serde(rename = "application/json")]
2337 ApplicationJson,
2338 #[serde(rename = "application/x-ndjson")]
2340 ApplicationXNdjson,
2341 #[serde(rename = "text/csv")]
2343 TextCsv,
2344 #[serde(untagged)]
2346 Other(String),
2347}
2348
2349impl ContentType {
2350 pub fn as_str(&self) -> &str {
2352 match self {
2353 Self::ApplicationJson => "application/json",
2354 Self::ApplicationXNdjson => "application/x-ndjson",
2355 Self::TextCsv => "text/csv",
2356 Self::Other(value) => value,
2357 }
2358 }
2359}
2360
2361impl From<&str> for ContentType {
2362 fn from(value: &str) -> Self {
2363 match value {
2364 "application/json" => Self::ApplicationJson,
2365 "application/x-ndjson" => Self::ApplicationXNdjson,
2366 "text/csv" => Self::TextCsv,
2367 other => Self::Other(other.to_owned()),
2368 }
2369 }
2370}
2371
2372impl std::fmt::Display for ContentType {
2373 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2374 f.write_str(self.as_str())
2375 }
2376}
2377
2378impl AsRef<str> for ContentType {
2379 fn as_ref(&self) -> &str {
2380 self.as_str()
2381 }
2382}
2383
2384#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2385#[non_exhaustive]
2386pub struct CounterpartyAnalysis {
2387 pub status: CounterpartyAnalysisStatus,
2388 #[serde(default, skip_serializing_if = "Option::is_none")]
2389 pub unavailable_reason: Option<String>,
2390 #[serde(default, skip_serializing_if = "Option::is_none")]
2392 pub snapshot_id: Option<String>,
2393 #[serde(default, skip_serializing_if = "Option::is_none")]
2395 pub analysis_id: Option<String>,
2396 pub execution_count: i64,
2397 pub available_execution_count: i64,
2398 pub unavailable_execution_count: i64,
2399 pub executions: Vec<CounterpartyExecution>,
2400 #[serde(default, skip_serializing_if = "Option::is_none")]
2402 pub executions_next_cursor: Option<String>,
2403}
2404
2405#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
2407#[non_exhaustive]
2408pub enum CounterpartyAnalysisStatus {
2409 #[serde(rename = "available")]
2411 Available,
2412 #[serde(rename = "partial")]
2414 Partial,
2415 #[serde(rename = "unavailable")]
2417 Unavailable,
2418 #[serde(untagged)]
2420 Other(String),
2421}
2422
2423impl CounterpartyAnalysisStatus {
2424 pub fn as_str(&self) -> &str {
2426 match self {
2427 Self::Available => "available",
2428 Self::Partial => "partial",
2429 Self::Unavailable => "unavailable",
2430 Self::Other(value) => value,
2431 }
2432 }
2433}
2434
2435impl From<&str> for CounterpartyAnalysisStatus {
2436 fn from(value: &str) -> Self {
2437 match value {
2438 "available" => Self::Available,
2439 "partial" => Self::Partial,
2440 "unavailable" => Self::Unavailable,
2441 other => Self::Other(other.to_owned()),
2442 }
2443 }
2444}
2445
2446impl std::fmt::Display for CounterpartyAnalysisStatus {
2447 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2448 f.write_str(self.as_str())
2449 }
2450}
2451
2452impl AsRef<str> for CounterpartyAnalysisStatus {
2453 fn as_ref(&self) -> &str {
2454 self.as_str()
2455 }
2456}
2457
2458#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2459#[non_exhaustive]
2460pub struct CounterpartyExecution {
2461 pub execution_id: String,
2462 pub exchange_family: ExchangeFamily,
2464 pub transaction_hash: String,
2465 pub orders_matched_log_index: i64,
2466 pub taker: CounterpartyParticipant,
2467 pub makers: Vec<CounterpartyParticipant>,
2468 #[serde(default, skip_serializing_if = "Option::is_none")]
2470 pub makers_next_cursor: Option<String>,
2471}
2472
2473#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2474#[non_exhaustive]
2475pub struct CounterpartyMakerPage {
2476 pub analysis_id: String,
2477 pub snapshot_id: String,
2478 pub execution_id: String,
2479 pub items: Vec<CounterpartyParticipant>,
2480 #[serde(default, skip_serializing_if = "Option::is_none")]
2482 pub next_cursor: Option<String>,
2483}
2484
2485#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2486#[non_exhaustive]
2487pub struct CounterpartyMatchBreakdown {
2488 pub match_type: MatchType,
2489 pub maker_fill_count: i64,
2490 pub filled_shares: String,
2492}
2493
2494#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2495#[non_exhaustive]
2496pub struct CounterpartyParticipant {
2497 pub counterparty_key: String,
2498 pub execution_wallet: String,
2500 pub identity_status: IdentityStatus,
2501 #[serde(default, skip_serializing_if = "Option::is_none")]
2502 pub resolved_user_id: Option<String>,
2503 #[serde(default, skip_serializing_if = "Option::is_none")]
2504 pub wallet_family: Option<String>,
2505 #[serde(default, skip_serializing_if = "Option::is_none")]
2506 pub resolution_block: Option<i64>,
2507 #[serde(default, skip_serializing_if = "Option::is_none")]
2508 pub resolution_source: Option<String>,
2509 #[serde(default, skip_serializing_if = "Option::is_none")]
2510 pub display_name: Option<String>,
2511 #[serde(default, skip_serializing_if = "Option::is_none")]
2512 pub grade: Option<String>,
2513 #[serde(default, skip_serializing_if = "Option::is_none")]
2515 pub last_traded_at: Option<String>,
2516 #[serde(default, skip_serializing_if = "Option::is_none")]
2518 pub profile_segment: Option<String>,
2519 pub maker_fill_count: i64,
2520 pub filled_shares: String,
2522 pub filled_usdc: String,
2524 pub share_pct: String,
2526 pub match_breakdown: Vec<CounterpartyMatchBreakdown>,
2527}
2528
2529#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
2531#[non_exhaustive]
2532pub enum Coverage {
2533 #[serde(rename = "full_envelope_and_trades")]
2535 FullEnvelopeAndTrades,
2536 #[serde(rename = "trades_only")]
2538 TradesOnly,
2539 #[serde(untagged)]
2541 Other(String),
2542}
2543
2544impl Coverage {
2545 pub fn as_str(&self) -> &str {
2547 match self {
2548 Self::FullEnvelopeAndTrades => "full_envelope_and_trades",
2549 Self::TradesOnly => "trades_only",
2550 Self::Other(value) => value,
2551 }
2552 }
2553}
2554
2555impl From<&str> for Coverage {
2556 fn from(value: &str) -> Self {
2557 match value {
2558 "full_envelope_and_trades" => Self::FullEnvelopeAndTrades,
2559 "trades_only" => Self::TradesOnly,
2560 other => Self::Other(other.to_owned()),
2561 }
2562 }
2563}
2564
2565impl std::fmt::Display for Coverage {
2566 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2567 f.write_str(self.as_str())
2568 }
2569}
2570
2571impl AsRef<str> for Coverage {
2572 fn as_ref(&self) -> &str {
2573 self.as_str()
2574 }
2575}
2576
2577#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2578pub struct CreateMcpJsonRpcResponseBody {
2579 pub jsonrpc: String,
2581 #[serde(default, skip_serializing_if = "Option::is_none")]
2583 pub id: Option<serde_json::Value>,
2584 pub method: McpMethod,
2586 #[serde(default, skip_serializing_if = "Option::is_none")]
2588 pub params: Option<serde_json::Map<String, serde_json::Value>>,
2589}
2590
2591#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2592#[non_exhaustive]
2593pub struct CreateMcpJsonRpcResponseResponse {
2594 pub jsonrpc: String,
2595 #[serde(default)]
2596 pub id: Option<serde_json::Value>,
2597 #[serde(default, skip_serializing_if = "Option::is_none")]
2598 pub result: Option<serde_json::Map<String, serde_json::Value>>,
2599 #[serde(default, skip_serializing_if = "Option::is_none")]
2600 pub error: Option<CreateMcpJsonRpcResponseResponseError>,
2601}
2602
2603#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2604#[non_exhaustive]
2605pub struct CreateMcpJsonRpcResponseResponseError {
2606 pub code: i64,
2607 pub message: String,
2608 #[serde(default, skip_serializing_if = "Option::is_none")]
2610 pub data: Option<serde_json::Value>,
2611}
2612
2613#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2614pub struct CreateWebhookRequest {
2615 pub name: String,
2616 pub url: String,
2618 pub event_types: Vec<WebhookEventType>,
2619 #[serde(default, skip_serializing_if = "Option::is_none")]
2620 pub trade_filters: Option<LargeTradeSubscriptionFilters>,
2621}
2622
2623#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2624#[non_exhaustive]
2625pub struct CreateWebhookResponse {
2626 pub object: String,
2627 pub data: WebhookEndpoint,
2628 pub meta: ResponseMeta,
2629}
2630
2631#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2632pub struct CreateWebhookVerificationAttemptRequest {
2633 pub verification_token: String,
2635}
2636
2637#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2638#[non_exhaustive]
2639pub struct CreateWebhookVerificationAttemptResponse {
2640 pub object: String,
2641 pub data: WebhookVerificationAttempt,
2642 pub meta: ResponseMeta,
2643}
2644
2645#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
2647#[non_exhaustive]
2648pub enum CredentialKind {
2649 #[serde(rename = "api_key")]
2651 ApiKey,
2652 #[serde(rename = "oauth_grant")]
2654 OauthGrant,
2655 #[serde(rename = "integration_key")]
2657 IntegrationKey,
2658 #[serde(untagged)]
2660 Other(String),
2661}
2662
2663impl CredentialKind {
2664 pub fn as_str(&self) -> &str {
2666 match self {
2667 Self::ApiKey => "api_key",
2668 Self::OauthGrant => "oauth_grant",
2669 Self::IntegrationKey => "integration_key",
2670 Self::Other(value) => value,
2671 }
2672 }
2673}
2674
2675impl From<&str> for CredentialKind {
2676 fn from(value: &str) -> Self {
2677 match value {
2678 "api_key" => Self::ApiKey,
2679 "oauth_grant" => Self::OauthGrant,
2680 "integration_key" => Self::IntegrationKey,
2681 other => Self::Other(other.to_owned()),
2682 }
2683 }
2684}
2685
2686impl std::fmt::Display for CredentialKind {
2687 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2688 f.write_str(self.as_str())
2689 }
2690}
2691
2692impl AsRef<str> for CredentialKind {
2693 fn as_ref(&self) -> &str {
2694 self.as_str()
2695 }
2696}
2697
2698#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
2700#[non_exhaustive]
2701pub enum DailyPnlSeriesStatus {
2702 #[serde(rename = "ready")]
2704 Ready,
2705 #[serde(rename = "pending")]
2707 Pending,
2708 #[serde(untagged)]
2710 Other(String),
2711}
2712
2713impl DailyPnlSeriesStatus {
2714 pub fn as_str(&self) -> &str {
2716 match self {
2717 Self::Ready => "ready",
2718 Self::Pending => "pending",
2719 Self::Other(value) => value,
2720 }
2721 }
2722}
2723
2724impl From<&str> for DailyPnlSeriesStatus {
2725 fn from(value: &str) -> Self {
2726 match value {
2727 "ready" => Self::Ready,
2728 "pending" => Self::Pending,
2729 other => Self::Other(other.to_owned()),
2730 }
2731 }
2732}
2733
2734impl std::fmt::Display for DailyPnlSeriesStatus {
2735 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2736 f.write_str(self.as_str())
2737 }
2738}
2739
2740impl AsRef<str> for DailyPnlSeriesStatus {
2741 fn as_ref(&self) -> &str {
2742 self.as_str()
2743 }
2744}
2745
2746#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2748#[non_exhaustive]
2749pub struct DataQuality {
2750 pub status: DataQualityGroupStatus,
2752 #[serde(default, skip_serializing_if = "Option::is_none")]
2754 pub as_of: Option<String>,
2755 pub field_groups: Vec<DataQualityGroup>,
2757}
2758
2759#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2761#[non_exhaustive]
2762pub struct DataQualityGroup {
2763 pub group: String,
2765 pub owner: String,
2767 pub status: DataQualityGroupStatus,
2769 #[serde(default, skip_serializing_if = "Option::is_none")]
2771 pub as_of: Option<String>,
2772 #[serde(default, skip_serializing_if = "Option::is_none")]
2774 pub reason: Option<String>,
2775 #[serde(default, skip_serializing_if = "Option::is_none")]
2777 pub max_age_s: Option<i64>,
2778}
2779
2780#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
2782#[non_exhaustive]
2783pub enum DataQualityGroupStatus {
2784 #[serde(rename = "fresh")]
2786 Fresh,
2787 #[serde(rename = "stale")]
2789 Stale,
2790 #[serde(rename = "partial")]
2792 Partial,
2793 #[serde(rename = "unknown")]
2795 Unknown,
2796 #[serde(rename = "untracked")]
2798 Untracked,
2799 #[serde(rename = "unavailable")]
2801 Unavailable,
2802 #[serde(untagged)]
2804 Other(String),
2805}
2806
2807impl DataQualityGroupStatus {
2808 pub fn as_str(&self) -> &str {
2810 match self {
2811 Self::Fresh => "fresh",
2812 Self::Stale => "stale",
2813 Self::Partial => "partial",
2814 Self::Unknown => "unknown",
2815 Self::Untracked => "untracked",
2816 Self::Unavailable => "unavailable",
2817 Self::Other(value) => value,
2818 }
2819 }
2820}
2821
2822impl From<&str> for DataQualityGroupStatus {
2823 fn from(value: &str) -> Self {
2824 match value {
2825 "fresh" => Self::Fresh,
2826 "stale" => Self::Stale,
2827 "partial" => Self::Partial,
2828 "unknown" => Self::Unknown,
2829 "untracked" => Self::Untracked,
2830 "unavailable" => Self::Unavailable,
2831 other => Self::Other(other.to_owned()),
2832 }
2833 }
2834}
2835
2836impl std::fmt::Display for DataQualityGroupStatus {
2837 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2838 f.write_str(self.as_str())
2839 }
2840}
2841
2842impl AsRef<str> for DataQualityGroupStatus {
2843 fn as_ref(&self) -> &str {
2844 self.as_str()
2845 }
2846}
2847
2848#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2849#[non_exhaustive]
2850pub struct DeleteWebhookResponse {
2851 pub object: String,
2852 pub data: WebhookEndpoint,
2853 pub meta: ResponseMeta,
2854}
2855
2856#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
2858#[non_exhaustive]
2859pub enum Dir {
2860 #[serde(rename = "asc")]
2862 Asc,
2863 #[serde(rename = "desc")]
2865 Desc,
2866 #[serde(untagged)]
2868 Other(String),
2869}
2870
2871impl Dir {
2872 pub fn as_str(&self) -> &str {
2874 match self {
2875 Self::Asc => "asc",
2876 Self::Desc => "desc",
2877 Self::Other(value) => value,
2878 }
2879 }
2880}
2881
2882impl From<&str> for Dir {
2883 fn from(value: &str) -> Self {
2884 match value {
2885 "asc" => Self::Asc,
2886 "desc" => Self::Desc,
2887 other => Self::Other(other.to_owned()),
2888 }
2889 }
2890}
2891
2892impl std::fmt::Display for Dir {
2893 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2894 f.write_str(self.as_str())
2895 }
2896}
2897
2898impl AsRef<str> for Dir {
2899 fn as_ref(&self) -> &str {
2900 self.as_str()
2901 }
2902}
2903
2904#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
2906#[non_exhaustive]
2907pub enum Direction {
2908 #[serde(rename = "YES")]
2910 Yes,
2911 #[serde(rename = "NO")]
2913 No,
2914 #[serde(untagged)]
2916 Other(String),
2917}
2918
2919impl Direction {
2920 pub fn as_str(&self) -> &str {
2922 match self {
2923 Self::Yes => "YES",
2924 Self::No => "NO",
2925 Self::Other(value) => value,
2926 }
2927 }
2928}
2929
2930impl From<&str> for Direction {
2931 fn from(value: &str) -> Self {
2932 match value {
2933 "YES" => Self::Yes,
2934 "NO" => Self::No,
2935 other => Self::Other(other.to_owned()),
2936 }
2937 }
2938}
2939
2940impl std::fmt::Display for Direction {
2941 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2942 f.write_str(self.as_str())
2943 }
2944}
2945
2946impl AsRef<str> for Direction {
2947 fn as_ref(&self) -> &str {
2948 self.as_str()
2949 }
2950}
2951
2952#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
2954#[non_exhaustive]
2955pub enum DirectionalSource {
2956 #[serde(rename = "live")]
2958 Live,
2959 #[serde(rename = "degraded")]
2961 Degraded,
2962 #[serde(untagged)]
2964 Other(String),
2965}
2966
2967impl DirectionalSource {
2968 pub fn as_str(&self) -> &str {
2970 match self {
2971 Self::Live => "live",
2972 Self::Degraded => "degraded",
2973 Self::Other(value) => value,
2974 }
2975 }
2976}
2977
2978impl From<&str> for DirectionalSource {
2979 fn from(value: &str) -> Self {
2980 match value {
2981 "live" => Self::Live,
2982 "degraded" => Self::Degraded,
2983 other => Self::Other(other.to_owned()),
2984 }
2985 }
2986}
2987
2988impl std::fmt::Display for DirectionalSource {
2989 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2990 f.write_str(self.as_str())
2991 }
2992}
2993
2994impl AsRef<str> for DirectionalSource {
2995 fn as_ref(&self) -> &str {
2996 self.as_str()
2997 }
2998}
2999
3000#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
3002#[non_exhaustive]
3003pub enum DirectionalStatus {
3004 #[serde(rename = "available")]
3006 Available,
3007 #[serde(rename = "unknown_ungrouped")]
3009 UnknownUngrouped,
3010 #[serde(rename = "unknown_stale")]
3012 UnknownStale,
3013 #[serde(rename = "unavailable")]
3015 Unavailable,
3016 #[serde(untagged)]
3018 Other(String),
3019}
3020
3021impl DirectionalStatus {
3022 pub fn as_str(&self) -> &str {
3024 match self {
3025 Self::Available => "available",
3026 Self::UnknownUngrouped => "unknown_ungrouped",
3027 Self::UnknownStale => "unknown_stale",
3028 Self::Unavailable => "unavailable",
3029 Self::Other(value) => value,
3030 }
3031 }
3032}
3033
3034impl From<&str> for DirectionalStatus {
3035 fn from(value: &str) -> Self {
3036 match value {
3037 "available" => Self::Available,
3038 "unknown_ungrouped" => Self::UnknownUngrouped,
3039 "unknown_stale" => Self::UnknownStale,
3040 "unavailable" => Self::Unavailable,
3041 other => Self::Other(other.to_owned()),
3042 }
3043 }
3044}
3045
3046impl std::fmt::Display for DirectionalStatus {
3047 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3048 f.write_str(self.as_str())
3049 }
3050}
3051
3052impl AsRef<str> for DirectionalStatus {
3053 fn as_ref(&self) -> &str {
3054 self.as_str()
3055 }
3056}
3057
3058#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
3060#[non_exhaustive]
3061pub enum Draw {
3062 #[serde(rename = "main")]
3064 Main,
3065 #[serde(rename = "qualification")]
3067 Qualification,
3068 #[serde(untagged)]
3070 Other(String),
3071}
3072
3073impl Draw {
3074 pub fn as_str(&self) -> &str {
3076 match self {
3077 Self::Main => "main",
3078 Self::Qualification => "qualification",
3079 Self::Other(value) => value,
3080 }
3081 }
3082}
3083
3084impl From<&str> for Draw {
3085 fn from(value: &str) -> Self {
3086 match value {
3087 "main" => Self::Main,
3088 "qualification" => Self::Qualification,
3089 other => Self::Other(other.to_owned()),
3090 }
3091 }
3092}
3093
3094impl std::fmt::Display for Draw {
3095 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3096 f.write_str(self.as_str())
3097 }
3098}
3099
3100impl AsRef<str> for Draw {
3101 fn as_ref(&self) -> &str {
3102 self.as_str()
3103 }
3104}
3105
3106#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
3108#[non_exhaustive]
3109pub enum EdgeHold {
3110 #[serde(rename = "category_loss")]
3112 CategoryLoss,
3113 #[serde(rename = "record_incomplete")]
3115 RecordIncomplete,
3116 #[serde(untagged)]
3118 Other(String),
3119}
3120
3121impl EdgeHold {
3122 pub fn as_str(&self) -> &str {
3124 match self {
3125 Self::CategoryLoss => "category_loss",
3126 Self::RecordIncomplete => "record_incomplete",
3127 Self::Other(value) => value,
3128 }
3129 }
3130}
3131
3132impl From<&str> for EdgeHold {
3133 fn from(value: &str) -> Self {
3134 match value {
3135 "category_loss" => Self::CategoryLoss,
3136 "record_incomplete" => Self::RecordIncomplete,
3137 other => Self::Other(other.to_owned()),
3138 }
3139 }
3140}
3141
3142impl std::fmt::Display for EdgeHold {
3143 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3144 f.write_str(self.as_str())
3145 }
3146}
3147
3148impl AsRef<str> for EdgeHold {
3149 fn as_ref(&self) -> &str {
3150 self.as_str()
3151 }
3152}
3153
3154#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3156#[non_exhaustive]
3157pub struct EdgeHunterBoard {
3158 pub as_of: String,
3160 pub horizon_hours: i64,
3161 pub min_grade: MarketHolderGrade,
3163 pub ranking_source: RankingSource,
3165 pub directional_source: DirectionalSource,
3167 #[serde(default)]
3168 pub cached_age_seconds: Option<i64>,
3169 pub viewer: String,
3170 #[serde(default)]
3172 pub free_rank: Option<i64>,
3173 pub total: i64,
3175 pub rows: Vec<EdgeHunterRow>,
3176}
3177
3178#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3179#[non_exhaustive]
3180pub struct EdgeHunterBoardResponse {
3181 pub object: String,
3182 pub data: EdgeHunterBoard,
3183 pub meta: ResponseMeta,
3184 #[serde(default, skip_serializing_if = "Option::is_none")]
3186 pub selection: Option<EdgeHunterSelection>,
3187}
3188
3189#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3191#[non_exhaustive]
3192pub struct EdgeHunterCategorySkill {
3193 pub status: Status,
3194 pub model_version: String,
3195 #[serde(default)]
3196 pub taxonomy_version: Option<String>,
3197 pub platform: String,
3198 pub scope: String,
3199 pub source_coverage: SourceCoverage,
3200 pub observation_started_at: String,
3201 pub as_of: String,
3202 #[serde(default)]
3203 pub canonical_category: Option<String>,
3204 pub eligible_holders: i64,
3205 pub covered_holders: i64,
3206 #[serde(default)]
3207 pub backed_sharp_usd: Option<f64>,
3208 #[serde(default)]
3209 pub covered_backed_usd: Option<f64>,
3210 #[serde(default)]
3211 pub coverage_pct: Option<f64>,
3212 #[serde(default)]
3213 pub weighted_edge_mean: Option<f64>,
3214 #[serde(default)]
3215 pub weighted_holder_lower_mean: Option<f64>,
3216 #[serde(default)]
3217 pub specialist_backed_usd: Option<f64>,
3218 #[serde(default)]
3219 pub specialist_backed_usd_pct: Option<f64>,
3220 #[serde(default)]
3221 pub largest_holder_backed_usd_pct: Option<f64>,
3222 #[serde(default)]
3223 pub minimum_holder_event_count: Option<i64>,
3224}
3225
3226#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3228#[non_exhaustive]
3229pub struct EdgeHunterFunnelReport {
3230 pub sports: Vec<EdgeHunterSportFunnelReport>,
3231}
3232
3233#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3235#[non_exhaustive]
3236pub struct EdgeHunterMarketContext {
3237 #[serde(default)]
3239 pub league: Option<String>,
3240 #[serde(default)]
3242 pub series_slug: Option<String>,
3243 #[serde(default)]
3245 pub market_type: Option<String>,
3246 #[serde(default)]
3248 pub metadata_updated_at: Option<String>,
3249}
3250
3251#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3253#[non_exhaustive]
3254pub struct EdgeHunterObservation {
3255 #[serde(default)]
3257 pub side: Option<String>,
3258 pub backing_score: f64,
3260 pub side_share: f64,
3262 pub condition_id: String,
3264 pub token_id: String,
3266 pub category: Category,
3268 #[serde(default)]
3270 pub raw_category: Option<String>,
3271 pub title: String,
3273 #[serde(default)]
3274 pub event_slug: Option<String>,
3275 #[serde(default)]
3277 pub event_id: Option<String>,
3278 #[serde(default)]
3280 pub parent_event_id: Option<String>,
3281 pub game_start_time: String,
3283 pub observed_at: String,
3285 pub cohort: Cohort,
3287 pub admitted_by: AdmittedBy,
3289 pub observation_only: bool,
3291 #[serde(default)]
3293 pub piled_side: Option<String>,
3294 pub piled_outcome_index: i64,
3296 pub backed_price: f64,
3298 pub sharp_pct: f64,
3300 pub backed_sharp_usd: f64,
3302 pub s_count: i64,
3303 pub a_count: i64,
3304 pub b_count: i64,
3305 pub graded_holders: i64,
3307 pub top_grade: MarketHolderGrade,
3308 pub smart_score: f64,
3310 pub volume: f64,
3312 pub conviction_score: f64,
3314 pub provider_read_source: ProviderReadSource,
3316 pub holder_scan_complete: bool,
3318 #[serde(default)]
3320 pub holder_snapshot_at: Option<String>,
3321 pub directional_status: DirectionalStatus,
3323 #[serde(default)]
3324 pub one_way_holder_count: Option<i64>,
3325 #[serde(default)]
3326 pub hedged_holder_count: Option<i64>,
3327 #[serde(default)]
3328 pub one_way_graded_usd: Option<f64>,
3329 #[serde(default)]
3330 pub directional_confidence: Option<f64>,
3331 pub directional_rank_score: f64,
3333 pub rank: i64,
3335 #[serde(default)]
3337 pub market_context: Option<EdgeHunterMarketContext>,
3338}
3339
3340#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3342#[non_exhaustive]
3343pub struct EdgeHunterObservationCoverage {
3344 pub input_markets: i64,
3346 pub capacity_limited_markets: i64,
3348 pub emitted_observations: i64,
3350 pub incomplete_holder_markets: i64,
3352 pub selected_observations: i64,
3354 pub returned_observations: i64,
3356}
3357
3358#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3360#[non_exhaustive]
3361pub struct EdgeHunterObservationDegradationReason {
3362 pub reason: EdgeHunterObservationDegradationReasonReason,
3364 #[serde(default)]
3366 pub sport: Option<String>,
3367}
3368
3369#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
3371#[non_exhaustive]
3372pub enum EdgeHunterObservationDegradationReasonReason {
3373 #[serde(rename = "holder_scan_incomplete")]
3375 HolderScanIncomplete,
3376 #[serde(rename = "live_source_stale")]
3378 LiveSourceStale,
3379 #[serde(rename = "directional_unavailable")]
3381 DirectionalUnavailable,
3382 #[serde(rename = "funnel_unreconciled")]
3384 FunnelUnreconciled,
3385 #[serde(rename = "board_live_unavailable")]
3387 BoardLiveUnavailable,
3388 #[serde(rename = "board_upcoming_unavailable")]
3390 BoardUpcomingUnavailable,
3391 #[serde(rename = "provider_unavailable")]
3393 ProviderUnavailable,
3394 #[serde(rename = "holder_deadline_unavailable")]
3396 HolderDeadlineUnavailable,
3397 #[serde(rename = "holder_computation_unavailable")]
3399 HolderComputationUnavailable,
3400 #[serde(rename = "missing_stored_market")]
3402 MissingStoredMarket,
3403 #[serde(rename = "price_unavailable")]
3405 PriceUnavailable,
3406 #[serde(rename = "in_play_stale_observed")]
3408 InPlayStaleObserved,
3409 #[serde(rename = "in_play_directional_unavailable")]
3411 InPlayDirectionalUnavailable,
3412 #[serde(rename = "internal_unclassified")]
3414 InternalUnclassified,
3415 #[serde(rename = "board_source_unavailable")]
3417 BoardSourceUnavailable,
3418 #[serde(rename = "board_deadline_unavailable")]
3420 BoardDeadlineUnavailable,
3421 #[serde(untagged)]
3423 Other(String),
3424}
3425
3426impl EdgeHunterObservationDegradationReasonReason {
3427 pub fn as_str(&self) -> &str {
3429 match self {
3430 Self::HolderScanIncomplete => "holder_scan_incomplete",
3431 Self::LiveSourceStale => "live_source_stale",
3432 Self::DirectionalUnavailable => "directional_unavailable",
3433 Self::FunnelUnreconciled => "funnel_unreconciled",
3434 Self::BoardLiveUnavailable => "board_live_unavailable",
3435 Self::BoardUpcomingUnavailable => "board_upcoming_unavailable",
3436 Self::ProviderUnavailable => "provider_unavailable",
3437 Self::HolderDeadlineUnavailable => "holder_deadline_unavailable",
3438 Self::HolderComputationUnavailable => "holder_computation_unavailable",
3439 Self::MissingStoredMarket => "missing_stored_market",
3440 Self::PriceUnavailable => "price_unavailable",
3441 Self::InPlayStaleObserved => "in_play_stale_observed",
3442 Self::InPlayDirectionalUnavailable => "in_play_directional_unavailable",
3443 Self::InternalUnclassified => "internal_unclassified",
3444 Self::BoardSourceUnavailable => "board_source_unavailable",
3445 Self::BoardDeadlineUnavailable => "board_deadline_unavailable",
3446 Self::Other(value) => value,
3447 }
3448 }
3449}
3450
3451impl From<&str> for EdgeHunterObservationDegradationReasonReason {
3452 fn from(value: &str) -> Self {
3453 match value {
3454 "holder_scan_incomplete" => Self::HolderScanIncomplete,
3455 "live_source_stale" => Self::LiveSourceStale,
3456 "directional_unavailable" => Self::DirectionalUnavailable,
3457 "funnel_unreconciled" => Self::FunnelUnreconciled,
3458 "board_live_unavailable" => Self::BoardLiveUnavailable,
3459 "board_upcoming_unavailable" => Self::BoardUpcomingUnavailable,
3460 "provider_unavailable" => Self::ProviderUnavailable,
3461 "holder_deadline_unavailable" => Self::HolderDeadlineUnavailable,
3462 "holder_computation_unavailable" => Self::HolderComputationUnavailable,
3463 "missing_stored_market" => Self::MissingStoredMarket,
3464 "price_unavailable" => Self::PriceUnavailable,
3465 "in_play_stale_observed" => Self::InPlayStaleObserved,
3466 "in_play_directional_unavailable" => Self::InPlayDirectionalUnavailable,
3467 "internal_unclassified" => Self::InternalUnclassified,
3468 "board_source_unavailable" => Self::BoardSourceUnavailable,
3469 "board_deadline_unavailable" => Self::BoardDeadlineUnavailable,
3470 other => Self::Other(other.to_owned()),
3471 }
3472 }
3473}
3474
3475impl std::fmt::Display for EdgeHunterObservationDegradationReasonReason {
3476 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3477 f.write_str(self.as_str())
3478 }
3479}
3480
3481impl AsRef<str> for EdgeHunterObservationDegradationReasonReason {
3482 fn as_ref(&self) -> &str {
3483 self.as_str()
3484 }
3485}
3486
3487#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3489#[non_exhaustive]
3490pub struct EdgeHunterObservationDeparture {
3491 pub condition_id: String,
3493 #[serde(default)]
3494 pub event_slug: Option<String>,
3495 pub category: Category,
3497 pub admitted_by: AdmittedBy,
3499 pub game_start_time: String,
3501 pub last_observed_at: String,
3503 pub departed_at: String,
3505 pub reason: EdgeHunterObservationTerminalReason,
3507}
3508
3509#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
3513#[non_exhaustive]
3514pub enum EdgeHunterObservationTerminalReason {
3515 #[serde(rename = "outside_horizon")]
3517 OutsideHorizon,
3518 #[serde(rename = "resolved")]
3520 Resolved,
3521 #[serde(rename = "provider_closed")]
3523 ProviderClosed,
3524 #[serde(rename = "provider_excluded")]
3526 ProviderExcluded,
3527 #[serde(rename = "invalid_market")]
3529 InvalidMarket,
3530 #[serde(rename = "missing_token")]
3532 MissingToken,
3533 #[serde(rename = "missing_stored_market")]
3535 MissingStoredMarket,
3536 #[serde(rename = "not_provider_live")]
3538 NotProviderLive,
3539 #[serde(rename = "board_source_unavailable")]
3541 BoardSourceUnavailable,
3542 #[serde(rename = "board_deadline_unavailable")]
3544 BoardDeadlineUnavailable,
3545 #[serde(rename = "primary_slate_candidate")]
3547 PrimarySlateCandidate,
3548 #[serde(rename = "zero_indexed_holder_research")]
3550 ZeroIndexedHolderResearch,
3551 #[serde(rename = "capacity_limited")]
3553 CapacityLimited,
3554 #[serde(rename = "provider_unavailable")]
3556 ProviderUnavailable,
3557 #[serde(rename = "holder_deadline_unavailable")]
3559 HolderDeadlineUnavailable,
3560 #[serde(rename = "holder_computation_unavailable")]
3562 HolderComputationUnavailable,
3563 #[serde(rename = "holder_scan_incomplete")]
3565 HolderScanIncomplete,
3566 #[serde(rename = "no_current_graded_holder")]
3568 NoCurrentGradedHolder,
3569 #[serde(rename = "split_holder_pile")]
3571 SplitHolderPile,
3572 #[serde(rename = "price_unavailable")]
3574 PriceUnavailable,
3575 #[serde(rename = "wider_holder_emitted")]
3577 WiderHolderEmitted,
3578 #[serde(rename = "in_play_emitted")]
3580 InPlayEmitted,
3581 #[serde(rename = "in_play_stale_observed")]
3583 InPlayStaleObserved,
3584 #[serde(rename = "in_play_directional_unavailable")]
3586 InPlayDirectionalUnavailable,
3587 #[serde(rename = "internal_unclassified")]
3589 InternalUnclassified,
3590 #[serde(untagged)]
3592 Other(String),
3593}
3594
3595impl EdgeHunterObservationTerminalReason {
3596 pub fn as_str(&self) -> &str {
3598 match self {
3599 Self::OutsideHorizon => "outside_horizon",
3600 Self::Resolved => "resolved",
3601 Self::ProviderClosed => "provider_closed",
3602 Self::ProviderExcluded => "provider_excluded",
3603 Self::InvalidMarket => "invalid_market",
3604 Self::MissingToken => "missing_token",
3605 Self::MissingStoredMarket => "missing_stored_market",
3606 Self::NotProviderLive => "not_provider_live",
3607 Self::BoardSourceUnavailable => "board_source_unavailable",
3608 Self::BoardDeadlineUnavailable => "board_deadline_unavailable",
3609 Self::PrimarySlateCandidate => "primary_slate_candidate",
3610 Self::ZeroIndexedHolderResearch => "zero_indexed_holder_research",
3611 Self::CapacityLimited => "capacity_limited",
3612 Self::ProviderUnavailable => "provider_unavailable",
3613 Self::HolderDeadlineUnavailable => "holder_deadline_unavailable",
3614 Self::HolderComputationUnavailable => "holder_computation_unavailable",
3615 Self::HolderScanIncomplete => "holder_scan_incomplete",
3616 Self::NoCurrentGradedHolder => "no_current_graded_holder",
3617 Self::SplitHolderPile => "split_holder_pile",
3618 Self::PriceUnavailable => "price_unavailable",
3619 Self::WiderHolderEmitted => "wider_holder_emitted",
3620 Self::InPlayEmitted => "in_play_emitted",
3621 Self::InPlayStaleObserved => "in_play_stale_observed",
3622 Self::InPlayDirectionalUnavailable => "in_play_directional_unavailable",
3623 Self::InternalUnclassified => "internal_unclassified",
3624 Self::Other(value) => value,
3625 }
3626 }
3627}
3628
3629impl From<&str> for EdgeHunterObservationTerminalReason {
3630 fn from(value: &str) -> Self {
3631 match value {
3632 "outside_horizon" => Self::OutsideHorizon,
3633 "resolved" => Self::Resolved,
3634 "provider_closed" => Self::ProviderClosed,
3635 "provider_excluded" => Self::ProviderExcluded,
3636 "invalid_market" => Self::InvalidMarket,
3637 "missing_token" => Self::MissingToken,
3638 "missing_stored_market" => Self::MissingStoredMarket,
3639 "not_provider_live" => Self::NotProviderLive,
3640 "board_source_unavailable" => Self::BoardSourceUnavailable,
3641 "board_deadline_unavailable" => Self::BoardDeadlineUnavailable,
3642 "primary_slate_candidate" => Self::PrimarySlateCandidate,
3643 "zero_indexed_holder_research" => Self::ZeroIndexedHolderResearch,
3644 "capacity_limited" => Self::CapacityLimited,
3645 "provider_unavailable" => Self::ProviderUnavailable,
3646 "holder_deadline_unavailable" => Self::HolderDeadlineUnavailable,
3647 "holder_computation_unavailable" => Self::HolderComputationUnavailable,
3648 "holder_scan_incomplete" => Self::HolderScanIncomplete,
3649 "no_current_graded_holder" => Self::NoCurrentGradedHolder,
3650 "split_holder_pile" => Self::SplitHolderPile,
3651 "price_unavailable" => Self::PriceUnavailable,
3652 "wider_holder_emitted" => Self::WiderHolderEmitted,
3653 "in_play_emitted" => Self::InPlayEmitted,
3654 "in_play_stale_observed" => Self::InPlayStaleObserved,
3655 "in_play_directional_unavailable" => Self::InPlayDirectionalUnavailable,
3656 "internal_unclassified" => Self::InternalUnclassified,
3657 other => Self::Other(other.to_owned()),
3658 }
3659 }
3660}
3661
3662impl std::fmt::Display for EdgeHunterObservationTerminalReason {
3663 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3664 f.write_str(self.as_str())
3665 }
3666}
3667
3668impl AsRef<str> for EdgeHunterObservationTerminalReason {
3669 fn as_ref(&self) -> &str {
3670 self.as_str()
3671 }
3672}
3673
3674#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3676#[non_exhaustive]
3677pub struct EdgeHunterObservationsResponse {
3678 pub object: String,
3679 pub view: String,
3680 pub data: Vec<EdgeHunterObservation>,
3681 pub has_more: bool,
3682 #[serde(default)]
3684 pub next_cursor: Option<String>,
3685 pub snapshot_as_of: String,
3687 pub degraded: bool,
3689 pub degradation_reasons: Vec<EdgeHunterObservationDegradationReason>,
3691 pub coverage: EdgeHunterObservationCoverage,
3692 pub funnel: EdgeHunterFunnelReport,
3693 pub meta: ResponseMeta,
3694 #[serde(default, skip_serializing_if = "Option::is_none")]
3696 pub selection: Option<EdgeHunterSelection>,
3697 #[serde(default, skip_serializing_if = "Option::is_none")]
3699 pub admission: Option<Admission>,
3700 #[serde(default, skip_serializing_if = "Option::is_none")]
3702 pub departures: Option<Vec<EdgeHunterObservationDeparture>>,
3703 #[serde(default, skip_serializing_if = "Option::is_none")]
3705 pub signals_as_of: Option<String>,
3706}
3707
3708#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3710#[non_exhaustive]
3711pub struct EdgeHunterOutcome {
3712 pub index: i64,
3713 #[serde(default)]
3714 pub label: Option<String>,
3715 #[serde(default)]
3716 pub provider_id: Option<i64>,
3717 #[serde(default)]
3719 pub token_id: Option<String>,
3720 #[serde(default)]
3721 pub current_price: Option<EdgeHunterPrice>,
3722}
3723
3724#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3725#[non_exhaustive]
3726pub struct EdgeHunterParticipant {
3727 #[serde(default, skip_serializing_if = "Option::is_none")]
3728 pub provider_id: Option<i64>,
3729 #[serde(default, skip_serializing_if = "Option::is_none")]
3730 pub logo: Option<String>,
3731 #[serde(default, skip_serializing_if = "Option::is_none")]
3732 pub logo_mark_dark: Option<bool>,
3733 #[serde(default, skip_serializing_if = "Option::is_none")]
3734 pub color: Option<String>,
3735 #[serde(default, skip_serializing_if = "Option::is_none")]
3736 pub headshot: Option<String>,
3737 #[serde(default, skip_serializing_if = "Option::is_none")]
3738 pub headshot_revision: Option<i64>,
3739 #[serde(default, skip_serializing_if = "Option::is_none")]
3740 pub tour: Option<String>,
3741 pub name: String,
3742 #[serde(default, skip_serializing_if = "Option::is_none")]
3743 pub logo_mark_light: Option<bool>,
3744 #[serde(default, skip_serializing_if = "Option::is_none")]
3745 pub logo_mark_measured: Option<bool>,
3746}
3747
3748#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3749#[non_exhaustive]
3750pub struct EdgeHunterPrice {
3751 pub price: String,
3753 pub basis: EdgeHunterPriceBasis,
3754 pub ts: String,
3756 #[serde(default, skip_serializing_if = "Option::is_none")]
3758 pub validated_at: Option<String>,
3759}
3760
3761#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
3763#[non_exhaustive]
3764pub enum EdgeHunterPriceBasis {
3765 #[serde(rename = "midpoint")]
3767 Midpoint,
3768 #[serde(rename = "last_trade")]
3770 LastTrade,
3771 #[serde(untagged)]
3773 Other(String),
3774}
3775
3776impl EdgeHunterPriceBasis {
3777 pub fn as_str(&self) -> &str {
3779 match self {
3780 Self::Midpoint => "midpoint",
3781 Self::LastTrade => "last_trade",
3782 Self::Other(value) => value,
3783 }
3784 }
3785}
3786
3787impl From<&str> for EdgeHunterPriceBasis {
3788 fn from(value: &str) -> Self {
3789 match value {
3790 "midpoint" => Self::Midpoint,
3791 "last_trade" => Self::LastTrade,
3792 other => Self::Other(other.to_owned()),
3793 }
3794 }
3795}
3796
3797impl std::fmt::Display for EdgeHunterPriceBasis {
3798 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3799 f.write_str(self.as_str())
3800 }
3801}
3802
3803impl AsRef<str> for EdgeHunterPriceBasis {
3804 fn as_ref(&self) -> &str {
3805 self.as_str()
3806 }
3807}
3808
3809#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3811#[non_exhaustive]
3812pub struct EdgeHunterRankedSignal {
3813 #[serde(default)]
3815 pub side: Option<String>,
3816 pub ranked_at: String,
3818 pub backing_score: f64,
3820 #[serde(default)]
3822 pub side_share: Option<f64>,
3823 pub condition_id: String,
3825 pub signal_created_at: String,
3827 #[serde(default)]
3829 pub token_id: Option<String>,
3830 #[serde(default)]
3832 pub category: Option<Category>,
3833 #[serde(default)]
3835 pub raw_category: Option<String>,
3836 #[serde(default)]
3837 pub title: Option<String>,
3838 #[serde(default)]
3839 pub event_slug: Option<String>,
3840 #[serde(default)]
3842 pub game_start_time: Option<String>,
3843 #[serde(default)]
3845 pub piled_side: Option<String>,
3846 pub piled_outcome_index: i64,
3848 #[serde(default)]
3850 pub sharp_pct: Option<f64>,
3851 pub backed_sharp_usd: f64,
3853 pub s_count: i64,
3855 pub a_count: i64,
3857 pub b_count: i64,
3859 pub graded_holders: i64,
3861 #[serde(default)]
3863 pub top_grade: Option<MarketHolderGrade>,
3864 #[serde(default)]
3866 pub smart_score: Option<f64>,
3867 #[serde(default)]
3869 pub volume: Option<f64>,
3870 #[serde(default)]
3872 pub net_side: Option<Side>,
3873 pub conviction_score: f64,
3875 #[serde(default)]
3877 pub one_way_holder_count: Option<i64>,
3878 #[serde(default)]
3880 pub hedged_holder_count: Option<i64>,
3881 #[serde(default)]
3883 pub one_way_graded_usd: Option<f64>,
3884 #[serde(default)]
3886 pub directional_confidence: Option<f64>,
3887 pub directional_rank_score: f64,
3889 pub category_skill: EdgeHunterCategorySkill,
3890 pub rank: i64,
3892 #[serde(default)]
3894 pub market_context: Option<EdgeHunterMarketContext>,
3895}
3896
3897#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3899#[non_exhaustive]
3900pub struct EdgeHunterRow {
3901 pub rank: i64,
3902 pub state: String,
3903 pub free: bool,
3904 pub condition_id: String,
3905 #[serde(default)]
3906 pub event_slug: Option<String>,
3907 #[serde(default)]
3908 pub title: Option<String>,
3909 #[serde(default)]
3910 pub category: Option<Category>,
3911 #[serde(default)]
3912 pub raw_category: Option<String>,
3913 #[serde(default)]
3914 pub game_start_time: Option<String>,
3915 #[serde(default)]
3917 pub volume: Option<f64>,
3918 pub participants: Vec<EdgeHunterParticipant>,
3919 #[serde(default)]
3920 pub image: Option<String>,
3921 pub outcomes: Vec<EdgeHunterOutcome>,
3922 #[serde(default)]
3923 pub signal: Option<EdgeHunterSignal>,
3924 #[serde(default)]
3926 pub market_context: Option<EdgeHunterMarketContext>,
3927}
3928
3929#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3931#[non_exhaustive]
3932pub struct EdgeHunterSelection {
3933 #[serde(default, skip_serializing_if = "Option::is_none")]
3934 pub kind: Option<Kind>,
3935 #[serde(default, skip_serializing_if = "Option::is_none")]
3937 pub category: Option<String>,
3938 #[serde(default, skip_serializing_if = "Option::is_none")]
3940 pub sports: Option<Vec<String>>,
3941 #[serde(default, skip_serializing_if = "Option::is_none")]
3943 pub leagues: Option<Vec<String>>,
3944 #[serde(default, skip_serializing_if = "Option::is_none")]
3946 pub market_types: Option<Vec<String>>,
3947 #[serde(default, skip_serializing_if = "Option::is_none")]
3949 pub condition_ids: Option<Vec<String>>,
3950 #[serde(default, skip_serializing_if = "Option::is_none")]
3952 pub event_slugs: Option<Vec<String>>,
3953 #[serde(default, skip_serializing_if = "Option::is_none")]
3955 pub series_slugs: Option<Vec<String>>,
3956}
3957
3958#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3960#[non_exhaustive]
3961pub struct EdgeHunterSignal {
3962 #[serde(default)]
3963 pub piled_side: Option<String>,
3964 pub piled_outcome_index: i64,
3965 #[serde(default)]
3967 pub sharp_pct: Option<f64>,
3968 pub backed_sharp_usd: f64,
3969 pub s_count: i64,
3970 pub a_count: i64,
3971 pub b_count: i64,
3972 pub graded_holders: i64,
3973 #[serde(default)]
3974 pub top_grade: Option<MarketHolderGrade>,
3975 #[serde(default)]
3976 pub smart_score: Option<f64>,
3977 #[serde(default)]
3978 pub net_side: Option<String>,
3979 pub conviction_score: f64,
3980 #[serde(default)]
3981 pub one_way_holder_count: Option<i64>,
3982 #[serde(default)]
3983 pub hedged_holder_count: Option<i64>,
3984 #[serde(default)]
3985 pub one_way_graded_usd: Option<f64>,
3986 #[serde(default)]
3987 pub directional_confidence: Option<f64>,
3988 pub directional_rank_score: f64,
3989 #[serde(default)]
3990 pub current_price: Option<EdgeHunterPrice>,
3991 #[serde(default)]
3993 pub token_id: Option<String>,
3994 pub ranked_at: String,
3996 pub category_skill: EdgeHunterCategorySkill,
3998}
3999
4000#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4002#[non_exhaustive]
4003pub struct EdgeHunterSignalsResponse {
4004 pub object: String,
4005 pub view: String,
4006 pub data: Vec<EdgeHunterRankedSignal>,
4007 pub has_more: bool,
4008 #[serde(default, skip_serializing_if = "Option::is_none")]
4009 pub next_cursor: Option<String>,
4010 #[serde(default, skip_serializing_if = "Option::is_none")]
4011 pub total: Option<i64>,
4012 pub meta: ResponseMeta,
4013 #[serde(default, skip_serializing_if = "Option::is_none")]
4015 pub selection: Option<EdgeHunterSelection>,
4016}
4017
4018#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4020#[non_exhaustive]
4021pub struct EdgeHunterSportFunnelReport {
4022 pub sport: Category,
4023 pub board_input: i64,
4025 pub board_live_available: bool,
4027 pub board_upcoming_configured: bool,
4029 pub board_upcoming_available: bool,
4031 pub board_upcoming_status: BoardUpcomingStatus,
4033 pub board_upcoming_unavailable_scopes: Vec<BoardUpcomingUnavailableScopes>,
4035 pub input: i64,
4037 pub terminals: std::collections::BTreeMap<String, i64>,
4039 pub terminal_total: i64,
4041 pub reconciled: bool,
4043}
4044
4045#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
4047#[non_exhaustive]
4048pub enum EnrichmentStatus {
4049 #[serde(rename = "available")]
4051 Available,
4052 #[serde(rename = "unavailable")]
4054 Unavailable,
4055 #[serde(untagged)]
4057 Other(String),
4058}
4059
4060impl EnrichmentStatus {
4061 pub fn as_str(&self) -> &str {
4063 match self {
4064 Self::Available => "available",
4065 Self::Unavailable => "unavailable",
4066 Self::Other(value) => value,
4067 }
4068 }
4069}
4070
4071impl From<&str> for EnrichmentStatus {
4072 fn from(value: &str) -> Self {
4073 match value {
4074 "available" => Self::Available,
4075 "unavailable" => Self::Unavailable,
4076 other => Self::Other(other.to_owned()),
4077 }
4078 }
4079}
4080
4081impl std::fmt::Display for EnrichmentStatus {
4082 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4083 f.write_str(self.as_str())
4084 }
4085}
4086
4087impl AsRef<str> for EnrichmentStatus {
4088 fn as_ref(&self) -> &str {
4089 self.as_str()
4090 }
4091}
4092
4093#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
4095#[non_exhaustive]
4096pub enum ErrorCode {
4097 #[serde(rename = "bad_request")]
4099 BadRequest,
4100 #[serde(rename = "invalid_api_key")]
4102 InvalidApiKey,
4103 #[serde(rename = "subscription_required")]
4105 SubscriptionRequired,
4106 #[serde(rename = "forbidden")]
4108 Forbidden,
4109 #[serde(rename = "insufficient_scope")]
4111 InsufficientScope,
4112 #[serde(rename = "not_found")]
4114 NotFound,
4115 #[serde(rename = "account_locked")]
4117 AccountLocked,
4118 #[serde(rename = "rate_limited")]
4120 RateLimited,
4121 #[serde(rename = "rate_limit_unavailable")]
4123 RateLimitUnavailable,
4124 #[serde(rename = "internal_error")]
4126 InternalError,
4127 #[serde(rename = "request_timeout")]
4129 RequestTimeout,
4130 #[serde(rename = "endpoint_retired")]
4132 EndpointRetired,
4133 #[serde(untagged)]
4135 Other(String),
4136}
4137
4138impl ErrorCode {
4139 pub fn as_str(&self) -> &str {
4141 match self {
4142 Self::BadRequest => "bad_request",
4143 Self::InvalidApiKey => "invalid_api_key",
4144 Self::SubscriptionRequired => "subscription_required",
4145 Self::Forbidden => "forbidden",
4146 Self::InsufficientScope => "insufficient_scope",
4147 Self::NotFound => "not_found",
4148 Self::AccountLocked => "account_locked",
4149 Self::RateLimited => "rate_limited",
4150 Self::RateLimitUnavailable => "rate_limit_unavailable",
4151 Self::InternalError => "internal_error",
4152 Self::RequestTimeout => "request_timeout",
4153 Self::EndpointRetired => "endpoint_retired",
4154 Self::Other(value) => value,
4155 }
4156 }
4157}
4158
4159impl From<&str> for ErrorCode {
4160 fn from(value: &str) -> Self {
4161 match value {
4162 "bad_request" => Self::BadRequest,
4163 "invalid_api_key" => Self::InvalidApiKey,
4164 "subscription_required" => Self::SubscriptionRequired,
4165 "forbidden" => Self::Forbidden,
4166 "insufficient_scope" => Self::InsufficientScope,
4167 "not_found" => Self::NotFound,
4168 "account_locked" => Self::AccountLocked,
4169 "rate_limited" => Self::RateLimited,
4170 "rate_limit_unavailable" => Self::RateLimitUnavailable,
4171 "internal_error" => Self::InternalError,
4172 "request_timeout" => Self::RequestTimeout,
4173 "endpoint_retired" => Self::EndpointRetired,
4174 other => Self::Other(other.to_owned()),
4175 }
4176 }
4177}
4178
4179impl std::fmt::Display for ErrorCode {
4180 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4181 f.write_str(self.as_str())
4182 }
4183}
4184
4185impl AsRef<str> for ErrorCode {
4186 fn as_ref(&self) -> &str {
4187 self.as_str()
4188 }
4189}
4190
4191#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
4193#[non_exhaustive]
4194pub enum ErrorReason {
4195 #[serde(rename = "cursor_expired")]
4197 CursorExpired,
4198 #[serde(rename = "unknown_endpoint")]
4200 UnknownEndpoint,
4201 #[serde(rename = "pick_not_released")]
4203 PickNotReleased,
4204 #[serde(rename = "trader_not_tracked")]
4206 TraderNotTracked,
4207 #[serde(rename = "market_out_of_scope")]
4209 MarketOutOfScope,
4210 #[serde(rename = "read_model_warming")]
4212 ReadModelWarming,
4213 #[serde(rename = "database_unavailable")]
4215 DatabaseUnavailable,
4216 #[serde(rename = "request_accounting_unavailable")]
4218 RequestAccountingUnavailable,
4219 #[serde(rename = "idempotency_in_progress")]
4221 IdempotencyInProgress,
4222 #[serde(rename = "webhook_delivery_in_progress")]
4224 WebhookDeliveryInProgress,
4225 #[serde(rename = "webhook_secret_rotation_not_prepared")]
4227 WebhookSecretRotationNotPrepared,
4228 #[serde(rename = "webhook_secret_rotation_overlap_active")]
4230 WebhookSecretRotationOverlapActive,
4231 #[serde(rename = "sandbox_api_key")]
4233 SandboxApiKey,
4234 #[serde(rename = "api_key_in_query")]
4236 ApiKeyInQuery,
4237 #[serde(rename = "subscription_inactive")]
4239 SubscriptionInactive,
4240 #[serde(rename = "payment_overdue")]
4242 PaymentOverdue,
4243 #[serde(rename = "monthly_quota_exceeded")]
4245 MonthlyQuotaExceeded,
4246 #[serde(rename = "invalid_query")]
4248 InvalidQuery,
4249 #[serde(rename = "unknown_query_parameter")]
4251 UnknownQueryParameter,
4252 #[serde(rename = "invalid_path")]
4254 InvalidPath,
4255 #[serde(rename = "invalid_body")]
4257 InvalidBody,
4258 #[serde(rename = "unsupported_media_type")]
4260 UnsupportedMediaType,
4261 #[serde(rename = "payload_too_large")]
4263 PayloadTooLarge,
4264 #[serde(rename = "method_not_allowed")]
4266 MethodNotAllowed,
4267 #[serde(rename = "ip_rate_limited")]
4269 IpRateLimited,
4270 #[serde(rename = "ip_throttled")]
4272 IpThrottled,
4273 #[serde(rename = "cold_read_limited")]
4275 ColdReadLimited,
4276 #[serde(rename = "export_expired")]
4278 ExportExpired,
4279 #[serde(rename = "freshness_ceiling_unsatisfied")]
4281 FreshnessCeilingUnsatisfied,
4282 #[serde(rename = "max_plan_required")]
4284 MaxPlanRequired,
4285 #[serde(rename = "endpoint_retired")]
4287 EndpointRetired,
4288 #[serde(untagged)]
4290 Other(String),
4291}
4292
4293impl ErrorReason {
4294 pub fn as_str(&self) -> &str {
4296 match self {
4297 Self::CursorExpired => "cursor_expired",
4298 Self::UnknownEndpoint => "unknown_endpoint",
4299 Self::PickNotReleased => "pick_not_released",
4300 Self::TraderNotTracked => "trader_not_tracked",
4301 Self::MarketOutOfScope => "market_out_of_scope",
4302 Self::ReadModelWarming => "read_model_warming",
4303 Self::DatabaseUnavailable => "database_unavailable",
4304 Self::RequestAccountingUnavailable => "request_accounting_unavailable",
4305 Self::IdempotencyInProgress => "idempotency_in_progress",
4306 Self::WebhookDeliveryInProgress => "webhook_delivery_in_progress",
4307 Self::WebhookSecretRotationNotPrepared => "webhook_secret_rotation_not_prepared",
4308 Self::WebhookSecretRotationOverlapActive => "webhook_secret_rotation_overlap_active",
4309 Self::SandboxApiKey => "sandbox_api_key",
4310 Self::ApiKeyInQuery => "api_key_in_query",
4311 Self::SubscriptionInactive => "subscription_inactive",
4312 Self::PaymentOverdue => "payment_overdue",
4313 Self::MonthlyQuotaExceeded => "monthly_quota_exceeded",
4314 Self::InvalidQuery => "invalid_query",
4315 Self::UnknownQueryParameter => "unknown_query_parameter",
4316 Self::InvalidPath => "invalid_path",
4317 Self::InvalidBody => "invalid_body",
4318 Self::UnsupportedMediaType => "unsupported_media_type",
4319 Self::PayloadTooLarge => "payload_too_large",
4320 Self::MethodNotAllowed => "method_not_allowed",
4321 Self::IpRateLimited => "ip_rate_limited",
4322 Self::IpThrottled => "ip_throttled",
4323 Self::ColdReadLimited => "cold_read_limited",
4324 Self::ExportExpired => "export_expired",
4325 Self::FreshnessCeilingUnsatisfied => "freshness_ceiling_unsatisfied",
4326 Self::MaxPlanRequired => "max_plan_required",
4327 Self::EndpointRetired => "endpoint_retired",
4328 Self::Other(value) => value,
4329 }
4330 }
4331}
4332
4333impl From<&str> for ErrorReason {
4334 fn from(value: &str) -> Self {
4335 match value {
4336 "cursor_expired" => Self::CursorExpired,
4337 "unknown_endpoint" => Self::UnknownEndpoint,
4338 "pick_not_released" => Self::PickNotReleased,
4339 "trader_not_tracked" => Self::TraderNotTracked,
4340 "market_out_of_scope" => Self::MarketOutOfScope,
4341 "read_model_warming" => Self::ReadModelWarming,
4342 "database_unavailable" => Self::DatabaseUnavailable,
4343 "request_accounting_unavailable" => Self::RequestAccountingUnavailable,
4344 "idempotency_in_progress" => Self::IdempotencyInProgress,
4345 "webhook_delivery_in_progress" => Self::WebhookDeliveryInProgress,
4346 "webhook_secret_rotation_not_prepared" => Self::WebhookSecretRotationNotPrepared,
4347 "webhook_secret_rotation_overlap_active" => Self::WebhookSecretRotationOverlapActive,
4348 "sandbox_api_key" => Self::SandboxApiKey,
4349 "api_key_in_query" => Self::ApiKeyInQuery,
4350 "subscription_inactive" => Self::SubscriptionInactive,
4351 "payment_overdue" => Self::PaymentOverdue,
4352 "monthly_quota_exceeded" => Self::MonthlyQuotaExceeded,
4353 "invalid_query" => Self::InvalidQuery,
4354 "unknown_query_parameter" => Self::UnknownQueryParameter,
4355 "invalid_path" => Self::InvalidPath,
4356 "invalid_body" => Self::InvalidBody,
4357 "unsupported_media_type" => Self::UnsupportedMediaType,
4358 "payload_too_large" => Self::PayloadTooLarge,
4359 "method_not_allowed" => Self::MethodNotAllowed,
4360 "ip_rate_limited" => Self::IpRateLimited,
4361 "ip_throttled" => Self::IpThrottled,
4362 "cold_read_limited" => Self::ColdReadLimited,
4363 "export_expired" => Self::ExportExpired,
4364 "freshness_ceiling_unsatisfied" => Self::FreshnessCeilingUnsatisfied,
4365 "max_plan_required" => Self::MaxPlanRequired,
4366 "endpoint_retired" => Self::EndpointRetired,
4367 other => Self::Other(other.to_owned()),
4368 }
4369 }
4370}
4371
4372impl std::fmt::Display for ErrorReason {
4373 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4374 f.write_str(self.as_str())
4375 }
4376}
4377
4378impl AsRef<str> for ErrorReason {
4379 fn as_ref(&self) -> &str {
4380 self.as_str()
4381 }
4382}
4383
4384#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4385#[non_exhaustive]
4386pub struct EventReplayEvent {
4387 pub id: String,
4389 pub r#type: String,
4390 pub cursor: String,
4392 pub sequence: i64,
4394 pub published_at: String,
4395 pub payload: EventReplayEventPayload,
4397 #[serde(default, skip_serializing_if = "Option::is_none")]
4399 pub trade: Option<LargeTrade>,
4400 pub source: EventReplaySource,
4401 pub freshness: EventReplayFreshness,
4402}
4403
4404#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4406#[non_exhaustive]
4407pub struct EventReplayEventPayload {
4408 pub count: i64,
4410 pub whale_alert_id: i64,
4412 pub condition_id: String,
4414 pub trader_id: i64,
4416 pub platform: String,
4418 #[serde(flatten)]
4420 pub extra: serde_json::Map<String, serde_json::Value>,
4421}
4422
4423#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4424#[non_exhaustive]
4425pub struct EventReplayFreshness {
4426 pub status: String,
4427 pub observed_at: String,
4428}
4429
4430#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4431#[non_exhaustive]
4432pub struct EventReplayMeta {
4433 pub request_id: String,
4435 pub cached: bool,
4436 pub cost: i64,
4438 pub replay: EventReplayMetaReplay,
4439 pub retention: EventReplayMetaRetention,
4440 pub completeness: EventReplayMetaCompleteness,
4441}
4442
4443#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4444#[non_exhaustive]
4445pub struct EventReplayMetaCompleteness {
4446 pub status: EventReplayMetaCompletenessStatus,
4448 pub reason: String,
4449}
4450
4451#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
4453#[non_exhaustive]
4454pub enum EventReplayMetaCompletenessStatus {
4455 #[serde(rename = "complete")]
4457 Complete,
4458 #[serde(rename = "caught_up")]
4460 CaughtUp,
4461 #[serde(untagged)]
4463 Other(String),
4464}
4465
4466impl EventReplayMetaCompletenessStatus {
4467 pub fn as_str(&self) -> &str {
4469 match self {
4470 Self::Complete => "complete",
4471 Self::CaughtUp => "caught_up",
4472 Self::Other(value) => value,
4473 }
4474 }
4475}
4476
4477impl From<&str> for EventReplayMetaCompletenessStatus {
4478 fn from(value: &str) -> Self {
4479 match value {
4480 "complete" => Self::Complete,
4481 "caught_up" => Self::CaughtUp,
4482 other => Self::Other(other.to_owned()),
4483 }
4484 }
4485}
4486
4487impl std::fmt::Display for EventReplayMetaCompletenessStatus {
4488 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4489 f.write_str(self.as_str())
4490 }
4491}
4492
4493impl AsRef<str> for EventReplayMetaCompletenessStatus {
4494 fn as_ref(&self) -> &str {
4495 self.as_str()
4496 }
4497}
4498
4499#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4500#[non_exhaustive]
4501pub struct EventReplayMetaReplay {
4502 pub from_cursor: String,
4504 pub to_cursor: String,
4506 pub from_sequence: i64,
4508 pub to_sequence: i64,
4510 pub ordering: String,
4512 pub pending_beyond_horizon: bool,
4514 #[serde(default, skip_serializing_if = "Option::is_none")]
4516 pub filters: Option<EventReplayMetaReplayFilters>,
4517 pub expand: Vec<String>,
4519}
4520
4521#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4523#[non_exhaustive]
4524pub struct EventReplayMetaReplayFilters {
4525 #[serde(default, skip_serializing_if = "Option::is_none")]
4527 pub trader: Option<String>,
4528 #[serde(default, skip_serializing_if = "Option::is_none")]
4530 pub condition_id: Option<String>,
4531 #[serde(default, skip_serializing_if = "Option::is_none")]
4532 pub min_grade: Option<Grade>,
4533 #[serde(default, skip_serializing_if = "Option::is_none")]
4534 pub min_size: Option<f64>,
4535}
4536
4537#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4538#[non_exhaustive]
4539pub struct EventReplayMetaRetention {
4540 pub status: String,
4541 pub retained_events: i64,
4542 pub cursor_expired: bool,
4543}
4544
4545#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4546#[non_exhaustive]
4547pub struct EventReplaySource {
4548 pub kind: String,
4549 pub producer_family: String,
4550 pub owner: String,
4551 pub provider_fetch_at_request_time: bool,
4552}
4553
4554#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4556#[non_exhaustive]
4557pub struct ExactDecimal {
4558 pub value: String,
4560 pub unit: String,
4562 pub scale: i64,
4564 pub basis: String,
4566}
4567
4568#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
4570#[non_exhaustive]
4571pub enum ExchangeFamily {
4572 #[serde(rename = "ctf_v2")]
4574 CtfV2,
4575 #[serde(rename = "neg_risk_ctf_v2")]
4577 NegRiskCtfV2,
4578 #[serde(rename = "exchange_v3")]
4580 ExchangeV3,
4581 #[serde(untagged)]
4583 Other(String),
4584}
4585
4586impl ExchangeFamily {
4587 pub fn as_str(&self) -> &str {
4589 match self {
4590 Self::CtfV2 => "ctf_v2",
4591 Self::NegRiskCtfV2 => "neg_risk_ctf_v2",
4592 Self::ExchangeV3 => "exchange_v3",
4593 Self::Other(value) => value,
4594 }
4595 }
4596}
4597
4598impl From<&str> for ExchangeFamily {
4599 fn from(value: &str) -> Self {
4600 match value {
4601 "ctf_v2" => Self::CtfV2,
4602 "neg_risk_ctf_v2" => Self::NegRiskCtfV2,
4603 "exchange_v3" => Self::ExchangeV3,
4604 other => Self::Other(other.to_owned()),
4605 }
4606 }
4607}
4608
4609impl std::fmt::Display for ExchangeFamily {
4610 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4611 f.write_str(self.as_str())
4612 }
4613}
4614
4615impl AsRef<str> for ExchangeFamily {
4616 fn as_ref(&self) -> &str {
4617 self.as_str()
4618 }
4619}
4620
4621#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
4623#[non_exhaustive]
4624pub enum Expand {
4625 #[serde(rename = "strategy")]
4627 Strategy,
4628 #[serde(rename = "categories")]
4630 Categories,
4631 #[serde(rename = "quant_metrics")]
4633 QuantMetrics,
4634 #[serde(rename = "trust")]
4636 Trust,
4637 #[serde(rename = "breakdowns")]
4639 Breakdowns,
4640 #[serde(untagged)]
4642 Other(String),
4643}
4644
4645impl Expand {
4646 pub fn as_str(&self) -> &str {
4648 match self {
4649 Self::Strategy => "strategy",
4650 Self::Categories => "categories",
4651 Self::QuantMetrics => "quant_metrics",
4652 Self::Trust => "trust",
4653 Self::Breakdowns => "breakdowns",
4654 Self::Other(value) => value,
4655 }
4656 }
4657}
4658
4659impl From<&str> for Expand {
4660 fn from(value: &str) -> Self {
4661 match value {
4662 "strategy" => Self::Strategy,
4663 "categories" => Self::Categories,
4664 "quant_metrics" => Self::QuantMetrics,
4665 "trust" => Self::Trust,
4666 "breakdowns" => Self::Breakdowns,
4667 other => Self::Other(other.to_owned()),
4668 }
4669 }
4670}
4671
4672impl std::fmt::Display for Expand {
4673 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4674 f.write_str(self.as_str())
4675 }
4676}
4677
4678impl AsRef<str> for Expand {
4679 fn as_ref(&self) -> &str {
4680 self.as_str()
4681 }
4682}
4683
4684#[derive(Debug, Clone, PartialEq)]
4687#[non_exhaustive]
4688pub enum ExploreEntry {
4689 Group(ExploreGroup),
4691 Standalone(ExploreStandalone),
4693 Unknown(serde_json::Value),
4695}
4696
4697impl<'de> Deserialize<'de> for ExploreEntry {
4698 fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
4699 let value = serde_json::Value::deserialize(deserializer)?;
4700 match value.get("type").and_then(serde_json::Value::as_str) {
4701 Some("group") => serde_json::from_value(value)
4702 .map(Self::Group)
4703 .map_err(de::Error::custom),
4704 Some("standalone") => serde_json::from_value(value)
4705 .map(Self::Standalone)
4706 .map_err(de::Error::custom),
4707 _ => Ok(Self::Unknown(value)),
4708 }
4709 }
4710}
4711
4712impl Serialize for ExploreEntry {
4713 fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
4714 match self {
4715 Self::Group(inner) => inner.serialize(serializer),
4716 Self::Standalone(inner) => inner.serialize(serializer),
4717 Self::Unknown(inner) => inner.serialize(serializer),
4718 }
4719 }
4720}
4721
4722#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4723#[non_exhaustive]
4724pub struct ExploreFacetValue {
4725 pub value: String,
4726 pub label: String,
4727 pub count: i64,
4728}
4729
4730#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4731#[non_exhaustive]
4732pub struct ExploreFacets {
4733 pub categories: Vec<ExploreFacetValue>,
4734 pub platforms: Vec<ExploreFacetValue>,
4735}
4736
4737#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4738#[non_exhaustive]
4739pub struct ExploreGroup {
4740 pub r#type: String,
4741 pub event_slug: String,
4742 pub parent_title: String,
4743 #[serde(default)]
4744 pub image: Option<String>,
4745 #[serde(default)]
4747 pub platform: Option<String>,
4748 #[serde(default)]
4749 pub category: Option<String>,
4750 pub markets: Vec<ExploreMarket>,
4752 #[serde(default)]
4754 pub rep_volume: Option<f64>,
4755 #[serde(default)]
4757 pub rep_large_trades: Option<i64>,
4758 #[serde(default)]
4760 pub rep_whales: Option<i64>,
4761}
4762
4763#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4764#[non_exhaustive]
4765pub struct ExploreMarket {
4766 pub id: String,
4767 pub condition_id: String,
4768 pub title: String,
4770 #[serde(default)]
4772 pub slug: Option<String>,
4773 #[serde(default)]
4775 pub url_slug: Option<String>,
4776 #[serde(default)]
4777 pub image: Option<String>,
4778 #[serde(default)]
4779 pub icon: Option<String>,
4780 #[serde(default)]
4781 pub category: Option<String>,
4782 #[serde(default)]
4784 pub platform: Option<String>,
4785 pub status: MarketSearchResultStatus,
4787 #[serde(default)]
4789 pub volume: Option<f64>,
4790 #[serde(default)]
4791 pub liquidity: Option<f64>,
4792 #[serde(default)]
4794 pub large_trade_count: Option<i64>,
4795 #[serde(default)]
4797 pub whale_trade_count: Option<i64>,
4798 #[serde(default)]
4800 pub large_trade_distinct_wallets: Option<i64>,
4801 #[serde(default)]
4803 pub whale_distinct_wallets: Option<i64>,
4804 #[serde(default)]
4806 pub large_trade_total_usd: Option<f64>,
4807 #[serde(default)]
4809 pub whale_total_usd: Option<f64>,
4810 #[serde(default)]
4812 pub large_trade_last_at: Option<String>,
4813 #[serde(default)]
4815 pub whale_last_trade_at: Option<String>,
4816 #[serde(default)]
4817 pub end_date: Option<String>,
4818 #[serde(default)]
4819 pub created_at: Option<String>,
4820 #[serde(default)]
4821 pub outcome_yes: Option<String>,
4822 #[serde(default)]
4824 pub token_id_yes: Option<String>,
4825 #[serde(default)]
4826 pub outcome_no: Option<String>,
4827 #[serde(default)]
4829 pub token_id_no: Option<String>,
4830 #[serde(default)]
4831 pub event_slug: Option<String>,
4832 #[serde(default)]
4833 pub smart_score: Option<f64>,
4834 #[serde(default)]
4835 pub smart_count: Option<i64>,
4836 #[serde(default)]
4838 pub smart_label: Option<String>,
4839 #[serde(default)]
4841 pub sharp_money_as_of: Option<String>,
4842 #[serde(default)]
4844 pub outcome_yes_label: Option<String>,
4845 #[serde(default)]
4847 pub outcome_no_label: Option<String>,
4848 #[serde(default)]
4850 pub outcome_yes_provider_id: Option<i64>,
4851 #[serde(default)]
4853 pub outcome_no_provider_id: Option<i64>,
4854 #[serde(default)]
4855 pub open_interest: Option<f64>,
4856 #[serde(default)]
4857 pub oi_change_pct: Option<f64>,
4858 #[serde(default)]
4859 pub price_points: Option<Vec<Vec<f64>>>,
4860 #[serde(default)]
4861 pub no_price_points: Option<Vec<Vec<f64>>>,
4862 #[serde(default)]
4863 pub last_price: Option<f64>,
4864 #[serde(default)]
4865 pub no_last_price: Option<f64>,
4866 #[serde(default)]
4867 pub change_pct_24h: Option<f64>,
4868 #[serde(default)]
4869 pub no_change_pct_24h: Option<f64>,
4870 #[serde(default)]
4872 pub discover_score: Option<f64>,
4873 pub score_components: ExploreMarketScoreComponents,
4874 pub freshness: ExploreMarketFreshness,
4875}
4876
4877#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4878#[non_exhaustive]
4879pub struct ExploreMarketFreshness {
4880 pub enrichment_status: EnrichmentStatus,
4881 pub price_status: EnrichmentStatus,
4882}
4883
4884#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4885#[non_exhaustive]
4886pub struct ExploreMarketScoreComponents {
4887 #[serde(default)]
4888 pub volume_signal: Option<f64>,
4889 #[serde(default)]
4891 pub large_trade_signal: Option<f64>,
4892 #[serde(default)]
4894 pub whale_signal: Option<f64>,
4895 #[serde(default)]
4896 pub liquidity_signal: Option<f64>,
4897 #[serde(default)]
4898 pub recency_signal: Option<f64>,
4899 #[serde(default)]
4901 pub sharp_money_signal: Option<f64>,
4902 #[serde(default)]
4904 pub smart_money_signal: Option<f64>,
4905 #[serde(default)]
4906 pub price_move_signal: Option<f64>,
4907 pub missing_price_penalty: f64,
4908}
4909
4910#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4911#[non_exhaustive]
4912pub struct ExploreMarketsResponse {
4913 pub object: String,
4914 pub data: Vec<ExploreEntry>,
4915 pub has_more: bool,
4916 #[serde(default, skip_serializing_if = "Option::is_none")]
4917 pub next_cursor: Option<String>,
4918 #[serde(default, skip_serializing_if = "Option::is_none")]
4920 pub total: Option<i64>,
4921 pub facets: ExploreFacets,
4922 pub meta: ResponseMeta,
4923 #[serde(default, skip_serializing_if = "Option::is_none")]
4925 pub computed_at: Option<String>,
4926 #[serde(default, skip_serializing_if = "Option::is_none")]
4928 pub fresh_for_seconds: Option<i64>,
4929}
4930
4931#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
4933#[non_exhaustive]
4934pub enum ExploreMarketsSort {
4935 #[serde(rename = "trending")]
4937 Trending,
4938 #[serde(rename = "hot")]
4940 Hot,
4941 #[serde(rename = "expiring")]
4943 Expiring,
4944 #[serde(rename = "large_trades")]
4946 LargeTrades,
4947 #[serde(rename = "whales")]
4949 Whales,
4950 #[serde(rename = "volume")]
4952 Volume,
4953 #[serde(rename = "newest")]
4955 Newest,
4956 #[serde(untagged)]
4958 Other(String),
4959}
4960
4961impl ExploreMarketsSort {
4962 pub fn as_str(&self) -> &str {
4964 match self {
4965 Self::Trending => "trending",
4966 Self::Hot => "hot",
4967 Self::Expiring => "expiring",
4968 Self::LargeTrades => "large_trades",
4969 Self::Whales => "whales",
4970 Self::Volume => "volume",
4971 Self::Newest => "newest",
4972 Self::Other(value) => value,
4973 }
4974 }
4975}
4976
4977impl From<&str> for ExploreMarketsSort {
4978 fn from(value: &str) -> Self {
4979 match value {
4980 "trending" => Self::Trending,
4981 "hot" => Self::Hot,
4982 "expiring" => Self::Expiring,
4983 "large_trades" => Self::LargeTrades,
4984 "whales" => Self::Whales,
4985 "volume" => Self::Volume,
4986 "newest" => Self::Newest,
4987 other => Self::Other(other.to_owned()),
4988 }
4989 }
4990}
4991
4992impl std::fmt::Display for ExploreMarketsSort {
4993 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4994 f.write_str(self.as_str())
4995 }
4996}
4997
4998impl AsRef<str> for ExploreMarketsSort {
4999 fn as_ref(&self) -> &str {
5000 self.as_str()
5001 }
5002}
5003
5004#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5005#[non_exhaustive]
5006pub struct ExploreStandalone {
5007 pub r#type: String,
5008 pub market: ExploreMarket,
5009}
5010
5011#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5012#[non_exhaustive]
5013pub struct ExportCompleteness {
5014 pub status: SnapshotCompletenessStatus,
5015 pub reason: String,
5016 pub sync_coverage: f64,
5017}
5018
5019#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5020#[non_exhaustive]
5021pub struct ExportCounts {
5022 pub pnl_days: i64,
5024 pub exported_markets: i64,
5026 pub estimated_trade_rows: i64,
5028 pub estimated_size_mb: f64,
5030}
5031
5032#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5034#[non_exhaustive]
5035pub struct ExportJobCancelledData {
5036 pub job_id: i64,
5037 pub status: String,
5038 pub format: String,
5039 pub next_action: String,
5040}
5041
5042#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5044#[non_exhaustive]
5045pub struct ExportJobExpiredData {
5046 pub job_id: i64,
5047 pub status: String,
5048 pub format: String,
5049 pub next_action: String,
5050}
5051
5052#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5054#[non_exhaustive]
5055pub struct ExportJobFailedData {
5056 pub job_id: i64,
5057 pub status: String,
5058 pub format: String,
5059 pub next_action: String,
5060 pub failure_reason: String,
5061}
5062
5063#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5065#[non_exhaustive]
5066pub struct ExportJobReadyData {
5067 pub job_id: i64,
5068 pub status: String,
5069 pub format: String,
5070 pub next_action: String,
5071 #[serde(default)]
5072 pub total_trades: Option<i64>,
5073 #[serde(default)]
5074 pub processed_trades: Option<i64>,
5075 #[serde(default)]
5077 pub file_size: Option<i64>,
5078 #[serde(default)]
5079 pub data_as_of: Option<String>,
5080}
5081
5082#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5083#[non_exhaustive]
5084pub struct ExportSourceRange {
5085 #[serde(default)]
5087 pub first_pnl_date: Option<String>,
5088 #[serde(default)]
5090 pub last_pnl_date: Option<String>,
5091 pub pnl_series_status: DailyPnlSeriesStatus,
5093 #[serde(default)]
5095 pub latest_trade_at: Option<String>,
5096 #[serde(default)]
5098 pub latest_market_activity_at: Option<String>,
5099}
5100
5101#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5102#[non_exhaustive]
5103pub struct ExportVolumeReconciliation {
5104 #[serde(default)]
5106 pub provider_lifetime_volume: Option<f64>,
5107 #[serde(default)]
5109 pub exported_activity_volume: Option<f64>,
5110 pub exported_market_cost_basis: f64,
5112 #[serde(default)]
5114 pub provider_activity_volume_gap: Option<f64>,
5115 #[serde(default)]
5117 pub activity_volume_coverage: Option<f64>,
5118}
5119
5120#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
5122#[non_exhaustive]
5123pub enum Format {
5124 #[serde(rename = "json")]
5126 Json,
5127 #[serde(rename = "ndjson")]
5129 Ndjson,
5130 #[serde(rename = "csv")]
5132 Csv,
5133 #[serde(untagged)]
5135 Other(String),
5136}
5137
5138impl Format {
5139 pub fn as_str(&self) -> &str {
5141 match self {
5142 Self::Json => "json",
5143 Self::Ndjson => "ndjson",
5144 Self::Csv => "csv",
5145 Self::Other(value) => value,
5146 }
5147 }
5148}
5149
5150impl From<&str> for Format {
5151 fn from(value: &str) -> Self {
5152 match value {
5153 "json" => Self::Json,
5154 "ndjson" => Self::Ndjson,
5155 "csv" => Self::Csv,
5156 other => Self::Other(other.to_owned()),
5157 }
5158 }
5159}
5160
5161impl std::fmt::Display for Format {
5162 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5163 f.write_str(self.as_str())
5164 }
5165}
5166
5167impl AsRef<str> for Format {
5168 fn as_ref(&self) -> &str {
5169 self.as_str()
5170 }
5171}
5172
5173#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
5175#[non_exhaustive]
5176pub enum Freshness {
5177 #[serde(rename = "fresh")]
5179 Fresh,
5180 #[serde(rename = "refreshing")]
5182 Refreshing,
5183 #[serde(rename = "stale")]
5185 Stale,
5186 #[serde(rename = "unknown")]
5188 Unknown,
5189 #[serde(untagged)]
5191 Other(String),
5192}
5193
5194impl Freshness {
5195 pub fn as_str(&self) -> &str {
5197 match self {
5198 Self::Fresh => "fresh",
5199 Self::Refreshing => "refreshing",
5200 Self::Stale => "stale",
5201 Self::Unknown => "unknown",
5202 Self::Other(value) => value,
5203 }
5204 }
5205}
5206
5207impl From<&str> for Freshness {
5208 fn from(value: &str) -> Self {
5209 match value {
5210 "fresh" => Self::Fresh,
5211 "refreshing" => Self::Refreshing,
5212 "stale" => Self::Stale,
5213 "unknown" => Self::Unknown,
5214 other => Self::Other(other.to_owned()),
5215 }
5216 }
5217}
5218
5219impl std::fmt::Display for Freshness {
5220 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5221 f.write_str(self.as_str())
5222 }
5223}
5224
5225impl AsRef<str> for Freshness {
5226 fn as_ref(&self) -> &str {
5227 self.as_str()
5228 }
5229}
5230
5231#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5232#[non_exhaustive]
5233pub struct FreshnessFailure {
5234 pub max_age_s: i64,
5236 #[serde(default, skip_serializing_if = "Option::is_none")]
5238 pub actual_age_s: Option<i64>,
5239 #[serde(default, skip_serializing_if = "Option::is_none")]
5241 pub as_of: Option<String>,
5242 pub data_quality_status: DataQualityGroupStatus,
5244}
5245
5246#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5248#[non_exhaustive]
5249pub struct Game {
5250 pub object: String,
5251 pub event_slug: String,
5253 #[serde(default, skip_serializing_if = "Option::is_none")]
5255 pub game_id: Option<String>,
5256 #[serde(default, skip_serializing_if = "Option::is_none")]
5258 pub sport: Option<String>,
5259 #[serde(default, skip_serializing_if = "Option::is_none")]
5261 pub league: Option<String>,
5262 #[serde(default, skip_serializing_if = "Option::is_none")]
5264 pub title: Option<String>,
5265 #[serde(default, skip_serializing_if = "Option::is_none")]
5267 pub scheduled_at: Option<String>,
5268 pub status: GameStatus,
5269 pub competitors: Vec<GameCompetitor>,
5271 #[serde(default, skip_serializing_if = "Option::is_none")]
5273 pub series_format: Option<String>,
5274 pub draw_offered: bool,
5276 pub markets: Vec<GameMarket>,
5278 pub freshness: GameFreshness,
5279 pub coverage: GameCoverage,
5280 pub url: String,
5282 #[serde(default, skip_serializing_if = "Option::is_none")]
5283 pub sharp_money: Option<GameSharpMoney>,
5284 #[serde(default, skip_serializing_if = "Option::is_none")]
5286 pub volume: Option<GameVolume>,
5287 #[serde(default, skip_serializing_if = "Option::is_none")]
5289 pub tournament: Option<GameTournament>,
5290}
5291
5292#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5294#[non_exhaustive]
5295pub struct GameCompetitor {
5296 pub name: String,
5298 #[serde(default, skip_serializing_if = "Option::is_none")]
5300 pub provider_id: Option<String>,
5301 #[serde(default, skip_serializing_if = "Option::is_none")]
5303 pub logo: Option<String>,
5304 #[serde(default, skip_serializing_if = "Option::is_none")]
5306 pub score: Option<String>,
5307 #[serde(default, skip_serializing_if = "Option::is_none")]
5309 pub record: Option<String>,
5310}
5311
5312#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5314#[non_exhaustive]
5315pub struct GameCoverage {
5316 pub scores: EnrichmentStatus,
5318 pub competitors: Competitors,
5320 pub schedule: EnrichmentStatus,
5322}
5323
5324#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5326#[non_exhaustive]
5327pub struct GameFreshness {
5328 pub source: GameFreshnessSource,
5330 pub source_status: SourceStatus,
5332 pub source_availability: SourceAvailability,
5334 pub source_freshness: SourceFreshness,
5336 #[serde(default, skip_serializing_if = "Option::is_none")]
5338 pub source_observed_at: Option<String>,
5339 #[serde(default, skip_serializing_if = "Option::is_none")]
5341 pub source_age_seconds: Option<i64>,
5342 pub delayed: bool,
5344 #[serde(default, skip_serializing_if = "Option::is_none")]
5346 pub scores_observed_at: Option<String>,
5347 #[serde(default, skip_serializing_if = "Option::is_none")]
5349 pub scores_source_at: Option<String>,
5350}
5351
5352#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
5354#[non_exhaustive]
5355pub enum GameFreshnessSource {
5356 #[serde(rename = "live")]
5358 Live,
5359 #[serde(rename = "upcoming")]
5361 Upcoming,
5362 #[serde(rename = "stored")]
5364 Stored,
5365 #[serde(untagged)]
5367 Other(String),
5368}
5369
5370impl GameFreshnessSource {
5371 pub fn as_str(&self) -> &str {
5373 match self {
5374 Self::Live => "live",
5375 Self::Upcoming => "upcoming",
5376 Self::Stored => "stored",
5377 Self::Other(value) => value,
5378 }
5379 }
5380}
5381
5382impl From<&str> for GameFreshnessSource {
5383 fn from(value: &str) -> Self {
5384 match value {
5385 "live" => Self::Live,
5386 "upcoming" => Self::Upcoming,
5387 "stored" => Self::Stored,
5388 other => Self::Other(other.to_owned()),
5389 }
5390 }
5391}
5392
5393impl std::fmt::Display for GameFreshnessSource {
5394 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5395 f.write_str(self.as_str())
5396 }
5397}
5398
5399impl AsRef<str> for GameFreshnessSource {
5400 fn as_ref(&self) -> &str {
5401 self.as_str()
5402 }
5403}
5404
5405#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5407#[non_exhaustive]
5408pub struct GameHoldersItem {
5409 pub data: Vec<MarketHolder>,
5411 pub has_more: bool,
5413 pub total: i64,
5415 pub market: MarketHoldersMarket,
5416 pub scan: MarketHoldersScan,
5417 pub totals: MarketHoldersTotals,
5418 pub computed_at: String,
5420 pub cached: bool,
5422}
5423
5424#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5426#[non_exhaustive]
5427pub struct GameMarket {
5428 pub id: String,
5430 pub condition_id: String,
5432 pub platform: String,
5434 #[serde(default, skip_serializing_if = "Option::is_none")]
5436 pub slug: Option<String>,
5437 #[serde(default, skip_serializing_if = "Option::is_none")]
5439 pub sports_market_type: Option<String>,
5440 #[serde(default, skip_serializing_if = "Option::is_none")]
5442 pub side: Option<GameMarketSide>,
5443 #[serde(default, skip_serializing_if = "Option::is_none")]
5445 pub outcome_yes: Option<String>,
5446 #[serde(default, skip_serializing_if = "Option::is_none")]
5448 pub outcome_no: Option<String>,
5449 #[serde(default, skip_serializing_if = "Option::is_none")]
5451 pub outcome_token_ids: Option<Vec<String>>,
5452 #[serde(default, skip_serializing_if = "Option::is_none")]
5454 pub prices: Option<GameMarketPrices>,
5455 #[serde(default, skip_serializing_if = "Option::is_none")]
5457 pub liquidity: Option<GameMarketLiquidity>,
5458}
5459
5460#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5462#[non_exhaustive]
5463pub struct GameMarketLiquidity {
5464 pub value: f64,
5466 pub source: String,
5468 #[serde(default, skip_serializing_if = "Option::is_none")]
5470 pub observed_at: Option<String>,
5471}
5472
5473#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
5477#[non_exhaustive]
5478pub enum GameMarketPriceBindingProvenance {
5479 #[serde(rename = "provider_ids")]
5481 ProviderIds,
5482 #[serde(rename = "exact_labels")]
5484 ExactLabels,
5485 #[serde(rename = "containment_labels")]
5487 ContainmentLabels,
5488 #[serde(rename = "elimination")]
5490 Elimination,
5491 #[serde(untagged)]
5493 Other(String),
5494}
5495
5496impl GameMarketPriceBindingProvenance {
5497 pub fn as_str(&self) -> &str {
5499 match self {
5500 Self::ProviderIds => "provider_ids",
5501 Self::ExactLabels => "exact_labels",
5502 Self::ContainmentLabels => "containment_labels",
5503 Self::Elimination => "elimination",
5504 Self::Other(value) => value,
5505 }
5506 }
5507}
5508
5509impl From<&str> for GameMarketPriceBindingProvenance {
5510 fn from(value: &str) -> Self {
5511 match value {
5512 "provider_ids" => Self::ProviderIds,
5513 "exact_labels" => Self::ExactLabels,
5514 "containment_labels" => Self::ContainmentLabels,
5515 "elimination" => Self::Elimination,
5516 other => Self::Other(other.to_owned()),
5517 }
5518 }
5519}
5520
5521impl std::fmt::Display for GameMarketPriceBindingProvenance {
5522 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5523 f.write_str(self.as_str())
5524 }
5525}
5526
5527impl AsRef<str> for GameMarketPriceBindingProvenance {
5528 fn as_ref(&self) -> &str {
5529 self.as_str()
5530 }
5531}
5532
5533#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5535#[non_exhaustive]
5536pub struct GameMarketPriceCompetitor {
5537 #[serde(default, skip_serializing_if = "Option::is_none")]
5539 pub provider_id: Option<i64>,
5540 pub label: String,
5542 pub price: f64,
5544 pub price_provenance: PriceProvenance,
5546}
5547
5548#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5550#[non_exhaustive]
5551pub struct GameMarketPriceIncomplete {
5552 pub state: String,
5553 pub reason: Reason,
5554 #[serde(default, skip_serializing_if = "Option::is_none")]
5556 pub competitor_a_is_yes: Option<bool>,
5557 #[serde(default, skip_serializing_if = "Option::is_none")]
5559 pub competitor_a_provider_id: Option<i64>,
5560 #[serde(default, skip_serializing_if = "Option::is_none")]
5562 pub competitor_b_provider_id: Option<i64>,
5563 #[serde(default, skip_serializing_if = "Option::is_none")]
5564 pub binding_provenance: Option<GameMarketPriceBindingProvenance>,
5565}
5566
5567#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5569#[non_exhaustive]
5570pub struct GameMarketPriceInvalid {
5571 pub state: String,
5572 pub reason: GameMarketPriceInvalidReason,
5573 #[serde(default, skip_serializing_if = "Option::is_none")]
5575 pub competitor_a_is_yes: Option<bool>,
5576 #[serde(default, skip_serializing_if = "Option::is_none")]
5578 pub competitor_a_provider_id: Option<i64>,
5579 #[serde(default, skip_serializing_if = "Option::is_none")]
5581 pub competitor_b_provider_id: Option<i64>,
5582 #[serde(default, skip_serializing_if = "Option::is_none")]
5583 pub binding_provenance: Option<GameMarketPriceBindingProvenance>,
5584}
5585
5586#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
5588#[non_exhaustive]
5589pub enum GameMarketPriceInvalidReason {
5590 #[serde(rename = "team_cardinality")]
5592 TeamCardinality,
5593 #[serde(rename = "outcome_cardinality")]
5595 OutcomeCardinality,
5596 #[serde(rename = "price_cardinality")]
5598 PriceCardinality,
5599 #[serde(rename = "non_finite_price")]
5601 NonFinitePrice,
5602 #[serde(rename = "out_of_range_price")]
5604 OutOfRangePrice,
5605 #[serde(rename = "non_complementary_prices")]
5607 NonComplementaryPrices,
5608 #[serde(rename = "ambiguous_identity")]
5610 AmbiguousIdentity,
5611 #[serde(rename = "final_identity_mismatch")]
5613 FinalIdentityMismatch,
5614 #[serde(untagged)]
5616 Other(String),
5617}
5618
5619impl GameMarketPriceInvalidReason {
5620 pub fn as_str(&self) -> &str {
5622 match self {
5623 Self::TeamCardinality => "team_cardinality",
5624 Self::OutcomeCardinality => "outcome_cardinality",
5625 Self::PriceCardinality => "price_cardinality",
5626 Self::NonFinitePrice => "non_finite_price",
5627 Self::OutOfRangePrice => "out_of_range_price",
5628 Self::NonComplementaryPrices => "non_complementary_prices",
5629 Self::AmbiguousIdentity => "ambiguous_identity",
5630 Self::FinalIdentityMismatch => "final_identity_mismatch",
5631 Self::Other(value) => value,
5632 }
5633 }
5634}
5635
5636impl From<&str> for GameMarketPriceInvalidReason {
5637 fn from(value: &str) -> Self {
5638 match value {
5639 "team_cardinality" => Self::TeamCardinality,
5640 "outcome_cardinality" => Self::OutcomeCardinality,
5641 "price_cardinality" => Self::PriceCardinality,
5642 "non_finite_price" => Self::NonFinitePrice,
5643 "out_of_range_price" => Self::OutOfRangePrice,
5644 "non_complementary_prices" => Self::NonComplementaryPrices,
5645 "ambiguous_identity" => Self::AmbiguousIdentity,
5646 "final_identity_mismatch" => Self::FinalIdentityMismatch,
5647 other => Self::Other(other.to_owned()),
5648 }
5649 }
5650}
5651
5652impl std::fmt::Display for GameMarketPriceInvalidReason {
5653 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5654 f.write_str(self.as_str())
5655 }
5656}
5657
5658impl AsRef<str> for GameMarketPriceInvalidReason {
5659 fn as_ref(&self) -> &str {
5660 self.as_str()
5661 }
5662}
5663
5664#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5666#[non_exhaustive]
5667pub struct GameMarketPricePaired {
5668 pub state: String,
5669 pub competitor_a: GameMarketPriceCompetitor,
5670 pub competitor_b: GameMarketPriceCompetitor,
5671 pub competitor_a_is_yes: bool,
5673 pub binding_provenance: GameMarketPriceBindingProvenance,
5674}
5675
5676#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5678#[non_exhaustive]
5679pub struct GameMarketPrices {
5680 pub provider: GameMarketProviderPrices,
5681 #[serde(default)]
5683 pub observed_at: Option<String>,
5684 pub observation_source: ObservationSource,
5686}
5687
5688#[derive(Debug, Clone, PartialEq)]
5691#[non_exhaustive]
5692pub enum GameMarketProviderPrices {
5693 Paired(GameMarketPricePaired),
5695 Incomplete(GameMarketPriceIncomplete),
5697 Invalid(GameMarketPriceInvalid),
5699 Unknown(serde_json::Value),
5701}
5702
5703impl<'de> Deserialize<'de> for GameMarketProviderPrices {
5704 fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
5705 let value = serde_json::Value::deserialize(deserializer)?;
5706 match value.get("state").and_then(serde_json::Value::as_str) {
5707 Some("paired") => serde_json::from_value(value)
5708 .map(Self::Paired)
5709 .map_err(de::Error::custom),
5710 Some("incomplete") => serde_json::from_value(value)
5711 .map(Self::Incomplete)
5712 .map_err(de::Error::custom),
5713 Some("invalid") => serde_json::from_value(value)
5714 .map(Self::Invalid)
5715 .map_err(de::Error::custom),
5716 _ => Ok(Self::Unknown(value)),
5717 }
5718 }
5719}
5720
5721impl Serialize for GameMarketProviderPrices {
5722 fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
5723 match self {
5724 Self::Paired(inner) => inner.serialize(serializer),
5725 Self::Incomplete(inner) => inner.serialize(serializer),
5726 Self::Invalid(inner) => inner.serialize(serializer),
5727 Self::Unknown(inner) => inner.serialize(serializer),
5728 }
5729 }
5730}
5731
5732#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
5734#[non_exhaustive]
5735pub enum GameMarketSide {
5736 #[serde(rename = "home")]
5738 Home,
5739 #[serde(rename = "away")]
5741 Away,
5742 #[serde(rename = "draw")]
5744 Draw,
5745 #[serde(rename = "other")]
5747 OtherValue,
5748 #[serde(untagged)]
5750 Other(String),
5751}
5752
5753impl GameMarketSide {
5754 pub fn as_str(&self) -> &str {
5756 match self {
5757 Self::Home => "home",
5758 Self::Away => "away",
5759 Self::Draw => "draw",
5760 Self::OtherValue => "other",
5761 Self::Other(value) => value,
5762 }
5763 }
5764}
5765
5766impl From<&str> for GameMarketSide {
5767 fn from(value: &str) -> Self {
5768 match value {
5769 "home" => Self::Home,
5770 "away" => Self::Away,
5771 "draw" => Self::Draw,
5772 "other" => Self::OtherValue,
5773 other => Self::Other(other.to_owned()),
5774 }
5775 }
5776}
5777
5778impl std::fmt::Display for GameMarketSide {
5779 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5780 f.write_str(self.as_str())
5781 }
5782}
5783
5784impl AsRef<str> for GameMarketSide {
5785 fn as_ref(&self) -> &str {
5786 self.as_str()
5787 }
5788}
5789
5790#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5792#[non_exhaustive]
5793pub struct GameSharpMoney {
5794 #[serde(default)]
5795 pub allocation: Option<Allocation>,
5796 #[serde(default)]
5797 pub computed_at: Option<String>,
5798 pub event_slug: String,
5799 #[serde(default)]
5800 pub holders_partial: Option<bool>,
5801 #[serde(default)]
5802 pub lifecycle: Option<Lifecycle>,
5803 #[serde(default)]
5804 pub money_as_of: Option<String>,
5805 pub object: String,
5806 pub outcomes: Vec<GameSharpMoneyOutcomesItem>,
5807 pub status: GameSharpMoneyStatus,
5808 #[serde(default)]
5809 pub total_usd: Option<f64>,
5810 #[serde(default)]
5811 pub trader_count: Option<i64>,
5812 #[serde(default)]
5813 pub unallocated_usd: Option<f64>,
5814 #[serde(default)]
5815 pub verdict: Option<serde_json::Value>,
5816}
5817
5818#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5819#[non_exhaustive]
5820pub struct GameSharpMoneyOutcomesItem {
5821 pub is_leader: bool,
5822 pub label: String,
5823 pub pct: i64,
5824 pub side: GameSharpMoneyOutcomesSide,
5825 pub usd: f64,
5826 pub wallets: GameSharpMoneyOutcomesItemWallets,
5827}
5828
5829#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5830#[non_exhaustive]
5831pub struct GameSharpMoneyOutcomesItemWallets {
5832 pub a: i64,
5833 pub b: i64,
5834 pub s: i64,
5835}
5836
5837#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
5839#[non_exhaustive]
5840pub enum GameSharpMoneyOutcomesSide {
5841 #[serde(rename = "home")]
5843 Home,
5844 #[serde(rename = "draw")]
5846 Draw,
5847 #[serde(rename = "away")]
5849 Away,
5850 #[serde(untagged)]
5852 Other(String),
5853}
5854
5855impl GameSharpMoneyOutcomesSide {
5856 pub fn as_str(&self) -> &str {
5858 match self {
5859 Self::Home => "home",
5860 Self::Draw => "draw",
5861 Self::Away => "away",
5862 Self::Other(value) => value,
5863 }
5864 }
5865}
5866
5867impl From<&str> for GameSharpMoneyOutcomesSide {
5868 fn from(value: &str) -> Self {
5869 match value {
5870 "home" => Self::Home,
5871 "draw" => Self::Draw,
5872 "away" => Self::Away,
5873 other => Self::Other(other.to_owned()),
5874 }
5875 }
5876}
5877
5878impl std::fmt::Display for GameSharpMoneyOutcomesSide {
5879 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5880 f.write_str(self.as_str())
5881 }
5882}
5883
5884impl AsRef<str> for GameSharpMoneyOutcomesSide {
5885 fn as_ref(&self) -> &str {
5886 self.as_str()
5887 }
5888}
5889
5890#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
5892#[non_exhaustive]
5893pub enum GameSharpMoneyStatus {
5894 #[serde(rename = "computed")]
5896 Computed,
5897 #[serde(rename = "not_computed")]
5899 NotComputed,
5900 #[serde(rename = "unavailable")]
5902 Unavailable,
5903 #[serde(untagged)]
5905 Other(String),
5906}
5907
5908impl GameSharpMoneyStatus {
5909 pub fn as_str(&self) -> &str {
5911 match self {
5912 Self::Computed => "computed",
5913 Self::NotComputed => "not_computed",
5914 Self::Unavailable => "unavailable",
5915 Self::Other(value) => value,
5916 }
5917 }
5918}
5919
5920impl From<&str> for GameSharpMoneyStatus {
5921 fn from(value: &str) -> Self {
5922 match value {
5923 "computed" => Self::Computed,
5924 "not_computed" => Self::NotComputed,
5925 "unavailable" => Self::Unavailable,
5926 other => Self::Other(other.to_owned()),
5927 }
5928 }
5929}
5930
5931impl std::fmt::Display for GameSharpMoneyStatus {
5932 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5933 f.write_str(self.as_str())
5934 }
5935}
5936
5937impl AsRef<str> for GameSharpMoneyStatus {
5938 fn as_ref(&self) -> &str {
5939 self.as_str()
5940 }
5941}
5942
5943#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5945#[non_exhaustive]
5946pub struct GameStatus {
5947 pub state: State,
5949 #[serde(default, skip_serializing_if = "Option::is_none")]
5951 pub match_status: Option<MatchStatus>,
5952 #[serde(default, skip_serializing_if = "Option::is_none")]
5954 pub provider_status: Option<String>,
5955 #[serde(default, skip_serializing_if = "Option::is_none")]
5957 pub period: Option<String>,
5958 #[serde(default, skip_serializing_if = "Option::is_none")]
5960 pub clock: Option<String>,
5961 #[serde(default, skip_serializing_if = "Option::is_none")]
5963 pub live: Option<bool>,
5964 pub ended: bool,
5966}
5967
5968#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5970#[non_exhaustive]
5971pub struct GameTournament {
5972 pub label: String,
5974 pub tour: Tour,
5976 #[serde(default, skip_serializing_if = "Option::is_none")]
5978 pub draw: Option<Draw>,
5979 #[serde(default, skip_serializing_if = "Option::is_none")]
5981 pub tier: Option<String>,
5982 #[serde(default, skip_serializing_if = "Option::is_none")]
5984 pub location: Option<GameTournamentLocation>,
5985 #[serde(default, skip_serializing_if = "Option::is_none")]
5987 pub timezone: Option<String>,
5988 pub edition_year: i64,
5990 pub starts_on: String,
5992 pub ends_on: String,
5994 pub source_urls: Vec<String>,
5996 pub checked_on: String,
5998}
5999
6000#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6002#[non_exhaustive]
6003pub struct GameTournamentLocation {
6004 pub city: String,
6005 pub country: String,
6006 pub country_code: String,
6008}
6009
6010#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6012#[non_exhaustive]
6013pub struct GameTrade {
6014 pub id: String,
6016 pub traded_at: String,
6018 pub side: Side,
6020 #[serde(default)]
6022 pub outcome: Option<String>,
6023 #[serde(default)]
6025 pub outcome_index: Option<i64>,
6026 pub price: f64,
6028 pub shares: f64,
6030 pub size_usd: f64,
6032 #[serde(default)]
6034 pub point: Option<f64>,
6035 pub trader: GameTradeTrader,
6036 pub market: GameTradeMarket,
6037}
6038
6039#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6040#[non_exhaustive]
6041pub struct GameTradeMarket {
6042 pub id: String,
6044 pub condition_id: String,
6046 #[serde(default)]
6048 pub title: Option<String>,
6049 #[serde(default)]
6051 pub slug: Option<String>,
6052 #[serde(default)]
6054 pub line_label: Option<String>,
6055}
6056
6057#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6058#[non_exhaustive]
6059pub struct GameTradeTrader {
6060 pub address: String,
6062 pub display_name: String,
6064 #[serde(default)]
6066 pub grade: Option<Grade>,
6067}
6068
6069#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6071#[non_exhaustive]
6072pub struct GameVolume {
6073 pub value: f64,
6075 #[serde(default, skip_serializing_if = "Option::is_none")]
6077 pub unit: Option<String>,
6078 #[serde(default, skip_serializing_if = "Option::is_none")]
6080 pub basis: Option<Basis>,
6081 pub source: Source,
6083 #[serde(default, skip_serializing_if = "Option::is_none")]
6085 pub observed_at: Option<String>,
6086 pub fresh_for_seconds: i64,
6088}
6089
6090#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6092#[non_exhaustive]
6093pub struct GamesCoverage {
6094 pub sports: Vec<String>,
6096 pub leagues: Vec<String>,
6098 pub sources_unavailable: Vec<String>,
6100}
6101
6102#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6103#[non_exhaustive]
6104pub struct GetApiDiscoveryResponse {
6105 pub object: String,
6106 pub data: ApiDiscovery,
6107 pub meta: ResponseMeta,
6108}
6109
6110#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6111#[non_exhaustive]
6112pub struct GetCategoryLeaderboardResponse {
6113 pub object: String,
6114 pub data: Vec<CategoryLeader>,
6115 pub has_more: bool,
6116 #[serde(default, skip_serializing_if = "Option::is_none")]
6117 pub next_cursor: Option<String>,
6118 #[serde(default, skip_serializing_if = "Option::is_none")]
6120 pub total: Option<i64>,
6121 pub meta: ResponseMeta,
6122}
6123
6124#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6125#[non_exhaustive]
6126pub struct GetCoverageResponse {
6127 pub object: String,
6128 pub data: Platforms,
6129 pub meta: ResponseMeta,
6130}
6131
6132#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6133#[non_exhaustive]
6134pub struct GetDailyReportSnapshotResponse {
6135 pub object: String,
6136 pub data: ReportSnapshot,
6137 pub meta: ResponseMeta,
6138}
6139
6140#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
6142#[non_exhaustive]
6143pub enum GetEdgeHunterView {
6144 #[serde(rename = "board")]
6146 Board,
6147 #[serde(rename = "signals")]
6149 Signals,
6150 #[serde(rename = "observations")]
6152 Observations,
6153 #[serde(untagged)]
6155 Other(String),
6156}
6157
6158impl GetEdgeHunterView {
6159 pub fn as_str(&self) -> &str {
6161 match self {
6162 Self::Board => "board",
6163 Self::Signals => "signals",
6164 Self::Observations => "observations",
6165 Self::Other(value) => value,
6166 }
6167 }
6168}
6169
6170impl From<&str> for GetEdgeHunterView {
6171 fn from(value: &str) -> Self {
6172 match value {
6173 "board" => Self::Board,
6174 "signals" => Self::Signals,
6175 "observations" => Self::Observations,
6176 other => Self::Other(other.to_owned()),
6177 }
6178 }
6179}
6180
6181impl std::fmt::Display for GetEdgeHunterView {
6182 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6183 f.write_str(self.as_str())
6184 }
6185}
6186
6187impl AsRef<str> for GetEdgeHunterView {
6188 fn as_ref(&self) -> &str {
6189 self.as_str()
6190 }
6191}
6192
6193#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6195#[serde(untagged)]
6196#[non_exhaustive]
6197pub enum GetEventReplaySinceMinSize {
6198 Number(f64),
6200 Text(String),
6202}
6203impl From<f64> for GetEventReplaySinceMinSize {
6204 fn from(value: f64) -> Self {
6205 Self::Number(value)
6206 }
6207}
6208impl From<String> for GetEventReplaySinceMinSize {
6209 fn from(value: String) -> Self {
6210 Self::Text(value)
6211 }
6212}
6213impl From<&str> for GetEventReplaySinceMinSize {
6214 fn from(value: &str) -> Self {
6215 Self::Text(value.to_owned())
6216 }
6217}
6218impl std::fmt::Display for GetEventReplaySinceMinSize {
6219 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6220 match self {
6221 Self::Number(value) => value.fmt(f),
6222 Self::Text(value) => value.fmt(f),
6223 }
6224 }
6225}
6226
6227#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6228#[non_exhaustive]
6229pub struct GetEventReplaySinceResponse {
6230 pub object: String,
6231 pub data: Vec<EventReplayEvent>,
6232 pub has_more: bool,
6233 pub next_cursor: String,
6234 pub meta: EventReplayMeta,
6235}
6236
6237#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6238#[non_exhaustive]
6239pub struct GetGameHoldersResponse {
6240 pub object: String,
6241 pub data: Vec<BatchGameHoldersItem>,
6242 pub meta: BatchResponseMeta,
6243}
6244
6245#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6246#[non_exhaustive]
6247pub struct GetGameResponse {
6248 pub object: String,
6249 pub data: Game,
6250 pub as_of: String,
6252 pub meta: ResponseMeta,
6253}
6254
6255#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6256#[non_exhaustive]
6257pub struct GetGameSharpMoneyResponse {
6258 pub object: String,
6259 pub data: GameSharpMoney,
6260 pub meta: ResponseMeta,
6261}
6262
6263#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6264#[non_exhaustive]
6265pub struct GetHealthResponse {
6266 pub object: String,
6267 pub data: GetHealthResponseData,
6268 pub meta: ResponseMeta,
6269}
6270
6271#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6272#[non_exhaustive]
6273pub struct GetHealthResponseData {
6274 pub status: GetHealthResponseDataStatus,
6275 pub db: bool,
6276 pub cache: bool,
6277 pub subsystems: GetHealthResponseDataSubsystems,
6278}
6279
6280#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
6282#[non_exhaustive]
6283pub enum GetHealthResponseDataStatus {
6284 #[serde(rename = "ok")]
6286 Ok,
6287 #[serde(rename = "degraded")]
6289 Degraded,
6290 #[serde(rename = "down")]
6292 Down,
6293 #[serde(rename = "maintenance")]
6295 Maintenance,
6296 #[serde(untagged)]
6298 Other(String),
6299}
6300
6301impl GetHealthResponseDataStatus {
6302 pub fn as_str(&self) -> &str {
6304 match self {
6305 Self::Ok => "ok",
6306 Self::Degraded => "degraded",
6307 Self::Down => "down",
6308 Self::Maintenance => "maintenance",
6309 Self::Other(value) => value,
6310 }
6311 }
6312}
6313
6314impl From<&str> for GetHealthResponseDataStatus {
6315 fn from(value: &str) -> Self {
6316 match value {
6317 "ok" => Self::Ok,
6318 "degraded" => Self::Degraded,
6319 "down" => Self::Down,
6320 "maintenance" => Self::Maintenance,
6321 other => Self::Other(other.to_owned()),
6322 }
6323 }
6324}
6325
6326impl std::fmt::Display for GetHealthResponseDataStatus {
6327 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6328 f.write_str(self.as_str())
6329 }
6330}
6331
6332impl AsRef<str> for GetHealthResponseDataStatus {
6333 fn as_ref(&self) -> &str {
6334 self.as_str()
6335 }
6336}
6337
6338#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6339#[non_exhaustive]
6340pub struct GetHealthResponseDataSubsystems {
6341 pub webhook_compatibility: bool,
6343 pub background_jobs: GetHealthResponseDataSubsystemsBackgroundJobs,
6345}
6346
6347#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6349#[non_exhaustive]
6350pub struct GetHealthResponseDataSubsystemsBackgroundJobs {
6351 pub status: GetHealthResponseDataSubsystemsBackgroundJobsStatus,
6352 pub checked: bool,
6353 pub total: i64,
6354 pub healthy: i64,
6355 pub stale: i64,
6356 pub missing: i64,
6357 pub invalid: i64,
6358 pub unconfigured: i64,
6359 pub paused: i64,
6361}
6362
6363#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
6365#[non_exhaustive]
6366pub enum GetHealthResponseDataSubsystemsBackgroundJobsStatus {
6367 #[serde(rename = "ok")]
6369 Ok,
6370 #[serde(rename = "degraded")]
6372 Degraded,
6373 #[serde(rename = "down")]
6375 Down,
6376 #[serde(rename = "not_checked")]
6378 NotChecked,
6379 #[serde(untagged)]
6381 Other(String),
6382}
6383
6384impl GetHealthResponseDataSubsystemsBackgroundJobsStatus {
6385 pub fn as_str(&self) -> &str {
6387 match self {
6388 Self::Ok => "ok",
6389 Self::Degraded => "degraded",
6390 Self::Down => "down",
6391 Self::NotChecked => "not_checked",
6392 Self::Other(value) => value,
6393 }
6394 }
6395}
6396
6397impl From<&str> for GetHealthResponseDataSubsystemsBackgroundJobsStatus {
6398 fn from(value: &str) -> Self {
6399 match value {
6400 "ok" => Self::Ok,
6401 "degraded" => Self::Degraded,
6402 "down" => Self::Down,
6403 "not_checked" => Self::NotChecked,
6404 other => Self::Other(other.to_owned()),
6405 }
6406 }
6407}
6408
6409impl std::fmt::Display for GetHealthResponseDataSubsystemsBackgroundJobsStatus {
6410 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6411 f.write_str(self.as_str())
6412 }
6413}
6414
6415impl AsRef<str> for GetHealthResponseDataSubsystemsBackgroundJobsStatus {
6416 fn as_ref(&self) -> &str {
6417 self.as_str()
6418 }
6419}
6420
6421#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6422#[non_exhaustive]
6423pub struct GetInsiderRadarFlagResponse {
6424 pub object: String,
6425 pub data: SuspiciousTrade,
6426 pub meta: ResponseMeta,
6427}
6428
6429#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6430#[non_exhaustive]
6431pub struct GetLargeTradeResponse {
6432 pub object: String,
6433 pub data: LargeTradeDetail,
6434 pub meta: ResponseMeta,
6435}
6436
6437#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6438#[non_exhaustive]
6439pub struct GetMarketCandlesResponse {
6440 pub object: String,
6441 pub data: MarketCandles,
6442 pub meta: ResponseMeta,
6443}
6444
6445#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6446#[non_exhaustive]
6447pub struct GetMarketFlowResponse {
6448 pub object: String,
6449 pub data: MarketFlow,
6450 pub meta: ResponseMeta,
6451}
6452
6453#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
6455#[non_exhaustive]
6456pub enum GetMarketHoldersOutcome {
6457 #[serde(rename = "yes")]
6459 Yes,
6460 #[serde(rename = "no")]
6462 No,
6463 #[serde(rename = "all")]
6465 All,
6466 #[serde(untagged)]
6468 Other(String),
6469}
6470
6471impl GetMarketHoldersOutcome {
6472 pub fn as_str(&self) -> &str {
6474 match self {
6475 Self::Yes => "yes",
6476 Self::No => "no",
6477 Self::All => "all",
6478 Self::Other(value) => value,
6479 }
6480 }
6481}
6482
6483impl From<&str> for GetMarketHoldersOutcome {
6484 fn from(value: &str) -> Self {
6485 match value {
6486 "yes" => Self::Yes,
6487 "no" => Self::No,
6488 "all" => Self::All,
6489 other => Self::Other(other.to_owned()),
6490 }
6491 }
6492}
6493
6494impl std::fmt::Display for GetMarketHoldersOutcome {
6495 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6496 f.write_str(self.as_str())
6497 }
6498}
6499
6500impl AsRef<str> for GetMarketHoldersOutcome {
6501 fn as_ref(&self) -> &str {
6502 self.as_str()
6503 }
6504}
6505
6506#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6507#[non_exhaustive]
6508pub struct GetMarketHoldersResponse {
6509 pub object: String,
6510 pub data: Vec<MarketHolder>,
6511 pub has_more: bool,
6512 #[serde(default, skip_serializing_if = "Option::is_none")]
6514 pub next_cursor: Option<String>,
6515 pub total: i64,
6517 pub market: MarketHoldersMarket,
6518 pub scan: MarketHoldersScan,
6519 pub totals: MarketHoldersTotals,
6520 pub meta: ResponseMeta,
6521}
6522
6523#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6524#[non_exhaustive]
6525pub struct GetMarketIntelResponse {
6526 pub object: String,
6527 pub data: MarketFlow,
6528 pub meta: ResponseMeta,
6529}
6530
6531#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6532#[non_exhaustive]
6533pub struct GetMarketSnapshotResponse {
6534 pub object: String,
6535 pub data: MarketSnapshot,
6536 pub meta: ResponseMeta,
6537}
6538
6539#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6540#[non_exhaustive]
6541pub struct GetMarketTopHoldersResponse {
6542 pub object: String,
6543 pub data: MarketTopHolders,
6544 pub meta: ResponseMeta,
6545}
6546
6547#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6548#[non_exhaustive]
6549pub struct GetMarketWalletsInOutResponse {
6550 pub object: String,
6551 pub data: MarketWalletsInOut,
6552 pub meta: ResponseMeta,
6553}
6554
6555#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
6557#[non_exhaustive]
6558pub enum GetMarketWalletsInOutWindow {
6559 #[serde(rename = "24h")]
6561 V24h,
6562 #[serde(rename = "7d")]
6564 V7d,
6565 #[serde(untagged)]
6567 Other(String),
6568}
6569
6570impl GetMarketWalletsInOutWindow {
6571 pub fn as_str(&self) -> &str {
6573 match self {
6574 Self::V24h => "24h",
6575 Self::V7d => "7d",
6576 Self::Other(value) => value,
6577 }
6578 }
6579}
6580
6581impl From<&str> for GetMarketWalletsInOutWindow {
6582 fn from(value: &str) -> Self {
6583 match value {
6584 "24h" => Self::V24h,
6585 "7d" => Self::V7d,
6586 other => Self::Other(other.to_owned()),
6587 }
6588 }
6589}
6590
6591impl std::fmt::Display for GetMarketWalletsInOutWindow {
6592 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6593 f.write_str(self.as_str())
6594 }
6595}
6596
6597impl AsRef<str> for GetMarketWalletsInOutWindow {
6598 fn as_ref(&self) -> &str {
6599 self.as_str()
6600 }
6601}
6602
6603#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6604#[non_exhaustive]
6605pub struct GetMonthlyReportSnapshotResponse {
6606 pub object: String,
6607 pub data: ReportSnapshot,
6608 pub meta: ResponseMeta,
6609}
6610
6611#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6612#[non_exhaustive]
6613pub struct GetPickOfTheDayArchiveResponse {
6614 pub object: String,
6615 pub data: PickOfTheDayArchive,
6616 pub meta: ResponseMeta,
6617}
6618
6619#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6620#[non_exhaustive]
6621pub struct GetPickOfTheDayLedgerEntryResponse {
6622 pub object: String,
6623 pub data: PickOfTheDayLedgerEntry,
6624 pub meta: ResponseMeta,
6625}
6626
6627#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6628#[non_exhaustive]
6629pub struct GetPickOfTheDayLedgerResponse {
6630 pub object: String,
6631 pub data: PickOfTheDayLedger,
6632 pub meta: ResponseMeta,
6633}
6634
6635#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6636#[non_exhaustive]
6637pub struct GetPickOfTheDayResponse {
6638 pub object: String,
6639 pub data: serde_json::Value,
6640 pub meta: ResponseMeta,
6641}
6642
6643#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6644#[non_exhaustive]
6645pub struct GetPickOfTheDayStatsResponse {
6646 pub object: String,
6647 pub data: PickOfTheDayStats,
6648 pub meta: ResponseMeta,
6649}
6650
6651#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6652#[non_exhaustive]
6653pub struct GetPlatformsResponse {
6654 pub object: String,
6655 pub data: Platforms,
6656 pub meta: ResponseMeta,
6657}
6658
6659#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6660#[non_exhaustive]
6661pub struct GetPositionTimelineByIdResponse {
6662 pub object: String,
6663 pub data: Vec<PositionTimelineEvent>,
6664 pub has_more: bool,
6665 #[serde(default, skip_serializing_if = "Option::is_none")]
6666 pub next_cursor: Option<String>,
6667 #[serde(default, skip_serializing_if = "Option::is_none")]
6669 pub total: Option<i64>,
6670 pub meta: ResponseMeta,
6671}
6672
6673#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6674#[non_exhaustive]
6675pub struct GetPositionTimelineResponse {
6676 pub object: String,
6677 pub data: Vec<PositionTimelineEvent>,
6678 pub has_more: bool,
6679 #[serde(default, skip_serializing_if = "Option::is_none")]
6680 pub next_cursor: Option<String>,
6681 #[serde(default, skip_serializing_if = "Option::is_none")]
6683 pub total: Option<i64>,
6684 pub meta: ResponseMeta,
6685}
6686
6687#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6688#[non_exhaustive]
6689pub struct GetReportsResponse {
6690 pub object: String,
6691 pub data: ReportSnapshot,
6692 pub meta: ResponseMeta,
6693}
6694
6695#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6696#[non_exhaustive]
6697pub struct GetResolutionReportResponse {
6698 pub object: String,
6699 pub data: ResolutionReport,
6700 pub meta: ResponseMeta,
6701}
6702
6703#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6704#[non_exhaustive]
6705pub struct GetSportLeaderboardResponse {
6706 pub object: String,
6707 pub data: SportLeaderboard,
6708 pub meta: ResponseMeta,
6709}
6710
6711#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6712#[non_exhaustive]
6713pub struct GetSuspiciousTradeResponse {
6714 pub object: String,
6715 pub data: SuspiciousTrade,
6716 pub meta: ResponseMeta,
6717}
6718
6719#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6720#[non_exhaustive]
6721pub struct GetTraderCategoryRecordsResponse {
6722 pub object: String,
6723 pub data: TraderCategoryRecords,
6724 pub meta: ResponseMeta,
6725}
6726
6727#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6728#[non_exhaustive]
6729pub struct GetTraderContextResponse {
6730 pub object: String,
6731 pub data: TraderContext,
6732 pub meta: ResponseMeta,
6733}
6734
6735#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6736#[non_exhaustive]
6737pub struct GetTraderExportSnapshotResponse {
6738 pub object: String,
6739 pub data: TraderExportSnapshot,
6740 pub meta: ResponseMeta,
6741}
6742
6743#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6744#[non_exhaustive]
6745pub struct GetTraderGradeAtResponse {
6746 pub object: String,
6747 pub data: TraderGradeAt,
6748 pub meta: ResponseMeta,
6749}
6750
6751#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6752#[non_exhaustive]
6753pub struct GetTraderPnlResponse {
6754 pub object: String,
6755 pub data: TraderPnl,
6756 pub meta: ResponseMeta,
6757}
6758
6759#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6760#[non_exhaustive]
6761pub struct GetTraderResponse {
6762 pub object: String,
6763 pub data: Trader,
6764 pub meta: ResponseMeta,
6765}
6766
6767#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6768#[non_exhaustive]
6769pub struct GetWebhookResponse {
6770 pub object: String,
6771 pub data: WebhookEndpoint,
6772 pub meta: ResponseMeta,
6773}
6774
6775#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6776#[non_exhaustive]
6777pub struct GetWebhookVerificationAttemptResponse {
6778 pub object: String,
6779 pub data: WebhookVerificationAttempt,
6780 pub meta: ResponseMeta,
6781}
6782
6783#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6784#[non_exhaustive]
6785pub struct GetWeeklyReportSnapshotResponse {
6786 pub object: String,
6787 pub data: ReportSnapshot,
6788 pub meta: ResponseMeta,
6789}
6790
6791#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6792#[non_exhaustive]
6793pub struct GetWhaleTradeResponse {
6794 pub object: String,
6795 pub data: LargeTradeDetail,
6796 pub meta: ResponseMeta,
6797}
6798
6799#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
6801#[non_exhaustive]
6802pub enum Grade {
6803 #[serde(rename = "S")]
6805 S,
6806 #[serde(rename = "A")]
6808 A,
6809 #[serde(rename = "B")]
6811 B,
6812 #[serde(rename = "C")]
6814 C,
6815 #[serde(rename = "D")]
6817 D,
6818 #[serde(rename = "F")]
6820 F,
6821 #[serde(untagged)]
6823 Other(String),
6824}
6825
6826impl Grade {
6827 pub fn as_str(&self) -> &str {
6829 match self {
6830 Self::S => "S",
6831 Self::A => "A",
6832 Self::B => "B",
6833 Self::C => "C",
6834 Self::D => "D",
6835 Self::F => "F",
6836 Self::Other(value) => value,
6837 }
6838 }
6839}
6840
6841impl From<&str> for Grade {
6842 fn from(value: &str) -> Self {
6843 match value {
6844 "S" => Self::S,
6845 "A" => Self::A,
6846 "B" => Self::B,
6847 "C" => Self::C,
6848 "D" => Self::D,
6849 "F" => Self::F,
6850 other => Self::Other(other.to_owned()),
6851 }
6852 }
6853}
6854
6855impl std::fmt::Display for Grade {
6856 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6857 f.write_str(self.as_str())
6858 }
6859}
6860
6861impl AsRef<str> for Grade {
6862 fn as_ref(&self) -> &str {
6863 self.as_str()
6864 }
6865}
6866
6867#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
6869#[non_exhaustive]
6870pub enum GradeAtTradeStatus {
6871 #[serde(rename = "graded")]
6873 Graded,
6874 #[serde(rename = "ungraded")]
6876 Ungraded,
6877 #[serde(rename = "unknown")]
6879 Unknown,
6880 #[serde(untagged)]
6882 Other(String),
6883}
6884
6885impl GradeAtTradeStatus {
6886 pub fn as_str(&self) -> &str {
6888 match self {
6889 Self::Graded => "graded",
6890 Self::Ungraded => "ungraded",
6891 Self::Unknown => "unknown",
6892 Self::Other(value) => value,
6893 }
6894 }
6895}
6896
6897impl From<&str> for GradeAtTradeStatus {
6898 fn from(value: &str) -> Self {
6899 match value {
6900 "graded" => Self::Graded,
6901 "ungraded" => Self::Ungraded,
6902 "unknown" => Self::Unknown,
6903 other => Self::Other(other.to_owned()),
6904 }
6905 }
6906}
6907
6908impl std::fmt::Display for GradeAtTradeStatus {
6909 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6910 f.write_str(self.as_str())
6911 }
6912}
6913
6914impl AsRef<str> for GradeAtTradeStatus {
6915 fn as_ref(&self) -> &str {
6916 self.as_str()
6917 }
6918}
6919
6920#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
6922#[non_exhaustive]
6923pub enum GradeBasis {
6924 #[serde(rename = "at_resolution")]
6926 AtResolution,
6927 #[serde(rename = "current")]
6929 Current,
6930 #[serde(untagged)]
6932 Other(String),
6933}
6934
6935impl GradeBasis {
6936 pub fn as_str(&self) -> &str {
6938 match self {
6939 Self::AtResolution => "at_resolution",
6940 Self::Current => "current",
6941 Self::Other(value) => value,
6942 }
6943 }
6944}
6945
6946impl From<&str> for GradeBasis {
6947 fn from(value: &str) -> Self {
6948 match value {
6949 "at_resolution" => Self::AtResolution,
6950 "current" => Self::Current,
6951 other => Self::Other(other.to_owned()),
6952 }
6953 }
6954}
6955
6956impl std::fmt::Display for GradeBasis {
6957 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6958 f.write_str(self.as_str())
6959 }
6960}
6961
6962impl AsRef<str> for GradeBasis {
6963 fn as_ref(&self) -> &str {
6964 self.as_str()
6965 }
6966}
6967
6968#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
6970#[non_exhaustive]
6971pub enum Granularity {
6972 #[serde(rename = "daily")]
6974 Daily,
6975 #[serde(rename = "weekly")]
6977 Weekly,
6978 #[serde(rename = "monthly")]
6980 Monthly,
6981 #[serde(untagged)]
6983 Other(String),
6984}
6985
6986impl Granularity {
6987 pub fn as_str(&self) -> &str {
6989 match self {
6990 Self::Daily => "daily",
6991 Self::Weekly => "weekly",
6992 Self::Monthly => "monthly",
6993 Self::Other(value) => value,
6994 }
6995 }
6996}
6997
6998impl From<&str> for Granularity {
6999 fn from(value: &str) -> Self {
7000 match value {
7001 "daily" => Self::Daily,
7002 "weekly" => Self::Weekly,
7003 "monthly" => Self::Monthly,
7004 other => Self::Other(other.to_owned()),
7005 }
7006 }
7007}
7008
7009impl std::fmt::Display for Granularity {
7010 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7011 f.write_str(self.as_str())
7012 }
7013}
7014
7015impl AsRef<str> for Granularity {
7016 fn as_ref(&self) -> &str {
7017 self.as_str()
7018 }
7019}
7020
7021#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7023#[non_exhaustive]
7024pub struct HolderCategoryEvidence {
7025 pub status: Status,
7026 #[serde(default, skip_serializing_if = "Option::is_none")]
7027 pub canonical_category: Option<String>,
7028 #[serde(default, skip_serializing_if = "Option::is_none")]
7029 pub skill: Option<CategorySkillV2>,
7030}
7031
7032#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
7034#[non_exhaustive]
7035pub enum IdentityStatus {
7036 #[serde(rename = "resolved")]
7038 Resolved,
7039 #[serde(rename = "infrastructure")]
7041 Infrastructure,
7042 #[serde(rename = "unavailable")]
7044 Unavailable,
7045 #[serde(untagged)]
7047 Other(String),
7048}
7049
7050impl IdentityStatus {
7051 pub fn as_str(&self) -> &str {
7053 match self {
7054 Self::Resolved => "resolved",
7055 Self::Infrastructure => "infrastructure",
7056 Self::Unavailable => "unavailable",
7057 Self::Other(value) => value,
7058 }
7059 }
7060}
7061
7062impl From<&str> for IdentityStatus {
7063 fn from(value: &str) -> Self {
7064 match value {
7065 "resolved" => Self::Resolved,
7066 "infrastructure" => Self::Infrastructure,
7067 "unavailable" => Self::Unavailable,
7068 other => Self::Other(other.to_owned()),
7069 }
7070 }
7071}
7072
7073impl std::fmt::Display for IdentityStatus {
7074 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7075 f.write_str(self.as_str())
7076 }
7077}
7078
7079impl AsRef<str> for IdentityStatus {
7080 fn as_ref(&self) -> &str {
7081 self.as_str()
7082 }
7083}
7084
7085#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
7087#[non_exhaustive]
7088pub enum Kind {
7089 #[serde(rename = "sports")]
7091 Sports,
7092 #[serde(rename = "esports")]
7094 Esports,
7095 #[serde(untagged)]
7097 Other(String),
7098}
7099
7100impl Kind {
7101 pub fn as_str(&self) -> &str {
7103 match self {
7104 Self::Sports => "sports",
7105 Self::Esports => "esports",
7106 Self::Other(value) => value,
7107 }
7108 }
7109}
7110
7111impl From<&str> for Kind {
7112 fn from(value: &str) -> Self {
7113 match value {
7114 "sports" => Self::Sports,
7115 "esports" => Self::Esports,
7116 other => Self::Other(other.to_owned()),
7117 }
7118 }
7119}
7120
7121impl std::fmt::Display for Kind {
7122 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7123 f.write_str(self.as_str())
7124 }
7125}
7126
7127impl AsRef<str> for Kind {
7128 fn as_ref(&self) -> &str {
7129 self.as_str()
7130 }
7131}
7132
7133#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7134#[non_exhaustive]
7135pub struct LargeExportPolicy {
7136 pub mode: String,
7137 pub current_internal_route: String,
7138 pub v1_async: LargeExportPolicyV1Async,
7140 pub direct_streaming: LargeExportPolicyDirectStreaming,
7141 pub async_job: LargeExportPolicyAsyncJob,
7142 pub rate_limit: LargeExportPolicyRateLimit,
7143}
7144
7145#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7146#[non_exhaustive]
7147pub struct LargeExportPolicyAsyncJob {
7148 pub available_when: String,
7149 pub status_values: Vec<String>,
7150 pub retention: String,
7151}
7152
7153#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7154#[non_exhaustive]
7155pub struct LargeExportPolicyDirectStreaming {
7156 pub available_when: String,
7157 pub backpressure: String,
7158 pub chunk_size_rows: i64,
7159}
7160
7161#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7162#[non_exhaustive]
7163pub struct LargeExportPolicyRateLimit {
7164 pub daily_cap_per_user: i64,
7165 pub per_address_hourly_cap: i64,
7166}
7167
7168#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7170#[non_exhaustive]
7171pub struct LargeExportPolicyV1Async {
7172 pub submit_route: String,
7174 pub status_route: String,
7176 pub download_route: String,
7178 pub cancel_route: String,
7180 pub formats: Vec<Format>,
7182 pub status_values: Vec<TraderExportJobDataStatus>,
7184 pub retention: String,
7186}
7187
7188#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7189#[non_exhaustive]
7190pub struct LargePosition {
7191 pub id: String,
7193 pub platform: String,
7195 #[serde(default, skip_serializing_if = "Option::is_none")]
7197 pub total_size_usd: Option<f64>,
7198 #[serde(default, skip_serializing_if = "Option::is_none")]
7200 pub position_unrealized_pnl: Option<f64>,
7201 #[serde(default, skip_serializing_if = "Option::is_none")]
7203 pub combined_value_usd: Option<f64>,
7204 #[serde(default, skip_serializing_if = "Option::is_none")]
7206 pub combined_unrealized_pnl: Option<f64>,
7207 pub is_two_sided: bool,
7209 pub holdings: Vec<LargePositionHoldingsItem>,
7211 pub share_count: f64,
7213 #[serde(default, skip_serializing_if = "Option::is_none")]
7215 pub avg_entry_price: Option<f64>,
7216 #[serde(default, skip_serializing_if = "Option::is_none")]
7218 pub current_price: Option<f64>,
7219 #[serde(default, skip_serializing_if = "Option::is_none")]
7221 pub outcome_label: Option<String>,
7222 #[serde(default)]
7224 pub token_id: Option<String>,
7225 pub event_leg_count: i64,
7227 #[serde(default, skip_serializing_if = "Option::is_none")]
7229 pub event_total_value_usd: Option<f64>,
7230 pub first_seen_at: String,
7231 pub last_updated_at: String,
7232 pub trader: LargePositionTrader,
7233 pub market: LargePositionMarket,
7234}
7235
7236#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7237#[non_exhaustive]
7238pub struct LargePositionHoldingsItem {
7239 pub outcome_index: i64,
7241 #[serde(default, skip_serializing_if = "Option::is_none")]
7243 pub outcome_label: Option<String>,
7244 #[serde(default)]
7246 pub token_id: Option<String>,
7247 pub share_count: f64,
7249 #[serde(default, skip_serializing_if = "Option::is_none")]
7251 pub avg_entry_price: Option<f64>,
7252 #[serde(default, skip_serializing_if = "Option::is_none")]
7254 pub current_price: Option<f64>,
7255 #[serde(default, skip_serializing_if = "Option::is_none")]
7257 pub value_usd: Option<f64>,
7258 #[serde(default, skip_serializing_if = "Option::is_none")]
7260 pub unrealized_pnl: Option<f64>,
7261}
7262
7263#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7264#[non_exhaustive]
7265pub struct LargePositionMarket {
7266 pub id: String,
7268 pub condition_id: String,
7269 #[serde(default, skip_serializing_if = "Option::is_none")]
7270 pub title: Option<String>,
7271 #[serde(default, skip_serializing_if = "Option::is_none")]
7272 pub slug: Option<String>,
7273 #[serde(default, skip_serializing_if = "Option::is_none")]
7274 pub event_slug: Option<String>,
7275 #[serde(default, skip_serializing_if = "Option::is_none")]
7276 pub category: Option<String>,
7277}
7278
7279#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7280#[non_exhaustive]
7281pub struct LargePositionTrader {
7282 pub id: String,
7284 pub address: String,
7285 #[serde(default, skip_serializing_if = "Option::is_none")]
7286 pub username: Option<String>,
7287 #[serde(default, skip_serializing_if = "Option::is_none")]
7288 pub grade: Option<Grade>,
7289 #[serde(default, skip_serializing_if = "Option::is_none")]
7291 pub win_rate: Option<f64>,
7292 #[serde(default, skip_serializing_if = "Option::is_none")]
7294 pub pnl: Option<f64>,
7295 #[serde(default, skip_serializing_if = "Option::is_none")]
7297 pub in_scope_realized_pnl: Option<f64>,
7298 #[serde(default, skip_serializing_if = "Option::is_none")]
7300 pub markets_traded: Option<i64>,
7301}
7302
7303#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7305#[non_exhaustive]
7306pub struct LargePositionsUpdatedData {
7307 pub count: i64,
7309}
7310
7311#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7312#[non_exhaustive]
7313pub struct LargeTrade {
7314 pub id: String,
7316 pub traded_at: String,
7317 pub size_usd: f64,
7318 pub side: Side,
7319 #[serde(default)]
7321 pub outcome: Option<String>,
7322 #[serde(default)]
7324 pub token_id: Option<String>,
7325 pub price: f64,
7326 pub review_score: f64,
7328 pub signal_score: f64,
7330 #[serde(default)]
7332 pub recorded_review_score: Option<f64>,
7333 #[serde(default)]
7335 pub recorded_signal_score: Option<f64>,
7336 #[serde(default)]
7338 pub suspicion_score: Option<i64>,
7339 #[serde(default)]
7341 pub suspicion_track: Option<SuspicionTrack>,
7342 #[serde(default, skip_serializing_if = "Option::is_none")]
7344 pub market_volume_share: Option<f64>,
7345 pub trader: LargeTradeTrader,
7346 pub market: LargeTradeMarket,
7347}
7348
7349#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7350#[non_exhaustive]
7351pub struct LargeTradeDetail {
7352 #[serde(flatten)]
7353 pub large_trade: LargeTrade,
7354 pub counterparty_analysis: CounterpartyAnalysis,
7355}
7356
7357#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7358#[non_exhaustive]
7359pub struct LargeTradeHistoryMeta {
7360 pub request_id: String,
7362 pub cached: bool,
7363 #[serde(default, skip_serializing_if = "Option::is_none")]
7365 pub cache_age_s: Option<i64>,
7366 pub source: LargeTradeHistoryMetaSource,
7367 pub completeness: LargeTradeHistoryMetaCompleteness,
7368}
7369
7370#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7371#[non_exhaustive]
7372pub struct LargeTradeHistoryMetaCompleteness {
7373 pub status: String,
7374 pub reason: String,
7376}
7377
7378#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7379#[non_exhaustive]
7380pub struct LargeTradeHistoryMetaSource {
7381 pub kind: String,
7382 pub table: String,
7383 pub provider_fetch_at_request_time: bool,
7384}
7385
7386#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7388#[non_exhaustive]
7389pub struct LargeTradeInsertedV2Data {
7390 pub event_id: String,
7392 pub whale_alert_id: i64,
7394 pub condition_id: String,
7396 pub trader_id: i64,
7398 pub wallet: String,
7400 #[serde(default)]
7402 pub grade: Option<Grade>,
7403 pub size_usd: String,
7405 pub shares: String,
7407 pub price: String,
7409 pub side: Side,
7410 pub outcome_index: i64,
7412 pub traded_at: String,
7414 pub platform: String,
7415}
7416
7417#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7418#[non_exhaustive]
7419pub struct LargeTradeMarket {
7420 pub id: String,
7421 pub condition_id: String,
7422 pub title: String,
7423 #[serde(default, skip_serializing_if = "Option::is_none")]
7424 pub slug: Option<String>,
7425 #[serde(default, skip_serializing_if = "Option::is_none")]
7427 pub category: Option<String>,
7428}
7429
7430#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, Default)]
7432pub struct LargeTradeSubscriptionFilters {
7433 #[serde(default, skip_serializing_if = "Option::is_none")]
7435 pub condition_id: Option<String>,
7436 #[serde(default, skip_serializing_if = "Option::is_none")]
7438 pub wallet: Option<String>,
7439 #[serde(default, skip_serializing_if = "Option::is_none")]
7441 pub min_grade: Option<Grade>,
7442 #[serde(default, skip_serializing_if = "Option::is_none")]
7444 pub min_size_usd: Option<String>,
7445}
7446
7447#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7448#[non_exhaustive]
7449pub struct LargeTradeTrader {
7450 pub id: String,
7451 pub address: String,
7452 #[serde(default, skip_serializing_if = "Option::is_none")]
7453 pub username: Option<String>,
7454 #[serde(default, skip_serializing_if = "Option::is_none")]
7456 pub grade: Option<Grade>,
7457 #[serde(default)]
7459 pub grade_at_trade: Option<Grade>,
7460 pub grade_at_trade_status: GradeAtTradeStatus,
7462}
7463
7464#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7466#[non_exhaustive]
7467pub struct LargeTradesInsertedData {
7468 pub count: i64,
7470}
7471
7472#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7473#[non_exhaustive]
7474pub struct LeaderboardEntry {
7475 pub id: String,
7476 pub address: String,
7477 #[serde(default, skip_serializing_if = "Option::is_none")]
7478 pub username: Option<String>,
7479 #[serde(default, skip_serializing_if = "Option::is_none")]
7480 pub grade: Option<Grade>,
7481 #[serde(default, skip_serializing_if = "Option::is_none")]
7483 pub streak_tier: Option<StreakTier>,
7484 #[serde(default, skip_serializing_if = "Option::is_none")]
7485 pub score: Option<f64>,
7486 #[serde(default, skip_serializing_if = "Option::is_none")]
7488 pub pnl: Option<f64>,
7489 #[serde(default, skip_serializing_if = "Option::is_none")]
7491 pub realized_pnl: Option<f64>,
7492 #[serde(default, skip_serializing_if = "Option::is_none")]
7494 pub pnl_correction: Option<PnlCorrection>,
7495 #[serde(default, skip_serializing_if = "Option::is_none")]
7497 pub volume: Option<f64>,
7498 #[serde(default, skip_serializing_if = "Option::is_none")]
7500 pub markets_traded: Option<i64>,
7501 #[serde(default, skip_serializing_if = "Option::is_none")]
7503 pub win_rate: Option<f64>,
7504 #[serde(default, skip_serializing_if = "Option::is_none")]
7506 pub in_scope: Option<TraderPnlInScope>,
7507 #[serde(default, skip_serializing_if = "Option::is_none")]
7509 pub price_edge: Option<LeaderboardPriceEdge>,
7510 #[serde(default, skip_serializing_if = "Option::is_none")]
7512 pub strategy_type: Option<String>,
7513 pub platform: String,
7515 #[serde(default, skip_serializing_if = "Option::is_none")]
7517 pub last_active: Option<String>,
7518}
7519
7520#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7521#[non_exhaustive]
7522pub struct LeaderboardLeagues {
7523 pub leagues: Vec<LeaderboardLeaguesLeaguesItem>,
7524 pub min_ranked: i64,
7525 pub min_resolved: i64,
7526 pub refreshed_at: String,
7527}
7528
7529#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7530#[non_exhaustive]
7531pub struct LeaderboardLeaguesLeaguesItem {
7532 pub category: String,
7533 pub name: String,
7534 pub ranked_traders: i64,
7535 pub slug: String,
7536 pub sport: String,
7537 pub total_traders: i64,
7538}
7539
7540#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7542#[non_exhaustive]
7543pub struct LeaderboardPriceEdge {
7544 pub markets: i64,
7546 pub hit_rate: f64,
7548 pub avg_price: f64,
7550 pub edge: f64,
7552 pub status: SportLeaderboardRowsPriceEdgeStatus,
7554 #[serde(default, skip_serializing_if = "Option::is_none")]
7556 pub hold: Option<String>,
7557}
7558
7559#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
7561#[non_exhaustive]
7562pub enum Lifecycle {
7563 #[serde(rename = "live")]
7565 Live,
7566 #[serde(rename = "settled")]
7568 Settled,
7569 #[serde(rename = "indeterminate")]
7571 Indeterminate,
7572 #[serde(untagged)]
7574 Other(String),
7575}
7576
7577impl Lifecycle {
7578 pub fn as_str(&self) -> &str {
7580 match self {
7581 Self::Live => "live",
7582 Self::Settled => "settled",
7583 Self::Indeterminate => "indeterminate",
7584 Self::Other(value) => value,
7585 }
7586 }
7587}
7588
7589impl From<&str> for Lifecycle {
7590 fn from(value: &str) -> Self {
7591 match value {
7592 "live" => Self::Live,
7593 "settled" => Self::Settled,
7594 "indeterminate" => Self::Indeterminate,
7595 other => Self::Other(other.to_owned()),
7596 }
7597 }
7598}
7599
7600impl std::fmt::Display for Lifecycle {
7601 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7602 f.write_str(self.as_str())
7603 }
7604}
7605
7606impl AsRef<str> for Lifecycle {
7607 fn as_ref(&self) -> &str {
7608 self.as_str()
7609 }
7610}
7611
7612#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7613#[non_exhaustive]
7614pub struct ListCategoryLeadersResponse {
7615 pub object: String,
7616 pub data: Vec<CategoryLeader>,
7617 pub has_more: bool,
7618 #[serde(default, skip_serializing_if = "Option::is_none")]
7619 pub next_cursor: Option<String>,
7620 #[serde(default, skip_serializing_if = "Option::is_none")]
7622 pub total: Option<i64>,
7623 pub meta: ResponseMeta,
7624}
7625
7626#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7627#[non_exhaustive]
7628pub struct ListGameMarketsResponse {
7629 pub data: Vec<ListGameMarketsResponseDataItem>,
7630 pub event_slug: String,
7631 pub families: Vec<ListGameMarketsResponseFamiliesItem>,
7632 pub has_more: bool,
7633 pub meta: ResponseMeta,
7634 #[serde(default, skip_serializing_if = "Option::is_none")]
7635 pub next_cursor: Option<String>,
7636 pub object: String,
7637}
7638
7639#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7640#[non_exhaustive]
7641pub struct ListGameMarketsResponseDataItem {
7642 pub condition_id: String,
7643 pub event_slug: String,
7644 #[serde(default, skip_serializing_if = "Option::is_none")]
7645 pub group_item_title: Option<String>,
7646 pub id: String,
7647 #[serde(default, skip_serializing_if = "Option::is_none")]
7648 pub line: Option<f64>,
7649 #[serde(default, skip_serializing_if = "Option::is_none")]
7650 pub line_outcome_index: Option<i64>,
7651 #[serde(default, skip_serializing_if = "Option::is_none")]
7652 pub negative_risk: Option<bool>,
7653 pub outcomes: Vec<ListGameMarketsResponseDataItemOutcomesItem>,
7654 #[serde(default, skip_serializing_if = "Option::is_none")]
7655 pub platform: Option<String>,
7656 #[serde(default, skip_serializing_if = "Option::is_none")]
7657 pub slug: Option<String>,
7658 #[serde(default, skip_serializing_if = "Option::is_none")]
7659 pub sports_market_type: Option<String>,
7660 pub status: String,
7661 #[serde(default, skip_serializing_if = "Option::is_none")]
7662 pub title: Option<String>,
7663 #[serde(default, skip_serializing_if = "Option::is_none")]
7664 pub sharp_money: Option<ListGameMarketsResponseDataItemSharpMoney>,
7665}
7666
7667#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7668#[non_exhaustive]
7669pub struct ListGameMarketsResponseDataItemOutcomesItem {
7670 pub index: i64,
7671 #[serde(default, skip_serializing_if = "Option::is_none")]
7672 pub label: Option<String>,
7673 #[serde(default, skip_serializing_if = "Option::is_none")]
7674 pub token_id: Option<String>,
7675}
7676
7677#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7678#[non_exhaustive]
7679pub struct ListGameMarketsResponseDataItemSharpMoney {
7680 #[serde(default)]
7681 pub money_as_of: Option<String>,
7682 pub outcomes: Vec<ListGameMarketsResponseDataItemSharpMoneyOutcomesItem>,
7683 pub status: GameSharpMoneyStatus,
7684 #[serde(default)]
7685 pub trader_count: Option<i64>,
7686}
7687
7688#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7689#[non_exhaustive]
7690pub struct ListGameMarketsResponseDataItemSharpMoneyOutcomesItem {
7691 pub index: i64,
7692 pub usd: f64,
7693 pub wallets: ListGameMarketsResponseDataItemSharpMoneyOutcomesItemWallets,
7694}
7695
7696#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7697#[non_exhaustive]
7698pub struct ListGameMarketsResponseDataItemSharpMoneyOutcomesItemWallets {
7699 pub a: i64,
7700 pub b: i64,
7701 pub s: i64,
7702}
7703
7704#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7705#[non_exhaustive]
7706pub struct ListGameMarketsResponseFamiliesItem {
7707 pub active: i64,
7708 pub markets: i64,
7709 #[serde(default, skip_serializing_if = "Option::is_none")]
7710 pub sports_market_type: Option<String>,
7711}
7712
7713#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7714#[non_exhaustive]
7715pub struct ListGameTradesResponse {
7716 pub object: String,
7717 pub data: Vec<GameTrade>,
7719 pub has_more: bool,
7721 pub event_slug: String,
7723 pub source_stale: bool,
7725 pub meta: ResponseMeta,
7726}
7727
7728#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7729#[non_exhaustive]
7730pub struct ListGamesResponse {
7731 pub object: String,
7732 pub data: Vec<Game>,
7733 pub has_more: bool,
7734 #[serde(default, skip_serializing_if = "Option::is_none")]
7736 pub next_cursor: Option<String>,
7737 pub as_of: String,
7739 pub coverage: GamesCoverage,
7740 pub meta: ResponseMeta,
7741}
7742
7743#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
7745#[non_exhaustive]
7746pub enum ListGamesWindow {
7747 #[serde(rename = "all")]
7749 All,
7750 #[serde(rename = "now")]
7752 Now,
7753 #[serde(untagged)]
7755 Other(String),
7756}
7757
7758impl ListGamesWindow {
7759 pub fn as_str(&self) -> &str {
7761 match self {
7762 Self::All => "all",
7763 Self::Now => "now",
7764 Self::Other(value) => value,
7765 }
7766 }
7767}
7768
7769impl From<&str> for ListGamesWindow {
7770 fn from(value: &str) -> Self {
7771 match value {
7772 "all" => Self::All,
7773 "now" => Self::Now,
7774 other => Self::Other(other.to_owned()),
7775 }
7776 }
7777}
7778
7779impl std::fmt::Display for ListGamesWindow {
7780 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7781 f.write_str(self.as_str())
7782 }
7783}
7784
7785impl AsRef<str> for ListGamesWindow {
7786 fn as_ref(&self) -> &str {
7787 self.as_str()
7788 }
7789}
7790
7791#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7792#[non_exhaustive]
7793pub struct ListInsiderRadarResponse {
7794 pub object: String,
7795 pub data: Vec<SuspiciousTrade>,
7796 pub has_more: bool,
7797 #[serde(default, skip_serializing_if = "Option::is_none")]
7798 pub next_cursor: Option<String>,
7799 #[serde(default, skip_serializing_if = "Option::is_none")]
7801 pub total: Option<i64>,
7802 pub meta: ResponseMeta,
7803}
7804
7805#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7806#[non_exhaustive]
7807pub struct ListLargePositionsResponse {
7808 pub object: String,
7809 pub data: Vec<LargePosition>,
7810 pub has_more: bool,
7811 #[serde(default, skip_serializing_if = "Option::is_none")]
7813 pub next_cursor: Option<String>,
7814 #[serde(default, skip_serializing_if = "Option::is_none")]
7816 pub total: Option<i64>,
7817 pub meta: ResponseMeta,
7818}
7819
7820#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7821#[non_exhaustive]
7822pub struct ListLargeTradeCounterpartyExecutionsResponse {
7823 pub object: String,
7824 pub data: CounterpartyAnalysis,
7825 pub meta: ResponseMeta,
7826}
7827
7828#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7829#[non_exhaustive]
7830pub struct ListLargeTradeCounterpartyMakersResponse {
7831 pub object: String,
7832 pub data: CounterpartyMakerPage,
7833 pub meta: ResponseMeta,
7834}
7835
7836#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7837#[non_exhaustive]
7838pub struct ListLargeTradeHistoryResponse {
7839 pub object: String,
7840 pub data: Vec<LargeTrade>,
7841 pub data_quality: DataQuality,
7843 pub has_more: bool,
7844 #[serde(default, skip_serializing_if = "Option::is_none")]
7845 pub next_cursor: Option<String>,
7846 #[serde(default, skip_serializing_if = "Option::is_none")]
7848 pub total: Option<i64>,
7849 pub meta: LargeTradeHistoryMeta,
7850}
7851
7852#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7853#[non_exhaustive]
7854pub struct ListLargeTradesResponse {
7855 pub object: String,
7856 pub data: Vec<LargeTrade>,
7857 pub data_quality: DataQuality,
7859 pub has_more: bool,
7860 #[serde(default, skip_serializing_if = "Option::is_none")]
7861 pub next_cursor: Option<String>,
7862 #[serde(default, skip_serializing_if = "Option::is_none")]
7864 pub total: Option<i64>,
7865 pub meta: ResponseMeta,
7866}
7867
7868#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7869#[non_exhaustive]
7870pub struct ListLeaderboardLeaguesResponse {
7871 pub object: String,
7872 pub data: LeaderboardLeagues,
7873 pub meta: ResponseMeta,
7874}
7875
7876#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7877#[non_exhaustive]
7878pub struct ListLeaderboardResponse {
7879 pub object: String,
7880 pub data: Vec<LeaderboardEntry>,
7881 pub has_more: bool,
7882 #[serde(default, skip_serializing_if = "Option::is_none")]
7883 pub next_cursor: Option<String>,
7884 #[serde(default, skip_serializing_if = "Option::is_none")]
7886 pub total: Option<i64>,
7887 pub meta: ResponseMeta,
7888}
7889
7890#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
7892#[non_exhaustive]
7893pub enum ListLeaderboardSort {
7894 #[serde(rename = "rank")]
7896 Rank,
7897 #[serde(rename = "grade")]
7899 Grade,
7900 #[serde(rename = "volume")]
7902 Volume,
7903 #[serde(rename = "predictions")]
7905 Predictions,
7906 #[serde(rename = "pnl")]
7908 Pnl,
7909 #[serde(rename = "win_rate")]
7911 WinRate,
7912 #[serde(rename = "edge")]
7914 Edge,
7915 #[serde(untagged)]
7917 Other(String),
7918}
7919
7920impl ListLeaderboardSort {
7921 pub fn as_str(&self) -> &str {
7923 match self {
7924 Self::Rank => "rank",
7925 Self::Grade => "grade",
7926 Self::Volume => "volume",
7927 Self::Predictions => "predictions",
7928 Self::Pnl => "pnl",
7929 Self::WinRate => "win_rate",
7930 Self::Edge => "edge",
7931 Self::Other(value) => value,
7932 }
7933 }
7934}
7935
7936impl From<&str> for ListLeaderboardSort {
7937 fn from(value: &str) -> Self {
7938 match value {
7939 "rank" => Self::Rank,
7940 "grade" => Self::Grade,
7941 "volume" => Self::Volume,
7942 "predictions" => Self::Predictions,
7943 "pnl" => Self::Pnl,
7944 "win_rate" => Self::WinRate,
7945 "edge" => Self::Edge,
7946 other => Self::Other(other.to_owned()),
7947 }
7948 }
7949}
7950
7951impl std::fmt::Display for ListLeaderboardSort {
7952 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7953 f.write_str(self.as_str())
7954 }
7955}
7956
7957impl AsRef<str> for ListLeaderboardSort {
7958 fn as_ref(&self) -> &str {
7959 self.as_str()
7960 }
7961}
7962
7963#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7964#[non_exhaustive]
7965pub struct ListPositionsResponse {
7966 pub object: String,
7967 pub data: Vec<Position>,
7968 pub data_quality: DataQuality,
7970 pub has_more: bool,
7971 #[serde(default, skip_serializing_if = "Option::is_none")]
7972 pub next_cursor: Option<String>,
7973 #[serde(default, skip_serializing_if = "Option::is_none")]
7975 pub total: Option<i64>,
7976 #[serde(default, skip_serializing_if = "Option::is_none")]
7978 pub snapshot: Option<ListPositionsResponseSnapshot>,
7979 pub meta: ResponseMeta,
7980}
7981
7982#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7984#[non_exhaustive]
7985pub struct ListPositionsResponseSnapshot {
7986 pub as_of: String,
7987 pub expires_at: String,
7988 pub row_count: i64,
7989}
7990
7991#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7992#[non_exhaustive]
7993pub struct ListSharpMoneyFlowsResponse {
7994 pub object: String,
7995 pub data: Vec<SmartMoneyFlowMarket>,
7996 pub has_more: bool,
7997 #[serde(default, skip_serializing_if = "Option::is_none")]
7998 pub next_cursor: Option<String>,
7999 #[serde(default, skip_serializing_if = "Option::is_none")]
8000 pub total: Option<i64>,
8001 pub meta: ResponseMeta,
8002}
8003
8004#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8005#[non_exhaustive]
8006pub struct ListSmartMoneyFlowsResponse {
8007 pub object: String,
8008 pub data: Vec<SmartMoneyFlowMarket>,
8009 pub has_more: bool,
8010 #[serde(default, skip_serializing_if = "Option::is_none")]
8011 pub next_cursor: Option<String>,
8012 #[serde(default, skip_serializing_if = "Option::is_none")]
8013 pub total: Option<i64>,
8014 pub meta: ResponseMeta,
8015}
8016
8017#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8018#[non_exhaustive]
8019pub struct ListSuspiciousTradesResponse {
8020 pub object: String,
8021 pub data: Vec<SuspiciousTrade>,
8022 pub has_more: bool,
8023 #[serde(default, skip_serializing_if = "Option::is_none")]
8024 pub next_cursor: Option<String>,
8025 #[serde(default, skip_serializing_if = "Option::is_none")]
8027 pub total: Option<i64>,
8028 pub meta: ResponseMeta,
8029}
8030
8031#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8032#[non_exhaustive]
8033pub struct ListTrendingWalletsResponse {
8034 pub object: String,
8035 pub data: Vec<TrendingWallet>,
8036 pub has_more: bool,
8037 #[serde(default, skip_serializing_if = "Option::is_none")]
8039 pub next_cursor: Option<String>,
8040 #[serde(default, skip_serializing_if = "Option::is_none")]
8042 pub total: Option<i64>,
8043 pub meta: ResponseMeta,
8044}
8045
8046#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
8048#[non_exhaustive]
8049pub enum ListTrendingWalletsWindow {
8050 #[serde(rename = "7d")]
8052 V7d,
8053 #[serde(rename = "30d")]
8055 V30d,
8056 #[serde(untagged)]
8058 Other(String),
8059}
8060
8061impl ListTrendingWalletsWindow {
8062 pub fn as_str(&self) -> &str {
8064 match self {
8065 Self::V7d => "7d",
8066 Self::V30d => "30d",
8067 Self::Other(value) => value,
8068 }
8069 }
8070}
8071
8072impl From<&str> for ListTrendingWalletsWindow {
8073 fn from(value: &str) -> Self {
8074 match value {
8075 "7d" => Self::V7d,
8076 "30d" => Self::V30d,
8077 other => Self::Other(other.to_owned()),
8078 }
8079 }
8080}
8081
8082impl std::fmt::Display for ListTrendingWalletsWindow {
8083 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8084 f.write_str(self.as_str())
8085 }
8086}
8087
8088impl AsRef<str> for ListTrendingWalletsWindow {
8089 fn as_ref(&self) -> &str {
8090 self.as_str()
8091 }
8092}
8093
8094#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8095#[non_exhaustive]
8096pub struct ListWebhookDeliveriesResponse {
8097 pub object: String,
8098 pub data: Vec<WebhookDelivery>,
8099 pub has_more: bool,
8100 #[serde(default, skip_serializing_if = "Option::is_none")]
8101 pub next_cursor: Option<String>,
8102 #[serde(default, skip_serializing_if = "Option::is_none")]
8103 pub total: Option<i64>,
8104 pub meta: ResponseMeta,
8105}
8106
8107#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8108#[non_exhaustive]
8109pub struct ListWebhookEventsResponse {
8110 pub object: String,
8111 pub data: Vec<WebhookEventDescriptor>,
8112 pub has_more: bool,
8113 #[serde(default, skip_serializing_if = "Option::is_none")]
8114 pub next_cursor: Option<String>,
8115 #[serde(default, skip_serializing_if = "Option::is_none")]
8116 pub total: Option<i64>,
8117 pub meta: ResponseMeta,
8118}
8119
8120#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8121#[non_exhaustive]
8122pub struct ListWebhooksResponse {
8123 pub object: String,
8124 pub data: Vec<WebhookEndpoint>,
8125 pub has_more: bool,
8126 #[serde(default, skip_serializing_if = "Option::is_none")]
8127 pub next_cursor: Option<String>,
8128 #[serde(default, skip_serializing_if = "Option::is_none")]
8129 pub total: Option<i64>,
8130 pub meta: ResponseMeta,
8131}
8132
8133#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8134#[non_exhaustive]
8135pub struct ListWhaleTradeCounterpartyExecutionsResponse {
8136 pub object: String,
8137 pub data: CounterpartyAnalysis,
8138 pub meta: ResponseMeta,
8139}
8140
8141#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8142#[non_exhaustive]
8143pub struct ListWhaleTradeCounterpartyMakersResponse {
8144 pub object: String,
8145 pub data: CounterpartyMakerPage,
8146 pub meta: ResponseMeta,
8147}
8148
8149#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8150#[non_exhaustive]
8151pub struct ListWhaleTradeHistoryResponse {
8152 pub object: String,
8153 pub data: Vec<LargeTrade>,
8154 pub data_quality: DataQuality,
8156 pub has_more: bool,
8157 #[serde(default, skip_serializing_if = "Option::is_none")]
8158 pub next_cursor: Option<String>,
8159 #[serde(default, skip_serializing_if = "Option::is_none")]
8161 pub total: Option<i64>,
8162 pub meta: LargeTradeHistoryMeta,
8163}
8164
8165#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8166#[non_exhaustive]
8167pub struct ListWhaleTradesResponse {
8168 pub object: String,
8169 pub data: Vec<LargeTrade>,
8170 pub data_quality: DataQuality,
8172 pub has_more: bool,
8173 #[serde(default, skip_serializing_if = "Option::is_none")]
8174 pub next_cursor: Option<String>,
8175 #[serde(default, skip_serializing_if = "Option::is_none")]
8177 pub total: Option<i64>,
8178 pub meta: ResponseMeta,
8179}
8180
8181#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8183#[non_exhaustive]
8184pub struct LiveSportsScoreEntry {
8185 pub team: String,
8187 pub score: String,
8189 #[serde(default, skip_serializing_if = "Option::is_none")]
8191 pub map_score: Option<String>,
8192}
8193
8194#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8196#[non_exhaustive]
8197pub struct LiveSportsUpdatedData {
8198 pub event_slug: String,
8200 #[serde(default)]
8202 pub game_id: Option<String>,
8203 #[serde(default)]
8205 pub league: Option<String>,
8206 pub version: i64,
8208 pub changed: Vec<Changed>,
8210 #[serde(default)]
8212 pub observed_at: Option<String>,
8213 pub published_at: String,
8215 #[serde(default)]
8217 pub status: Option<String>,
8218 #[serde(default)]
8220 pub period: Option<String>,
8221 #[serde(default)]
8223 pub clock: Option<String>,
8224 #[serde(default)]
8226 pub live: Option<bool>,
8227 pub ended: bool,
8229 pub scores: Vec<LiveSportsScoreEntry>,
8231 #[serde(default)]
8233 pub series_format: Option<String>,
8234 pub snapshot_url: String,
8236}
8237
8238#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8240#[non_exhaustive]
8241pub struct MarketCandles {
8242 pub condition_id: String,
8244 pub resolution: Resolution,
8246 pub outcomes: Vec<OutcomeCandles>,
8248}
8249
8250#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8251#[non_exhaustive]
8252pub struct MarketFlow {
8253 pub market: MarketFlowMarket,
8254 pub sharp_money: MarketFlowSharpMoney,
8256 pub smart_money: MarketFlowSmartMoney,
8258 pub timeframe: String,
8259}
8260
8261#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8262#[non_exhaustive]
8263pub struct MarketFlowMarket {
8264 pub id: String,
8265 pub condition_id: String,
8266 pub title: String,
8267 #[serde(default)]
8268 pub slug: Option<String>,
8269 #[serde(default)]
8270 pub category: Option<String>,
8271 #[serde(default)]
8273 pub platform: Option<String>,
8274}
8275
8276#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8278#[non_exhaustive]
8279pub struct MarketFlowSharpMoney {
8280 pub net_flow_usd: f64,
8281 pub direction: Direction,
8282 #[serde(default)]
8284 pub token_id: Option<String>,
8285 pub large_trade_count: i64,
8287 pub whale_trade_count: i64,
8289 pub buy_volume_usd: f64,
8290 pub sell_volume_usd: f64,
8291 pub top_positions: Vec<MarketFlowSharpMoneyTopPositionsItem>,
8292 #[serde(default)]
8294 pub oldest_snapshot_as_of: Option<String>,
8295}
8296
8297#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8298#[non_exhaustive]
8299pub struct MarketFlowSharpMoneyTopPositionsItem {
8300 pub id: String,
8301 pub address: String,
8302 #[serde(default)]
8303 pub username: Option<String>,
8304 #[serde(default)]
8305 pub grade: Option<Grade>,
8306 pub side: Direction,
8307 #[serde(default)]
8309 pub token_id: Option<String>,
8310 pub size_usd: f64,
8311}
8312
8313#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8315#[non_exhaustive]
8316pub struct MarketFlowSmartMoney {
8317 pub net_flow_usd: f64,
8318 pub direction: Direction,
8319 #[serde(default)]
8321 pub token_id: Option<String>,
8322 pub large_trade_count: i64,
8324 pub whale_trade_count: i64,
8326 pub buy_volume_usd: f64,
8327 pub sell_volume_usd: f64,
8328 pub top_positions: Vec<MarketFlowSmartMoneyTopPositionsItem>,
8329 #[serde(default)]
8331 pub oldest_snapshot_as_of: Option<String>,
8332}
8333
8334#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8335#[non_exhaustive]
8336pub struct MarketFlowSmartMoneyTopPositionsItem {
8337 pub id: String,
8338 pub address: String,
8339 #[serde(default)]
8340 pub username: Option<String>,
8341 #[serde(default)]
8342 pub grade: Option<Grade>,
8343 pub side: Direction,
8344 #[serde(default)]
8346 pub token_id: Option<String>,
8347 pub size_usd: f64,
8348}
8349
8350#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8351#[non_exhaustive]
8352pub struct MarketHolder {
8353 pub id: String,
8355 pub trader_id: String,
8357 pub address: String,
8359 #[serde(default)]
8361 pub name: Option<String>,
8362 pub side: Direction,
8364 #[serde(default)]
8366 pub token_id: Option<String>,
8367 #[serde(default)]
8369 pub grade: Option<MarketHolderGrade>,
8370 pub shares: f64,
8372 #[serde(default)]
8374 pub current_value_usd: Option<f64>,
8375 #[serde(default, skip_serializing_if = "Option::is_none")]
8377 pub other_outcome_shares: Option<f64>,
8378 #[serde(default)]
8380 pub last_traded_at: Option<String>,
8381 #[serde(default, skip_serializing_if = "Option::is_none")]
8383 pub category_win_rate: Option<f64>,
8384 #[serde(default, skip_serializing_if = "Option::is_none")]
8386 pub category_win_record: Option<MarketHolderCategoryWinRecord>,
8387 #[serde(default, skip_serializing_if = "Option::is_none")]
8389 pub category_avg_price: Option<f64>,
8390 #[serde(default, skip_serializing_if = "Option::is_none")]
8392 pub category_win_rate_game: Option<String>,
8393 pub category_win_rate_status: CategoryWinRateStatus,
8395 #[serde(default, skip_serializing_if = "Option::is_none")]
8396 pub category_evidence: Option<HolderCategoryEvidence>,
8397 #[serde(default, skip_serializing_if = "Option::is_none")]
8399 pub wallet_age_days: Option<f64>,
8400 #[serde(default, skip_serializing_if = "Option::is_none")]
8402 pub is_new_wallet: Option<bool>,
8403 #[serde(default, skip_serializing_if = "Option::is_none")]
8405 pub markets_traded: Option<i64>,
8406 #[serde(default, skip_serializing_if = "Option::is_none")]
8408 pub is_bot: Option<bool>,
8409 #[serde(default, skip_serializing_if = "Option::is_none")]
8411 pub x_username: Option<String>,
8412}
8413
8414#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8416#[non_exhaustive]
8417pub struct MarketHolderCategoryWinRecord {
8418 pub wins: i64,
8420 pub decided: i64,
8422}
8423
8424#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
8426#[non_exhaustive]
8427pub enum MarketHolderGrade {
8428 #[serde(rename = "S")]
8430 S,
8431 #[serde(rename = "A")]
8433 A,
8434 #[serde(rename = "B")]
8436 B,
8437 #[serde(untagged)]
8439 Other(String),
8440}
8441
8442impl MarketHolderGrade {
8443 pub fn as_str(&self) -> &str {
8445 match self {
8446 Self::S => "S",
8447 Self::A => "A",
8448 Self::B => "B",
8449 Self::Other(value) => value,
8450 }
8451 }
8452}
8453
8454impl From<&str> for MarketHolderGrade {
8455 fn from(value: &str) -> Self {
8456 match value {
8457 "S" => Self::S,
8458 "A" => Self::A,
8459 "B" => Self::B,
8460 other => Self::Other(other.to_owned()),
8461 }
8462 }
8463}
8464
8465impl std::fmt::Display for MarketHolderGrade {
8466 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8467 f.write_str(self.as_str())
8468 }
8469}
8470
8471impl AsRef<str> for MarketHolderGrade {
8472 fn as_ref(&self) -> &str {
8473 self.as_str()
8474 }
8475}
8476
8477#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8478#[non_exhaustive]
8479pub struct MarketHoldersMarket {
8480 pub id: String,
8482 pub condition_id: String,
8483 #[serde(default)]
8484 pub title: Option<String>,
8485 #[serde(default, skip_serializing_if = "Option::is_none")]
8486 pub slug: Option<String>,
8487 #[serde(default, skip_serializing_if = "Option::is_none")]
8488 pub event_slug: Option<String>,
8489 #[serde(default)]
8491 pub category: Option<String>,
8492 #[serde(default)]
8493 pub outcome_yes: Option<String>,
8494 #[serde(default)]
8495 pub outcome_no: Option<String>,
8496 #[serde(default)]
8497 pub token_id_yes: Option<String>,
8498 #[serde(default)]
8499 pub token_id_no: Option<String>,
8500 #[serde(default, skip_serializing_if = "Option::is_none")]
8501 pub end_date: Option<String>,
8502 pub status: MarketHoldersMarketStatus,
8504}
8505
8506#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
8508#[non_exhaustive]
8509pub enum MarketHoldersMarketStatus {
8510 #[serde(rename = "open")]
8512 Open,
8513 #[serde(rename = "closed")]
8515 Closed,
8516 #[serde(rename = "resolved")]
8518 Resolved,
8519 #[serde(untagged)]
8521 Other(String),
8522}
8523
8524impl MarketHoldersMarketStatus {
8525 pub fn as_str(&self) -> &str {
8527 match self {
8528 Self::Open => "open",
8529 Self::Closed => "closed",
8530 Self::Resolved => "resolved",
8531 Self::Other(value) => value,
8532 }
8533 }
8534}
8535
8536impl From<&str> for MarketHoldersMarketStatus {
8537 fn from(value: &str) -> Self {
8538 match value {
8539 "open" => Self::Open,
8540 "closed" => Self::Closed,
8541 "resolved" => Self::Resolved,
8542 other => Self::Other(other.to_owned()),
8543 }
8544 }
8545}
8546
8547impl std::fmt::Display for MarketHoldersMarketStatus {
8548 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8549 f.write_str(self.as_str())
8550 }
8551}
8552
8553impl AsRef<str> for MarketHoldersMarketStatus {
8554 fn as_ref(&self) -> &str {
8555 self.as_str()
8556 }
8557}
8558
8559#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8560#[non_exhaustive]
8561pub struct MarketHoldersScan {
8562 pub source: ProviderReadSource,
8564 pub complete: bool,
8566 #[serde(default)]
8568 pub fetched_at: Option<String>,
8569 pub wallet_count: i64,
8571}
8572
8573#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8575#[non_exhaustive]
8576pub struct MarketHoldersSideGradeUsd {
8577 pub s: f64,
8579 pub a: f64,
8581 pub b: f64,
8583}
8584
8585#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8586#[non_exhaustive]
8587pub struct MarketHoldersSideGrades {
8588 pub s: i64,
8589 pub a: i64,
8590 pub b: i64,
8591}
8592
8593#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8595#[non_exhaustive]
8596pub struct MarketHoldersTotals {
8597 pub graded_count: i64,
8599 pub yes_count: i64,
8600 pub no_count: i64,
8601 pub yes_shares: f64,
8602 pub no_shares: f64,
8603 pub yes_usd: f64,
8605 pub no_usd: f64,
8607 pub yes_grades: MarketHoldersSideGrades,
8608 pub no_grades: MarketHoldersSideGrades,
8609 pub yes_grade_usd: MarketHoldersSideGradeUsd,
8611 pub no_grade_usd: MarketHoldersSideGradeUsd,
8613}
8614
8615#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
8617#[non_exhaustive]
8618pub enum MarketScope {
8619 #[serde(rename = "all_markets")]
8621 AllMarkets,
8622 #[serde(rename = "sports_and_esports")]
8624 SportsAndEsports,
8625 #[serde(untagged)]
8627 Other(String),
8628}
8629
8630impl MarketScope {
8631 pub fn as_str(&self) -> &str {
8633 match self {
8634 Self::AllMarkets => "all_markets",
8635 Self::SportsAndEsports => "sports_and_esports",
8636 Self::Other(value) => value,
8637 }
8638 }
8639}
8640
8641impl From<&str> for MarketScope {
8642 fn from(value: &str) -> Self {
8643 match value {
8644 "all_markets" => Self::AllMarkets,
8645 "sports_and_esports" => Self::SportsAndEsports,
8646 other => Self::Other(other.to_owned()),
8647 }
8648 }
8649}
8650
8651impl std::fmt::Display for MarketScope {
8652 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8653 f.write_str(self.as_str())
8654 }
8655}
8656
8657impl AsRef<str> for MarketScope {
8658 fn as_ref(&self) -> &str {
8659 self.as_str()
8660 }
8661}
8662
8663#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8664#[non_exhaustive]
8665pub struct MarketSearchResult {
8666 pub id: String,
8667 pub condition_id: String,
8668 pub title: String,
8669 #[serde(default)]
8670 pub slug: Option<String>,
8671 #[serde(default)]
8672 pub category: Option<String>,
8673 #[serde(default)]
8675 pub platform: Option<String>,
8676 pub status: MarketSearchResultStatus,
8678 #[serde(default, skip_serializing_if = "Option::is_none")]
8679 pub event_slug: Option<String>,
8680}
8681
8682#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
8684#[non_exhaustive]
8685pub enum MarketSearchResultStatus {
8686 #[serde(rename = "active")]
8688 Active,
8689 #[serde(rename = "closed")]
8691 Closed,
8692 #[serde(untagged)]
8694 Other(String),
8695}
8696
8697impl MarketSearchResultStatus {
8698 pub fn as_str(&self) -> &str {
8700 match self {
8701 Self::Active => "active",
8702 Self::Closed => "closed",
8703 Self::Other(value) => value,
8704 }
8705 }
8706}
8707
8708impl From<&str> for MarketSearchResultStatus {
8709 fn from(value: &str) -> Self {
8710 match value {
8711 "active" => Self::Active,
8712 "closed" => Self::Closed,
8713 other => Self::Other(other.to_owned()),
8714 }
8715 }
8716}
8717
8718impl std::fmt::Display for MarketSearchResultStatus {
8719 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8720 f.write_str(self.as_str())
8721 }
8722}
8723
8724impl AsRef<str> for MarketSearchResultStatus {
8725 fn as_ref(&self) -> &str {
8726 self.as_str()
8727 }
8728}
8729
8730#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8731#[non_exhaustive]
8732pub struct MarketSnapshot {
8733 pub market: MarketSnapshotMarket,
8734 pub outcomes: Vec<MarketSnapshotOutcomesItem>,
8735 pub liquidity: MarketSnapshotLiquidity,
8736 pub sports: MarketSnapshotSports,
8737 pub freshness: MarketSnapshotFreshnessBySource,
8738 #[serde(default, skip_serializing_if = "Option::is_none")]
8740 pub trust: Option<MarketSnapshotTrust>,
8741}
8742
8743#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8744#[non_exhaustive]
8745pub struct MarketSnapshotFreshness {
8746 pub status: MarketSnapshotFreshnessStatus,
8747 pub source: String,
8748 #[serde(default, skip_serializing_if = "Option::is_none")]
8749 pub as_of: Option<String>,
8750 #[serde(default, skip_serializing_if = "Option::is_none")]
8752 pub stale_after_s: Option<i64>,
8753 #[serde(default, skip_serializing_if = "Option::is_none")]
8754 pub reason: Option<String>,
8755}
8756
8757#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8758#[non_exhaustive]
8759pub struct MarketSnapshotFreshnessBySource {
8760 pub market_data: MarketSnapshotFreshness,
8761 pub top_of_book: MarketSnapshotFreshness,
8762 pub live_sports: MarketSnapshotFreshness,
8764}
8765
8766#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
8768#[non_exhaustive]
8769pub enum MarketSnapshotFreshnessStatus {
8770 #[serde(rename = "fresh")]
8772 Fresh,
8773 #[serde(rename = "stale")]
8775 Stale,
8776 #[serde(rename = "available")]
8778 Available,
8779 #[serde(rename = "not_live")]
8781 NotLive,
8782 #[serde(rename = "unavailable")]
8784 Unavailable,
8785 #[serde(untagged)]
8787 Other(String),
8788}
8789
8790impl MarketSnapshotFreshnessStatus {
8791 pub fn as_str(&self) -> &str {
8793 match self {
8794 Self::Fresh => "fresh",
8795 Self::Stale => "stale",
8796 Self::Available => "available",
8797 Self::NotLive => "not_live",
8798 Self::Unavailable => "unavailable",
8799 Self::Other(value) => value,
8800 }
8801 }
8802}
8803
8804impl From<&str> for MarketSnapshotFreshnessStatus {
8805 fn from(value: &str) -> Self {
8806 match value {
8807 "fresh" => Self::Fresh,
8808 "stale" => Self::Stale,
8809 "available" => Self::Available,
8810 "not_live" => Self::NotLive,
8811 "unavailable" => Self::Unavailable,
8812 other => Self::Other(other.to_owned()),
8813 }
8814 }
8815}
8816
8817impl std::fmt::Display for MarketSnapshotFreshnessStatus {
8818 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8819 f.write_str(self.as_str())
8820 }
8821}
8822
8823impl AsRef<str> for MarketSnapshotFreshnessStatus {
8824 fn as_ref(&self) -> &str {
8825 self.as_str()
8826 }
8827}
8828
8829#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8830#[non_exhaustive]
8831pub struct MarketSnapshotLiquidity {
8832 pub source: String,
8833 #[serde(default)]
8835 pub volume_usd: Option<f64>,
8836 #[serde(default)]
8837 pub liquidity_usd: Option<f64>,
8838 #[serde(default)]
8840 pub volume_24h_usd: Option<f64>,
8841 #[serde(default)]
8843 pub volume_24h_as_of: Option<String>,
8844 #[serde(default)]
8846 pub last_price: Option<f64>,
8847}
8848
8849#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8850#[non_exhaustive]
8851pub struct MarketSnapshotMarket {
8852 pub id: String,
8853 pub condition_id: String,
8854 pub provider: String,
8855 #[serde(default)]
8856 pub title: Option<String>,
8857 #[serde(default)]
8858 pub slug: Option<String>,
8859 #[serde(default)]
8860 pub page_slug: Option<String>,
8861 #[serde(default)]
8862 pub event_slug: Option<String>,
8863 #[serde(default)]
8864 pub category: Option<String>,
8865 pub status: MarketSearchResultStatus,
8867 #[serde(default)]
8868 pub description: Option<String>,
8869 #[serde(default)]
8870 pub image: Option<String>,
8871 #[serde(default)]
8873 pub series_slug: Option<String>,
8874 #[serde(default)]
8876 pub market_type: Option<String>,
8877 #[serde(default)]
8879 pub market_result: Option<String>,
8880 #[serde(default)]
8881 pub created_at: Option<String>,
8882 #[serde(default)]
8883 pub end_date: Option<String>,
8884 #[serde(default)]
8885 pub resolved_at: Option<String>,
8886}
8887
8888#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8889#[non_exhaustive]
8890pub struct MarketSnapshotOutcomesItem {
8891 pub side: SuspiciousTradeFlaggedDataSide,
8892 pub label: String,
8893 #[serde(default, skip_serializing_if = "Option::is_none")]
8894 pub token_id: Option<String>,
8895 #[serde(default, skip_serializing_if = "Option::is_none")]
8897 pub current_price: Option<f64>,
8898 pub top_of_book: MarketSnapshotTopOfBook,
8899}
8900
8901#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8902#[non_exhaustive]
8903pub struct MarketSnapshotSports {
8904 pub status: MarketSnapshotSportsStatus,
8905 pub source: String,
8906 #[serde(default, skip_serializing_if = "Option::is_none")]
8907 pub live_match_key: Option<String>,
8908 #[serde(default, skip_serializing_if = "Option::is_none")]
8909 pub live_league_key: Option<String>,
8910 #[serde(default, skip_serializing_if = "Option::is_none")]
8912 pub live_score: Option<MarketSnapshotSportsLiveScore>,
8913 #[serde(default, skip_serializing_if = "Option::is_none")]
8914 pub reason: Option<String>,
8915}
8916
8917#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8919#[non_exhaustive]
8920pub struct MarketSnapshotSportsLiveScore {
8921 #[serde(default, skip_serializing_if = "Option::is_none")]
8922 pub tennis_points: Option<TennisPoints>,
8923}
8924
8925#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
8927#[non_exhaustive]
8928pub enum MarketSnapshotSportsStatus {
8929 #[serde(rename = "fresh")]
8931 Fresh,
8932 #[serde(rename = "stale")]
8934 Stale,
8935 #[serde(rename = "not_live")]
8937 NotLive,
8938 #[serde(rename = "unavailable")]
8940 Unavailable,
8941 #[serde(untagged)]
8943 Other(String),
8944}
8945
8946impl MarketSnapshotSportsStatus {
8947 pub fn as_str(&self) -> &str {
8949 match self {
8950 Self::Fresh => "fresh",
8951 Self::Stale => "stale",
8952 Self::NotLive => "not_live",
8953 Self::Unavailable => "unavailable",
8954 Self::Other(value) => value,
8955 }
8956 }
8957}
8958
8959impl From<&str> for MarketSnapshotSportsStatus {
8960 fn from(value: &str) -> Self {
8961 match value {
8962 "fresh" => Self::Fresh,
8963 "stale" => Self::Stale,
8964 "not_live" => Self::NotLive,
8965 "unavailable" => Self::Unavailable,
8966 other => Self::Other(other.to_owned()),
8967 }
8968 }
8969}
8970
8971impl std::fmt::Display for MarketSnapshotSportsStatus {
8972 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8973 f.write_str(self.as_str())
8974 }
8975}
8976
8977impl AsRef<str> for MarketSnapshotSportsStatus {
8978 fn as_ref(&self) -> &str {
8979 self.as_str()
8980 }
8981}
8982
8983#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8984#[non_exhaustive]
8985pub struct MarketSnapshotTopOfBook {
8986 pub status: EnrichmentStatus,
8987 pub source: String,
8988 #[serde(default, skip_serializing_if = "Option::is_none")]
8989 pub best_bid: Option<f64>,
8990 #[serde(default, skip_serializing_if = "Option::is_none")]
8991 pub best_ask: Option<f64>,
8992 #[serde(default, skip_serializing_if = "Option::is_none")]
8993 pub spread_bps: Option<i64>,
8994 #[serde(default, skip_serializing_if = "Option::is_none")]
8995 pub bid_depth_usdc: Option<f64>,
8996 #[serde(default, skip_serializing_if = "Option::is_none")]
8997 pub ask_depth_usdc: Option<f64>,
8998 #[serde(default, skip_serializing_if = "Option::is_none")]
8999 pub reason: Option<String>,
9000}
9001
9002#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
9004#[non_exhaustive]
9005pub struct MarketSnapshotTrust {
9006 pub current_price: TrustMetadata,
9007 pub spread_bps: TrustMetadata,
9008}
9009
9010#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
9011#[non_exhaustive]
9012pub struct MarketTopHolder {
9013 pub rank: i64,
9015 pub trader_id: String,
9017 pub address: String,
9019 #[serde(default)]
9021 pub name: Option<String>,
9022 #[serde(default)]
9024 pub grade: Option<Grade>,
9025 pub shares: f64,
9027 #[serde(default)]
9029 pub current_value_usd: Option<f64>,
9030 #[serde(default)]
9032 pub avg_entry_price: Option<f64>,
9033 #[serde(default, skip_serializing_if = "Option::is_none")]
9035 pub other_outcome_shares: Option<f64>,
9036 #[serde(default)]
9038 pub position_realized_pnl: Option<f64>,
9039 #[serde(default)]
9041 pub position_unrealized_pnl: Option<f64>,
9042 #[serde(default)]
9044 pub position_total_pnl: Option<f64>,
9045 #[serde(default)]
9047 pub in_scope_realized_pnl: Option<f64>,
9048 #[serde(default)]
9050 pub in_scope_volume: Option<f64>,
9051 #[serde(default)]
9053 pub strategy_type: Option<String>,
9054 #[serde(default)]
9056 pub last_traded_at: Option<String>,
9057 #[serde(default, skip_serializing_if = "Option::is_none")]
9059 pub category_win_rate: Option<f64>,
9060 #[serde(default, skip_serializing_if = "Option::is_none")]
9062 pub category_win_record: Option<MarketTopHolderCategoryWinRecord>,
9063 #[serde(default, skip_serializing_if = "Option::is_none")]
9065 pub category_avg_price: Option<f64>,
9066 #[serde(default, skip_serializing_if = "Option::is_none")]
9068 pub category_win_rate_game: Option<String>,
9069 #[serde(default, skip_serializing_if = "Option::is_none")]
9071 pub category_win_rate_status: Option<CategoryWinRateStatus>,
9072 #[serde(default, skip_serializing_if = "Option::is_none")]
9074 pub wallet_age_days: Option<f64>,
9075 #[serde(default, skip_serializing_if = "Option::is_none")]
9077 pub is_new_wallet: Option<bool>,
9078 #[serde(default, skip_serializing_if = "Option::is_none")]
9080 pub markets_traded: Option<i64>,
9081 #[serde(default, skip_serializing_if = "Option::is_none")]
9083 pub is_bot: Option<bool>,
9084 #[serde(default, skip_serializing_if = "Option::is_none")]
9086 pub x_username: Option<String>,
9087}
9088
9089#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
9091#[non_exhaustive]
9092pub struct MarketTopHolderCategoryWinRecord {
9093 pub wins: i64,
9095 pub decided: i64,
9097}
9098
9099#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
9100#[non_exhaustive]
9101pub struct MarketTopHolders {
9102 pub market: MarketHoldersMarket,
9103 pub yes: Vec<MarketTopHolder>,
9105 pub no: Vec<MarketTopHolder>,
9107 pub totals: MarketTopHoldersTotals,
9108 pub profiles_status: EnrichmentStatus,
9110 #[serde(default, skip_serializing_if = "Option::is_none")]
9112 pub category_records_as_of: Option<String>,
9113 #[serde(default, skip_serializing_if = "Option::is_none")]
9115 pub computed_at: Option<String>,
9116 #[serde(default, skip_serializing_if = "Option::is_none")]
9118 pub positions_as_of: Option<String>,
9119 pub source_stale: bool,
9121}
9122
9123#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
9124#[non_exhaustive]
9125pub struct MarketTopHoldersTotals {
9126 pub yes_count: i64,
9128 pub no_count: i64,
9130 pub yes_shares: f64,
9132 pub no_shares: f64,
9134 pub sample_cap: i64,
9136}
9137
9138#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
9140#[non_exhaustive]
9141pub struct MarketWalletsInOut {
9142 pub condition_id: String,
9144 pub window: String,
9146 #[serde(default)]
9148 pub window_start: Option<String>,
9149 #[serde(default)]
9151 pub window_end: Option<String>,
9152 pub summary: MarketWalletsInOutSummary,
9154 pub net_buyers: Vec<MarketWalletsInOutNetBuyersItem>,
9156 pub net_sellers: Vec<MarketWalletsInOutNetSellersItem>,
9158}
9159
9160#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
9162#[non_exhaustive]
9163pub struct MarketWalletsInOutNetBuyersItem {
9164 pub address: String,
9166 pub display_name: String,
9168 #[serde(default)]
9170 pub grade: Option<Grade>,
9171 pub net_usd: f64,
9173 pub trades: i64,
9175 #[serde(default)]
9177 pub last_traded_at: Option<String>,
9178}
9179
9180#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
9182#[non_exhaustive]
9183pub struct MarketWalletsInOutNetSellersItem {
9184 pub address: String,
9186 pub display_name: String,
9188 #[serde(default)]
9190 pub grade: Option<Grade>,
9191 pub net_usd: f64,
9193 pub trades: i64,
9195 #[serde(default)]
9197 pub last_traded_at: Option<String>,
9198}
9199
9200#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
9202#[non_exhaustive]
9203pub struct MarketWalletsInOutSummary {
9204 pub wallets_in: i64,
9206 pub wallets_out: i64,
9208 pub net_usd: f64,
9210}
9211
9212#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
9214#[non_exhaustive]
9215pub enum MatchStatus {
9216 #[serde(rename = "scheduled")]
9218 Scheduled,
9219 #[serde(rename = "in_progress")]
9221 InProgress,
9222 #[serde(rename = "halftime")]
9224 Halftime,
9225 #[serde(rename = "penalty_shootout")]
9227 PenaltyShootout,
9228 #[serde(rename = "delayed")]
9230 Delayed,
9231 #[serde(rename = "suspended")]
9233 Suspended,
9234 #[serde(rename = "final")]
9236 Final,
9237 #[serde(rename = "final_overtime")]
9239 FinalOvertime,
9240 #[serde(rename = "final_shootout")]
9242 FinalShootout,
9243 #[serde(rename = "awarded")]
9245 Awarded,
9246 #[serde(rename = "forfeit")]
9248 Forfeit,
9249 #[serde(rename = "not_necessary")]
9251 NotNecessary,
9252 #[serde(rename = "postponed")]
9254 Postponed,
9255 #[serde(rename = "cancelled")]
9257 Cancelled,
9258 #[serde(rename = "unknown")]
9260 Unknown,
9261 #[serde(untagged)]
9263 Other(String),
9264}
9265
9266impl MatchStatus {
9267 pub fn as_str(&self) -> &str {
9269 match self {
9270 Self::Scheduled => "scheduled",
9271 Self::InProgress => "in_progress",
9272 Self::Halftime => "halftime",
9273 Self::PenaltyShootout => "penalty_shootout",
9274 Self::Delayed => "delayed",
9275 Self::Suspended => "suspended",
9276 Self::Final => "final",
9277 Self::FinalOvertime => "final_overtime",
9278 Self::FinalShootout => "final_shootout",
9279 Self::Awarded => "awarded",
9280 Self::Forfeit => "forfeit",
9281 Self::NotNecessary => "not_necessary",
9282 Self::Postponed => "postponed",
9283 Self::Cancelled => "cancelled",
9284 Self::Unknown => "unknown",
9285 Self::Other(value) => value,
9286 }
9287 }
9288}
9289
9290impl From<&str> for MatchStatus {
9291 fn from(value: &str) -> Self {
9292 match value {
9293 "scheduled" => Self::Scheduled,
9294 "in_progress" => Self::InProgress,
9295 "halftime" => Self::Halftime,
9296 "penalty_shootout" => Self::PenaltyShootout,
9297 "delayed" => Self::Delayed,
9298 "suspended" => Self::Suspended,
9299 "final" => Self::Final,
9300 "final_overtime" => Self::FinalOvertime,
9301 "final_shootout" => Self::FinalShootout,
9302 "awarded" => Self::Awarded,
9303 "forfeit" => Self::Forfeit,
9304 "not_necessary" => Self::NotNecessary,
9305 "postponed" => Self::Postponed,
9306 "cancelled" => Self::Cancelled,
9307 "unknown" => Self::Unknown,
9308 other => Self::Other(other.to_owned()),
9309 }
9310 }
9311}
9312
9313impl std::fmt::Display for MatchStatus {
9314 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9315 f.write_str(self.as_str())
9316 }
9317}
9318
9319impl AsRef<str> for MatchStatus {
9320 fn as_ref(&self) -> &str {
9321 self.as_str()
9322 }
9323}
9324
9325#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
9327#[non_exhaustive]
9328pub enum MatchType {
9329 #[serde(rename = "COMPLEMENTARY")]
9331 Complementary,
9332 #[serde(rename = "MINT")]
9334 Mint,
9335 #[serde(rename = "MERGE")]
9337 Merge,
9338 #[serde(untagged)]
9340 Other(String),
9341}
9342
9343impl MatchType {
9344 pub fn as_str(&self) -> &str {
9346 match self {
9347 Self::Complementary => "COMPLEMENTARY",
9348 Self::Mint => "MINT",
9349 Self::Merge => "MERGE",
9350 Self::Other(value) => value,
9351 }
9352 }
9353}
9354
9355impl From<&str> for MatchType {
9356 fn from(value: &str) -> Self {
9357 match value {
9358 "COMPLEMENTARY" => Self::Complementary,
9359 "MINT" => Self::Mint,
9360 "MERGE" => Self::Merge,
9361 other => Self::Other(other.to_owned()),
9362 }
9363 }
9364}
9365
9366impl std::fmt::Display for MatchType {
9367 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9368 f.write_str(self.as_str())
9369 }
9370}
9371
9372impl AsRef<str> for MatchType {
9373 fn as_ref(&self) -> &str {
9374 self.as_str()
9375 }
9376}
9377
9378#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
9379#[non_exhaustive]
9380pub struct McpJsonRpcError {
9381 pub jsonrpc: String,
9382 #[serde(default, skip_serializing_if = "Option::is_none")]
9384 pub id: Option<serde_json::Value>,
9385 pub error: McpJsonRpcErrorError,
9386}
9387
9388#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
9389#[non_exhaustive]
9390pub struct McpJsonRpcErrorError {
9391 pub code: i64,
9392 pub message: String,
9393 #[serde(default, skip_serializing_if = "Option::is_none")]
9395 pub data: Option<serde_json::Value>,
9396}
9397
9398#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
9400#[non_exhaustive]
9401pub enum McpMethod {
9402 #[serde(rename = "initialize")]
9404 Initialize,
9405 #[serde(rename = "notifications/initialized")]
9407 NotificationsInitialized,
9408 #[serde(rename = "notifications/cancelled")]
9410 NotificationsCancelled,
9411 #[serde(rename = "ping")]
9413 Ping,
9414 #[serde(rename = "tools/list")]
9416 ToolsList,
9417 #[serde(rename = "tools/call")]
9419 ToolsCall,
9420 #[serde(rename = "server/discover")]
9422 ServerDiscover,
9423 #[serde(untagged)]
9425 Other(String),
9426}
9427
9428impl McpMethod {
9429 pub fn as_str(&self) -> &str {
9431 match self {
9432 Self::Initialize => "initialize",
9433 Self::NotificationsInitialized => "notifications/initialized",
9434 Self::NotificationsCancelled => "notifications/cancelled",
9435 Self::Ping => "ping",
9436 Self::ToolsList => "tools/list",
9437 Self::ToolsCall => "tools/call",
9438 Self::ServerDiscover => "server/discover",
9439 Self::Other(value) => value,
9440 }
9441 }
9442}
9443
9444impl From<&str> for McpMethod {
9445 fn from(value: &str) -> Self {
9446 match value {
9447 "initialize" => Self::Initialize,
9448 "notifications/initialized" => Self::NotificationsInitialized,
9449 "notifications/cancelled" => Self::NotificationsCancelled,
9450 "ping" => Self::Ping,
9451 "tools/list" => Self::ToolsList,
9452 "tools/call" => Self::ToolsCall,
9453 "server/discover" => Self::ServerDiscover,
9454 other => Self::Other(other.to_owned()),
9455 }
9456 }
9457}
9458
9459impl std::fmt::Display for McpMethod {
9460 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9461 f.write_str(self.as_str())
9462 }
9463}
9464
9465impl AsRef<str> for McpMethod {
9466 fn as_ref(&self) -> &str {
9467 self.as_str()
9468 }
9469}
9470
9471#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
9473#[non_exhaustive]
9474pub enum Mode {
9475 #[serde(rename = "live")]
9477 Live,
9478 #[serde(rename = "stable")]
9480 Stable,
9481 #[serde(untagged)]
9483 Other(String),
9484}
9485
9486impl Mode {
9487 pub fn as_str(&self) -> &str {
9489 match self {
9490 Self::Live => "live",
9491 Self::Stable => "stable",
9492 Self::Other(value) => value,
9493 }
9494 }
9495}
9496
9497impl From<&str> for Mode {
9498 fn from(value: &str) -> Self {
9499 match value {
9500 "live" => Self::Live,
9501 "stable" => Self::Stable,
9502 other => Self::Other(other.to_owned()),
9503 }
9504 }
9505}
9506
9507impl std::fmt::Display for Mode {
9508 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9509 f.write_str(self.as_str())
9510 }
9511}
9512
9513impl AsRef<str> for Mode {
9514 fn as_ref(&self) -> &str {
9515 self.as_str()
9516 }
9517}
9518
9519#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
9521#[non_exhaustive]
9522pub enum NextAction {
9523 #[serde(rename = "poll")]
9525 Poll,
9526 #[serde(rename = "download")]
9528 Download,
9529 #[serde(rename = "resubmit")]
9531 Resubmit,
9532 #[serde(untagged)]
9534 Other(String),
9535}
9536
9537impl NextAction {
9538 pub fn as_str(&self) -> &str {
9540 match self {
9541 Self::Poll => "poll",
9542 Self::Download => "download",
9543 Self::Resubmit => "resubmit",
9544 Self::Other(value) => value,
9545 }
9546 }
9547}
9548
9549impl From<&str> for NextAction {
9550 fn from(value: &str) -> Self {
9551 match value {
9552 "poll" => Self::Poll,
9553 "download" => Self::Download,
9554 "resubmit" => Self::Resubmit,
9555 other => Self::Other(other.to_owned()),
9556 }
9557 }
9558}
9559
9560impl std::fmt::Display for NextAction {
9561 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9562 f.write_str(self.as_str())
9563 }
9564}
9565
9566impl AsRef<str> for NextAction {
9567 fn as_ref(&self) -> &str {
9568 self.as_str()
9569 }
9570}
9571
9572#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
9574#[non_exhaustive]
9575pub enum ObservationSource {
9576 #[serde(rename = "board_snapshot")]
9578 BoardSnapshot,
9579 #[serde(rename = "clob_display")]
9581 ClobDisplay,
9582 #[serde(untagged)]
9584 Other(String),
9585}
9586
9587impl ObservationSource {
9588 pub fn as_str(&self) -> &str {
9590 match self {
9591 Self::BoardSnapshot => "board_snapshot",
9592 Self::ClobDisplay => "clob_display",
9593 Self::Other(value) => value,
9594 }
9595 }
9596}
9597
9598impl From<&str> for ObservationSource {
9599 fn from(value: &str) -> Self {
9600 match value {
9601 "board_snapshot" => Self::BoardSnapshot,
9602 "clob_display" => Self::ClobDisplay,
9603 other => Self::Other(other.to_owned()),
9604 }
9605 }
9606}
9607
9608impl std::fmt::Display for ObservationSource {
9609 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9610 f.write_str(self.as_str())
9611 }
9612}
9613
9614impl AsRef<str> for ObservationSource {
9615 fn as_ref(&self) -> &str {
9616 self.as_str()
9617 }
9618}
9619
9620#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
9622#[non_exhaustive]
9623pub enum Outcome {
9624 #[serde(rename = "pending")]
9626 Pending,
9627 #[serde(rename = "win")]
9629 Win,
9630 #[serde(rename = "loss")]
9632 Loss,
9633 #[serde(rename = "void")]
9635 Void,
9636 #[serde(untagged)]
9638 Other(String),
9639}
9640
9641impl Outcome {
9642 pub fn as_str(&self) -> &str {
9644 match self {
9645 Self::Pending => "pending",
9646 Self::Win => "win",
9647 Self::Loss => "loss",
9648 Self::Void => "void",
9649 Self::Other(value) => value,
9650 }
9651 }
9652}
9653
9654impl From<&str> for Outcome {
9655 fn from(value: &str) -> Self {
9656 match value {
9657 "pending" => Self::Pending,
9658 "win" => Self::Win,
9659 "loss" => Self::Loss,
9660 "void" => Self::Void,
9661 other => Self::Other(other.to_owned()),
9662 }
9663 }
9664}
9665
9666impl std::fmt::Display for Outcome {
9667 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9668 f.write_str(self.as_str())
9669 }
9670}
9671
9672impl AsRef<str> for Outcome {
9673 fn as_ref(&self) -> &str {
9674 self.as_str()
9675 }
9676}
9677
9678#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
9680#[non_exhaustive]
9681pub struct OutcomeCandles {
9682 pub token_id: String,
9684 pub outcome: Direction,
9686 pub candles: Vec<Candle>,
9688}
9689
9690#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
9692#[non_exhaustive]
9693pub enum PaidDataAccess {
9694 #[serde(rename = "active")]
9696 Active,
9697 #[serde(rename = "lapsed")]
9699 Lapsed,
9700 #[serde(untagged)]
9702 Other(String),
9703}
9704
9705impl PaidDataAccess {
9706 pub fn as_str(&self) -> &str {
9708 match self {
9709 Self::Active => "active",
9710 Self::Lapsed => "lapsed",
9711 Self::Other(value) => value,
9712 }
9713 }
9714}
9715
9716impl From<&str> for PaidDataAccess {
9717 fn from(value: &str) -> Self {
9718 match value {
9719 "active" => Self::Active,
9720 "lapsed" => Self::Lapsed,
9721 other => Self::Other(other.to_owned()),
9722 }
9723 }
9724}
9725
9726impl std::fmt::Display for PaidDataAccess {
9727 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9728 f.write_str(self.as_str())
9729 }
9730}
9731
9732impl AsRef<str> for PaidDataAccess {
9733 fn as_ref(&self) -> &str {
9734 self.as_str()
9735 }
9736}
9737
9738#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
9739#[non_exhaustive]
9740pub struct PickHolder {
9741 pub address: String,
9742 #[serde(default)]
9743 pub name: Option<String>,
9744 #[serde(default)]
9746 pub grade: Option<String>,
9747 #[serde(default)]
9749 pub last_traded_at: Option<String>,
9750 #[serde(default, skip_serializing_if = "Option::is_none")]
9752 pub profile_segment: Option<String>,
9753 pub shares: f64,
9754 #[serde(default, skip_serializing_if = "Option::is_none")]
9756 pub entry_value_usd: Option<f64>,
9757 #[serde(default, skip_serializing_if = "Option::is_none")]
9759 pub category_win_rate: Option<f64>,
9760 #[serde(default, skip_serializing_if = "Option::is_none")]
9762 pub category_win_record: Option<PickHolderCategoryWinRecord>,
9763 #[serde(default, skip_serializing_if = "Option::is_none")]
9765 pub category_avg_price: Option<f64>,
9766 #[serde(default, skip_serializing_if = "Option::is_none")]
9768 pub category_win_rate_game: Option<String>,
9769 #[serde(default, skip_serializing_if = "Option::is_none")]
9771 pub category_win_rate_status: Option<CategoryWinRateStatus>,
9772 #[serde(default, skip_serializing_if = "Option::is_none")]
9774 pub wallet_age_days: Option<f64>,
9775 #[serde(default, skip_serializing_if = "Option::is_none")]
9777 pub is_new_wallet: Option<bool>,
9778 #[serde(default, skip_serializing_if = "Option::is_none")]
9780 pub markets_traded: Option<i64>,
9781 #[serde(default, skip_serializing_if = "Option::is_none")]
9783 pub is_bot: Option<bool>,
9784 #[serde(default, skip_serializing_if = "Option::is_none")]
9786 pub x_username: Option<String>,
9787}
9788
9789#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
9791#[non_exhaustive]
9792pub struct PickHolderCategoryWinRecord {
9793 pub wins: i64,
9795 pub decided: i64,
9797}
9798
9799#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
9801#[non_exhaustive]
9802pub struct PickLeadBacker {
9803 pub address: String,
9805 #[serde(default)]
9807 pub name: Option<String>,
9808 pub grade: String,
9810 pub category: String,
9812 pub position_usd: f64,
9814 #[serde(default, skip_serializing_if = "Option::is_none")]
9816 pub net_position_usd: Option<f64>,
9817 pub position_observed_at: String,
9819 pub directional_event_count: i64,
9821 pub profitable_event_count: i64,
9823 pub realized_pnl_usd: f64,
9825 pub entry_basis_usd: f64,
9827 pub roi: f64,
9829 pub max_realized_drawdown_usd: f64,
9831 pub recorded_at: String,
9833}
9834
9835#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
9836#[non_exhaustive]
9837pub struct PickOfTheDay {
9838 pub state: String,
9840 #[serde(default, skip_serializing_if = "Option::is_none")]
9842 pub pick_date: Option<String>,
9843 #[serde(default, skip_serializing_if = "Option::is_none")]
9845 pub pick_rank: Option<i64>,
9846 #[serde(default, skip_serializing_if = "Option::is_none")]
9848 pub picks: Option<Vec<PickOfTheDay>>,
9849 #[serde(default, skip_serializing_if = "Option::is_none")]
9851 pub pick_count: Option<i64>,
9852 #[serde(default, skip_serializing_if = "Option::is_none")]
9854 pub scheduled_picks: Option<Vec<ScheduledPickSlot>>,
9855 #[serde(default, skip_serializing_if = "Option::is_none")]
9857 pub matchup: Option<String>,
9858 #[serde(default, skip_serializing_if = "Option::is_none")]
9860 pub category: Option<String>,
9861 #[serde(default, skip_serializing_if = "Option::is_none")]
9863 pub display_category: Option<String>,
9864 #[serde(default, skip_serializing_if = "Option::is_none")]
9866 pub platform: Option<String>,
9867 #[serde(default, skip_serializing_if = "Option::is_none")]
9869 pub release_at: Option<String>,
9870 #[serde(default, skip_serializing_if = "Option::is_none")]
9872 pub is_locked: Option<bool>,
9873 #[serde(default, skip_serializing_if = "Option::is_none")]
9875 pub game_started: Option<bool>,
9876 #[serde(default, skip_serializing_if = "Option::is_none")]
9878 pub game_ended: Option<bool>,
9879 #[serde(default, skip_serializing_if = "Option::is_none")]
9881 pub outcome: Option<Outcome>,
9882 #[serde(default, skip_serializing_if = "Option::is_none")]
9884 pub outcome_display: Option<String>,
9885 #[serde(default, skip_serializing_if = "Option::is_none")]
9887 pub pick_outcome_label: Option<String>,
9888 #[serde(default, skip_serializing_if = "Option::is_none")]
9890 pub token_id: Option<String>,
9891 #[serde(default, skip_serializing_if = "Option::is_none")]
9893 pub position: Option<String>,
9894 #[serde(default, skip_serializing_if = "Option::is_none")]
9896 pub side_summary: Option<String>,
9897 #[serde(default, skip_serializing_if = "Option::is_none")]
9899 pub sharp_wallet_count: Option<i64>,
9900 #[serde(default, skip_serializing_if = "Option::is_none")]
9902 pub smart_wallet_count: Option<i64>,
9903 #[serde(default, skip_serializing_if = "Option::is_none")]
9905 pub top_grade: Option<String>,
9906 #[serde(default, skip_serializing_if = "Option::is_none")]
9908 pub sharp_usd: Option<f64>,
9909 #[serde(default, skip_serializing_if = "Option::is_none")]
9911 pub smart_usd: Option<f64>,
9912 #[serde(default, skip_serializing_if = "Option::is_none")]
9914 pub backed_price: Option<f64>,
9915 #[serde(default, skip_serializing_if = "Option::is_none")]
9917 pub entry_price_note: Option<String>,
9918 #[serde(default, skip_serializing_if = "Option::is_none")]
9920 pub odds_display: Option<String>,
9921 #[serde(default, skip_serializing_if = "Option::is_none")]
9923 pub stake_usd: Option<f64>,
9924 #[serde(default, skip_serializing_if = "Option::is_none")]
9926 pub return_usd: Option<f64>,
9927 #[serde(default, skip_serializing_if = "Option::is_none")]
9929 pub return_per_100: Option<f64>,
9930 #[serde(default, skip_serializing_if = "Option::is_none")]
9932 pub payout_display: Option<String>,
9933 #[serde(default, skip_serializing_if = "Option::is_none")]
9935 pub profit_display: Option<String>,
9936 #[serde(default, skip_serializing_if = "Option::is_none")]
9938 pub clv_status: Option<String>,
9939 #[serde(default, skip_serializing_if = "Option::is_none")]
9941 pub clv_basis: Option<String>,
9942 #[serde(default, skip_serializing_if = "Option::is_none")]
9944 pub clv_pct: Option<f64>,
9945 #[serde(default, skip_serializing_if = "Option::is_none")]
9947 pub clv_display: Option<String>,
9948 #[serde(default, skip_serializing_if = "Option::is_none")]
9950 pub clv_explanation: Option<String>,
9951 #[serde(default, skip_serializing_if = "Option::is_none")]
9953 pub unit_score: Option<f64>,
9954 #[serde(default, skip_serializing_if = "Option::is_none")]
9956 pub unit_score_display: Option<String>,
9957 #[serde(default, skip_serializing_if = "Option::is_none")]
9959 pub sharp_pct: Option<f64>,
9960 #[serde(default, skip_serializing_if = "Option::is_none")]
9962 pub market_pct: Option<f64>,
9963 #[serde(default, skip_serializing_if = "Option::is_none")]
9965 pub qualifying_expert: Option<PickOfTheDayQualifyingExpert>,
9966 #[serde(default, skip_serializing_if = "Option::is_none")]
9968 pub traders: Option<i64>,
9969 #[serde(default, skip_serializing_if = "Option::is_none")]
9971 pub backed_sharp_usd: Option<f64>,
9972 #[serde(default, skip_serializing_if = "Option::is_none")]
9974 pub holders: Option<Vec<PickHolder>>,
9975 #[serde(default, skip_serializing_if = "Option::is_none")]
9977 pub display_holders: Option<Vec<PickHolder>>,
9978 #[serde(default, skip_serializing_if = "Option::is_none")]
9980 pub holder_count: Option<i64>,
9981 #[serde(default, skip_serializing_if = "Option::is_none")]
9983 pub thesis: Option<String>,
9984 #[serde(default, skip_serializing_if = "Option::is_none")]
9986 pub market_url: Option<String>,
9987 #[serde(default, skip_serializing_if = "Option::is_none")]
9989 pub polymarket_url: Option<String>,
9990 #[serde(default, skip_serializing_if = "Option::is_none")]
9992 pub event_slug: Option<String>,
9993 #[serde(default, skip_serializing_if = "Option::is_none")]
9995 pub event_link_slug: Option<String>,
9996 #[serde(default, skip_serializing_if = "Option::is_none")]
9998 pub sports_context: Option<PickSportsContext>,
9999 #[serde(default, skip_serializing_if = "Option::is_none")]
10001 pub disclaimer: Option<String>,
10002 #[serde(default, skip_serializing_if = "Option::is_none")]
10004 pub proof_pending_picks: Option<Vec<ProofPendingPickSlot>>,
10005 #[serde(default, skip_serializing_if = "Option::is_none")]
10007 pub entry_authorization: Option<PotdEntryAuthorization>,
10008 #[serde(default, skip_serializing_if = "Option::is_none")]
10010 pub locked_picks: Option<Vec<PickOfTheDayLockedPicksItem>>,
10011 #[serde(default, skip_serializing_if = "Option::is_none")]
10013 pub message: Option<String>,
10014 #[serde(default, skip_serializing_if = "Option::is_none")]
10016 pub pick_id: Option<String>,
10017 #[serde(default, skip_serializing_if = "Option::is_none")]
10019 pub publication_order: Option<i64>,
10020 #[serde(default, skip_serializing_if = "Option::is_none")]
10022 pub is_free_selection: Option<bool>,
10023 #[serde(default)]
10025 pub supersedes_pick_id: Option<String>,
10026 #[serde(default, skip_serializing_if = "Option::is_none")]
10028 pub lead_backer: Option<PickLeadBacker>,
10029}
10030
10031#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10032#[non_exhaustive]
10033pub struct PickOfTheDayArchive {
10034 pub picks: Vec<PickOfTheDayArchiveEntry>,
10036 pub days: Vec<PickOfTheDayArchiveDay>,
10038 pub hit_rate: PickOfTheDayHitRate,
10039}
10040
10041#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10042#[non_exhaustive]
10043pub struct PickOfTheDayArchiveDay {
10044 pub date: String,
10046 pub picks: i64,
10048 pub wins: i64,
10050 pub losses: i64,
10052 pub void: i64,
10054 pub pending: i64,
10056 #[serde(default, skip_serializing_if = "Option::is_none")]
10058 pub unit_score: Option<f64>,
10059 #[serde(default, skip_serializing_if = "Option::is_none")]
10061 pub unit_score_display: Option<String>,
10062 #[serde(default, skip_serializing_if = "Option::is_none")]
10064 pub sweep: Option<Sweep>,
10065}
10066
10067#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10068#[non_exhaustive]
10069pub struct PickOfTheDayArchiveEntry {
10070 pub pick_date: String,
10072 pub pick_rank: i64,
10074 #[serde(default, skip_serializing_if = "Option::is_none")]
10076 pub published_at: Option<String>,
10077 #[serde(default, skip_serializing_if = "Option::is_none")]
10079 pub matchup: Option<String>,
10080 #[serde(default, skip_serializing_if = "Option::is_none")]
10082 pub category: Option<String>,
10083 #[serde(default, skip_serializing_if = "Option::is_none")]
10085 pub display_category: Option<String>,
10086 #[serde(default, skip_serializing_if = "Option::is_none")]
10088 pub image_url: Option<String>,
10089 #[serde(default, skip_serializing_if = "Option::is_none")]
10091 pub pick_outcome_label: Option<String>,
10092 #[serde(default, skip_serializing_if = "Option::is_none")]
10094 pub top_grade: Option<String>,
10095 pub outcome: Outcome,
10097 #[serde(default, skip_serializing_if = "Option::is_none")]
10099 pub outcome_display: Option<String>,
10100 #[serde(default, skip_serializing_if = "Option::is_none")]
10102 pub resolved_at: Option<String>,
10103 #[serde(default, skip_serializing_if = "Option::is_none")]
10105 pub stake_usd: Option<f64>,
10106 #[serde(default, skip_serializing_if = "Option::is_none")]
10108 pub return_usd: Option<f64>,
10109 #[serde(default, skip_serializing_if = "Option::is_none")]
10111 pub return_per_100: Option<f64>,
10112 #[serde(default, skip_serializing_if = "Option::is_none")]
10114 pub payout_display: Option<String>,
10115 #[serde(default, skip_serializing_if = "Option::is_none")]
10117 pub backed_price: Option<f64>,
10118 #[serde(default, skip_serializing_if = "Option::is_none")]
10120 pub clv_pct: Option<f64>,
10121 #[serde(default, skip_serializing_if = "Option::is_none")]
10123 pub clv_display: Option<String>,
10124 #[serde(default, skip_serializing_if = "Option::is_none")]
10126 pub clv_entry_price: Option<f64>,
10127 #[serde(default, skip_serializing_if = "Option::is_none")]
10129 pub clv_close_price: Option<f64>,
10130 #[serde(default, skip_serializing_if = "Option::is_none")]
10132 pub clv_applicability: Option<ClvApplicability>,
10133 #[serde(default, skip_serializing_if = "Option::is_none")]
10135 pub clv_explanation: Option<String>,
10136 #[serde(default, skip_serializing_if = "Option::is_none")]
10138 pub clv_status: Option<String>,
10139 #[serde(default, skip_serializing_if = "Option::is_none")]
10141 pub clv_basis: Option<String>,
10142 #[serde(default, skip_serializing_if = "Option::is_none")]
10144 pub unit_score: Option<f64>,
10145 #[serde(default, skip_serializing_if = "Option::is_none")]
10147 pub unit_score_display: Option<String>,
10148 #[serde(default, skip_serializing_if = "Option::is_none")]
10150 pub required_tier: Option<RequiredTier>,
10151 #[serde(default, skip_serializing_if = "Option::is_none")]
10153 pub backed_side_locked: Option<bool>,
10154 pub pick_id: String,
10156 pub publication_order: i64,
10158 pub is_free_selection: bool,
10160 #[serde(default)]
10162 pub supersedes_pick_id: Option<String>,
10163}
10164
10165pub type PickOfTheDayCommitmentPayload = serde_json::Value;
10167
10168#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10170#[non_exhaustive]
10171pub struct PickOfTheDayCommitmentPayloadV1 {
10172 pub backed_price: String,
10174 pub condition_id: String,
10176 pub kickoff: String,
10178 pub pick_date: String,
10180 pub pick_outcome_index: i64,
10182 pub pick_outcome_label: String,
10184 pub pick_rank: i64,
10186 pub platform: String,
10188}
10189
10190#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10192#[non_exhaustive]
10193pub struct PickOfTheDayCommitmentPayloadV2 {
10194 pub backed_price: String,
10196 pub condition_id: String,
10198 pub kickoff: String,
10200 pub pick_date: String,
10202 pub pick_outcome_index: i64,
10204 pub pick_outcome_label: String,
10206 pub platform: String,
10208 pub pick_id: String,
10210 pub version: i64,
10211}
10212
10213#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10214#[non_exhaustive]
10215pub struct PickOfTheDayHitRate {
10216 pub wins: i64,
10218 pub losses: i64,
10220 pub decided: i64,
10222 pub pct: f64,
10224 pub void: i64,
10226 pub pending: i64,
10228 pub stake_usd: f64,
10230 pub net_profit_usd: f64,
10232 pub staked_usd: f64,
10234 pub roi_pct: f64,
10236 pub net_profit_display: String,
10238 pub roi_display: String,
10240 pub win_rate_display: String,
10242 #[serde(default, skip_serializing_if = "Option::is_none")]
10244 pub unit_score: Option<f64>,
10245 #[serde(default, skip_serializing_if = "Option::is_none")]
10247 pub unit_score_display: Option<String>,
10248 pub clv_pending: i64,
10250 pub clv_unavailable: i64,
10252 pub clv_state: ClvState,
10254 pub clv_eligible: i64,
10256 pub clv_total: i64,
10258 pub clv_measured: i64,
10260 pub clv_applicable: i64,
10262 pub clv_not_applicable: i64,
10264 #[serde(default, skip_serializing_if = "Option::is_none")]
10266 pub clv_coverage_pct: Option<f64>,
10267 #[serde(default, skip_serializing_if = "Option::is_none")]
10269 pub clv_coverage_display: Option<String>,
10270 #[serde(default, skip_serializing_if = "Option::is_none")]
10272 pub clv_coverage_explanation: Option<String>,
10273 #[serde(default, skip_serializing_if = "Option::is_none")]
10275 pub clv_avg_pct: Option<f64>,
10276 #[serde(default, skip_serializing_if = "Option::is_none")]
10278 pub clv_avg_display: Option<String>,
10279 #[serde(default, skip_serializing_if = "Option::is_none")]
10281 pub clv_avg_pp: Option<f64>,
10282 #[serde(default, skip_serializing_if = "Option::is_none")]
10284 pub clv_avg_pp_display: Option<String>,
10285 pub clv_beats_close: i64,
10287 pub clv_ties: i64,
10289 pub series: Vec<PickOfTheDayHitRateSeriesItem>,
10291}
10292
10293#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10294#[non_exhaustive]
10295pub struct PickOfTheDayHitRateSeriesItem {
10296 pub date: String,
10298 pub net_profit_usd: f64,
10300 pub hit_rate_pct: f64,
10302}
10303
10304#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10306#[non_exhaustive]
10307pub struct PickOfTheDayLedger {
10308 pub entries: Vec<PickOfTheDayLedgerEntry>,
10310 pub entry_count: i64,
10312 pub sealed_count: i64,
10314 pub opened_count: i64,
10316 pub uncommitted_count: i64,
10318}
10319
10320#[derive(Debug, Clone, PartialEq)]
10325#[non_exhaustive]
10326pub enum PickOfTheDayLedgerEntry {
10327 Sealed(PickOfTheDayLedgerSealedEntry),
10329 Opened(PickOfTheDayLedgerOpenedEntry),
10331 Uncommitted(PickOfTheDayLedgerUncommittedEntry),
10333 Unknown(serde_json::Value),
10335}
10336
10337impl<'de> Deserialize<'de> for PickOfTheDayLedgerEntry {
10338 fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
10339 let value = serde_json::Value::deserialize(deserializer)?;
10340 match value.get("state").and_then(serde_json::Value::as_str) {
10341 Some("sealed") => serde_json::from_value(value)
10342 .map(Self::Sealed)
10343 .map_err(de::Error::custom),
10344 Some("opened") => serde_json::from_value(value)
10345 .map(Self::Opened)
10346 .map_err(de::Error::custom),
10347 Some("uncommitted") => serde_json::from_value(value)
10348 .map(Self::Uncommitted)
10349 .map_err(de::Error::custom),
10350 _ => Ok(Self::Unknown(value)),
10351 }
10352 }
10353}
10354
10355impl Serialize for PickOfTheDayLedgerEntry {
10356 fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
10357 match self {
10358 Self::Sealed(inner) => inner.serialize(serializer),
10359 Self::Opened(inner) => inner.serialize(serializer),
10360 Self::Uncommitted(inner) => inner.serialize(serializer),
10361 Self::Unknown(inner) => inner.serialize(serializer),
10362 }
10363 }
10364}
10365
10366#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10368#[non_exhaustive]
10369pub struct PickOfTheDayLedgerOpenedEntry {
10370 pub state: String,
10371 pub pick_date: String,
10373 pub pick_rank: i64,
10375 pub commitment_hash: String,
10377 pub commitment_nonce: String,
10379 pub commitment_algo: String,
10381 pub sealed_at: String,
10383 #[serde(default)]
10385 pub resolved_at: Option<String>,
10386 pub kickoff: String,
10388 pub payload: PickOfTheDayCommitmentPayload,
10389 pub outcome: PickOfTheDayLedgerOpenedEntryOutcome,
10391 #[serde(default)]
10393 pub withdrawal_reason: Option<WithdrawalReason>,
10394 pub matchup: String,
10396 pub category: String,
10398 pub permalink: String,
10400 pub pick_id: String,
10402 pub publication_order: i64,
10404 pub is_free_selection: bool,
10406 #[serde(default)]
10408 pub supersedes_pick_id: Option<String>,
10409 pub commitment_version: i64,
10411}
10412
10413#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
10415#[non_exhaustive]
10416pub enum PickOfTheDayLedgerOpenedEntryOutcome {
10417 #[serde(rename = "win")]
10419 Win,
10420 #[serde(rename = "loss")]
10422 Loss,
10423 #[serde(rename = "void")]
10425 Void,
10426 #[serde(untagged)]
10428 Other(String),
10429}
10430
10431impl PickOfTheDayLedgerOpenedEntryOutcome {
10432 pub fn as_str(&self) -> &str {
10434 match self {
10435 Self::Win => "win",
10436 Self::Loss => "loss",
10437 Self::Void => "void",
10438 Self::Other(value) => value,
10439 }
10440 }
10441}
10442
10443impl From<&str> for PickOfTheDayLedgerOpenedEntryOutcome {
10444 fn from(value: &str) -> Self {
10445 match value {
10446 "win" => Self::Win,
10447 "loss" => Self::Loss,
10448 "void" => Self::Void,
10449 other => Self::Other(other.to_owned()),
10450 }
10451 }
10452}
10453
10454impl std::fmt::Display for PickOfTheDayLedgerOpenedEntryOutcome {
10455 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10456 f.write_str(self.as_str())
10457 }
10458}
10459
10460impl AsRef<str> for PickOfTheDayLedgerOpenedEntryOutcome {
10461 fn as_ref(&self) -> &str {
10462 self.as_str()
10463 }
10464}
10465
10466#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10468#[non_exhaustive]
10469pub struct PickOfTheDayLedgerSealedEntry {
10470 pub state: String,
10471 pub pick_date: String,
10473 pub pick_rank: i64,
10475 pub commitment_hash: String,
10477 pub commitment_algo: String,
10479 pub sealed_at: String,
10481 pub permalink: String,
10483 pub pick_id: String,
10485 pub publication_order: i64,
10487 pub is_free_selection: bool,
10489 #[serde(default)]
10491 pub supersedes_pick_id: Option<String>,
10492 pub commitment_version: i64,
10494}
10495
10496#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10498#[non_exhaustive]
10499pub struct PickOfTheDayLedgerUncommittedEntry {
10500 pub state: String,
10501 pub pick_date: String,
10503 pub pick_rank: i64,
10505 pub pre_commitment: bool,
10507 pub outcome: Outcome,
10509 #[serde(default, skip_serializing_if = "Option::is_none")]
10511 pub withdrawal_reason: Option<WithdrawalReason>,
10512 #[serde(default, skip_serializing_if = "Option::is_none")]
10514 pub matchup: Option<String>,
10515 #[serde(default, skip_serializing_if = "Option::is_none")]
10517 pub category: Option<String>,
10518 #[serde(default)]
10520 pub resolved_at: Option<String>,
10521 #[serde(default)]
10523 pub payload: Option<PickOfTheDayUncommittedPayload>,
10524 pub permalink: String,
10526 pub pick_id: String,
10528 pub publication_order: i64,
10530 pub is_free_selection: bool,
10532 #[serde(default)]
10534 pub supersedes_pick_id: Option<String>,
10535}
10536
10537#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10538#[non_exhaustive]
10539pub struct PickOfTheDayLockedPicksItem {
10540 pub pick_rank: i64,
10541 pub required_tier: String,
10542}
10543
10544#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10546#[non_exhaustive]
10547pub struct PickOfTheDayNoEntitledPicks {
10548 pub state: String,
10550 pub pick_date: String,
10552 pub picks: Vec<PickOfTheDay>,
10554 pub pick_count: i64,
10556 pub locked_picks: Vec<PickOfTheDayNoEntitledPicksLockedPicksItem>,
10558 pub message: String,
10560 #[serde(default, skip_serializing_if = "Option::is_none")]
10562 pub scheduled_picks: Option<Vec<ScheduledPickSlot>>,
10563 #[serde(default)]
10565 pub supersedes_pick_id: Option<String>,
10566}
10567
10568#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10569#[non_exhaustive]
10570pub struct PickOfTheDayNoEntitledPicksLockedPicksItem {
10571 pub pick_rank: i64,
10572 pub required_tier: String,
10573}
10574
10575#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10577#[non_exhaustive]
10578pub struct PickOfTheDayQualifyingExpert {
10579 pub address: String,
10581 #[serde(default)]
10583 pub name: Option<String>,
10584 #[serde(default)]
10586 pub grade: Option<String>,
10587 pub canonical_category: String,
10589 #[serde(default)]
10591 pub win_rate: Option<f64>,
10592 #[serde(default)]
10594 pub n_resolved: Option<i64>,
10595 pub position_usd: f64,
10597 #[serde(default, skip_serializing_if = "Option::is_none")]
10599 pub opposite_position_usd: Option<f64>,
10600 pub stats_computed_at: String,
10602}
10603
10604#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10605#[non_exhaustive]
10606pub struct PickOfTheDayStats {
10607 pub categories: Vec<PickOfTheDayStatsCategoriesItem>,
10608 pub days: Vec<PickOfTheDayStatsDaysItem>,
10609 pub hit_rate: PickOfTheDayHitRate,
10610 pub market_expectations: PickOfTheDayStatsMarketExpectations,
10611 pub market_types: Vec<PickOfTheDayStatsMarketTypesItem>,
10612 pub months: Vec<PickOfTheDayStatsMonthsItem>,
10613 pub outcome_stats: PickOfTheDayStatsOutcomeStats,
10614 pub price_bands: Vec<PickOfTheDayStatsPriceBandsItem>,
10615 pub records: PickOfTheDayStatsRecords,
10616 pub sports: Vec<PickOfTheDayStatsSportsItem>,
10617 pub streaks: PickOfTheDayStatsStreaks,
10618 pub tiers: Vec<PickOfTheDayStatsTiersItem>,
10619 pub total_sides: Vec<PickOfTheDayStatsTotalSidesItem>,
10620 pub voids: Vec<PickOfTheDayStatsVoidsItem>,
10621}
10622
10623#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10624#[non_exhaustive]
10625pub struct PickOfTheDayStatsCategoriesItem {
10626 #[serde(default, skip_serializing_if = "Option::is_none")]
10627 pub canonical_category: Option<String>,
10628 #[serde(default, skip_serializing_if = "Option::is_none")]
10629 pub clv_avg_display: Option<String>,
10630 #[serde(default, skip_serializing_if = "Option::is_none")]
10631 pub clv_avg_pct: Option<f64>,
10632 #[serde(default, skip_serializing_if = "Option::is_none")]
10633 pub clv_avg_pp: Option<f64>,
10634 #[serde(default, skip_serializing_if = "Option::is_none")]
10635 pub clv_avg_pp_display: Option<String>,
10636 pub clv_measured: i64,
10637 #[serde(default, skip_serializing_if = "Option::is_none")]
10638 pub edge_display: Option<String>,
10639 #[serde(default, skip_serializing_if = "Option::is_none")]
10640 pub edge_pp: Option<f64>,
10641 pub key: String,
10642 pub label: String,
10643 pub losses: i64,
10644 #[serde(default, skip_serializing_if = "Option::is_none")]
10645 pub net_profit_display: Option<String>,
10646 #[serde(default, skip_serializing_if = "Option::is_none")]
10647 pub net_profit_usd: Option<f64>,
10648 pub pending: i64,
10649 pub picks: i64,
10650 pub priced_decided: i64,
10651 #[serde(default, skip_serializing_if = "Option::is_none")]
10652 pub priced_in_display: Option<String>,
10653 #[serde(default, skip_serializing_if = "Option::is_none")]
10654 pub priced_in_pct: Option<f64>,
10655 #[serde(default, skip_serializing_if = "Option::is_none")]
10656 pub roi_display: Option<String>,
10657 #[serde(default, skip_serializing_if = "Option::is_none")]
10658 pub roi_pct: Option<f64>,
10659 pub settled: i64,
10660 pub small_sample: bool,
10661 pub staked_usd: f64,
10662 #[serde(default, skip_serializing_if = "Option::is_none")]
10663 pub unit_score: Option<f64>,
10664 #[serde(default, skip_serializing_if = "Option::is_none")]
10665 pub unit_score_display: Option<String>,
10666 pub void: i64,
10667 #[serde(default, skip_serializing_if = "Option::is_none")]
10668 pub win_rate_display: Option<String>,
10669 #[serde(default, skip_serializing_if = "Option::is_none")]
10670 pub win_rate_pct: Option<f64>,
10671 pub wins: i64,
10672}
10673
10674#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10675#[non_exhaustive]
10676pub struct PickOfTheDayStatsDaysItem {
10677 pub date: String,
10678 pub losses: i64,
10679 #[serde(default, skip_serializing_if = "Option::is_none")]
10680 pub net_profit_display: Option<String>,
10681 #[serde(default, skip_serializing_if = "Option::is_none")]
10682 pub net_profit_usd: Option<f64>,
10683 pub pending: i64,
10684 pub picks: i64,
10685 #[serde(default, skip_serializing_if = "Option::is_none")]
10686 pub sweep: Option<Sweep>,
10687 #[serde(default, skip_serializing_if = "Option::is_none")]
10688 pub unit_score: Option<f64>,
10689 #[serde(default, skip_serializing_if = "Option::is_none")]
10690 pub unit_score_display: Option<String>,
10691 pub void: i64,
10692 pub wins: i64,
10693}
10694
10695#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10696#[non_exhaustive]
10697pub struct PickOfTheDayStatsMarketExpectations {
10698 pub as_of_date: String,
10699 pub price_basis: String,
10700 pub timezone: String,
10701 pub windows: Vec<PickOfTheDayStatsMarketExpectationsWindowsItem>,
10702}
10703
10704#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10705#[non_exhaustive]
10706pub struct PickOfTheDayStatsMarketExpectationsWindowsItem {
10707 #[serde(default)]
10708 pub clv_avg_display: Option<String>,
10709 #[serde(default)]
10710 pub clv_avg_pct: Option<f64>,
10711 #[serde(default)]
10712 pub clv_avg_pp: Option<f64>,
10713 #[serde(default)]
10714 pub clv_avg_pp_display: Option<String>,
10715 pub clv_measured: i64,
10716 pub clv_missing: i64,
10717 #[serde(default)]
10718 pub expected_wins: Option<f64>,
10719 #[serde(default)]
10720 pub expected_wins_display: Option<String>,
10721 #[serde(default)]
10722 pub from_date: Option<String>,
10723 pub key: String,
10724 pub label: String,
10725 pub numeric_unavailable: bool,
10726 pub priced_decided: i64,
10727 pub through_date: String,
10728 #[serde(default)]
10729 pub units: Option<f64>,
10730 #[serde(default)]
10731 pub units_display: Option<String>,
10732 #[serde(default)]
10733 pub units_z: Option<f64>,
10734 #[serde(default)]
10735 pub units_z_display: Option<String>,
10736 pub unpriced_decided: i64,
10737 pub wins: i64,
10738 #[serde(default)]
10739 pub wins_z: Option<f64>,
10740 #[serde(default)]
10741 pub wins_z_display: Option<String>,
10742}
10743
10744#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10745#[non_exhaustive]
10746pub struct PickOfTheDayStatsMarketTypesItem {
10747 #[serde(default, skip_serializing_if = "Option::is_none")]
10748 pub canonical_category: Option<String>,
10749 #[serde(default, skip_serializing_if = "Option::is_none")]
10750 pub clv_avg_display: Option<String>,
10751 #[serde(default, skip_serializing_if = "Option::is_none")]
10752 pub clv_avg_pct: Option<f64>,
10753 #[serde(default, skip_serializing_if = "Option::is_none")]
10754 pub clv_avg_pp: Option<f64>,
10755 #[serde(default, skip_serializing_if = "Option::is_none")]
10756 pub clv_avg_pp_display: Option<String>,
10757 pub clv_measured: i64,
10758 #[serde(default, skip_serializing_if = "Option::is_none")]
10759 pub edge_display: Option<String>,
10760 #[serde(default, skip_serializing_if = "Option::is_none")]
10761 pub edge_pp: Option<f64>,
10762 pub key: String,
10763 pub label: String,
10764 pub losses: i64,
10765 #[serde(default, skip_serializing_if = "Option::is_none")]
10766 pub net_profit_display: Option<String>,
10767 #[serde(default, skip_serializing_if = "Option::is_none")]
10768 pub net_profit_usd: Option<f64>,
10769 pub pending: i64,
10770 pub picks: i64,
10771 pub priced_decided: i64,
10772 #[serde(default, skip_serializing_if = "Option::is_none")]
10773 pub priced_in_display: Option<String>,
10774 #[serde(default, skip_serializing_if = "Option::is_none")]
10775 pub priced_in_pct: Option<f64>,
10776 #[serde(default, skip_serializing_if = "Option::is_none")]
10777 pub roi_display: Option<String>,
10778 #[serde(default, skip_serializing_if = "Option::is_none")]
10779 pub roi_pct: Option<f64>,
10780 pub settled: i64,
10781 pub small_sample: bool,
10782 pub staked_usd: f64,
10783 #[serde(default, skip_serializing_if = "Option::is_none")]
10784 pub unit_score: Option<f64>,
10785 #[serde(default, skip_serializing_if = "Option::is_none")]
10786 pub unit_score_display: Option<String>,
10787 pub void: i64,
10788 #[serde(default, skip_serializing_if = "Option::is_none")]
10789 pub win_rate_display: Option<String>,
10790 #[serde(default, skip_serializing_if = "Option::is_none")]
10791 pub win_rate_pct: Option<f64>,
10792 pub wins: i64,
10793}
10794
10795#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10796#[non_exhaustive]
10797pub struct PickOfTheDayStatsMonthsItem {
10798 #[serde(default, skip_serializing_if = "Option::is_none")]
10799 pub canonical_category: Option<String>,
10800 #[serde(default, skip_serializing_if = "Option::is_none")]
10801 pub clv_avg_display: Option<String>,
10802 #[serde(default, skip_serializing_if = "Option::is_none")]
10803 pub clv_avg_pct: Option<f64>,
10804 #[serde(default, skip_serializing_if = "Option::is_none")]
10805 pub clv_avg_pp: Option<f64>,
10806 #[serde(default, skip_serializing_if = "Option::is_none")]
10807 pub clv_avg_pp_display: Option<String>,
10808 pub clv_measured: i64,
10809 #[serde(default, skip_serializing_if = "Option::is_none")]
10810 pub edge_display: Option<String>,
10811 #[serde(default, skip_serializing_if = "Option::is_none")]
10812 pub edge_pp: Option<f64>,
10813 pub key: String,
10814 pub label: String,
10815 pub losses: i64,
10816 #[serde(default, skip_serializing_if = "Option::is_none")]
10817 pub net_profit_display: Option<String>,
10818 #[serde(default, skip_serializing_if = "Option::is_none")]
10819 pub net_profit_usd: Option<f64>,
10820 pub pending: i64,
10821 pub picks: i64,
10822 pub priced_decided: i64,
10823 #[serde(default, skip_serializing_if = "Option::is_none")]
10824 pub priced_in_display: Option<String>,
10825 #[serde(default, skip_serializing_if = "Option::is_none")]
10826 pub priced_in_pct: Option<f64>,
10827 #[serde(default, skip_serializing_if = "Option::is_none")]
10828 pub roi_display: Option<String>,
10829 #[serde(default, skip_serializing_if = "Option::is_none")]
10830 pub roi_pct: Option<f64>,
10831 pub settled: i64,
10832 pub small_sample: bool,
10833 pub staked_usd: f64,
10834 #[serde(default, skip_serializing_if = "Option::is_none")]
10835 pub unit_score: Option<f64>,
10836 #[serde(default, skip_serializing_if = "Option::is_none")]
10837 pub unit_score_display: Option<String>,
10838 pub void: i64,
10839 #[serde(default, skip_serializing_if = "Option::is_none")]
10840 pub win_rate_display: Option<String>,
10841 #[serde(default, skip_serializing_if = "Option::is_none")]
10842 pub win_rate_pct: Option<f64>,
10843 pub wins: i64,
10844}
10845
10846#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10847#[non_exhaustive]
10848pub struct PickOfTheDayStatsOutcomeStats {
10849 pub concentration: PickOfTheDayStatsOutcomeStatsConcentration,
10850 pub drawdown: PickOfTheDayStatsOutcomeStatsDrawdown,
10851 pub profit_factor: PickOfTheDayStatsOutcomeStatsProfitFactor,
10852 pub rolling: Vec<PickOfTheDayStatsOutcomeStatsRollingItem>,
10853}
10854
10855#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10856#[non_exhaustive]
10857pub struct PickOfTheDayStatsOutcomeStatsConcentration {
10858 pub positive_wins: i64,
10859 pub remaining_valued_decided: i64,
10860 pub removed_wins: i64,
10861 #[serde(default)]
10862 pub roi_without_top_wins_display: Option<String>,
10863 #[serde(default)]
10864 pub roi_without_top_wins_pct: Option<f64>,
10865 pub target_wins: i64,
10866 #[serde(default)]
10867 pub top_wins_share_display: Option<String>,
10868 #[serde(default)]
10869 pub top_wins_share_pct: Option<f64>,
10870 pub valued_decided: i64,
10871}
10872
10873#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10874#[non_exhaustive]
10875pub struct PickOfTheDayStatsOutcomeStatsDrawdown {
10876 pub completed_days: i64,
10877 #[serde(default)]
10878 pub current_days_below_peak: Option<i64>,
10879 #[serde(default)]
10880 pub current_drawdown_display: Option<String>,
10881 #[serde(default)]
10882 pub current_drawdown_units: Option<f64>,
10883 #[serde(default)]
10884 pub days_below_peak: Option<i64>,
10885 pub excluded_days: i64,
10886 #[serde(default)]
10887 pub from_date: Option<String>,
10888 #[serde(default)]
10889 pub longest_days_below_peak: Option<i64>,
10890 #[serde(default)]
10891 pub longest_recovery_days: Option<i64>,
10892 #[serde(default)]
10893 pub max_drawdown_display: Option<String>,
10894 #[serde(default)]
10895 pub max_drawdown_units: Option<f64>,
10896 #[serde(default)]
10897 pub peak_date: Option<String>,
10898 #[serde(default)]
10899 pub peak_net_profit_usd: Option<f64>,
10900 #[serde(default)]
10901 pub through_date: Option<String>,
10902}
10903
10904#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10905#[non_exhaustive]
10906pub struct PickOfTheDayStatsOutcomeStatsProfitFactor {
10907 #[serde(default)]
10908 pub display: Option<String>,
10909 #[serde(default)]
10910 pub gross_loss_usd: Option<f64>,
10911 #[serde(default)]
10912 pub gross_profit_usd: Option<f64>,
10913 pub state: PickOfTheDayStatsOutcomeStatsProfitFactorState,
10914 #[serde(default)]
10915 pub value: Option<f64>,
10916 pub valued_decided: i64,
10917}
10918
10919#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
10921#[non_exhaustive]
10922pub enum PickOfTheDayStatsOutcomeStatsProfitFactorState {
10923 #[serde(rename = "empty")]
10925 Empty,
10926 #[serde(rename = "measured")]
10928 Measured,
10929 #[serde(rename = "no_losses")]
10931 NoLosses,
10932 #[serde(rename = "numeric_unavailable")]
10934 NumericUnavailable,
10935 #[serde(untagged)]
10937 Other(String),
10938}
10939
10940impl PickOfTheDayStatsOutcomeStatsProfitFactorState {
10941 pub fn as_str(&self) -> &str {
10943 match self {
10944 Self::Empty => "empty",
10945 Self::Measured => "measured",
10946 Self::NoLosses => "no_losses",
10947 Self::NumericUnavailable => "numeric_unavailable",
10948 Self::Other(value) => value,
10949 }
10950 }
10951}
10952
10953impl From<&str> for PickOfTheDayStatsOutcomeStatsProfitFactorState {
10954 fn from(value: &str) -> Self {
10955 match value {
10956 "empty" => Self::Empty,
10957 "measured" => Self::Measured,
10958 "no_losses" => Self::NoLosses,
10959 "numeric_unavailable" => Self::NumericUnavailable,
10960 other => Self::Other(other.to_owned()),
10961 }
10962 }
10963}
10964
10965impl std::fmt::Display for PickOfTheDayStatsOutcomeStatsProfitFactorState {
10966 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
10967 f.write_str(self.as_str())
10968 }
10969}
10970
10971impl AsRef<str> for PickOfTheDayStatsOutcomeStatsProfitFactorState {
10972 fn as_ref(&self) -> &str {
10973 self.as_str()
10974 }
10975}
10976
10977#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10978#[non_exhaustive]
10979pub struct PickOfTheDayStatsOutcomeStatsRollingItem {
10980 #[serde(default)]
10981 pub from_date: Option<String>,
10982 pub losses: i64,
10983 #[serde(default)]
10984 pub roi_display: Option<String>,
10985 #[serde(default)]
10986 pub roi_pct: Option<f64>,
10987 #[serde(default)]
10988 pub through_date: Option<String>,
10989 #[serde(default)]
10990 pub units: Option<f64>,
10991 #[serde(default)]
10992 pub units_display: Option<String>,
10993 pub valued_decided: i64,
10994 #[serde(default)]
10995 pub win_rate_display: Option<String>,
10996 #[serde(default)]
10997 pub win_rate_pct: Option<f64>,
10998 pub window_size: i64,
10999 pub wins: i64,
11000}
11001
11002#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11003#[non_exhaustive]
11004pub struct PickOfTheDayStatsPriceBandsItem {
11005 #[serde(default, skip_serializing_if = "Option::is_none")]
11006 pub canonical_category: Option<String>,
11007 #[serde(default, skip_serializing_if = "Option::is_none")]
11008 pub clv_avg_display: Option<String>,
11009 #[serde(default, skip_serializing_if = "Option::is_none")]
11010 pub clv_avg_pct: Option<f64>,
11011 #[serde(default, skip_serializing_if = "Option::is_none")]
11012 pub clv_avg_pp: Option<f64>,
11013 #[serde(default, skip_serializing_if = "Option::is_none")]
11014 pub clv_avg_pp_display: Option<String>,
11015 pub clv_measured: i64,
11016 #[serde(default, skip_serializing_if = "Option::is_none")]
11017 pub edge_display: Option<String>,
11018 #[serde(default, skip_serializing_if = "Option::is_none")]
11019 pub edge_pp: Option<f64>,
11020 pub key: String,
11021 pub label: String,
11022 pub losses: i64,
11023 #[serde(default, skip_serializing_if = "Option::is_none")]
11024 pub net_profit_display: Option<String>,
11025 #[serde(default, skip_serializing_if = "Option::is_none")]
11026 pub net_profit_usd: Option<f64>,
11027 pub pending: i64,
11028 pub picks: i64,
11029 pub priced_decided: i64,
11030 #[serde(default, skip_serializing_if = "Option::is_none")]
11031 pub priced_in_display: Option<String>,
11032 #[serde(default, skip_serializing_if = "Option::is_none")]
11033 pub priced_in_pct: Option<f64>,
11034 #[serde(default, skip_serializing_if = "Option::is_none")]
11035 pub roi_display: Option<String>,
11036 #[serde(default, skip_serializing_if = "Option::is_none")]
11037 pub roi_pct: Option<f64>,
11038 pub settled: i64,
11039 pub small_sample: bool,
11040 pub staked_usd: f64,
11041 #[serde(default, skip_serializing_if = "Option::is_none")]
11042 pub unit_score: Option<f64>,
11043 #[serde(default, skip_serializing_if = "Option::is_none")]
11044 pub unit_score_display: Option<String>,
11045 pub void: i64,
11046 #[serde(default, skip_serializing_if = "Option::is_none")]
11047 pub win_rate_display: Option<String>,
11048 #[serde(default, skip_serializing_if = "Option::is_none")]
11049 pub win_rate_pct: Option<f64>,
11050 pub wins: i64,
11051}
11052
11053#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11054#[non_exhaustive]
11055pub struct PickOfTheDayStatsRecords {
11056 #[serde(default, skip_serializing_if = "Option::is_none")]
11057 pub best_day: Option<PickOfTheDayStatsRecordsBestDay>,
11058 #[serde(default, skip_serializing_if = "Option::is_none")]
11059 pub biggest_win: Option<PickOfTheDayStatsRecordsBiggestWin>,
11060 #[serde(default, skip_serializing_if = "Option::is_none")]
11061 pub longest_losing_day_streak: Option<PickOfTheDayStatsRecordsLongestLosingDayStreak>,
11062 #[serde(default, skip_serializing_if = "Option::is_none")]
11063 pub longest_winning_day_streak: Option<PickOfTheDayStatsRecordsLongestWinningDayStreak>,
11064 pub sweeps: PickOfTheDayStatsRecordsSweeps,
11065 #[serde(default, skip_serializing_if = "Option::is_none")]
11066 pub winning_days: Option<PickOfTheDayStatsRecordsWinningDays>,
11067 #[serde(default, skip_serializing_if = "Option::is_none")]
11068 pub worst_day: Option<PickOfTheDayStatsRecordsWorstDay>,
11069}
11070
11071#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11072#[non_exhaustive]
11073pub struct PickOfTheDayStatsRecordsBestDay {
11074 pub date: String,
11075 pub date_display: String,
11076 pub losses: i64,
11077 pub net_profit_display: String,
11078 pub net_profit_usd: f64,
11079 pub picks: i64,
11080 pub wins: i64,
11081}
11082
11083#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11084#[non_exhaustive]
11085pub struct PickOfTheDayStatsRecordsBiggestWin {
11086 pub category: String,
11087 pub date: String,
11088 pub date_display: String,
11089 pub matchup: String,
11090 pub net_profit_display: String,
11091 pub net_profit_usd: f64,
11092}
11093
11094#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11095#[non_exhaustive]
11096pub struct PickOfTheDayStatsRecordsLongestLosingDayStreak {
11097 pub days: i64,
11098 pub end_date: String,
11099 pub net_profit_display: String,
11100 pub net_profit_usd: f64,
11101 pub range_display: String,
11102 pub start_date: String,
11103}
11104
11105#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11106#[non_exhaustive]
11107pub struct PickOfTheDayStatsRecordsLongestWinningDayStreak {
11108 pub days: i64,
11109 pub end_date: String,
11110 pub net_profit_display: String,
11111 pub net_profit_usd: f64,
11112 pub range_display: String,
11113 pub start_date: String,
11114}
11115
11116#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11117#[non_exhaustive]
11118pub struct PickOfTheDayStatsRecordsSweeps {
11119 pub clean_sweeps: i64,
11120 #[serde(default, skip_serializing_if = "Option::is_none")]
11121 pub latest_clean_sweep: Option<PickOfTheDayStatsRecordsSweepsLatestCleanSweep>,
11122 #[serde(default, skip_serializing_if = "Option::is_none")]
11123 pub latest_wipeout: Option<PickOfTheDayStatsRecordsSweepsLatestWipeout>,
11124 pub min_decided: i64,
11125 pub wipeouts: i64,
11126}
11127
11128#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11129#[non_exhaustive]
11130pub struct PickOfTheDayStatsRecordsSweepsLatestCleanSweep {
11131 pub date: String,
11132 pub date_display: String,
11133 pub losses: i64,
11134 pub wins: i64,
11135}
11136
11137#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11138#[non_exhaustive]
11139pub struct PickOfTheDayStatsRecordsSweepsLatestWipeout {
11140 pub date: String,
11141 pub date_display: String,
11142 pub losses: i64,
11143 pub wins: i64,
11144}
11145
11146#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11147#[non_exhaustive]
11148pub struct PickOfTheDayStatsRecordsWinningDays {
11149 pub flat: i64,
11150 pub losing: i64,
11151 pub settled: i64,
11152 pub winning: i64,
11153 pub winning_pct: f64,
11154 pub winning_pct_display: String,
11155}
11156
11157#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11158#[non_exhaustive]
11159pub struct PickOfTheDayStatsRecordsWorstDay {
11160 pub date: String,
11161 pub date_display: String,
11162 pub losses: i64,
11163 pub net_profit_display: String,
11164 pub net_profit_usd: f64,
11165 pub picks: i64,
11166 pub wins: i64,
11167}
11168
11169#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11170#[non_exhaustive]
11171pub struct PickOfTheDayStatsSportsItem {
11172 #[serde(default, skip_serializing_if = "Option::is_none")]
11173 pub canonical_category: Option<String>,
11174 #[serde(default, skip_serializing_if = "Option::is_none")]
11175 pub clv_avg_display: Option<String>,
11176 #[serde(default, skip_serializing_if = "Option::is_none")]
11177 pub clv_avg_pct: Option<f64>,
11178 #[serde(default, skip_serializing_if = "Option::is_none")]
11179 pub clv_avg_pp: Option<f64>,
11180 #[serde(default, skip_serializing_if = "Option::is_none")]
11181 pub clv_avg_pp_display: Option<String>,
11182 pub clv_measured: i64,
11183 #[serde(default, skip_serializing_if = "Option::is_none")]
11184 pub edge_display: Option<String>,
11185 #[serde(default, skip_serializing_if = "Option::is_none")]
11186 pub edge_pp: Option<f64>,
11187 pub key: String,
11188 pub label: String,
11189 pub losses: i64,
11190 #[serde(default, skip_serializing_if = "Option::is_none")]
11191 pub net_profit_display: Option<String>,
11192 #[serde(default, skip_serializing_if = "Option::is_none")]
11193 pub net_profit_usd: Option<f64>,
11194 pub pending: i64,
11195 pub picks: i64,
11196 pub priced_decided: i64,
11197 #[serde(default, skip_serializing_if = "Option::is_none")]
11198 pub priced_in_display: Option<String>,
11199 #[serde(default, skip_serializing_if = "Option::is_none")]
11200 pub priced_in_pct: Option<f64>,
11201 #[serde(default, skip_serializing_if = "Option::is_none")]
11202 pub roi_display: Option<String>,
11203 #[serde(default, skip_serializing_if = "Option::is_none")]
11204 pub roi_pct: Option<f64>,
11205 pub settled: i64,
11206 pub small_sample: bool,
11207 pub staked_usd: f64,
11208 #[serde(default, skip_serializing_if = "Option::is_none")]
11209 pub unit_score: Option<f64>,
11210 #[serde(default, skip_serializing_if = "Option::is_none")]
11211 pub unit_score_display: Option<String>,
11212 pub void: i64,
11213 #[serde(default, skip_serializing_if = "Option::is_none")]
11214 pub win_rate_display: Option<String>,
11215 #[serde(default, skip_serializing_if = "Option::is_none")]
11216 pub win_rate_pct: Option<f64>,
11217 pub wins: i64,
11218}
11219
11220#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11221#[non_exhaustive]
11222pub struct PickOfTheDayStatsStreaks {
11223 #[serde(default, skip_serializing_if = "Option::is_none")]
11224 pub current: Option<i64>,
11225 #[serde(default, skip_serializing_if = "Option::is_none")]
11226 pub current_day: Option<i64>,
11227 #[serde(default, skip_serializing_if = "Option::is_none")]
11228 pub current_day_display: Option<String>,
11229 #[serde(default, skip_serializing_if = "Option::is_none")]
11230 pub current_display: Option<String>,
11231 pub longest_loss: i64,
11232 pub longest_win: i64,
11233}
11234
11235#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11236#[non_exhaustive]
11237pub struct PickOfTheDayStatsTiersItem {
11238 #[serde(default, skip_serializing_if = "Option::is_none")]
11239 pub canonical_category: Option<String>,
11240 #[serde(default, skip_serializing_if = "Option::is_none")]
11241 pub clv_avg_display: Option<String>,
11242 #[serde(default, skip_serializing_if = "Option::is_none")]
11243 pub clv_avg_pct: Option<f64>,
11244 #[serde(default, skip_serializing_if = "Option::is_none")]
11245 pub clv_avg_pp: Option<f64>,
11246 #[serde(default, skip_serializing_if = "Option::is_none")]
11247 pub clv_avg_pp_display: Option<String>,
11248 pub clv_measured: i64,
11249 #[serde(default, skip_serializing_if = "Option::is_none")]
11250 pub edge_display: Option<String>,
11251 #[serde(default, skip_serializing_if = "Option::is_none")]
11252 pub edge_pp: Option<f64>,
11253 pub key: String,
11254 pub label: String,
11255 pub losses: i64,
11256 #[serde(default, skip_serializing_if = "Option::is_none")]
11257 pub net_profit_display: Option<String>,
11258 #[serde(default, skip_serializing_if = "Option::is_none")]
11259 pub net_profit_usd: Option<f64>,
11260 pub pending: i64,
11261 pub picks: i64,
11262 pub priced_decided: i64,
11263 #[serde(default, skip_serializing_if = "Option::is_none")]
11264 pub priced_in_display: Option<String>,
11265 #[serde(default, skip_serializing_if = "Option::is_none")]
11266 pub priced_in_pct: Option<f64>,
11267 #[serde(default, skip_serializing_if = "Option::is_none")]
11268 pub roi_display: Option<String>,
11269 #[serde(default, skip_serializing_if = "Option::is_none")]
11270 pub roi_pct: Option<f64>,
11271 pub settled: i64,
11272 pub small_sample: bool,
11273 pub staked_usd: f64,
11274 #[serde(default, skip_serializing_if = "Option::is_none")]
11275 pub unit_score: Option<f64>,
11276 #[serde(default, skip_serializing_if = "Option::is_none")]
11277 pub unit_score_display: Option<String>,
11278 pub void: i64,
11279 #[serde(default, skip_serializing_if = "Option::is_none")]
11280 pub win_rate_display: Option<String>,
11281 #[serde(default, skip_serializing_if = "Option::is_none")]
11282 pub win_rate_pct: Option<f64>,
11283 pub wins: i64,
11284}
11285
11286#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11287#[non_exhaustive]
11288pub struct PickOfTheDayStatsTotalSidesItem {
11289 #[serde(default, skip_serializing_if = "Option::is_none")]
11290 pub canonical_category: Option<String>,
11291 #[serde(default, skip_serializing_if = "Option::is_none")]
11292 pub clv_avg_display: Option<String>,
11293 #[serde(default, skip_serializing_if = "Option::is_none")]
11294 pub clv_avg_pct: Option<f64>,
11295 #[serde(default, skip_serializing_if = "Option::is_none")]
11296 pub clv_avg_pp: Option<f64>,
11297 #[serde(default, skip_serializing_if = "Option::is_none")]
11298 pub clv_avg_pp_display: Option<String>,
11299 pub clv_measured: i64,
11300 #[serde(default, skip_serializing_if = "Option::is_none")]
11301 pub edge_display: Option<String>,
11302 #[serde(default, skip_serializing_if = "Option::is_none")]
11303 pub edge_pp: Option<f64>,
11304 pub key: String,
11305 pub label: String,
11306 pub losses: i64,
11307 #[serde(default, skip_serializing_if = "Option::is_none")]
11308 pub net_profit_display: Option<String>,
11309 #[serde(default, skip_serializing_if = "Option::is_none")]
11310 pub net_profit_usd: Option<f64>,
11311 pub pending: i64,
11312 pub picks: i64,
11313 pub priced_decided: i64,
11314 #[serde(default, skip_serializing_if = "Option::is_none")]
11315 pub priced_in_display: Option<String>,
11316 #[serde(default, skip_serializing_if = "Option::is_none")]
11317 pub priced_in_pct: Option<f64>,
11318 #[serde(default, skip_serializing_if = "Option::is_none")]
11319 pub roi_display: Option<String>,
11320 #[serde(default, skip_serializing_if = "Option::is_none")]
11321 pub roi_pct: Option<f64>,
11322 pub settled: i64,
11323 pub small_sample: bool,
11324 pub staked_usd: f64,
11325 #[serde(default, skip_serializing_if = "Option::is_none")]
11326 pub unit_score: Option<f64>,
11327 #[serde(default, skip_serializing_if = "Option::is_none")]
11328 pub unit_score_display: Option<String>,
11329 pub void: i64,
11330 #[serde(default, skip_serializing_if = "Option::is_none")]
11331 pub win_rate_display: Option<String>,
11332 #[serde(default, skip_serializing_if = "Option::is_none")]
11333 pub win_rate_pct: Option<f64>,
11334 pub wins: i64,
11335}
11336
11337#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11338#[non_exhaustive]
11339pub struct PickOfTheDayStatsVoidsItem {
11340 #[serde(default, skip_serializing_if = "Option::is_none")]
11341 pub backed_price: Option<f64>,
11342 #[serde(default, skip_serializing_if = "Option::is_none")]
11343 pub backed_side: Option<String>,
11344 #[serde(default, skip_serializing_if = "Option::is_none")]
11345 pub category: Option<String>,
11346 #[serde(default, skip_serializing_if = "Option::is_none")]
11347 pub matchup: Option<String>,
11348 pub pick_date: String,
11349 pub pick_id: String,
11350 pub pick_rank: i64,
11351}
11352
11353#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11355#[non_exhaustive]
11356pub struct PickOfTheDayUncommittedPayload {
11357 pub backed_price: String,
11359 pub condition_id: String,
11361 #[serde(default)]
11363 pub kickoff: Option<String>,
11364 pub pick_date: String,
11366 pub pick_outcome_index: i64,
11368 pub pick_outcome_label: String,
11370 pub pick_rank: i64,
11372 pub platform: String,
11374}
11375
11376#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11378#[non_exhaustive]
11379pub struct PickSportsContext {
11380 #[serde(default)]
11382 pub league_name: Option<String>,
11383 #[serde(default, skip_serializing_if = "Option::is_none")]
11385 pub competition_label: Option<String>,
11386 #[serde(default)]
11388 pub league_logo: Option<String>,
11389 #[serde(default)]
11391 pub yes_team: Option<PickSportsTeam>,
11392 #[serde(default)]
11394 pub no_team: Option<PickSportsTeam>,
11395 #[serde(default, skip_serializing_if = "Option::is_none")]
11397 pub game_id: Option<i64>,
11398 pub event_matchup: bool,
11400 #[serde(default, skip_serializing_if = "Option::is_none")]
11402 pub event_subject_team: Option<PickSportsTeam>,
11403 #[serde(default, skip_serializing_if = "Option::is_none")]
11405 pub matchup_title: Option<String>,
11406}
11407
11408#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11410#[non_exhaustive]
11411pub struct PickSportsTeam {
11412 #[serde(default)]
11414 pub label: Option<String>,
11415 #[serde(default)]
11417 pub short_label: Option<String>,
11418 #[serde(default)]
11420 pub full_name: Option<String>,
11421 #[serde(default)]
11423 pub provider_id: Option<i64>,
11424 #[serde(default)]
11426 pub logo: Option<String>,
11427 pub logo_mark_dark: bool,
11429 #[serde(default)]
11431 pub color: Option<String>,
11432 #[serde(default)]
11434 pub record: Option<String>,
11435 #[serde(default)]
11437 pub score: Option<String>,
11438 #[serde(default, skip_serializing_if = "Option::is_none")]
11440 pub headshot: Option<String>,
11441 #[serde(default, skip_serializing_if = "Option::is_none")]
11443 pub tour: Option<Tour>,
11444 #[serde(default, skip_serializing_if = "Option::is_none")]
11446 pub sets: Option<Vec<ScoreCell>>,
11447 #[serde(default, skip_serializing_if = "Option::is_none")]
11448 pub format: Option<ScoreFormat>,
11449 #[serde(default, skip_serializing_if = "Option::is_none")]
11451 pub sets_won: Option<i64>,
11452 #[serde(default, skip_serializing_if = "Option::is_none")]
11454 pub headshot_revision: Option<i64>,
11455 #[serde(default, skip_serializing_if = "Option::is_none")]
11457 pub ranking: Option<TennisRanking>,
11458 pub logo_mark_light: bool,
11460 pub logo_mark_measured: bool,
11462}
11463
11464#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
11466#[non_exhaustive]
11467pub enum Platform {
11468 #[serde(rename = "polymarket")]
11470 Polymarket,
11471 #[serde(rename = "all")]
11473 All,
11474 #[serde(untagged)]
11476 Other(String),
11477}
11478
11479impl Platform {
11480 pub fn as_str(&self) -> &str {
11482 match self {
11483 Self::Polymarket => "polymarket",
11484 Self::All => "all",
11485 Self::Other(value) => value,
11486 }
11487 }
11488}
11489
11490impl From<&str> for Platform {
11491 fn from(value: &str) -> Self {
11492 match value {
11493 "polymarket" => Self::Polymarket,
11494 "all" => Self::All,
11495 other => Self::Other(other.to_owned()),
11496 }
11497 }
11498}
11499
11500impl std::fmt::Display for Platform {
11501 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11502 f.write_str(self.as_str())
11503 }
11504}
11505
11506impl AsRef<str> for Platform {
11507 fn as_ref(&self) -> &str {
11508 self.as_str()
11509 }
11510}
11511
11512#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11513#[non_exhaustive]
11514pub struct PlatformCapabilities {
11515 pub grade: PlatformCapabilityStatus,
11516 pub pnl: PlatformCapabilityStatus,
11517 pub strategy: PlatformCapabilityStatus,
11518 pub timeline: PlatformCapabilityStatus,
11519 pub large_trades: PlatformCapabilityStatus,
11521 pub whale_signal: PlatformCapabilityStatus,
11523 pub suspicious_trades: PlatformCapabilityStatus,
11524 pub insider_radar: PlatformCapabilityStatus,
11526 pub market_snapshot: PlatformCapabilityStatus,
11527}
11528
11529pub type PlatformCapabilityStatus = String;
11531
11532#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11533#[non_exhaustive]
11534pub struct Platforms {
11535 pub platforms: PlatformsPlatforms,
11536}
11537
11538#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11539#[non_exhaustive]
11540pub struct PlatformsPlatforms {
11541 pub polymarket: PlatformCapabilities,
11542}
11543
11544#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11546#[non_exhaustive]
11547pub struct PnlCorrection {
11548 pub basis: String,
11550 pub amount: f64,
11552 #[serde(default, skip_serializing_if = "Option::is_none")]
11554 pub realized: Option<f64>,
11555 #[serde(default, skip_serializing_if = "Option::is_none")]
11557 pub net_total: Option<f64>,
11558 pub as_of: String,
11560 pub markets_measured: i64,
11562 #[serde(default, skip_serializing_if = "Option::is_none")]
11564 pub markets_excluded: Option<i64>,
11565}
11566
11567#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11568#[non_exhaustive]
11569pub struct Position {
11570 pub id: String,
11572 pub platform: String,
11574 pub wallet: String,
11576 pub side: Direction,
11578 #[serde(default)]
11580 pub token_id: Option<String>,
11581 pub shares: f64,
11583 #[serde(default, skip_serializing_if = "Option::is_none")]
11585 pub avg_price: Option<f64>,
11586 pub current_value_usd: f64,
11588 #[serde(default, skip_serializing_if = "Option::is_none")]
11589 pub initial_value_usd: Option<f64>,
11590 #[serde(default, skip_serializing_if = "Option::is_none")]
11592 pub cash_pnl: Option<f64>,
11593 #[serde(default, skip_serializing_if = "Option::is_none")]
11595 pub realized_pnl: Option<f64>,
11596 #[serde(default, skip_serializing_if = "Option::is_none")]
11598 pub exact: Option<PositionExact>,
11599 #[serde(default, skip_serializing_if = "Option::is_none")]
11601 pub last_reconciled_at: Option<String>,
11602 pub freshness: Freshness,
11604 pub trader: PositionTrader,
11605 pub market: PositionMarket,
11606}
11607
11608#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11610#[non_exhaustive]
11611pub struct PositionExact {
11612 pub shares: ExactDecimal,
11613 #[serde(default, skip_serializing_if = "Option::is_none")]
11614 pub cost_basis_usd: Option<ExactDecimal>,
11615 #[serde(default, skip_serializing_if = "Option::is_none")]
11617 pub avg_price: Option<ExactDecimal>,
11618 pub current_value_usd: ExactDecimal,
11619 #[serde(default, skip_serializing_if = "Option::is_none")]
11620 pub initial_value_usd: Option<ExactDecimal>,
11621 #[serde(default, skip_serializing_if = "Option::is_none")]
11622 pub cash_pnl: Option<ExactDecimal>,
11623 #[serde(default, skip_serializing_if = "Option::is_none")]
11624 pub realized_pnl: Option<ExactDecimal>,
11625}
11626
11627#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11628#[non_exhaustive]
11629pub struct PositionMarket {
11630 pub id: String,
11632 pub condition_id: String,
11633 pub title: String,
11634 #[serde(default, skip_serializing_if = "Option::is_none")]
11635 pub slug: Option<String>,
11636 #[serde(default, skip_serializing_if = "Option::is_none")]
11637 pub event_slug: Option<String>,
11638 #[serde(default, skip_serializing_if = "Option::is_none")]
11640 pub category: Option<String>,
11641 #[serde(default, skip_serializing_if = "Option::is_none")]
11643 pub outcome_label: Option<String>,
11644 #[serde(default, skip_serializing_if = "Option::is_none")]
11645 pub end_date: Option<String>,
11646}
11647
11648#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11649#[non_exhaustive]
11650pub struct PositionTimelineEvent {
11651 pub id: String,
11653 pub event_timestamp: String,
11655 pub action: Action,
11657 pub outcome_side: SuspiciousTradeFlaggedDataSide,
11658 #[serde(default)]
11660 pub token_id: Option<String>,
11661 pub amount_delta: f64,
11663 pub price: f64,
11665 pub usdc_notional: f64,
11667 pub tx_hash: String,
11669 pub running_amount: f64,
11671 pub running_avg_price: f64,
11673}
11674
11675#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11676#[non_exhaustive]
11677pub struct PositionTrader {
11678 pub id: String,
11680 pub address: String,
11681 #[serde(default, skip_serializing_if = "Option::is_none")]
11682 pub username: Option<String>,
11683 #[serde(default, skip_serializing_if = "Option::is_none")]
11684 pub grade: Option<Grade>,
11685 #[serde(default, skip_serializing_if = "Option::is_none")]
11687 pub win_rate: Option<f64>,
11688 #[serde(default, skip_serializing_if = "Option::is_none")]
11690 pub pnl: Option<f64>,
11691 #[serde(default, skip_serializing_if = "Option::is_none")]
11693 pub in_scope_realized_pnl: Option<f64>,
11694 #[serde(default, skip_serializing_if = "Option::is_none")]
11696 pub markets: Option<i64>,
11697 #[serde(default, skip_serializing_if = "Option::is_none")]
11699 pub wallet_age_days: Option<f64>,
11700 pub is_new_wallet: bool,
11702}
11703
11704#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11706#[non_exhaustive]
11707pub struct PotdEntryAuthorization {
11708 pub version: i64,
11709 pub authorization_id: String,
11710 pub policy_version: i64,
11712 pub condition_id: String,
11713 pub token_id: String,
11714 pub outcome_index: i64,
11715 pub category: String,
11717 pub canonical_event_id: String,
11719 pub max_entry_price: String,
11721 pub reference_best_ask: String,
11723 pub reference_book_hash: String,
11724 pub reference_book_at: String,
11725 pub issued_at: String,
11726 pub expires_at: String,
11728}
11729
11730#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11731#[non_exhaustive]
11732pub struct PrepareWebhookSecretResponse {
11733 pub object: String,
11734 pub data: WebhookEndpoint,
11735 pub meta: ResponseMeta,
11736}
11737
11738#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
11740#[non_exhaustive]
11741pub enum PriceProvenance {
11742 #[serde(rename = "gamma_outcome_prices")]
11744 GammaOutcomePrices,
11745 #[serde(rename = "clob_display")]
11747 ClobDisplay,
11748 #[serde(untagged)]
11750 Other(String),
11751}
11752
11753impl PriceProvenance {
11754 pub fn as_str(&self) -> &str {
11756 match self {
11757 Self::GammaOutcomePrices => "gamma_outcome_prices",
11758 Self::ClobDisplay => "clob_display",
11759 Self::Other(value) => value,
11760 }
11761 }
11762}
11763
11764impl From<&str> for PriceProvenance {
11765 fn from(value: &str) -> Self {
11766 match value {
11767 "gamma_outcome_prices" => Self::GammaOutcomePrices,
11768 "clob_display" => Self::ClobDisplay,
11769 other => Self::Other(other.to_owned()),
11770 }
11771 }
11772}
11773
11774impl std::fmt::Display for PriceProvenance {
11775 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11776 f.write_str(self.as_str())
11777 }
11778}
11779
11780impl AsRef<str> for PriceProvenance {
11781 fn as_ref(&self) -> &str {
11782 self.as_str()
11783 }
11784}
11785
11786#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11788#[non_exhaustive]
11789pub struct ProofPendingPickSlot {
11790 pub pick_rank: i64,
11792 pub release_at: String,
11794 #[serde(default, skip_serializing_if = "Option::is_none")]
11796 pub kickoff: Option<String>,
11797 pub retry_at: String,
11799 pub pick_id: String,
11801 pub publication_order: i64,
11803 pub is_free_selection: bool,
11805 #[serde(default)]
11807 pub supersedes_pick_id: Option<String>,
11808}
11809
11810#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
11812#[non_exhaustive]
11813pub enum ProviderReadSource {
11814 #[serde(rename = "cached")]
11816 Cached,
11817 #[serde(rename = "live")]
11819 Live,
11820 #[serde(untagged)]
11822 Other(String),
11823}
11824
11825impl ProviderReadSource {
11826 pub fn as_str(&self) -> &str {
11828 match self {
11829 Self::Cached => "cached",
11830 Self::Live => "live",
11831 Self::Other(value) => value,
11832 }
11833 }
11834}
11835
11836impl From<&str> for ProviderReadSource {
11837 fn from(value: &str) -> Self {
11838 match value {
11839 "cached" => Self::Cached,
11840 "live" => Self::Live,
11841 other => Self::Other(other.to_owned()),
11842 }
11843 }
11844}
11845
11846impl std::fmt::Display for ProviderReadSource {
11847 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11848 f.write_str(self.as_str())
11849 }
11850}
11851
11852impl AsRef<str> for ProviderReadSource {
11853 fn as_ref(&self) -> &str {
11854 self.as_str()
11855 }
11856}
11857
11858#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
11860#[non_exhaustive]
11861pub enum RankingSource {
11862 #[serde(rename = "live")]
11864 Live,
11865 #[serde(rename = "db_only")]
11867 DbOnly,
11868 #[serde(untagged)]
11870 Other(String),
11871}
11872
11873impl RankingSource {
11874 pub fn as_str(&self) -> &str {
11876 match self {
11877 Self::Live => "live",
11878 Self::DbOnly => "db_only",
11879 Self::Other(value) => value,
11880 }
11881 }
11882}
11883
11884impl From<&str> for RankingSource {
11885 fn from(value: &str) -> Self {
11886 match value {
11887 "live" => Self::Live,
11888 "db_only" => Self::DbOnly,
11889 other => Self::Other(other.to_owned()),
11890 }
11891 }
11892}
11893
11894impl std::fmt::Display for RankingSource {
11895 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11896 f.write_str(self.as_str())
11897 }
11898}
11899
11900impl AsRef<str> for RankingSource {
11901 fn as_ref(&self) -> &str {
11902 self.as_str()
11903 }
11904}
11905
11906#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
11908#[non_exhaustive]
11909pub enum Reason {
11910 #[serde(rename = "outcome_prices_missing")]
11912 OutcomePricesMissing,
11913 #[serde(rename = "outcome_price_leg_missing")]
11915 OutcomePriceLegMissing,
11916 #[serde(rename = "zero_price_sentinel")]
11918 ZeroPriceSentinel,
11919 #[serde(rename = "display_price_pair_unavailable")]
11921 DisplayPricePairUnavailable,
11922 #[serde(rename = "outcome_identity_unavailable")]
11924 OutcomeIdentityUnavailable,
11925 #[serde(rename = "final_score_unavailable")]
11927 FinalScoreUnavailable,
11928 #[serde(untagged)]
11930 Other(String),
11931}
11932
11933impl Reason {
11934 pub fn as_str(&self) -> &str {
11936 match self {
11937 Self::OutcomePricesMissing => "outcome_prices_missing",
11938 Self::OutcomePriceLegMissing => "outcome_price_leg_missing",
11939 Self::ZeroPriceSentinel => "zero_price_sentinel",
11940 Self::DisplayPricePairUnavailable => "display_price_pair_unavailable",
11941 Self::OutcomeIdentityUnavailable => "outcome_identity_unavailable",
11942 Self::FinalScoreUnavailable => "final_score_unavailable",
11943 Self::Other(value) => value,
11944 }
11945 }
11946}
11947
11948impl From<&str> for Reason {
11949 fn from(value: &str) -> Self {
11950 match value {
11951 "outcome_prices_missing" => Self::OutcomePricesMissing,
11952 "outcome_price_leg_missing" => Self::OutcomePriceLegMissing,
11953 "zero_price_sentinel" => Self::ZeroPriceSentinel,
11954 "display_price_pair_unavailable" => Self::DisplayPricePairUnavailable,
11955 "outcome_identity_unavailable" => Self::OutcomeIdentityUnavailable,
11956 "final_score_unavailable" => Self::FinalScoreUnavailable,
11957 other => Self::Other(other.to_owned()),
11958 }
11959 }
11960}
11961
11962impl std::fmt::Display for Reason {
11963 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11964 f.write_str(self.as_str())
11965 }
11966}
11967
11968impl AsRef<str> for Reason {
11969 fn as_ref(&self) -> &str {
11970 self.as_str()
11971 }
11972}
11973
11974#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11975#[non_exhaustive]
11976pub struct RedeliverWebhookDeliveryResponse {
11977 pub object: String,
11978 pub data: WebhookDelivery,
11979 pub meta: ResponseMeta,
11980}
11981
11982#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11983#[non_exhaustive]
11984pub struct RegisterAgentResponse {
11985 pub object: String,
11986 pub data: AgentRegistration,
11987 pub meta: ResponseMeta,
11988}
11989
11990#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11991#[non_exhaustive]
11992pub struct ReportPayload {
11993 #[serde(default)]
11995 pub total_large_trades: Option<i64>,
11996 #[serde(default)]
11997 pub total_whale_trades: Option<i64>,
11998 #[serde(default)]
12000 pub total_large_trade_volume: Option<f64>,
12001 #[serde(default)]
12002 pub total_whale_volume: Option<f64>,
12003 #[serde(default)]
12004 pub biggest_trade_size: Option<f64>,
12005 #[serde(default)]
12006 pub active_traders: Option<i64>,
12007 #[serde(default)]
12009 pub top_large_trades: Option<Vec<ReportPayloadTopLargeTradesItem>>,
12010 #[serde(default)]
12011 pub top_whale_trades: Option<Vec<ReportPayloadTopWhaleTradesItem>>,
12012 #[serde(default)]
12013 pub categories: Option<Vec<ReportPayloadCategoriesItem>>,
12014 #[serde(default)]
12016 pub grade_distribution: Option<Vec<ReportPayloadGradeDistributionItem>>,
12017 pub market_scope: MarketScope,
12019}
12020
12021#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
12022#[non_exhaustive]
12023pub struct ReportPayloadCategoriesItem {
12024 #[serde(default)]
12025 pub category: Option<String>,
12026 #[serde(default)]
12027 pub large_trade_count: Option<i64>,
12028 #[serde(default)]
12029 pub whale_trade_count: Option<i64>,
12030 #[serde(default)]
12031 pub category_volume: Option<f64>,
12032}
12033
12034#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
12035#[non_exhaustive]
12036pub struct ReportPayloadGradeDistributionItem {
12037 #[serde(default)]
12038 pub grade: Option<Grade>,
12039 #[serde(default)]
12040 pub count: Option<i64>,
12041}
12042
12043#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
12044#[non_exhaustive]
12045pub struct ReportPayloadTopLargeTradesItem {
12046 #[serde(default)]
12048 pub outcome: Option<String>,
12049 #[serde(default)]
12051 pub side: Option<String>,
12052 #[serde(default)]
12054 pub title: Option<String>,
12055 #[serde(default)]
12057 pub size: Option<f64>,
12058 #[serde(default)]
12060 pub price: Option<f64>,
12061 #[serde(default)]
12063 pub token_id: Option<String>,
12064 #[serde(default)]
12066 pub id: Option<i64>,
12067 #[serde(default)]
12069 pub trade_time: Option<String>,
12070 #[serde(default)]
12072 pub market_category: Option<String>,
12073 #[serde(default)]
12075 pub platform: Option<String>,
12076 #[serde(default)]
12078 pub name: Option<String>,
12079 #[serde(default)]
12081 pub pseudonym: Option<String>,
12082 #[serde(default)]
12084 pub trader_grade: Option<Grade>,
12085}
12086
12087#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
12088#[non_exhaustive]
12089pub struct ReportPayloadTopWhaleTradesItem {
12090 #[serde(default)]
12092 pub outcome: Option<String>,
12093 #[serde(default)]
12095 pub side: Option<String>,
12096 #[serde(default)]
12098 pub title: Option<String>,
12099 #[serde(default)]
12101 pub size: Option<f64>,
12102 #[serde(default)]
12104 pub price: Option<f64>,
12105 #[serde(default)]
12107 pub token_id: Option<String>,
12108 #[serde(default)]
12110 pub id: Option<i64>,
12111 #[serde(default)]
12113 pub trade_time: Option<String>,
12114 #[serde(default)]
12116 pub market_category: Option<String>,
12117 #[serde(default)]
12119 pub platform: Option<String>,
12120 #[serde(default)]
12122 pub name: Option<String>,
12123 #[serde(default)]
12125 pub pseudonym: Option<String>,
12126 #[serde(default)]
12128 pub trader_grade: Option<Grade>,
12129}
12130
12131#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
12132#[non_exhaustive]
12133pub struct ReportReconciliation {
12134 pub volume_kind: String,
12135 pub whale_volume_source: String,
12137 pub notes: String,
12138}
12139
12140#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
12141#[non_exhaustive]
12142pub struct ReportSnapshot {
12143 pub kind: Granularity,
12144 pub generated_at: String,
12145 pub source_range: ReportSourceRange,
12146 pub snapshot: SnapshotState,
12147 pub completeness: SnapshotCompleteness,
12148 pub reconciliation: ReportReconciliation,
12149 pub report: ReportPayload,
12150}
12151
12152#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
12153#[non_exhaustive]
12154pub struct ReportSourceRange {
12155 pub start_date: String,
12156 pub end_date: String,
12157 pub timezone: String,
12158}
12159
12160#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
12162#[non_exhaustive]
12163pub enum RequiredTier {
12164 #[serde(rename = "account")]
12166 Account,
12167 #[serde(rename = "insider")]
12169 Insider,
12170 #[serde(rename = "max")]
12172 Max,
12173 #[serde(untagged)]
12175 Other(String),
12176}
12177
12178impl RequiredTier {
12179 pub fn as_str(&self) -> &str {
12181 match self {
12182 Self::Account => "account",
12183 Self::Insider => "insider",
12184 Self::Max => "max",
12185 Self::Other(value) => value,
12186 }
12187 }
12188}
12189
12190impl From<&str> for RequiredTier {
12191 fn from(value: &str) -> Self {
12192 match value {
12193 "account" => Self::Account,
12194 "insider" => Self::Insider,
12195 "max" => Self::Max,
12196 other => Self::Other(other.to_owned()),
12197 }
12198 }
12199}
12200
12201impl std::fmt::Display for RequiredTier {
12202 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12203 f.write_str(self.as_str())
12204 }
12205}
12206
12207impl AsRef<str> for RequiredTier {
12208 fn as_ref(&self) -> &str {
12209 self.as_str()
12210 }
12211}
12212
12213#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
12215#[non_exhaustive]
12216pub enum Resolution {
12217 #[serde(rename = "1d")]
12219 V1d,
12220 #[serde(rename = "1w")]
12222 V1w,
12223 #[serde(untagged)]
12225 Other(String),
12226}
12227
12228impl Resolution {
12229 pub fn as_str(&self) -> &str {
12231 match self {
12232 Self::V1d => "1d",
12233 Self::V1w => "1w",
12234 Self::Other(value) => value,
12235 }
12236 }
12237}
12238
12239impl From<&str> for Resolution {
12240 fn from(value: &str) -> Self {
12241 match value {
12242 "1d" => Self::V1d,
12243 "1w" => Self::V1w,
12244 other => Self::Other(other.to_owned()),
12245 }
12246 }
12247}
12248
12249impl std::fmt::Display for Resolution {
12250 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12251 f.write_str(self.as_str())
12252 }
12253}
12254
12255impl AsRef<str> for Resolution {
12256 fn as_ref(&self) -> &str {
12257 self.as_str()
12258 }
12259}
12260
12261#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
12262#[non_exhaustive]
12263pub struct ResolutionReport {
12264 #[serde(default)]
12265 pub accuracy: Option<f64>,
12266 #[serde(default)]
12267 pub all_wallets_accuracy: Option<f64>,
12268 #[serde(default)]
12269 pub all_wallets_right: Option<i64>,
12270 #[serde(default)]
12271 pub all_wallets_wrong: Option<i64>,
12272 #[serde(default)]
12273 pub date: Option<String>,
12274 #[serde(default)]
12275 pub generated_at: Option<String>,
12276 #[serde(default)]
12277 pub grade_basis: Option<GradeBasis>,
12278 pub market_scope: MarketScope,
12279 #[serde(default, skip_serializing_if = "Option::is_none")]
12280 pub markets: Option<Vec<ResolutionReportMarketsItem>>,
12281 #[serde(default)]
12282 pub markets_without_smart_positions: Option<i64>,
12283 #[serde(default)]
12284 pub no_consensus: Option<i64>,
12285 #[serde(default)]
12286 pub positions_grade_unknown: Option<i64>,
12287 #[serde(default)]
12288 pub positions_without_side: Option<i64>,
12289 #[serde(default)]
12290 pub smart_money_right: Option<i64>,
12291 #[serde(default)]
12292 pub smart_money_wrong: Option<i64>,
12293 pub source_updates_pending: bool,
12294 #[serde(default)]
12295 pub time_basis_counts: Option<ResolutionReportTimeBasisCounts>,
12296 #[serde(default)]
12297 pub total_resolved: Option<i64>,
12298 #[serde(default)]
12299 pub total_smart_pnl: Option<f64>,
12300 #[serde(default)]
12301 pub with_smart_positions: Option<i64>,
12302}
12303
12304#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
12305#[non_exhaustive]
12306pub struct ResolutionReportMarketsItem {
12307 #[serde(default)]
12308 pub all_wallets_right: Option<bool>,
12309 #[serde(default)]
12310 pub category: Option<String>,
12311 #[serde(default)]
12312 pub condition_id: Option<String>,
12313 #[serde(default)]
12314 pub confidence: Option<f64>,
12315 #[serde(default)]
12316 pub event_slug: Option<String>,
12317 pub out_of_product_scope: bool,
12318 #[serde(default)]
12319 pub outcome_no: Option<String>,
12320 #[serde(default)]
12321 pub outcome_yes: Option<String>,
12322 pub report_at: String,
12323 #[serde(default)]
12324 pub smart_consensus: Option<String>,
12325 #[serde(default)]
12326 pub smart_right: Option<bool>,
12327 #[serde(default)]
12328 pub smart_trader_count: Option<i64>,
12329 pub time_basis: TimeBasis,
12330 #[serde(default)]
12331 pub title: Option<String>,
12332 #[serde(default)]
12333 pub total_smart_pnl: Option<f64>,
12334 pub traders: Vec<ResolutionReportMarketsItemTradersItem>,
12335 #[serde(default)]
12336 pub weighted_no: Option<f64>,
12337 #[serde(default)]
12338 pub weighted_yes: Option<f64>,
12339 #[serde(default)]
12340 pub winning_outcome: Option<i64>,
12341}
12342
12343#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
12344#[non_exhaustive]
12345pub struct ResolutionReportMarketsItemTradersItem {
12346 #[serde(default)]
12347 pub address: Option<String>,
12348 #[serde(default)]
12349 pub correct: Option<bool>,
12350 #[serde(default)]
12351 pub cost: Option<f64>,
12352 #[serde(default)]
12353 pub grade: Option<Grade>,
12354 #[serde(default)]
12355 pub last_traded_at: Option<String>,
12356 #[serde(default)]
12357 pub pnl: Option<f64>,
12358 #[serde(default)]
12359 pub side: Option<String>,
12360 #[serde(default)]
12361 pub username: Option<String>,
12362}
12363
12364#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
12365#[non_exhaustive]
12366pub struct ResolutionReportTimeBasisCounts {
12367 pub observed_resolution: i64,
12368 pub polymarket_gamma_closed_time: i64,
12369}
12370
12371#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
12372#[non_exhaustive]
12373pub struct ResponseMeta {
12374 pub request_id: String,
12376 pub cached: bool,
12377 #[serde(default, skip_serializing_if = "Option::is_none")]
12379 pub cache_age_s: Option<i64>,
12380 pub cost: i64,
12382 #[serde(default, skip_serializing_if = "Option::is_none")]
12384 pub ranking_generation: Option<i64>,
12385 #[serde(default, skip_serializing_if = "Option::is_none")]
12387 pub ranking_as_of: Option<String>,
12388 #[serde(default, skip_serializing_if = "Option::is_none")]
12390 pub directional_source: Option<DirectionalSource>,
12391 #[serde(default, skip_serializing_if = "Option::is_none")]
12393 pub ranking_source: Option<RankingSource>,
12394 #[serde(default, skip_serializing_if = "Option::is_none")]
12396 pub category_skill_source: Option<CategorySkillSource>,
12397 #[serde(default, skip_serializing_if = "Option::is_none")]
12398 pub category_skill_model_version: Option<String>,
12399 #[serde(default, skip_serializing_if = "Option::is_none")]
12400 pub category_skill_taxonomy_version: Option<String>,
12401 #[serde(default, skip_serializing_if = "Option::is_none")]
12402 pub category_skill_platform: Option<String>,
12403 #[serde(default, skip_serializing_if = "Option::is_none")]
12404 pub category_skill_scope: Option<String>,
12405 #[serde(default, skip_serializing_if = "Option::is_none")]
12406 pub category_skill_source_coverage: Option<SourceCoverage>,
12407 #[serde(default, skip_serializing_if = "Option::is_none")]
12408 pub category_skill_observation_started_at: Option<String>,
12409 #[serde(default, skip_serializing_if = "Option::is_none")]
12411 pub category_skill_model_operationally_degraded: Option<bool>,
12412 #[serde(default, skip_serializing_if = "Option::is_none")]
12413 pub category_skill_status_counts: Option<ResponseMetaCategorySkillStatusCounts>,
12414 #[serde(default, skip_serializing_if = "Option::is_none")]
12416 pub category_skill_base_payload_hash: Option<String>,
12417 #[serde(default, skip_serializing_if = "Option::is_none")]
12419 pub category_skill_enriched_base_payload_hash: Option<String>,
12420}
12421
12422#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
12423#[non_exhaustive]
12424pub struct ResponseMetaCategorySkillStatusCounts {
12425 pub live: i64,
12426 pub insufficient: i64,
12427 pub stale: i64,
12428 pub unknown: i64,
12429 pub degraded: i64,
12430}
12431
12432#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
12433#[non_exhaustive]
12434pub struct RetireWebhookSecretResponse {
12435 pub object: String,
12436 pub data: WebhookEndpoint,
12437 pub meta: ResponseMeta,
12438}
12439
12440#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
12442#[non_exhaustive]
12443pub enum RetryScheduleReason {
12444 #[serde(rename = "receiver_retry_after")]
12446 ReceiverRetryAfter,
12447 #[serde(rename = "transient_failure")]
12449 TransientFailure,
12450 #[serde(rename = "permanent_or_auth_failure")]
12452 PermanentOrAuthFailure,
12453 #[serde(rename = "manual_redelivery")]
12455 ManualRedelivery,
12456 #[serde(rename = "configuration_changed")]
12458 ConfigurationChanged,
12459 #[serde(untagged)]
12461 Other(String),
12462}
12463
12464impl RetryScheduleReason {
12465 pub fn as_str(&self) -> &str {
12467 match self {
12468 Self::ReceiverRetryAfter => "receiver_retry_after",
12469 Self::TransientFailure => "transient_failure",
12470 Self::PermanentOrAuthFailure => "permanent_or_auth_failure",
12471 Self::ManualRedelivery => "manual_redelivery",
12472 Self::ConfigurationChanged => "configuration_changed",
12473 Self::Other(value) => value,
12474 }
12475 }
12476}
12477
12478impl From<&str> for RetryScheduleReason {
12479 fn from(value: &str) -> Self {
12480 match value {
12481 "receiver_retry_after" => Self::ReceiverRetryAfter,
12482 "transient_failure" => Self::TransientFailure,
12483 "permanent_or_auth_failure" => Self::PermanentOrAuthFailure,
12484 "manual_redelivery" => Self::ManualRedelivery,
12485 "configuration_changed" => Self::ConfigurationChanged,
12486 other => Self::Other(other.to_owned()),
12487 }
12488 }
12489}
12490
12491impl std::fmt::Display for RetryScheduleReason {
12492 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12493 f.write_str(self.as_str())
12494 }
12495}
12496
12497impl AsRef<str> for RetryScheduleReason {
12498 fn as_ref(&self) -> &str {
12499 self.as_str()
12500 }
12501}
12502
12503#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
12504#[non_exhaustive]
12505pub struct RotateWebhookSecretResponse {
12506 pub object: String,
12507 pub data: WebhookEndpoint,
12508 pub meta: ResponseMeta,
12509}
12510
12511#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
12513#[non_exhaustive]
12514pub struct ScheduledPickSlot {
12515 pub pick_rank: i64,
12517 pub release_at: String,
12519 pub kickoff: String,
12521 pub pick_id: String,
12523 pub publication_order: i64,
12525 pub is_free_selection: bool,
12527 #[serde(default)]
12529 pub supersedes_pick_id: Option<String>,
12530}
12531
12532#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
12534#[non_exhaustive]
12535pub enum SchemaVersion {
12536 #[serde(rename = "trader-export-json-v1")]
12538 TraderExportJsonV1,
12539 #[serde(rename = "trader-export-ndjson-v1")]
12541 TraderExportNdjsonV1,
12542 #[serde(rename = "trader-export-csv-v1")]
12544 TraderExportCsvV1,
12545 #[serde(untagged)]
12547 Other(String),
12548}
12549
12550impl SchemaVersion {
12551 pub fn as_str(&self) -> &str {
12553 match self {
12554 Self::TraderExportJsonV1 => "trader-export-json-v1",
12555 Self::TraderExportNdjsonV1 => "trader-export-ndjson-v1",
12556 Self::TraderExportCsvV1 => "trader-export-csv-v1",
12557 Self::Other(value) => value,
12558 }
12559 }
12560}
12561
12562impl From<&str> for SchemaVersion {
12563 fn from(value: &str) -> Self {
12564 match value {
12565 "trader-export-json-v1" => Self::TraderExportJsonV1,
12566 "trader-export-ndjson-v1" => Self::TraderExportNdjsonV1,
12567 "trader-export-csv-v1" => Self::TraderExportCsvV1,
12568 other => Self::Other(other.to_owned()),
12569 }
12570 }
12571}
12572
12573impl std::fmt::Display for SchemaVersion {
12574 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12575 f.write_str(self.as_str())
12576 }
12577}
12578
12579impl AsRef<str> for SchemaVersion {
12580 fn as_ref(&self) -> &str {
12581 self.as_str()
12582 }
12583}
12584
12585#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
12587#[non_exhaustive]
12588pub struct ScoreCell {
12589 pub games: i64,
12591 #[serde(default, skip_serializing_if = "Option::is_none")]
12593 pub tiebreak: Option<i64>,
12594}
12595
12596#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
12600#[non_exhaustive]
12601pub enum ScoreFormat {
12602 #[serde(rename = "two_side")]
12604 TwoSide,
12605 #[serde(rename = "multi_set")]
12607 MultiSet,
12608 #[serde(rename = "esports_series")]
12610 EsportsSeries,
12611 #[serde(untagged)]
12613 Other(String),
12614}
12615
12616impl ScoreFormat {
12617 pub fn as_str(&self) -> &str {
12619 match self {
12620 Self::TwoSide => "two_side",
12621 Self::MultiSet => "multi_set",
12622 Self::EsportsSeries => "esports_series",
12623 Self::Other(value) => value,
12624 }
12625 }
12626}
12627
12628impl From<&str> for ScoreFormat {
12629 fn from(value: &str) -> Self {
12630 match value {
12631 "two_side" => Self::TwoSide,
12632 "multi_set" => Self::MultiSet,
12633 "esports_series" => Self::EsportsSeries,
12634 other => Self::Other(other.to_owned()),
12635 }
12636 }
12637}
12638
12639impl std::fmt::Display for ScoreFormat {
12640 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12641 f.write_str(self.as_str())
12642 }
12643}
12644
12645impl AsRef<str> for ScoreFormat {
12646 fn as_ref(&self) -> &str {
12647 self.as_str()
12648 }
12649}
12650
12651#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
12652#[non_exhaustive]
12653pub struct SearchContentResponse {
12654 pub object: String,
12655 pub data: Vec<ContentSearchResult>,
12656 pub has_more: bool,
12657 #[serde(default, skip_serializing_if = "Option::is_none")]
12659 pub next_cursor: Option<String>,
12660 #[serde(default, skip_serializing_if = "Option::is_none")]
12662 pub total: Option<i64>,
12663 pub meta: ResponseMeta,
12664}
12665
12666#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
12667#[non_exhaustive]
12668pub struct SearchMarketsResponse {
12669 pub object: String,
12670 pub data: Vec<MarketSearchResult>,
12671 pub has_more: bool,
12672 #[serde(default, skip_serializing_if = "Option::is_none")]
12673 pub next_cursor: Option<String>,
12674 #[serde(default, skip_serializing_if = "Option::is_none")]
12676 pub total: Option<i64>,
12677 pub meta: ResponseMeta,
12678}
12679
12680#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
12682#[non_exhaustive]
12683pub enum SearchMarketsStatus {
12684 #[serde(rename = "active")]
12686 Active,
12687 #[serde(rename = "closed")]
12689 Closed,
12690 #[serde(rename = "all")]
12692 All,
12693 #[serde(untagged)]
12695 Other(String),
12696}
12697
12698impl SearchMarketsStatus {
12699 pub fn as_str(&self) -> &str {
12701 match self {
12702 Self::Active => "active",
12703 Self::Closed => "closed",
12704 Self::All => "all",
12705 Self::Other(value) => value,
12706 }
12707 }
12708}
12709
12710impl From<&str> for SearchMarketsStatus {
12711 fn from(value: &str) -> Self {
12712 match value {
12713 "active" => Self::Active,
12714 "closed" => Self::Closed,
12715 "all" => Self::All,
12716 other => Self::Other(other.to_owned()),
12717 }
12718 }
12719}
12720
12721impl std::fmt::Display for SearchMarketsStatus {
12722 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12723 f.write_str(self.as_str())
12724 }
12725}
12726
12727impl AsRef<str> for SearchMarketsStatus {
12728 fn as_ref(&self) -> &str {
12729 self.as_str()
12730 }
12731}
12732
12733#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
12735#[non_exhaustive]
12736pub enum Sections {
12737 #[serde(rename = "entries")]
12739 Entries,
12740 #[serde(rename = "stats")]
12742 Stats,
12743 #[serde(rename = "monthly")]
12745 Monthly,
12746 #[serde(rename = "year_totals")]
12748 YearTotals,
12749 #[serde(rename = "drawdown")]
12751 Drawdown,
12752 #[serde(untagged)]
12754 Other(String),
12755}
12756
12757impl Sections {
12758 pub fn as_str(&self) -> &str {
12760 match self {
12761 Self::Entries => "entries",
12762 Self::Stats => "stats",
12763 Self::Monthly => "monthly",
12764 Self::YearTotals => "year_totals",
12765 Self::Drawdown => "drawdown",
12766 Self::Other(value) => value,
12767 }
12768 }
12769}
12770
12771impl From<&str> for Sections {
12772 fn from(value: &str) -> Self {
12773 match value {
12774 "entries" => Self::Entries,
12775 "stats" => Self::Stats,
12776 "monthly" => Self::Monthly,
12777 "year_totals" => Self::YearTotals,
12778 "drawdown" => Self::Drawdown,
12779 other => Self::Other(other.to_owned()),
12780 }
12781 }
12782}
12783
12784impl std::fmt::Display for Sections {
12785 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12786 f.write_str(self.as_str())
12787 }
12788}
12789
12790impl AsRef<str> for Sections {
12791 fn as_ref(&self) -> &str {
12792 self.as_str()
12793 }
12794}
12795
12796#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
12798#[non_exhaustive]
12799pub enum ServingSide {
12800 #[serde(rename = "first")]
12802 First,
12803 #[serde(rename = "second")]
12805 Second,
12806 #[serde(untagged)]
12808 Other(String),
12809}
12810
12811impl ServingSide {
12812 pub fn as_str(&self) -> &str {
12814 match self {
12815 Self::First => "first",
12816 Self::Second => "second",
12817 Self::Other(value) => value,
12818 }
12819 }
12820}
12821
12822impl From<&str> for ServingSide {
12823 fn from(value: &str) -> Self {
12824 match value {
12825 "first" => Self::First,
12826 "second" => Self::Second,
12827 other => Self::Other(other.to_owned()),
12828 }
12829 }
12830}
12831
12832impl std::fmt::Display for ServingSide {
12833 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12834 f.write_str(self.as_str())
12835 }
12836}
12837
12838impl AsRef<str> for ServingSide {
12839 fn as_ref(&self) -> &str {
12840 self.as_str()
12841 }
12842}
12843
12844#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
12846#[non_exhaustive]
12847pub enum Severity {
12848 #[serde(rename = "flag")]
12850 Flag,
12851 #[serde(rename = "watch")]
12853 Watch,
12854 #[serde(untagged)]
12856 Other(String),
12857}
12858
12859impl Severity {
12860 pub fn as_str(&self) -> &str {
12862 match self {
12863 Self::Flag => "flag",
12864 Self::Watch => "watch",
12865 Self::Other(value) => value,
12866 }
12867 }
12868}
12869
12870impl From<&str> for Severity {
12871 fn from(value: &str) -> Self {
12872 match value {
12873 "flag" => Self::Flag,
12874 "watch" => Self::Watch,
12875 other => Self::Other(other.to_owned()),
12876 }
12877 }
12878}
12879
12880impl std::fmt::Display for Severity {
12881 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12882 f.write_str(self.as_str())
12883 }
12884}
12885
12886impl AsRef<str> for Severity {
12887 fn as_ref(&self) -> &str {
12888 self.as_str()
12889 }
12890}
12891
12892#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
12894#[non_exhaustive]
12895pub struct SharpMoneyFlowDetectedData {
12896 pub condition_id: String,
12898 pub net_flow_usd: f64,
12900 pub abs_net_flow_usd: f64,
12902 pub dominant_side: SuspiciousTradeFlaggedDataSide,
12904 pub grade_floor: Grade,
12906 pub whale_trade_count: i64,
12908 pub window: String,
12910}
12911
12912#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
12914#[non_exhaustive]
12915pub enum Side {
12916 #[serde(rename = "BUY")]
12918 Buy,
12919 #[serde(rename = "SELL")]
12921 Sell,
12922 #[serde(untagged)]
12924 Other(String),
12925}
12926
12927impl Side {
12928 pub fn as_str(&self) -> &str {
12930 match self {
12931 Self::Buy => "BUY",
12932 Self::Sell => "SELL",
12933 Self::Other(value) => value,
12934 }
12935 }
12936}
12937
12938impl From<&str> for Side {
12939 fn from(value: &str) -> Self {
12940 match value {
12941 "BUY" => Self::Buy,
12942 "SELL" => Self::Sell,
12943 other => Self::Other(other.to_owned()),
12944 }
12945 }
12946}
12947
12948impl std::fmt::Display for Side {
12949 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12950 f.write_str(self.as_str())
12951 }
12952}
12953
12954impl AsRef<str> for Side {
12955 fn as_ref(&self) -> &str {
12956 self.as_str()
12957 }
12958}
12959
12960#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
12961#[non_exhaustive]
12962pub struct SmartMoneyFlowMarket {
12963 pub market: SmartMoneyFlowMarketMarket,
12964 pub sharp_money: SmartMoneyFlowMarketSharpMoney,
12966 pub smart_money: SmartMoneyFlowMarketSmartMoney,
12968 pub timeframe: String,
12969}
12970
12971#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
12972#[non_exhaustive]
12973pub struct SmartMoneyFlowMarketMarket {
12974 pub id: String,
12975 pub condition_id: String,
12976 #[serde(default)]
12977 pub title: Option<String>,
12978 #[serde(default)]
12979 pub slug: Option<String>,
12980 #[serde(default)]
12981 pub category: Option<String>,
12982 #[serde(default)]
12984 pub platform: Option<String>,
12985}
12986
12987#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
12989#[non_exhaustive]
12990pub struct SmartMoneyFlowMarketSharpMoney {
12991 pub net_flow_usd: f64,
12992 pub direction: Direction,
12993 #[serde(default)]
12995 pub token_id: Option<String>,
12996 pub large_trade_count: i64,
12998 pub whale_trade_count: i64,
13000 pub buy_volume_usd: f64,
13001 pub sell_volume_usd: f64,
13002}
13003
13004#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
13006#[non_exhaustive]
13007pub struct SmartMoneyFlowMarketSmartMoney {
13008 pub net_flow_usd: f64,
13009 pub direction: Direction,
13010 #[serde(default)]
13012 pub token_id: Option<String>,
13013 pub large_trade_count: i64,
13015 pub whale_trade_count: i64,
13017 pub buy_volume_usd: f64,
13018 pub sell_volume_usd: f64,
13019}
13020
13021#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
13022#[non_exhaustive]
13023pub struct SnapshotCompleteness {
13024 pub status: SnapshotCompletenessStatus,
13026 pub reason: String,
13027 pub expected_days: i64,
13028 pub covered_days_with_large_trade_activity: i64,
13030 pub covered_days_with_whale_activity: i64,
13032}
13033
13034#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
13036#[non_exhaustive]
13037pub enum SnapshotCompletenessStatus {
13038 #[serde(rename = "complete")]
13040 Complete,
13041 #[serde(rename = "partial")]
13043 Partial,
13044 #[serde(rename = "empty")]
13046 Empty,
13047 #[serde(untagged)]
13049 Other(String),
13050}
13051
13052impl SnapshotCompletenessStatus {
13053 pub fn as_str(&self) -> &str {
13055 match self {
13056 Self::Complete => "complete",
13057 Self::Partial => "partial",
13058 Self::Empty => "empty",
13059 Self::Other(value) => value,
13060 }
13061 }
13062}
13063
13064impl From<&str> for SnapshotCompletenessStatus {
13065 fn from(value: &str) -> Self {
13066 match value {
13067 "complete" => Self::Complete,
13068 "partial" => Self::Partial,
13069 "empty" => Self::Empty,
13070 other => Self::Other(other.to_owned()),
13071 }
13072 }
13073}
13074
13075impl std::fmt::Display for SnapshotCompletenessStatus {
13076 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13077 f.write_str(self.as_str())
13078 }
13079}
13080
13081impl AsRef<str> for SnapshotCompletenessStatus {
13082 fn as_ref(&self) -> &str {
13083 self.as_str()
13084 }
13085}
13086
13087#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
13088#[non_exhaustive]
13089pub struct SnapshotState {
13090 pub version: i64,
13092 pub storage: Storage,
13094 pub status: SnapshotStateStatus,
13096 pub generated_at: String,
13097 #[serde(default)]
13099 pub mutable_until: Option<String>,
13100 pub period_closed: bool,
13102 pub final_after: String,
13104 #[serde(default)]
13106 pub source_read_started_at: Option<String>,
13107}
13108
13109#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
13111#[non_exhaustive]
13112pub enum SnapshotStateStatus {
13113 #[serde(rename = "final")]
13115 Final,
13116 #[serde(rename = "rolling")]
13118 Rolling,
13119 #[serde(untagged)]
13121 Other(String),
13122}
13123
13124impl SnapshotStateStatus {
13125 pub fn as_str(&self) -> &str {
13127 match self {
13128 Self::Final => "final",
13129 Self::Rolling => "rolling",
13130 Self::Other(value) => value,
13131 }
13132 }
13133}
13134
13135impl From<&str> for SnapshotStateStatus {
13136 fn from(value: &str) -> Self {
13137 match value {
13138 "final" => Self::Final,
13139 "rolling" => Self::Rolling,
13140 other => Self::Other(other.to_owned()),
13141 }
13142 }
13143}
13144
13145impl std::fmt::Display for SnapshotStateStatus {
13146 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13147 f.write_str(self.as_str())
13148 }
13149}
13150
13151impl AsRef<str> for SnapshotStateStatus {
13152 fn as_ref(&self) -> &str {
13153 self.as_str()
13154 }
13155}
13156
13157#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
13159#[non_exhaustive]
13160pub enum Sort {
13161 #[serde(rename = "recent")]
13163 Recent,
13164 #[serde(rename = "market_volume_share")]
13166 MarketVolumeShare,
13167 #[serde(untagged)]
13169 Other(String),
13170}
13171
13172impl Sort {
13173 pub fn as_str(&self) -> &str {
13175 match self {
13176 Self::Recent => "recent",
13177 Self::MarketVolumeShare => "market_volume_share",
13178 Self::Other(value) => value,
13179 }
13180 }
13181}
13182
13183impl From<&str> for Sort {
13184 fn from(value: &str) -> Self {
13185 match value {
13186 "recent" => Self::Recent,
13187 "market_volume_share" => Self::MarketVolumeShare,
13188 other => Self::Other(other.to_owned()),
13189 }
13190 }
13191}
13192
13193impl std::fmt::Display for Sort {
13194 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13195 f.write_str(self.as_str())
13196 }
13197}
13198
13199impl AsRef<str> for Sort {
13200 fn as_ref(&self) -> &str {
13201 self.as_str()
13202 }
13203}
13204
13205#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
13207#[non_exhaustive]
13208pub enum Source {
13209 #[serde(rename = "polymarket_data")]
13211 PolymarketData,
13212 #[serde(rename = "gamma")]
13214 Gamma,
13215 #[serde(untagged)]
13217 Other(String),
13218}
13219
13220impl Source {
13221 pub fn as_str(&self) -> &str {
13223 match self {
13224 Self::PolymarketData => "polymarket_data",
13225 Self::Gamma => "gamma",
13226 Self::Other(value) => value,
13227 }
13228 }
13229}
13230
13231impl From<&str> for Source {
13232 fn from(value: &str) -> Self {
13233 match value {
13234 "polymarket_data" => Self::PolymarketData,
13235 "gamma" => Self::Gamma,
13236 other => Self::Other(other.to_owned()),
13237 }
13238 }
13239}
13240
13241impl std::fmt::Display for Source {
13242 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13243 f.write_str(self.as_str())
13244 }
13245}
13246
13247impl AsRef<str> for Source {
13248 fn as_ref(&self) -> &str {
13249 self.as_str()
13250 }
13251}
13252
13253#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
13255#[non_exhaustive]
13256pub enum SourceAvailability {
13257 #[serde(rename = "available")]
13259 Available,
13260 #[serde(rename = "unavailable")]
13262 Unavailable,
13263 #[serde(rename = "not_applicable")]
13265 NotApplicable,
13266 #[serde(untagged)]
13268 Other(String),
13269}
13270
13271impl SourceAvailability {
13272 pub fn as_str(&self) -> &str {
13274 match self {
13275 Self::Available => "available",
13276 Self::Unavailable => "unavailable",
13277 Self::NotApplicable => "not_applicable",
13278 Self::Other(value) => value,
13279 }
13280 }
13281}
13282
13283impl From<&str> for SourceAvailability {
13284 fn from(value: &str) -> Self {
13285 match value {
13286 "available" => Self::Available,
13287 "unavailable" => Self::Unavailable,
13288 "not_applicable" => Self::NotApplicable,
13289 other => Self::Other(other.to_owned()),
13290 }
13291 }
13292}
13293
13294impl std::fmt::Display for SourceAvailability {
13295 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13296 f.write_str(self.as_str())
13297 }
13298}
13299
13300impl AsRef<str> for SourceAvailability {
13301 fn as_ref(&self) -> &str {
13302 self.as_str()
13303 }
13304}
13305
13306#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
13308#[non_exhaustive]
13309pub enum SourceCoverage {
13310 #[serde(rename = "partial_whale_threshold_fills")]
13312 PartialWhaleThresholdFills,
13313 #[serde(rename = "graded_wallet_fills")]
13315 GradedWalletFills,
13316 #[serde(untagged)]
13318 Other(String),
13319}
13320
13321impl SourceCoverage {
13322 pub fn as_str(&self) -> &str {
13324 match self {
13325 Self::PartialWhaleThresholdFills => "partial_whale_threshold_fills",
13326 Self::GradedWalletFills => "graded_wallet_fills",
13327 Self::Other(value) => value,
13328 }
13329 }
13330}
13331
13332impl From<&str> for SourceCoverage {
13333 fn from(value: &str) -> Self {
13334 match value {
13335 "partial_whale_threshold_fills" => Self::PartialWhaleThresholdFills,
13336 "graded_wallet_fills" => Self::GradedWalletFills,
13337 other => Self::Other(other.to_owned()),
13338 }
13339 }
13340}
13341
13342impl std::fmt::Display for SourceCoverage {
13343 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13344 f.write_str(self.as_str())
13345 }
13346}
13347
13348impl AsRef<str> for SourceCoverage {
13349 fn as_ref(&self) -> &str {
13350 self.as_str()
13351 }
13352}
13353
13354#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
13356#[non_exhaustive]
13357pub enum SourceFreshness {
13358 #[serde(rename = "fresh")]
13360 Fresh,
13361 #[serde(rename = "stale")]
13363 Stale,
13364 #[serde(rename = "unknown")]
13366 Unknown,
13367 #[serde(rename = "not_applicable")]
13369 NotApplicable,
13370 #[serde(untagged)]
13372 Other(String),
13373}
13374
13375impl SourceFreshness {
13376 pub fn as_str(&self) -> &str {
13378 match self {
13379 Self::Fresh => "fresh",
13380 Self::Stale => "stale",
13381 Self::Unknown => "unknown",
13382 Self::NotApplicable => "not_applicable",
13383 Self::Other(value) => value,
13384 }
13385 }
13386}
13387
13388impl From<&str> for SourceFreshness {
13389 fn from(value: &str) -> Self {
13390 match value {
13391 "fresh" => Self::Fresh,
13392 "stale" => Self::Stale,
13393 "unknown" => Self::Unknown,
13394 "not_applicable" => Self::NotApplicable,
13395 other => Self::Other(other.to_owned()),
13396 }
13397 }
13398}
13399
13400impl std::fmt::Display for SourceFreshness {
13401 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13402 f.write_str(self.as_str())
13403 }
13404}
13405
13406impl AsRef<str> for SourceFreshness {
13407 fn as_ref(&self) -> &str {
13408 self.as_str()
13409 }
13410}
13411
13412#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
13414#[non_exhaustive]
13415pub enum SourceStatus {
13416 #[serde(rename = "ok")]
13418 Ok,
13419 #[serde(rename = "unavailable")]
13421 Unavailable,
13422 #[serde(untagged)]
13424 Other(String),
13425}
13426
13427impl SourceStatus {
13428 pub fn as_str(&self) -> &str {
13430 match self {
13431 Self::Ok => "ok",
13432 Self::Unavailable => "unavailable",
13433 Self::Other(value) => value,
13434 }
13435 }
13436}
13437
13438impl From<&str> for SourceStatus {
13439 fn from(value: &str) -> Self {
13440 match value {
13441 "ok" => Self::Ok,
13442 "unavailable" => Self::Unavailable,
13443 other => Self::Other(other.to_owned()),
13444 }
13445 }
13446}
13447
13448impl std::fmt::Display for SourceStatus {
13449 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13450 f.write_str(self.as_str())
13451 }
13452}
13453
13454impl AsRef<str> for SourceStatus {
13455 fn as_ref(&self) -> &str {
13456 self.as_str()
13457 }
13458}
13459
13460#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
13461#[non_exhaustive]
13462pub struct SportLeaderboard {
13463 #[serde(default)]
13464 pub as_of: Option<String>,
13465 #[serde(default)]
13466 pub category: Option<String>,
13467 #[serde(default)]
13468 pub edge_average: Option<f64>,
13469 #[serde(default)]
13470 pub league: Option<SportLeaderboardLeague>,
13471 pub limit: i64,
13472 pub min_resolved: i64,
13473 pub rows: Vec<SportLeaderboardRowsItem>,
13474 pub sort: SportLeaderboardSort,
13475 pub sport: String,
13476 pub total_traders: i64,
13477 pub volume_scope: String,
13478}
13479
13480#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
13481#[non_exhaustive]
13482pub struct SportLeaderboardLeague {
13483 pub name: String,
13484 pub ranked_traders: i64,
13485 pub slug: String,
13486}
13487
13488#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
13489#[non_exhaustive]
13490pub struct SportLeaderboardRowsItem {
13491 pub address: String,
13492 #[serde(default)]
13493 pub cost: Option<f64>,
13494 #[serde(default)]
13495 pub edge_hold: Option<EdgeHold>,
13496 #[serde(default)]
13497 pub edge_skill: Option<f64>,
13498 #[serde(default)]
13499 pub grade: Option<Grade>,
13500 pub id: String,
13501 #[serde(default)]
13502 pub last_category_trade_at: Option<String>,
13503 pub losses: i64,
13504 pub n_resolved: i64,
13505 pub platform: String,
13506 #[serde(default)]
13507 pub pnl: Option<f64>,
13508 #[serde(default)]
13509 pub price_edge: Option<SportLeaderboardRowsItemPriceEdge>,
13510 pub rank: i64,
13511 #[serde(default)]
13512 pub roi: Option<f64>,
13513 #[serde(default)]
13514 pub username: Option<String>,
13515 #[serde(default)]
13516 pub volume: Option<f64>,
13517 #[serde(default)]
13518 pub win_rate: Option<f64>,
13519 #[serde(default)]
13520 pub win_rate_wilson_lb: Option<f64>,
13521 pub wins: i64,
13522}
13523
13524#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
13525#[non_exhaustive]
13526pub struct SportLeaderboardRowsItemPriceEdge {
13527 pub avg_price: f64,
13528 pub edge: f64,
13529 pub edge_lower: f64,
13530 pub hit_rate: f64,
13531 pub markets: i64,
13532 pub status: SportLeaderboardRowsPriceEdgeStatus,
13533}
13534
13535#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
13537#[non_exhaustive]
13538pub enum SportLeaderboardRowsPriceEdgeStatus {
13539 #[serde(rename = "ranked")]
13541 Ranked,
13542 #[serde(rename = "too_few_markets")]
13544 TooFewMarkets,
13545 #[serde(rename = "sample_mismatch")]
13547 SampleMismatch,
13548 #[serde(untagged)]
13550 Other(String),
13551}
13552
13553impl SportLeaderboardRowsPriceEdgeStatus {
13554 pub fn as_str(&self) -> &str {
13556 match self {
13557 Self::Ranked => "ranked",
13558 Self::TooFewMarkets => "too_few_markets",
13559 Self::SampleMismatch => "sample_mismatch",
13560 Self::Other(value) => value,
13561 }
13562 }
13563}
13564
13565impl From<&str> for SportLeaderboardRowsPriceEdgeStatus {
13566 fn from(value: &str) -> Self {
13567 match value {
13568 "ranked" => Self::Ranked,
13569 "too_few_markets" => Self::TooFewMarkets,
13570 "sample_mismatch" => Self::SampleMismatch,
13571 other => Self::Other(other.to_owned()),
13572 }
13573 }
13574}
13575
13576impl std::fmt::Display for SportLeaderboardRowsPriceEdgeStatus {
13577 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13578 f.write_str(self.as_str())
13579 }
13580}
13581
13582impl AsRef<str> for SportLeaderboardRowsPriceEdgeStatus {
13583 fn as_ref(&self) -> &str {
13584 self.as_str()
13585 }
13586}
13587
13588#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
13590#[non_exhaustive]
13591pub enum SportLeaderboardSort {
13592 #[serde(rename = "edge")]
13594 Edge,
13595 #[serde(rename = "pnl")]
13597 Pnl,
13598 #[serde(rename = "win_rate")]
13600 WinRate,
13601 #[serde(untagged)]
13603 Other(String),
13604}
13605
13606impl SportLeaderboardSort {
13607 pub fn as_str(&self) -> &str {
13609 match self {
13610 Self::Edge => "edge",
13611 Self::Pnl => "pnl",
13612 Self::WinRate => "win_rate",
13613 Self::Other(value) => value,
13614 }
13615 }
13616}
13617
13618impl From<&str> for SportLeaderboardSort {
13619 fn from(value: &str) -> Self {
13620 match value {
13621 "edge" => Self::Edge,
13622 "pnl" => Self::Pnl,
13623 "win_rate" => Self::WinRate,
13624 other => Self::Other(other.to_owned()),
13625 }
13626 }
13627}
13628
13629impl std::fmt::Display for SportLeaderboardSort {
13630 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13631 f.write_str(self.as_str())
13632 }
13633}
13634
13635impl AsRef<str> for SportLeaderboardSort {
13636 fn as_ref(&self) -> &str {
13637 self.as_str()
13638 }
13639}
13640
13641#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
13643#[non_exhaustive]
13644pub enum State {
13645 #[serde(rename = "scheduled")]
13647 Scheduled,
13648 #[serde(rename = "live")]
13650 Live,
13651 #[serde(rename = "paused")]
13653 Paused,
13654 #[serde(rename = "ended")]
13656 Ended,
13657 #[serde(rename = "postponed")]
13659 Postponed,
13660 #[serde(rename = "cancelled")]
13662 Cancelled,
13663 #[serde(rename = "suspended")]
13665 Suspended,
13666 #[serde(rename = "delayed")]
13668 Delayed,
13669 #[serde(rename = "unknown")]
13671 Unknown,
13672 #[serde(untagged)]
13674 Other(String),
13675}
13676
13677impl State {
13678 pub fn as_str(&self) -> &str {
13680 match self {
13681 Self::Scheduled => "scheduled",
13682 Self::Live => "live",
13683 Self::Paused => "paused",
13684 Self::Ended => "ended",
13685 Self::Postponed => "postponed",
13686 Self::Cancelled => "cancelled",
13687 Self::Suspended => "suspended",
13688 Self::Delayed => "delayed",
13689 Self::Unknown => "unknown",
13690 Self::Other(value) => value,
13691 }
13692 }
13693}
13694
13695impl From<&str> for State {
13696 fn from(value: &str) -> Self {
13697 match value {
13698 "scheduled" => Self::Scheduled,
13699 "live" => Self::Live,
13700 "paused" => Self::Paused,
13701 "ended" => Self::Ended,
13702 "postponed" => Self::Postponed,
13703 "cancelled" => Self::Cancelled,
13704 "suspended" => Self::Suspended,
13705 "delayed" => Self::Delayed,
13706 "unknown" => Self::Unknown,
13707 other => Self::Other(other.to_owned()),
13708 }
13709 }
13710}
13711
13712impl std::fmt::Display for State {
13713 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13714 f.write_str(self.as_str())
13715 }
13716}
13717
13718impl AsRef<str> for State {
13719 fn as_ref(&self) -> &str {
13720 self.as_str()
13721 }
13722}
13723
13724#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
13726#[non_exhaustive]
13727pub enum Status {
13728 #[serde(rename = "live")]
13730 Live,
13731 #[serde(rename = "insufficient")]
13733 Insufficient,
13734 #[serde(rename = "stale")]
13736 Stale,
13737 #[serde(rename = "unknown")]
13739 Unknown,
13740 #[serde(rename = "degraded")]
13742 Degraded,
13743 #[serde(untagged)]
13745 Other(String),
13746}
13747
13748impl Status {
13749 pub fn as_str(&self) -> &str {
13751 match self {
13752 Self::Live => "live",
13753 Self::Insufficient => "insufficient",
13754 Self::Stale => "stale",
13755 Self::Unknown => "unknown",
13756 Self::Degraded => "degraded",
13757 Self::Other(value) => value,
13758 }
13759 }
13760}
13761
13762impl From<&str> for Status {
13763 fn from(value: &str) -> Self {
13764 match value {
13765 "live" => Self::Live,
13766 "insufficient" => Self::Insufficient,
13767 "stale" => Self::Stale,
13768 "unknown" => Self::Unknown,
13769 "degraded" => Self::Degraded,
13770 other => Self::Other(other.to_owned()),
13771 }
13772 }
13773}
13774
13775impl std::fmt::Display for Status {
13776 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13777 f.write_str(self.as_str())
13778 }
13779}
13780
13781impl AsRef<str> for Status {
13782 fn as_ref(&self) -> &str {
13783 self.as_str()
13784 }
13785}
13786
13787#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
13789#[non_exhaustive]
13790pub enum Storage {
13791 #[serde(rename = "durable")]
13793 Durable,
13794 #[serde(rename = "ephemeral")]
13796 Ephemeral,
13797 #[serde(untagged)]
13799 Other(String),
13800}
13801
13802impl Storage {
13803 pub fn as_str(&self) -> &str {
13805 match self {
13806 Self::Durable => "durable",
13807 Self::Ephemeral => "ephemeral",
13808 Self::Other(value) => value,
13809 }
13810 }
13811}
13812
13813impl From<&str> for Storage {
13814 fn from(value: &str) -> Self {
13815 match value {
13816 "durable" => Self::Durable,
13817 "ephemeral" => Self::Ephemeral,
13818 other => Self::Other(other.to_owned()),
13819 }
13820 }
13821}
13822
13823impl std::fmt::Display for Storage {
13824 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13825 f.write_str(self.as_str())
13826 }
13827}
13828
13829impl AsRef<str> for Storage {
13830 fn as_ref(&self) -> &str {
13831 self.as_str()
13832 }
13833}
13834
13835#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
13837#[non_exhaustive]
13838pub enum Strategy {
13839 #[serde(rename = "category_focused")]
13841 CategoryFocused,
13842 #[serde(rename = "diversified")]
13844 Diversified,
13845 #[serde(rename = "high_activity")]
13847 HighActivity,
13848 #[serde(rename = "mixed")]
13850 Mixed,
13851 #[serde(rename = "two_sided")]
13853 TwoSided,
13854 #[serde(rename = "unclassified")]
13856 Unclassified,
13857 #[serde(untagged)]
13859 Other(String),
13860}
13861
13862impl Strategy {
13863 pub fn as_str(&self) -> &str {
13865 match self {
13866 Self::CategoryFocused => "category_focused",
13867 Self::Diversified => "diversified",
13868 Self::HighActivity => "high_activity",
13869 Self::Mixed => "mixed",
13870 Self::TwoSided => "two_sided",
13871 Self::Unclassified => "unclassified",
13872 Self::Other(value) => value,
13873 }
13874 }
13875}
13876
13877impl From<&str> for Strategy {
13878 fn from(value: &str) -> Self {
13879 match value {
13880 "category_focused" => Self::CategoryFocused,
13881 "diversified" => Self::Diversified,
13882 "high_activity" => Self::HighActivity,
13883 "mixed" => Self::Mixed,
13884 "two_sided" => Self::TwoSided,
13885 "unclassified" => Self::Unclassified,
13886 other => Self::Other(other.to_owned()),
13887 }
13888 }
13889}
13890
13891impl std::fmt::Display for Strategy {
13892 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13893 f.write_str(self.as_str())
13894 }
13895}
13896
13897impl AsRef<str> for Strategy {
13898 fn as_ref(&self) -> &str {
13899 self.as_str()
13900 }
13901}
13902
13903#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
13905#[non_exhaustive]
13906pub enum StreakTier {
13907 #[serde(rename = "hot")]
13909 Hot,
13910 #[serde(rename = "rising")]
13912 Rising,
13913 #[serde(rename = "neutral")]
13915 Neutral,
13916 #[serde(rename = "cooling")]
13918 Cooling,
13919 #[serde(rename = "cold")]
13921 Cold,
13922 #[serde(untagged)]
13924 Other(String),
13925}
13926
13927impl StreakTier {
13928 pub fn as_str(&self) -> &str {
13930 match self {
13931 Self::Hot => "hot",
13932 Self::Rising => "rising",
13933 Self::Neutral => "neutral",
13934 Self::Cooling => "cooling",
13935 Self::Cold => "cold",
13936 Self::Other(value) => value,
13937 }
13938 }
13939}
13940
13941impl From<&str> for StreakTier {
13942 fn from(value: &str) -> Self {
13943 match value {
13944 "hot" => Self::Hot,
13945 "rising" => Self::Rising,
13946 "neutral" => Self::Neutral,
13947 "cooling" => Self::Cooling,
13948 "cold" => Self::Cold,
13949 other => Self::Other(other.to_owned()),
13950 }
13951 }
13952}
13953
13954impl std::fmt::Display for StreakTier {
13955 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13956 f.write_str(self.as_str())
13957 }
13958}
13959
13960impl AsRef<str> for StreakTier {
13961 fn as_ref(&self) -> &str {
13962 self.as_str()
13963 }
13964}
13965
13966#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
13967pub struct SubmitWhaleDatasetBody {
13968 pub from: String,
13969 pub to: String,
13970 #[serde(default, skip_serializing_if = "Option::is_none")]
13972 pub condition_id: Option<String>,
13973 #[serde(default, skip_serializing_if = "Option::is_none")]
13975 pub min_size: Option<f64>,
13976}
13977
13978#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
13980#[non_exhaustive]
13981pub enum SuspicionTrack {
13982 #[serde(rename = "whale")]
13984 Whale,
13985 #[serde(rename = "fresh_conviction")]
13987 FreshConviction,
13988 #[serde(rename = "sliced_position")]
13990 SlicedPosition,
13991 #[serde(untagged)]
13993 Other(String),
13994}
13995
13996impl SuspicionTrack {
13997 pub fn as_str(&self) -> &str {
13999 match self {
14000 Self::Whale => "whale",
14001 Self::FreshConviction => "fresh_conviction",
14002 Self::SlicedPosition => "sliced_position",
14003 Self::Other(value) => value,
14004 }
14005 }
14006}
14007
14008impl From<&str> for SuspicionTrack {
14009 fn from(value: &str) -> Self {
14010 match value {
14011 "whale" => Self::Whale,
14012 "fresh_conviction" => Self::FreshConviction,
14013 "sliced_position" => Self::SlicedPosition,
14014 other => Self::Other(other.to_owned()),
14015 }
14016 }
14017}
14018
14019impl std::fmt::Display for SuspicionTrack {
14020 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14021 f.write_str(self.as_str())
14022 }
14023}
14024
14025impl AsRef<str> for SuspicionTrack {
14026 fn as_ref(&self) -> &str {
14027 self.as_str()
14028 }
14029}
14030
14031#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14032#[non_exhaustive]
14033pub struct SuspiciousTrade {
14034 pub id: String,
14036 pub suspicion_score: f64,
14038 pub severity: String,
14040 pub trader: SuspiciousTradeTrader,
14041 pub market: SuspiciousTradeMarket,
14042 pub scores: SuspiciousTradeScores,
14043 pub evidence: serde_json::Value,
14045 pub created_at: String,
14047}
14048
14049#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14051#[non_exhaustive]
14052pub struct SuspiciousTradeFlaggedData {
14053 pub trade_id: i64,
14055 pub wallet: String,
14057 pub trader_id: i64,
14059 pub condition_id: String,
14061 pub suspicion_score: f64,
14063 pub track: SuspicionTrack,
14065 pub side: SuspiciousTradeFlaggedDataSide,
14067 pub size: f64,
14069 pub price: f64,
14071}
14072
14073#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
14075#[non_exhaustive]
14076pub enum SuspiciousTradeFlaggedDataSide {
14077 #[serde(rename = "yes")]
14079 Yes,
14080 #[serde(rename = "no")]
14082 No,
14083 #[serde(untagged)]
14085 Other(String),
14086}
14087
14088impl SuspiciousTradeFlaggedDataSide {
14089 pub fn as_str(&self) -> &str {
14091 match self {
14092 Self::Yes => "yes",
14093 Self::No => "no",
14094 Self::Other(value) => value,
14095 }
14096 }
14097}
14098
14099impl From<&str> for SuspiciousTradeFlaggedDataSide {
14100 fn from(value: &str) -> Self {
14101 match value {
14102 "yes" => Self::Yes,
14103 "no" => Self::No,
14104 other => Self::Other(other.to_owned()),
14105 }
14106 }
14107}
14108
14109impl std::fmt::Display for SuspiciousTradeFlaggedDataSide {
14110 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14111 f.write_str(self.as_str())
14112 }
14113}
14114
14115impl AsRef<str> for SuspiciousTradeFlaggedDataSide {
14116 fn as_ref(&self) -> &str {
14117 self.as_str()
14118 }
14119}
14120
14121#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14122#[non_exhaustive]
14123pub struct SuspiciousTradeMarket {
14124 pub id: String,
14125 pub condition_id: String,
14126 #[serde(default)]
14128 pub title: Option<String>,
14129}
14130
14131#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14132#[non_exhaustive]
14133pub struct SuspiciousTradeScores {
14134 #[serde(default)]
14136 pub timing: Option<f64>,
14137 #[serde(default)]
14139 pub edge: Option<f64>,
14140 #[serde(default)]
14142 pub size: Option<f64>,
14143 #[serde(default)]
14145 pub fresh_wallet: Option<f64>,
14146}
14147
14148#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14149#[non_exhaustive]
14150pub struct SuspiciousTradeTrader {
14151 pub id: String,
14152 pub address: String,
14153 #[serde(default)]
14154 pub username: Option<String>,
14155}
14156
14157#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
14159#[non_exhaustive]
14160pub enum Sweep {
14161 #[serde(rename = "win")]
14163 Win,
14164 #[serde(rename = "loss")]
14166 Loss,
14167 #[serde(untagged)]
14169 Other(String),
14170}
14171
14172impl Sweep {
14173 pub fn as_str(&self) -> &str {
14175 match self {
14176 Self::Win => "win",
14177 Self::Loss => "loss",
14178 Self::Other(value) => value,
14179 }
14180 }
14181}
14182
14183impl From<&str> for Sweep {
14184 fn from(value: &str) -> Self {
14185 match value {
14186 "win" => Self::Win,
14187 "loss" => Self::Loss,
14188 other => Self::Other(other.to_owned()),
14189 }
14190 }
14191}
14192
14193impl std::fmt::Display for Sweep {
14194 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14195 f.write_str(self.as_str())
14196 }
14197}
14198
14199impl AsRef<str> for Sweep {
14200 fn as_ref(&self) -> &str {
14201 self.as_str()
14202 }
14203}
14204
14205#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14207#[non_exhaustive]
14208pub struct TennisPoints {
14209 pub source: String,
14210 pub match_key: i64,
14212 pub player_keys: Vec<i64>,
14214 pub points: Vec<String>,
14216 #[serde(default, skip_serializing_if = "Option::is_none")]
14218 pub serving_side: Option<ServingSide>,
14219 pub source_revision: i64,
14221 pub observed_at: String,
14223 pub expires_at: String,
14225 pub set_number: i64,
14227 pub games: Vec<i64>,
14229 #[serde(default, skip_serializing_if = "Option::is_none")]
14231 pub set_games: Option<Vec<Vec<i64>>>,
14232}
14233
14234#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14236#[non_exhaustive]
14237pub struct TennisRanking {
14238 pub rank: i64,
14240 pub tour: TennisRankingTour,
14242 pub source: String,
14244 pub observed_at: String,
14246 pub expires_at: String,
14248}
14249
14250#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
14252#[non_exhaustive]
14253pub enum TennisRankingTour {
14254 #[serde(rename = "atp")]
14256 Atp,
14257 #[serde(rename = "wta")]
14259 Wta,
14260 #[serde(untagged)]
14262 Other(String),
14263}
14264
14265impl TennisRankingTour {
14266 pub fn as_str(&self) -> &str {
14268 match self {
14269 Self::Atp => "atp",
14270 Self::Wta => "wta",
14271 Self::Other(value) => value,
14272 }
14273 }
14274}
14275
14276impl From<&str> for TennisRankingTour {
14277 fn from(value: &str) -> Self {
14278 match value {
14279 "atp" => Self::Atp,
14280 "wta" => Self::Wta,
14281 other => Self::Other(other.to_owned()),
14282 }
14283 }
14284}
14285
14286impl std::fmt::Display for TennisRankingTour {
14287 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14288 f.write_str(self.as_str())
14289 }
14290}
14291
14292impl AsRef<str> for TennisRankingTour {
14293 fn as_ref(&self) -> &str {
14294 self.as_str()
14295 }
14296}
14297
14298#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
14300#[non_exhaustive]
14301pub enum TimeBasis {
14302 #[serde(rename = "polymarket_gamma_closed_time")]
14304 PolymarketGammaClosedTime,
14305 #[serde(rename = "observed_resolution")]
14307 ObservedResolution,
14308 #[serde(untagged)]
14310 Other(String),
14311}
14312
14313impl TimeBasis {
14314 pub fn as_str(&self) -> &str {
14316 match self {
14317 Self::PolymarketGammaClosedTime => "polymarket_gamma_closed_time",
14318 Self::ObservedResolution => "observed_resolution",
14319 Self::Other(value) => value,
14320 }
14321 }
14322}
14323
14324impl From<&str> for TimeBasis {
14325 fn from(value: &str) -> Self {
14326 match value {
14327 "polymarket_gamma_closed_time" => Self::PolymarketGammaClosedTime,
14328 "observed_resolution" => Self::ObservedResolution,
14329 other => Self::Other(other.to_owned()),
14330 }
14331 }
14332}
14333
14334impl std::fmt::Display for TimeBasis {
14335 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14336 f.write_str(self.as_str())
14337 }
14338}
14339
14340impl AsRef<str> for TimeBasis {
14341 fn as_ref(&self) -> &str {
14342 self.as_str()
14343 }
14344}
14345
14346#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
14348#[non_exhaustive]
14349pub enum Timeframe {
14350 #[serde(rename = "1h")]
14352 V1h,
14353 #[serde(rename = "4h")]
14355 V4h,
14356 #[serde(rename = "24h")]
14358 V24h,
14359 #[serde(rename = "7d")]
14361 V7d,
14362 #[serde(untagged)]
14364 Other(String),
14365}
14366
14367impl Timeframe {
14368 pub fn as_str(&self) -> &str {
14370 match self {
14371 Self::V1h => "1h",
14372 Self::V4h => "4h",
14373 Self::V24h => "24h",
14374 Self::V7d => "7d",
14375 Self::Other(value) => value,
14376 }
14377 }
14378}
14379
14380impl From<&str> for Timeframe {
14381 fn from(value: &str) -> Self {
14382 match value {
14383 "1h" => Self::V1h,
14384 "4h" => Self::V4h,
14385 "24h" => Self::V24h,
14386 "7d" => Self::V7d,
14387 other => Self::Other(other.to_owned()),
14388 }
14389 }
14390}
14391
14392impl std::fmt::Display for Timeframe {
14393 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14394 f.write_str(self.as_str())
14395 }
14396}
14397
14398impl AsRef<str> for Timeframe {
14399 fn as_ref(&self) -> &str {
14400 self.as_str()
14401 }
14402}
14403
14404#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
14406#[non_exhaustive]
14407pub enum Tour {
14408 #[serde(rename = "atp")]
14410 Atp,
14411 #[serde(rename = "wta")]
14413 Wta,
14414 #[serde(rename = "itf")]
14416 Itf,
14417 #[serde(untagged)]
14419 Other(String),
14420}
14421
14422impl Tour {
14423 pub fn as_str(&self) -> &str {
14425 match self {
14426 Self::Atp => "atp",
14427 Self::Wta => "wta",
14428 Self::Itf => "itf",
14429 Self::Other(value) => value,
14430 }
14431 }
14432}
14433
14434impl From<&str> for Tour {
14435 fn from(value: &str) -> Self {
14436 match value {
14437 "atp" => Self::Atp,
14438 "wta" => Self::Wta,
14439 "itf" => Self::Itf,
14440 other => Self::Other(other.to_owned()),
14441 }
14442 }
14443}
14444
14445impl std::fmt::Display for Tour {
14446 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14447 f.write_str(self.as_str())
14448 }
14449}
14450
14451impl AsRef<str> for Tour {
14452 fn as_ref(&self) -> &str {
14453 self.as_str()
14454 }
14455}
14456
14457#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14458#[non_exhaustive]
14459pub struct Trader {
14460 pub id: String,
14462 pub address: String,
14463 #[serde(default, skip_serializing_if = "Option::is_none")]
14464 pub username: Option<String>,
14465 #[serde(default, skip_serializing_if = "Option::is_none")]
14466 pub grade: Option<Grade>,
14467 #[serde(default, skip_serializing_if = "Option::is_none")]
14469 pub streak_tier: Option<StreakTier>,
14470 #[serde(default, skip_serializing_if = "Option::is_none")]
14471 pub score: Option<f64>,
14472 #[serde(default, skip_serializing_if = "Option::is_none")]
14474 pub forecast_score: Option<f64>,
14475 #[serde(default, skip_serializing_if = "Option::is_none")]
14477 pub forecast_evidence: Option<f64>,
14478 #[serde(default, skip_serializing_if = "Option::is_none")]
14479 pub rank: Option<i64>,
14480 pub pnl: TraderPnlSummary,
14481 pub stats: TraderStats,
14483 #[serde(default, skip_serializing_if = "Option::is_none")]
14484 pub strategy: Option<TraderStrategy>,
14485 #[serde(default, skip_serializing_if = "Option::is_none")]
14487 pub category_strengths: Option<serde_json::Map<String, serde_json::Value>>,
14488 #[serde(default, skip_serializing_if = "Option::is_none")]
14490 pub quant_metrics: Option<TraderQuantMetrics>,
14491 #[serde(default, skip_serializing_if = "Option::is_none")]
14493 pub last_active: Option<String>,
14494 #[serde(default, skip_serializing_if = "Option::is_none")]
14496 pub synced_at: Option<String>,
14497 #[serde(default, skip_serializing_if = "Option::is_none")]
14499 pub sync_status: Option<String>,
14500 pub data_quality: DataQuality,
14502 #[serde(default, skip_serializing_if = "Option::is_none")]
14504 pub trust: Option<TraderTrust>,
14505 #[serde(default, skip_serializing_if = "Option::is_none")]
14507 pub category_records: Option<Vec<CategorySkillV2>>,
14508 #[serde(default, skip_serializing_if = "Option::is_none")]
14509 pub category_skill_model: Option<CategorySkillModelReadiness>,
14510 #[serde(default, skip_serializing_if = "Option::is_none")]
14512 pub price_edge: Option<TraderPriceEdge>,
14513 #[serde(default, skip_serializing_if = "Option::is_none")]
14515 pub breakdowns: Option<TraderBreakdowns>,
14516}
14517
14518#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14520#[non_exhaustive]
14521pub struct TraderBreakdowns {
14522 pub hourly_performance: TraderHourlyPerformance,
14523 pub time_breakdowns: TraderTimeBreakdowns,
14524 #[serde(default)]
14526 pub risk_metrics: Option<TraderRiskMetrics>,
14527 pub entry_price_analysis: TraderEntryPriceAnalysis,
14528}
14529
14530#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14531#[non_exhaustive]
14532pub struct TraderCategoryRecord {
14533 pub category: String,
14535 pub wins: i64,
14537 pub decided: i64,
14539 #[serde(default)]
14541 pub win_rate: Option<f64>,
14542 pub status: TraderEsportsGameRecordStatus,
14544 #[serde(default, skip_serializing_if = "Option::is_none")]
14546 pub games: Option<Vec<TraderEsportsGameRecord>>,
14547}
14548
14549#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14550#[non_exhaustive]
14551pub struct TraderCategoryRecords {
14552 pub id: String,
14554 pub address: String,
14556 pub basis: String,
14558 pub min_decided_for_win_rate: i64,
14560 #[serde(default)]
14562 pub computed_at: Option<String>,
14563 pub records: Vec<TraderCategoryRecord>,
14565}
14566
14567#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14568#[non_exhaustive]
14569pub struct TraderContext {
14570 pub trader: Trader,
14571 #[serde(default, skip_serializing_if = "Option::is_none")]
14573 pub position_summary: Option<TraderContextPositionSummary>,
14574 #[serde(default)]
14576 pub data_as_of: Option<String>,
14577 pub freshness_note: String,
14579}
14580
14581#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14583#[non_exhaustive]
14584pub struct TraderContextPositionSummary {
14585 #[serde(default)]
14587 pub markets_total: Option<i64>,
14588 pub markets_synced: i64,
14590 pub markets_pruned: i64,
14592 pub markets_unstored: i64,
14594 pub markets_combo: i64,
14596 pub markets_resolved: i64,
14598 pub markets_open: i64,
14600 pub sync_coverage: f64,
14602 pub synced_realized_pnl: f64,
14604 pub total_realized_pnl: f64,
14606 pub unrealized_mtm: f64,
14608 pub cost_basis_locked: f64,
14610 #[serde(default)]
14612 pub resolved_win_rate: Option<f64>,
14613 #[serde(default)]
14615 pub resolved_wins: Option<i64>,
14616 #[serde(default)]
14618 pub resolved_decided: Option<i64>,
14619 #[serde(default)]
14621 pub as_of: Option<String>,
14622}
14623
14624#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14626#[non_exhaustive]
14627pub struct TraderEntryPriceAnalysis {
14628 pub buckets: Vec<TraderEntryPriceBucket>,
14630 #[serde(default)]
14632 pub best_bucket: Option<String>,
14633 #[serde(default)]
14635 pub worst_bucket: Option<String>,
14636}
14637
14638#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14640#[non_exhaustive]
14641pub struct TraderEntryPriceBucket {
14642 pub bucket: String,
14644 pub bucket_order: i64,
14646 pub markets: AnalyticInteger,
14648 pub wins: AnalyticInteger,
14650 pub win_rate: AnalyticNumber,
14652 pub total_pnl: AnalyticNumber,
14654 pub avg_pnl: AnalyticNumber,
14656}
14657
14658#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14659#[non_exhaustive]
14660pub struct TraderEsportsGameRecord {
14661 pub game: String,
14663 pub series_slug: String,
14665 pub wins: i64,
14667 pub decided: i64,
14669 #[serde(default)]
14671 pub win_rate: Option<f64>,
14672 pub status: TraderEsportsGameRecordStatus,
14674}
14675
14676#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
14678#[non_exhaustive]
14679pub enum TraderEsportsGameRecordStatus {
14680 #[serde(rename = "measured")]
14682 Measured,
14683 #[serde(rename = "not_enough_data")]
14685 NotEnoughData,
14686 #[serde(untagged)]
14688 Other(String),
14689}
14690
14691impl TraderEsportsGameRecordStatus {
14692 pub fn as_str(&self) -> &str {
14694 match self {
14695 Self::Measured => "measured",
14696 Self::NotEnoughData => "not_enough_data",
14697 Self::Other(value) => value,
14698 }
14699 }
14700}
14701
14702impl From<&str> for TraderEsportsGameRecordStatus {
14703 fn from(value: &str) -> Self {
14704 match value {
14705 "measured" => Self::Measured,
14706 "not_enough_data" => Self::NotEnoughData,
14707 other => Self::Other(other.to_owned()),
14708 }
14709 }
14710}
14711
14712impl std::fmt::Display for TraderEsportsGameRecordStatus {
14713 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14714 f.write_str(self.as_str())
14715 }
14716}
14717
14718impl AsRef<str> for TraderEsportsGameRecordStatus {
14719 fn as_ref(&self) -> &str {
14720 self.as_str()
14721 }
14722}
14723
14724#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14725#[non_exhaustive]
14726pub struct TraderExportArtifactManifest {
14727 pub manifest_version: String,
14729 pub format: Format,
14731 pub schema_version: SchemaVersion,
14733 pub coverage: Coverage,
14735 pub generation: TraderExportGeneration,
14736 pub row_count: i64,
14738 pub content_size_bytes: i64,
14740 pub content_sha256: String,
14742 pub compressed_size_bytes: i64,
14744 pub compressed_sha256: String,
14746}
14747
14748#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14749#[non_exhaustive]
14750pub struct TraderExportCategoryWatermark {
14751 pub source: String,
14752 pub coverage: String,
14753 #[serde(default)]
14754 pub publication_fence: Option<String>,
14755 #[serde(default)]
14756 pub data_as_of: Option<String>,
14757}
14758
14759#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14760#[non_exhaustive]
14761pub struct TraderExportGeneration {
14762 pub id: String,
14764 pub selected_at: String,
14765 pub consistency: String,
14766 pub source_watermarks: TraderExportSourceWatermarks,
14767 #[serde(default, skip_serializing_if = "Option::is_none")]
14769 pub product_scope: Option<String>,
14770}
14771
14772#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14773#[non_exhaustive]
14774pub struct TraderExportJob {
14775 pub object: String,
14776 pub data: TraderExportJobData,
14777 pub meta: ResponseMeta,
14778}
14779
14780#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14781#[non_exhaustive]
14782pub struct TraderExportJobData {
14783 pub job_id: i64,
14784 pub status: TraderExportJobDataStatus,
14786 pub format: Format,
14787 #[serde(default)]
14789 pub total_trades: Option<i64>,
14790 #[serde(default)]
14792 pub processed_trades: Option<i64>,
14793 #[serde(default)]
14794 pub file_size: Option<i64>,
14795 #[serde(default)]
14796 pub error: Option<String>,
14797 pub terminal: bool,
14799 pub next_action: NextAction,
14801 #[serde(default, skip_serializing_if = "Option::is_none")]
14803 pub poll_after_s: Option<i64>,
14804 pub created_at: String,
14805 #[serde(default)]
14807 pub started_at: Option<String>,
14808 #[serde(default)]
14810 pub ready_at: Option<String>,
14811 #[serde(default)]
14812 pub failed_at: Option<String>,
14813 pub expires_at: String,
14815 #[serde(default)]
14817 pub expired_at: Option<String>,
14818 #[serde(default)]
14820 pub data_as_of: Option<String>,
14821 #[serde(default)]
14823 pub cancel_requested_at: Option<String>,
14824 #[serde(default)]
14826 pub cancelled_at: Option<String>,
14827 pub attempt: i64,
14829 pub max_attempts: i64,
14831 #[serde(default, skip_serializing_if = "Option::is_none")]
14833 pub artifact: Option<TraderExportJobDataArtifact>,
14834}
14835
14836#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14838#[non_exhaustive]
14839pub struct TraderExportJobDataArtifact {
14840 pub artifact_id: String,
14842 #[serde(default)]
14844 pub etag: Option<String>,
14845 #[serde(default)]
14847 pub compressed_size_bytes: Option<i64>,
14848 pub content_type: ContentType,
14849 pub content_encoding: String,
14850 #[serde(default)]
14852 pub manifest: Option<TraderExportArtifactManifest>,
14853}
14854
14855#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
14857#[non_exhaustive]
14858pub enum TraderExportJobDataStatus {
14859 #[serde(rename = "queued")]
14861 Queued,
14862 #[serde(rename = "running")]
14864 Running,
14865 #[serde(rename = "ready")]
14867 Ready,
14868 #[serde(rename = "failed")]
14870 Failed,
14871 #[serde(rename = "reconcile_required")]
14873 ReconcileRequired,
14874 #[serde(rename = "expired")]
14876 Expired,
14877 #[serde(rename = "cancel_requested")]
14879 CancelRequested,
14880 #[serde(rename = "cancelled")]
14882 Cancelled,
14883 #[serde(untagged)]
14885 Other(String),
14886}
14887
14888impl TraderExportJobDataStatus {
14889 pub fn as_str(&self) -> &str {
14891 match self {
14892 Self::Queued => "queued",
14893 Self::Running => "running",
14894 Self::Ready => "ready",
14895 Self::Failed => "failed",
14896 Self::ReconcileRequired => "reconcile_required",
14897 Self::Expired => "expired",
14898 Self::CancelRequested => "cancel_requested",
14899 Self::Cancelled => "cancelled",
14900 Self::Other(value) => value,
14901 }
14902 }
14903}
14904
14905impl From<&str> for TraderExportJobDataStatus {
14906 fn from(value: &str) -> Self {
14907 match value {
14908 "queued" => Self::Queued,
14909 "running" => Self::Running,
14910 "ready" => Self::Ready,
14911 "failed" => Self::Failed,
14912 "reconcile_required" => Self::ReconcileRequired,
14913 "expired" => Self::Expired,
14914 "cancel_requested" => Self::CancelRequested,
14915 "cancelled" => Self::Cancelled,
14916 other => Self::Other(other.to_owned()),
14917 }
14918 }
14919}
14920
14921impl std::fmt::Display for TraderExportJobDataStatus {
14922 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14923 f.write_str(self.as_str())
14924 }
14925}
14926
14927impl AsRef<str> for TraderExportJobDataStatus {
14928 fn as_ref(&self) -> &str {
14929 self.as_str()
14930 }
14931}
14932
14933#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14934#[non_exhaustive]
14935pub struct TraderExportPnlWatermark {
14936 pub source: String,
14937 pub coverage: String,
14938 #[serde(default)]
14939 pub revision: Option<i64>,
14940 #[serde(default)]
14941 pub observed_at: Option<String>,
14942}
14943
14944#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14945#[non_exhaustive]
14946pub struct TraderExportPositionWatermark {
14947 pub source: String,
14948 pub coverage: String,
14949 #[serde(default)]
14950 pub generation: Option<i64>,
14951 #[serde(default)]
14952 pub data_as_of: Option<String>,
14953}
14954
14955#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14956#[non_exhaustive]
14957pub struct TraderExportSnapshot {
14958 pub address: String,
14959 pub product_scope: String,
14961 pub generated_at: String,
14962 pub source_range: ExportSourceRange,
14963 pub completeness: ExportCompleteness,
14964 pub reconciliation: ExportVolumeReconciliation,
14965 pub counts: ExportCounts,
14966 pub large_export_policy: LargeExportPolicy,
14967}
14968
14969#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14970#[non_exhaustive]
14971pub struct TraderExportSourceWatermarks {
14972 pub positions: TraderExportPositionWatermark,
14973 pub pnl: TraderExportPnlWatermark,
14974 pub categories: TraderExportCategoryWatermark,
14975 pub trades: TraderExportTradeWatermark,
14976}
14977
14978#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14979#[non_exhaustive]
14980pub struct TraderExportTradeWatermark {
14981 pub source: String,
14982 pub coverage: String,
14984 pub rows: i64,
14986 #[serde(default)]
14987 pub first_activity_date: Option<String>,
14988}
14989
14990#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14991#[non_exhaustive]
14992pub struct TraderGradeAt {
14993 pub id: String,
14995 pub address: String,
14997 pub as_of: String,
14999 pub status: GradeAtTradeStatus,
15001 #[serde(default)]
15003 pub grade: Option<Grade>,
15004 #[serde(default)]
15006 pub available_from: Option<String>,
15007 #[serde(default)]
15009 pub observation: Option<TraderGradeAtObservation>,
15010}
15011
15012#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15014#[non_exhaustive]
15015pub struct TraderGradeAtObservation {
15016 pub id: i64,
15018 #[serde(default)]
15020 pub previous_observation_id: Option<i64>,
15021 pub observed_at: String,
15023 pub published_by: String,
15025 #[serde(default)]
15027 pub model_version: Option<String>,
15028 #[serde(default)]
15030 pub model_build_sha: Option<String>,
15031 #[serde(default)]
15033 pub source_observed_by: Option<String>,
15034}
15035
15036#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15038#[non_exhaustive]
15039pub struct TraderHourlyPerformance {
15040 pub entries: Vec<TraderHourlyPerformanceEntriesItem>,
15042 #[serde(default)]
15044 pub best_hour: Option<i64>,
15045 #[serde(default)]
15047 pub best_win_rate: Option<f64>,
15048 #[serde(default)]
15050 pub worst_hour: Option<i64>,
15051 #[serde(default)]
15053 pub worst_win_rate: Option<f64>,
15054 #[serde(default)]
15056 pub spread_pp: Option<f64>,
15057 pub is_approximate: bool,
15059}
15060
15061#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15062#[non_exhaustive]
15063pub struct TraderHourlyPerformanceEntriesItem {
15064 pub hour: i64,
15066 pub markets: i64,
15068 pub wins: i64,
15070 pub win_rate: f64,
15072 pub total_pnl: f64,
15074 pub avg_pnl: f64,
15076}
15077
15078#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15080#[non_exhaustive]
15081pub struct TraderPnl {
15082 pub id: String,
15084 #[serde(default, skip_serializing_if = "Option::is_none")]
15086 pub view: Option<TraderPnlView>,
15087 #[serde(default)]
15089 pub freshness_at: Option<String>,
15090 pub series_status: DailyPnlSeriesStatus,
15092 #[serde(default)]
15094 pub realized: Option<TraderPnlRealized>,
15095 #[serde(default, skip_serializing_if = "Option::is_none")]
15097 pub entries: Option<Vec<TraderPnlEntriesItem>>,
15098 #[serde(default, skip_serializing_if = "Option::is_none")]
15100 pub stats: Option<TraderPnlStats>,
15101 #[serde(default, skip_serializing_if = "Option::is_none")]
15103 pub monthly: Option<Vec<TraderPnlMonthlyItem>>,
15104 #[serde(default, skip_serializing_if = "Option::is_none")]
15106 pub year_totals: Option<Vec<TraderPnlYearTotalsItem>>,
15107 #[serde(default, skip_serializing_if = "Option::is_none")]
15109 pub drawdown: Option<Vec<TraderPnlDrawdownItem>>,
15110}
15111
15112#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15113#[non_exhaustive]
15114pub struct TraderPnlDrawdownItem {
15115 pub date: String,
15116 pub cumulative_profit: f64,
15117 pub drawdown: f64,
15118}
15119
15120#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15121#[non_exhaustive]
15122pub struct TraderPnlEntriesItem {
15123 pub date: String,
15124 #[serde(default, skip_serializing_if = "Option::is_none")]
15126 pub markets_traded: Option<i64>,
15127 #[serde(default, skip_serializing_if = "Option::is_none")]
15129 pub total_volume: Option<f64>,
15130 #[serde(default, skip_serializing_if = "Option::is_none")]
15132 pub cumulative_profit: Option<f64>,
15133 #[serde(default, skip_serializing_if = "Option::is_none")]
15135 pub total_pnl: Option<f64>,
15136 pub daily_change: f64,
15138}
15139
15140#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15142#[non_exhaustive]
15143pub struct TraderPnlExact {
15144 pub realized: ExactDecimal,
15146}
15147
15148#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15150#[non_exhaustive]
15151pub struct TraderPnlInScope {
15152 pub basis: String,
15154 #[serde(default)]
15156 pub realized_pnl: Option<f64>,
15157 pub markets: i64,
15159 pub markets_resolved: i64,
15161 #[serde(default)]
15163 pub win_rate: Option<f64>,
15164 pub markets_out_of_scope: i64,
15166 pub as_of: String,
15168}
15169
15170#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15171#[non_exhaustive]
15172pub struct TraderPnlMonthlyItem {
15173 pub year: i64,
15174 pub month: i64,
15175 pub pnl: f64,
15176 #[serde(default)]
15178 pub markets_traded: Option<i64>,
15179}
15180
15181#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15183#[non_exhaustive]
15184pub struct TraderPnlRealized {
15185 pub basis: TraderPnlRealizedBasis,
15187 #[serde(default)]
15189 pub realized_pnl: Option<f64>,
15190 pub dated_pnl: f64,
15192 #[serde(default)]
15194 pub undated_pnl: Option<f64>,
15195}
15196
15197#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
15199#[non_exhaustive]
15200pub enum TraderPnlRealizedBasis {
15201 #[serde(rename = "polymarket_sports_esports_v1")]
15203 PolymarketSportsEsportsV1,
15204 #[serde(rename = "sports_esports_split_v1")]
15206 SportsEsportsSplitV1,
15207 #[serde(untagged)]
15209 Other(String),
15210}
15211
15212impl TraderPnlRealizedBasis {
15213 pub fn as_str(&self) -> &str {
15215 match self {
15216 Self::PolymarketSportsEsportsV1 => "polymarket_sports_esports_v1",
15217 Self::SportsEsportsSplitV1 => "sports_esports_split_v1",
15218 Self::Other(value) => value,
15219 }
15220 }
15221}
15222
15223impl From<&str> for TraderPnlRealizedBasis {
15224 fn from(value: &str) -> Self {
15225 match value {
15226 "polymarket_sports_esports_v1" => Self::PolymarketSportsEsportsV1,
15227 "sports_esports_split_v1" => Self::SportsEsportsSplitV1,
15228 other => Self::Other(other.to_owned()),
15229 }
15230 }
15231}
15232
15233impl std::fmt::Display for TraderPnlRealizedBasis {
15234 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15235 f.write_str(self.as_str())
15236 }
15237}
15238
15239impl AsRef<str> for TraderPnlRealizedBasis {
15240 fn as_ref(&self) -> &str {
15241 self.as_str()
15242 }
15243}
15244
15245#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15247#[non_exhaustive]
15248pub struct TraderPnlStats {
15249 pub all: TraderPnlStatsAll,
15250 pub d90: TraderPnlStatsD90,
15251 pub d30: TraderPnlStatsD30,
15252 pub d7: TraderPnlStatsD7,
15253}
15254
15255#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15256#[non_exhaustive]
15257pub struct TraderPnlStatsAll {
15258 pub current: f64,
15259 pub change: f64,
15260 pub change_pct: f64,
15261 pub best_day: f64,
15262 #[serde(default, skip_serializing_if = "Option::is_none")]
15263 pub best_day_date: Option<String>,
15264 pub worst_day: f64,
15265 #[serde(default, skip_serializing_if = "Option::is_none")]
15266 pub worst_day_date: Option<String>,
15267 pub win_days: i64,
15268 pub loss_days: i64,
15269 pub avg_day: f64,
15270 pub rebase_anchor: f64,
15271}
15272
15273#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15274#[non_exhaustive]
15275pub struct TraderPnlStatsD30 {
15276 pub current: f64,
15277 pub change: f64,
15278 pub change_pct: f64,
15279 pub best_day: f64,
15280 #[serde(default, skip_serializing_if = "Option::is_none")]
15281 pub best_day_date: Option<String>,
15282 pub worst_day: f64,
15283 #[serde(default, skip_serializing_if = "Option::is_none")]
15284 pub worst_day_date: Option<String>,
15285 pub win_days: i64,
15286 pub loss_days: i64,
15287 pub avg_day: f64,
15288 pub rebase_anchor: f64,
15289}
15290
15291#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15292#[non_exhaustive]
15293pub struct TraderPnlStatsD7 {
15294 pub current: f64,
15295 pub change: f64,
15296 pub change_pct: f64,
15297 pub best_day: f64,
15298 #[serde(default, skip_serializing_if = "Option::is_none")]
15299 pub best_day_date: Option<String>,
15300 pub worst_day: f64,
15301 #[serde(default, skip_serializing_if = "Option::is_none")]
15302 pub worst_day_date: Option<String>,
15303 pub win_days: i64,
15304 pub loss_days: i64,
15305 pub avg_day: f64,
15306 pub rebase_anchor: f64,
15307}
15308
15309#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15310#[non_exhaustive]
15311pub struct TraderPnlStatsD90 {
15312 pub current: f64,
15313 pub change: f64,
15314 pub change_pct: f64,
15315 pub best_day: f64,
15316 #[serde(default, skip_serializing_if = "Option::is_none")]
15317 pub best_day_date: Option<String>,
15318 pub worst_day: f64,
15319 #[serde(default, skip_serializing_if = "Option::is_none")]
15320 pub worst_day_date: Option<String>,
15321 pub win_days: i64,
15322 pub loss_days: i64,
15323 pub avg_day: f64,
15324 pub rebase_anchor: f64,
15325}
15326
15327#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15328#[non_exhaustive]
15329pub struct TraderPnlSummary {
15330 #[serde(default, skip_serializing_if = "Option::is_none")]
15332 pub total: Option<f64>,
15333 #[serde(default, skip_serializing_if = "Option::is_none")]
15335 pub net_total: Option<f64>,
15336 #[serde(default, skip_serializing_if = "Option::is_none")]
15338 pub correction: Option<PnlCorrection>,
15339 #[serde(default, skip_serializing_if = "Option::is_none")]
15341 pub correction_pending: Option<bool>,
15342 #[serde(default, skip_serializing_if = "Option::is_none")]
15344 pub realized: Option<f64>,
15345 #[serde(default, skip_serializing_if = "Option::is_none")]
15347 pub unrealized: Option<f64>,
15348 #[serde(default, skip_serializing_if = "Option::is_none")]
15350 pub exact: Option<TraderPnlExact>,
15351 #[serde(default, skip_serializing_if = "Option::is_none")]
15353 pub in_scope: Option<TraderPnlInScope>,
15354}
15355
15356#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15358#[non_exhaustive]
15359pub struct TraderPnlView {
15360 #[serde(default)]
15362 pub from: Option<String>,
15363 #[serde(default)]
15365 pub to: Option<String>,
15366 pub sections: Vec<Sections>,
15368 pub entries_total: i64,
15370 pub entries_in_window: i64,
15372 #[serde(default)]
15374 pub anchor: Option<TraderPnlViewAnchor>,
15375}
15376
15377#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15379#[non_exhaustive]
15380pub struct TraderPnlViewAnchor {
15381 pub date: String,
15382 #[serde(default)]
15384 pub cumulative_profit: Option<f64>,
15385 #[serde(default)]
15387 pub total_pnl: Option<f64>,
15388 #[serde(default)]
15390 pub drawdown: Option<f64>,
15391}
15392
15393#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15394#[non_exhaustive]
15395pub struct TraderPnlYearTotalsItem {
15396 pub year: i64,
15397 pub pnl: f64,
15398}
15399
15400#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15402#[non_exhaustive]
15403pub struct TraderPriceEdge {
15404 pub markets: i64,
15406 pub hit_rate: f64,
15408 pub avg_price: f64,
15410 pub edge: f64,
15412 pub status: SportLeaderboardRowsPriceEdgeStatus,
15414 #[serde(default, skip_serializing_if = "Option::is_none")]
15416 pub shrunk_edge: Option<f64>,
15417 #[serde(default, skip_serializing_if = "Option::is_none")]
15419 pub field_average: Option<f64>,
15420}
15421
15422#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15424#[non_exhaustive]
15425pub struct TraderQuantMetrics {
15426 #[serde(default)]
15428 pub smart_score: Option<f64>,
15429 #[serde(default)]
15431 pub copy_score: Option<f64>,
15432 #[serde(default)]
15434 pub sharpe_30d: Option<f64>,
15435 #[serde(default)]
15437 pub sharpe_7d: Option<f64>,
15438 #[serde(default)]
15440 pub profit_factor: Option<f64>,
15441 #[serde(default)]
15443 pub edge_consistency: Option<f64>,
15444 #[serde(default)]
15446 pub sharpe_percentile: Option<f64>,
15447 #[serde(default)]
15449 pub pf_percentile: Option<f64>,
15450 #[serde(default)]
15452 pub consistency_percentile: Option<f64>,
15453}
15454
15455#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15457#[non_exhaustive]
15458pub struct TraderRiskMetrics {
15459 pub avg_position_size: AnalyticNumber,
15461 pub median_position_size: AnalyticNumber,
15463 pub max_position_size: AnalyticNumber,
15465 pub position_size_stddev: AnalyticNumber,
15467 pub total_positions: i64,
15469 pub large_position_count: i64,
15471 pub concentration: AnalyticNumber,
15473}
15474
15475#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15477#[non_exhaustive]
15478pub struct TraderStats {
15479 #[serde(default, skip_serializing_if = "Option::is_none")]
15481 pub markets_traded: Option<i64>,
15482 #[serde(default, skip_serializing_if = "Option::is_none")]
15484 pub win_rate: Option<f64>,
15485 #[serde(default, skip_serializing_if = "Option::is_none")]
15487 pub daily_win_rate: Option<f64>,
15488 #[serde(default, skip_serializing_if = "Option::is_none")]
15490 pub total_volume: Option<f64>,
15491 #[serde(default, skip_serializing_if = "Option::is_none")]
15493 pub exact: Option<TraderStatsExact>,
15494}
15495
15496#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15498#[non_exhaustive]
15499pub struct TraderStatsExact {
15500 pub total_volume: ExactDecimal,
15502}
15503
15504#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15505#[non_exhaustive]
15506pub struct TraderStrategy {
15507 pub strategy_type: String,
15509 #[serde(default, skip_serializing_if = "Option::is_none")]
15510 pub description: Option<String>,
15511 #[serde(default, skip_serializing_if = "Option::is_none")]
15512 pub confidence: Option<f64>,
15513}
15514
15515#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15517#[non_exhaustive]
15518pub struct TraderSyncedData {
15519 pub trader_id: i64,
15521 pub wallet: String,
15523}
15524
15525#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15527#[non_exhaustive]
15528pub struct TraderTimeBreakdownBand {
15529 pub category_value: String,
15531 pub n_markets: i64,
15533 #[serde(default)]
15535 pub win_rate: Option<f64>,
15536 #[serde(default)]
15538 pub expectancy: Option<f64>,
15539 #[serde(default)]
15541 pub profit_factor: Option<f64>,
15542 #[serde(default)]
15544 pub total_pnl: Option<f64>,
15545}
15546
15547#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15549#[non_exhaustive]
15550pub struct TraderTimeBreakdowns {
15551 pub by_duration: Vec<TraderTimeBreakdownBand>,
15553 pub by_hour_bucket: Vec<TraderTimeBreakdownBand>,
15555 pub insights: std::collections::BTreeMap<String, String>,
15557}
15558
15559#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15561#[non_exhaustive]
15562pub struct TraderTrust {
15563 pub total_pnl: TrustMetadata,
15565 pub realized_pnl: TrustMetadata,
15567 pub net_total_pnl: TrustMetadata,
15569 #[serde(default, skip_serializing_if = "Option::is_none")]
15571 pub pnl_correction: Option<TrustMetadata>,
15572 pub unrealized_pnl: TrustMetadata,
15573 pub markets_traded: TrustMetadata,
15575 pub win_rate: TrustMetadata,
15577 pub daily_win_rate: TrustMetadata,
15579 pub total_volume: TrustMetadata,
15581 pub grade: TrustMetadata,
15582 pub score: TrustMetadata,
15583 pub forecast_score: TrustMetadata,
15584 pub forecast_evidence: TrustMetadata,
15585 pub rank: TrustMetadata,
15586 pub streak_tier: TrustMetadata,
15587 pub strategy: TrustMetadata,
15588 pub category_strengths: TrustMetadata,
15589 pub quant_metrics: TrustMetadata,
15590 pub last_active: TrustMetadata,
15591 pub synced_at: TrustMetadata,
15592 pub sync_status: TrustMetadata,
15593 pub category_records: TrustMetadata,
15594 pub category_skill_model: TrustMetadata,
15595}
15596
15597#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15598#[non_exhaustive]
15599pub struct TrendingWallet {
15600 pub id: String,
15602 pub address: String,
15603 pub rank: i64,
15605 #[serde(default, skip_serializing_if = "Option::is_none")]
15606 pub username: Option<String>,
15607 #[serde(default, skip_serializing_if = "Option::is_none")]
15609 pub profile_image_url: Option<String>,
15610 pub platform: String,
15612 pub trending_pnl_usd: f64,
15614 #[serde(default, skip_serializing_if = "Option::is_none")]
15616 pub window_volume_usd: Option<f64>,
15617 #[serde(default, skip_serializing_if = "Option::is_none")]
15619 pub window_volume_shares: Option<f64>,
15620 pub window_markets_traded: i64,
15621 pub window_trade_days: i64,
15623 #[serde(default, skip_serializing_if = "Option::is_none")]
15625 pub grade: Option<Grade>,
15626 #[serde(default, skip_serializing_if = "Option::is_none")]
15628 pub streak_tier: Option<StreakTier>,
15629 #[serde(default, skip_serializing_if = "Option::is_none")]
15631 pub in_scope_realized_pnl: Option<f64>,
15632 #[serde(default, skip_serializing_if = "Option::is_none")]
15634 pub all_time_pnl_usd: Option<f64>,
15635 #[serde(default, skip_serializing_if = "Option::is_none")]
15637 pub pnl_correction: Option<PnlCorrection>,
15638 #[serde(default, skip_serializing_if = "Option::is_none")]
15639 pub all_time_score: Option<f64>,
15640 #[serde(default, skip_serializing_if = "Option::is_none")]
15641 pub last_synced: Option<String>,
15642 pub daily_pnl_series: Vec<TrendingWalletDailyPnlSeriesItem>,
15644 pub daily_pnl_series_status: DailyPnlSeriesStatus,
15646}
15647
15648#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15649#[non_exhaustive]
15650pub struct TrendingWalletDailyPnlSeriesItem {
15651 pub date: String,
15652 pub pnl_usd: f64,
15653}
15654
15655#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15657#[non_exhaustive]
15658pub struct TrustCompleteness {
15659 pub status: TrustCompletenessStatus,
15660 #[serde(default, skip_serializing_if = "Option::is_none")]
15661 pub detail: Option<String>,
15662}
15663
15664#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
15666#[non_exhaustive]
15667pub enum TrustCompletenessStatus {
15668 #[serde(rename = "complete")]
15670 Complete,
15671 #[serde(rename = "partial")]
15673 Partial,
15674 #[serde(rename = "not_computed")]
15676 NotComputed,
15677 #[serde(rename = "not_applicable")]
15679 NotApplicable,
15680 #[serde(rename = "unavailable")]
15682 Unavailable,
15683 #[serde(untagged)]
15685 Other(String),
15686}
15687
15688impl TrustCompletenessStatus {
15689 pub fn as_str(&self) -> &str {
15691 match self {
15692 Self::Complete => "complete",
15693 Self::Partial => "partial",
15694 Self::NotComputed => "not_computed",
15695 Self::NotApplicable => "not_applicable",
15696 Self::Unavailable => "unavailable",
15697 Self::Other(value) => value,
15698 }
15699 }
15700}
15701
15702impl From<&str> for TrustCompletenessStatus {
15703 fn from(value: &str) -> Self {
15704 match value {
15705 "complete" => Self::Complete,
15706 "partial" => Self::Partial,
15707 "not_computed" => Self::NotComputed,
15708 "not_applicable" => Self::NotApplicable,
15709 "unavailable" => Self::Unavailable,
15710 other => Self::Other(other.to_owned()),
15711 }
15712 }
15713}
15714
15715impl std::fmt::Display for TrustCompletenessStatus {
15716 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15717 f.write_str(self.as_str())
15718 }
15719}
15720
15721impl AsRef<str> for TrustCompletenessStatus {
15722 fn as_ref(&self) -> &str {
15723 self.as_str()
15724 }
15725}
15726
15727#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15729#[non_exhaustive]
15730pub struct TrustFreshness {
15731 pub status: TrustFreshnessStatus,
15732 #[serde(default, skip_serializing_if = "Option::is_none")]
15733 pub as_of: Option<String>,
15734 #[serde(default, skip_serializing_if = "Option::is_none")]
15735 pub max_age_s: Option<i64>,
15736}
15737
15738#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
15740#[non_exhaustive]
15741pub enum TrustFreshnessStatus {
15742 #[serde(rename = "fresh")]
15744 Fresh,
15745 #[serde(rename = "refreshing")]
15747 Refreshing,
15748 #[serde(rename = "stale")]
15750 Stale,
15751 #[serde(rename = "not_live")]
15753 NotLive,
15754 #[serde(rename = "unknown")]
15756 Unknown,
15757 #[serde(rename = "unavailable")]
15759 Unavailable,
15760 #[serde(untagged)]
15762 Other(String),
15763}
15764
15765impl TrustFreshnessStatus {
15766 pub fn as_str(&self) -> &str {
15768 match self {
15769 Self::Fresh => "fresh",
15770 Self::Refreshing => "refreshing",
15771 Self::Stale => "stale",
15772 Self::NotLive => "not_live",
15773 Self::Unknown => "unknown",
15774 Self::Unavailable => "unavailable",
15775 Self::Other(value) => value,
15776 }
15777 }
15778}
15779
15780impl From<&str> for TrustFreshnessStatus {
15781 fn from(value: &str) -> Self {
15782 match value {
15783 "fresh" => Self::Fresh,
15784 "refreshing" => Self::Refreshing,
15785 "stale" => Self::Stale,
15786 "not_live" => Self::NotLive,
15787 "unknown" => Self::Unknown,
15788 "unavailable" => Self::Unavailable,
15789 other => Self::Other(other.to_owned()),
15790 }
15791 }
15792}
15793
15794impl std::fmt::Display for TrustFreshnessStatus {
15795 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15796 f.write_str(self.as_str())
15797 }
15798}
15799
15800impl AsRef<str> for TrustFreshnessStatus {
15801 fn as_ref(&self) -> &str {
15802 self.as_str()
15803 }
15804}
15805
15806#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15808#[non_exhaustive]
15809pub struct TrustMetadata {
15810 pub source: TrustSource,
15811 pub freshness: TrustFreshness,
15812 pub reconciliation: TrustReconciliation,
15813 pub completeness: TrustCompleteness,
15814}
15815
15816#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15818#[non_exhaustive]
15819pub struct TrustReconciliation {
15820 pub status: TrustReconciliationStatus,
15821 #[serde(default, skip_serializing_if = "Option::is_none")]
15822 pub detail: Option<String>,
15823}
15824
15825#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
15827#[non_exhaustive]
15828pub enum TrustReconciliationStatus {
15829 #[serde(rename = "provider_backed")]
15831 ProviderBacked,
15832 #[serde(rename = "db_mirror")]
15834 DbMirror,
15835 #[serde(rename = "computed")]
15837 Computed,
15838 #[serde(rename = "partial")]
15840 Partial,
15841 #[serde(rename = "not_applicable")]
15843 NotApplicable,
15844 #[serde(rename = "unavailable")]
15846 Unavailable,
15847 #[serde(untagged)]
15849 Other(String),
15850}
15851
15852impl TrustReconciliationStatus {
15853 pub fn as_str(&self) -> &str {
15855 match self {
15856 Self::ProviderBacked => "provider_backed",
15857 Self::DbMirror => "db_mirror",
15858 Self::Computed => "computed",
15859 Self::Partial => "partial",
15860 Self::NotApplicable => "not_applicable",
15861 Self::Unavailable => "unavailable",
15862 Self::Other(value) => value,
15863 }
15864 }
15865}
15866
15867impl From<&str> for TrustReconciliationStatus {
15868 fn from(value: &str) -> Self {
15869 match value {
15870 "provider_backed" => Self::ProviderBacked,
15871 "db_mirror" => Self::DbMirror,
15872 "computed" => Self::Computed,
15873 "partial" => Self::Partial,
15874 "not_applicable" => Self::NotApplicable,
15875 "unavailable" => Self::Unavailable,
15876 other => Self::Other(other.to_owned()),
15877 }
15878 }
15879}
15880
15881impl std::fmt::Display for TrustReconciliationStatus {
15882 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15883 f.write_str(self.as_str())
15884 }
15885}
15886
15887impl AsRef<str> for TrustReconciliationStatus {
15888 fn as_ref(&self) -> &str {
15889 self.as_str()
15890 }
15891}
15892
15893#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15895#[non_exhaustive]
15896pub struct TrustSource {
15897 pub kind: TrustSourceKind,
15898 pub owner: String,
15900 #[serde(default, skip_serializing_if = "Option::is_none")]
15902 pub field: Option<String>,
15903}
15904
15905#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
15907#[non_exhaustive]
15908pub enum TrustSourceKind {
15909 #[serde(rename = "provider")]
15911 Provider,
15912 #[serde(rename = "database")]
15914 Database,
15915 #[serde(rename = "cache")]
15917 Cache,
15918 #[serde(rename = "computed")]
15920 Computed,
15921 #[serde(rename = "client_input")]
15923 ClientInput,
15924 #[serde(rename = "unavailable")]
15926 Unavailable,
15927 #[serde(untagged)]
15929 Other(String),
15930}
15931
15932impl TrustSourceKind {
15933 pub fn as_str(&self) -> &str {
15935 match self {
15936 Self::Provider => "provider",
15937 Self::Database => "database",
15938 Self::Cache => "cache",
15939 Self::Computed => "computed",
15940 Self::ClientInput => "client_input",
15941 Self::Unavailable => "unavailable",
15942 Self::Other(value) => value,
15943 }
15944 }
15945}
15946
15947impl From<&str> for TrustSourceKind {
15948 fn from(value: &str) -> Self {
15949 match value {
15950 "provider" => Self::Provider,
15951 "database" => Self::Database,
15952 "cache" => Self::Cache,
15953 "computed" => Self::Computed,
15954 "client_input" => Self::ClientInput,
15955 "unavailable" => Self::Unavailable,
15956 other => Self::Other(other.to_owned()),
15957 }
15958 }
15959}
15960
15961impl std::fmt::Display for TrustSourceKind {
15962 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15963 f.write_str(self.as_str())
15964 }
15965}
15966
15967impl AsRef<str> for TrustSourceKind {
15968 fn as_ref(&self) -> &str {
15969 self.as_str()
15970 }
15971}
15972
15973#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, Default)]
15974pub struct UpdateWebhookRequest {
15975 #[serde(default, skip_serializing_if = "Option::is_none")]
15976 pub name: Option<String>,
15977 #[serde(default, skip_serializing_if = "Option::is_none")]
15979 pub url: Option<String>,
15980 #[serde(default, skip_serializing_if = "Option::is_none")]
15981 pub event_types: Option<Vec<WebhookEventType>>,
15982 #[serde(default, skip_serializing_if = "Option::is_none")]
15983 pub trade_filters: Option<LargeTradeSubscriptionFilters>,
15984 #[serde(default, skip_serializing_if = "Option::is_none")]
15985 pub enabled: Option<bool>,
15986}
15987
15988#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15989#[non_exhaustive]
15990pub struct UpdateWebhookResponse {
15991 pub object: String,
15992 pub data: WebhookEndpoint,
15993 pub meta: ResponseMeta,
15994}
15995
15996#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
15997#[non_exhaustive]
15998pub struct Usage {
15999 pub object: String,
16000 pub data: UsageData,
16001 pub meta: ResponseMeta,
16002}
16003
16004#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
16005#[non_exhaustive]
16006pub struct UsageData {
16007 pub rate_limit: UsageDataRateLimit,
16008 pub daily_usage: UsageDataDailyUsage,
16010 #[serde(default)]
16012 pub monthly_quota: Option<UsageDataMonthlyQuota>,
16013}
16014
16015#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
16017#[non_exhaustive]
16018pub struct UsageDataDailyUsage {
16019 pub used: i64,
16020 #[serde(default)]
16021 pub limit: Option<i64>,
16022 #[serde(default)]
16023 pub remaining: Option<i64>,
16024 pub reset_at: i64,
16025 pub window_seconds: i64,
16026}
16027
16028#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
16030#[non_exhaustive]
16031pub struct UsageDataMonthlyQuota {
16032 pub used: i64,
16034 pub limit: i64,
16036 pub remaining: i64,
16037 pub reset_at: i64,
16039 pub enforced_from: i64,
16041 pub binding: bool,
16043 pub pay_as_you_go: bool,
16045 #[serde(default)]
16047 pub ceiling: Option<i64>,
16048 #[serde(default)]
16050 pub unavailable_reason: Option<String>,
16051}
16052
16053#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
16054#[non_exhaustive]
16055pub struct UsageDataRateLimit {
16056 pub used: i64,
16057 pub limit: i64,
16059 pub remaining: i64,
16060 pub reset_at: i64,
16061 pub window_seconds: i64,
16062}
16063
16064#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
16065pub struct VerifyWebhookRequest {
16066 pub verification_token: String,
16068}
16069
16070#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
16071#[non_exhaustive]
16072pub struct VerifyWebhookResponse {
16073 pub object: String,
16074 pub data: WebhookEndpoint,
16075 pub meta: ResponseMeta,
16076}
16077
16078#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
16080#[non_exhaustive]
16081pub enum View {
16082 #[serde(rename = "full")]
16084 Full,
16085 #[serde(rename = "totals")]
16087 Totals,
16088 #[serde(untagged)]
16090 Other(String),
16091}
16092
16093impl View {
16094 pub fn as_str(&self) -> &str {
16096 match self {
16097 Self::Full => "full",
16098 Self::Totals => "totals",
16099 Self::Other(value) => value,
16100 }
16101 }
16102}
16103
16104impl From<&str> for View {
16105 fn from(value: &str) -> Self {
16106 match value {
16107 "full" => Self::Full,
16108 "totals" => Self::Totals,
16109 other => Self::Other(other.to_owned()),
16110 }
16111 }
16112}
16113
16114impl std::fmt::Display for View {
16115 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16116 f.write_str(self.as_str())
16117 }
16118}
16119
16120impl AsRef<str> for View {
16121 fn as_ref(&self) -> &str {
16122 self.as_str()
16123 }
16124}
16125
16126#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
16128#[non_exhaustive]
16129pub struct WalletGradeChangedData {
16130 pub wallet: String,
16132 pub trader_id: i64,
16134 pub old_grade: Grade,
16136 pub new_grade: Grade,
16137 pub direction: WalletGradeChangedDataDirection,
16139 pub skill_index: f64,
16141 pub final_score: f64,
16143 pub date: String,
16145}
16146
16147#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
16149#[non_exhaustive]
16150pub enum WalletGradeChangedDataDirection {
16151 #[serde(rename = "upgrade")]
16153 Upgrade,
16154 #[serde(rename = "downgrade")]
16156 Downgrade,
16157 #[serde(untagged)]
16159 Other(String),
16160}
16161
16162impl WalletGradeChangedDataDirection {
16163 pub fn as_str(&self) -> &str {
16165 match self {
16166 Self::Upgrade => "upgrade",
16167 Self::Downgrade => "downgrade",
16168 Self::Other(value) => value,
16169 }
16170 }
16171}
16172
16173impl From<&str> for WalletGradeChangedDataDirection {
16174 fn from(value: &str) -> Self {
16175 match value {
16176 "upgrade" => Self::Upgrade,
16177 "downgrade" => Self::Downgrade,
16178 other => Self::Other(other.to_owned()),
16179 }
16180 }
16181}
16182
16183impl std::fmt::Display for WalletGradeChangedDataDirection {
16184 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16185 f.write_str(self.as_str())
16186 }
16187}
16188
16189impl AsRef<str> for WalletGradeChangedDataDirection {
16190 fn as_ref(&self) -> &str {
16191 self.as_str()
16192 }
16193}
16194
16195#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
16197#[non_exhaustive]
16198pub struct WebhookDelivery {
16199 pub id: i64,
16200 pub object: String,
16201 pub event_id: String,
16203 pub event_type: WebhookEventType,
16204 pub status: String,
16206 pub attempt_count: i64,
16208 #[serde(default, skip_serializing_if = "Option::is_none")]
16210 pub last_response_status: Option<i64>,
16211 #[serde(default, skip_serializing_if = "Option::is_none")]
16213 pub last_error: Option<String>,
16214 #[serde(default, skip_serializing_if = "Option::is_none")]
16216 pub delivered_at: Option<String>,
16217 #[serde(default)]
16219 pub next_attempt_at: Option<String>,
16220 #[serde(default)]
16222 pub retry_schedule_reason: Option<RetryScheduleReason>,
16223 pub created_at: String,
16224}
16225
16226#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
16227#[non_exhaustive]
16228pub struct WebhookEndpoint {
16229 pub id: i64,
16230 pub object: String,
16231 pub name: String,
16232 pub url: String,
16233 pub event_types: Vec<WebhookEventType>,
16234 pub trade_filters: LargeTradeSubscriptionFilters,
16235 pub status: WebhookStatus,
16236 #[serde(default)]
16237 pub verified_at: Option<String>,
16238 pub verification_token_expires_at: String,
16239 pub failure_count: i64,
16240 pub created_at: String,
16241 pub updated_at: String,
16242 pub retry_policy: WebhookRetryPolicy,
16243 pub secret_rotation: WebhookSecretRotation,
16244 #[serde(default, skip_serializing_if = "Option::is_none")]
16246 pub signing_secret: Option<String>,
16247 #[serde(default, skip_serializing_if = "Option::is_none")]
16248 pub verification: Option<WebhookVerification>,
16249}
16250
16251#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
16253#[non_exhaustive]
16254pub struct WebhookEventDescriptor {
16255 pub id: WebhookEventType,
16256 pub description: String,
16258 pub payload_shape: String,
16260 pub status: WebhookEventDescriptorStatus,
16262}
16263
16264#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
16266#[non_exhaustive]
16267pub enum WebhookEventDescriptorStatus {
16268 #[serde(rename = "active")]
16270 Active,
16271 #[serde(rename = "dormant")]
16273 Dormant,
16274 #[serde(untagged)]
16276 Other(String),
16277}
16278
16279impl WebhookEventDescriptorStatus {
16280 pub fn as_str(&self) -> &str {
16282 match self {
16283 Self::Active => "active",
16284 Self::Dormant => "dormant",
16285 Self::Other(value) => value,
16286 }
16287 }
16288}
16289
16290impl From<&str> for WebhookEventDescriptorStatus {
16291 fn from(value: &str) -> Self {
16292 match value {
16293 "active" => Self::Active,
16294 "dormant" => Self::Dormant,
16295 other => Self::Other(other.to_owned()),
16296 }
16297 }
16298}
16299
16300impl std::fmt::Display for WebhookEventDescriptorStatus {
16301 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16302 f.write_str(self.as_str())
16303 }
16304}
16305
16306impl AsRef<str> for WebhookEventDescriptorStatus {
16307 fn as_ref(&self) -> &str {
16308 self.as_str()
16309 }
16310}
16311
16312#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
16314#[non_exhaustive]
16315pub enum WebhookEventType {
16316 #[serde(rename = "large_trade_inserted_v2")]
16318 LargeTradeInsertedV2,
16319 #[serde(rename = "large_trades_inserted")]
16321 LargeTradesInserted,
16322 #[serde(rename = "whale_trades_inserted")]
16324 WhaleTradesInserted,
16325 #[serde(rename = "live_sports_updated")]
16327 LiveSportsUpdated,
16328 #[serde(rename = "trader_synced")]
16330 TraderSynced,
16331 #[serde(rename = "whale_trader_synced")]
16333 WhaleTraderSynced,
16334 #[serde(rename = "large_positions_updated")]
16336 LargePositionsUpdated,
16337 #[serde(rename = "wallet_grade_changed")]
16339 WalletGradeChanged,
16340 #[serde(rename = "suspicious_trade_flagged")]
16342 SuspiciousTradeFlagged,
16343 #[serde(rename = "insider_radar_flag_raised")]
16345 InsiderRadarFlagRaised,
16346 #[serde(rename = "sharp_money_flow_detected")]
16348 SharpMoneyFlowDetected,
16349 #[serde(rename = "smart_money_flow_detected")]
16351 SmartMoneyFlowDetected,
16352 #[serde(rename = "export_job_ready")]
16354 ExportJobReady,
16355 #[serde(rename = "export_job_failed")]
16357 ExportJobFailed,
16358 #[serde(rename = "export_job_expired")]
16360 ExportJobExpired,
16361 #[serde(rename = "export_job_cancelled")]
16363 ExportJobCancelled,
16364 #[serde(untagged)]
16366 Other(String),
16367}
16368
16369impl WebhookEventType {
16370 pub fn as_str(&self) -> &str {
16372 match self {
16373 Self::LargeTradeInsertedV2 => "large_trade_inserted_v2",
16374 Self::LargeTradesInserted => "large_trades_inserted",
16375 Self::WhaleTradesInserted => "whale_trades_inserted",
16376 Self::LiveSportsUpdated => "live_sports_updated",
16377 Self::TraderSynced => "trader_synced",
16378 Self::WhaleTraderSynced => "whale_trader_synced",
16379 Self::LargePositionsUpdated => "large_positions_updated",
16380 Self::WalletGradeChanged => "wallet_grade_changed",
16381 Self::SuspiciousTradeFlagged => "suspicious_trade_flagged",
16382 Self::InsiderRadarFlagRaised => "insider_radar_flag_raised",
16383 Self::SharpMoneyFlowDetected => "sharp_money_flow_detected",
16384 Self::SmartMoneyFlowDetected => "smart_money_flow_detected",
16385 Self::ExportJobReady => "export_job_ready",
16386 Self::ExportJobFailed => "export_job_failed",
16387 Self::ExportJobExpired => "export_job_expired",
16388 Self::ExportJobCancelled => "export_job_cancelled",
16389 Self::Other(value) => value,
16390 }
16391 }
16392}
16393
16394impl From<&str> for WebhookEventType {
16395 fn from(value: &str) -> Self {
16396 match value {
16397 "large_trade_inserted_v2" => Self::LargeTradeInsertedV2,
16398 "large_trades_inserted" => Self::LargeTradesInserted,
16399 "whale_trades_inserted" => Self::WhaleTradesInserted,
16400 "live_sports_updated" => Self::LiveSportsUpdated,
16401 "trader_synced" => Self::TraderSynced,
16402 "whale_trader_synced" => Self::WhaleTraderSynced,
16403 "large_positions_updated" => Self::LargePositionsUpdated,
16404 "wallet_grade_changed" => Self::WalletGradeChanged,
16405 "suspicious_trade_flagged" => Self::SuspiciousTradeFlagged,
16406 "insider_radar_flag_raised" => Self::InsiderRadarFlagRaised,
16407 "sharp_money_flow_detected" => Self::SharpMoneyFlowDetected,
16408 "smart_money_flow_detected" => Self::SmartMoneyFlowDetected,
16409 "export_job_ready" => Self::ExportJobReady,
16410 "export_job_failed" => Self::ExportJobFailed,
16411 "export_job_expired" => Self::ExportJobExpired,
16412 "export_job_cancelled" => Self::ExportJobCancelled,
16413 other => Self::Other(other.to_owned()),
16414 }
16415 }
16416}
16417
16418impl std::fmt::Display for WebhookEventType {
16419 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16420 f.write_str(self.as_str())
16421 }
16422}
16423
16424impl AsRef<str> for WebhookEventType {
16425 fn as_ref(&self) -> &str {
16426 self.as_str()
16427 }
16428}
16429
16430#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
16431#[non_exhaustive]
16432pub struct WebhookRetryPolicy {
16433 pub max_attempts: i64,
16434 pub terminal_status: String,
16435 pub retry_horizon_seconds: i64,
16437 pub disable_after_consecutive_failures: i64,
16439}
16440
16441#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
16442#[non_exhaustive]
16443pub struct WebhookSecretRotation {
16444 pub status: WebhookSecretRotationStatus,
16446 #[serde(default)]
16448 pub overlap_expires_at: Option<String>,
16449}
16450
16451#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
16453#[non_exhaustive]
16454pub enum WebhookSecretRotationStatus {
16455 #[serde(rename = "idle")]
16457 Idle,
16458 #[serde(rename = "pending")]
16460 Pending,
16461 #[serde(rename = "overlap")]
16463 Overlap,
16464 #[serde(untagged)]
16466 Other(String),
16467}
16468
16469impl WebhookSecretRotationStatus {
16470 pub fn as_str(&self) -> &str {
16472 match self {
16473 Self::Idle => "idle",
16474 Self::Pending => "pending",
16475 Self::Overlap => "overlap",
16476 Self::Other(value) => value,
16477 }
16478 }
16479}
16480
16481impl From<&str> for WebhookSecretRotationStatus {
16482 fn from(value: &str) -> Self {
16483 match value {
16484 "idle" => Self::Idle,
16485 "pending" => Self::Pending,
16486 "overlap" => Self::Overlap,
16487 other => Self::Other(other.to_owned()),
16488 }
16489 }
16490}
16491
16492impl std::fmt::Display for WebhookSecretRotationStatus {
16493 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16494 f.write_str(self.as_str())
16495 }
16496}
16497
16498impl AsRef<str> for WebhookSecretRotationStatus {
16499 fn as_ref(&self) -> &str {
16500 self.as_str()
16501 }
16502}
16503
16504#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
16506#[non_exhaustive]
16507pub enum WebhookStatus {
16508 #[serde(rename = "pending_verification")]
16510 PendingVerification,
16511 #[serde(rename = "active")]
16513 Active,
16514 #[serde(rename = "disabled")]
16516 Disabled,
16517 #[serde(untagged)]
16519 Other(String),
16520}
16521
16522impl WebhookStatus {
16523 pub fn as_str(&self) -> &str {
16525 match self {
16526 Self::PendingVerification => "pending_verification",
16527 Self::Active => "active",
16528 Self::Disabled => "disabled",
16529 Self::Other(value) => value,
16530 }
16531 }
16532}
16533
16534impl From<&str> for WebhookStatus {
16535 fn from(value: &str) -> Self {
16536 match value {
16537 "pending_verification" => Self::PendingVerification,
16538 "active" => Self::Active,
16539 "disabled" => Self::Disabled,
16540 other => Self::Other(other.to_owned()),
16541 }
16542 }
16543}
16544
16545impl std::fmt::Display for WebhookStatus {
16546 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16547 f.write_str(self.as_str())
16548 }
16549}
16550
16551impl AsRef<str> for WebhookStatus {
16552 fn as_ref(&self) -> &str {
16553 self.as_str()
16554 }
16555}
16556
16557#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
16558#[non_exhaustive]
16559pub struct WebhookVerification {
16560 pub token: String,
16562 pub expires_at: String,
16563}
16564
16565#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
16566#[non_exhaustive]
16567pub struct WebhookVerificationAttempt {
16568 pub id: String,
16569 pub object: String,
16570 pub webhook_id: i64,
16571 pub state: WebhookVerificationAttemptState,
16573 #[serde(default)]
16575 pub outcome: Option<WebhookVerificationAttemptOutcome>,
16576 pub attempt_count: i64,
16577 pub max_attempts: i64,
16578 pub expires_at: String,
16580 #[serde(default)]
16582 pub next_attempt_at: Option<String>,
16583 #[serde(default)]
16585 pub last_response_status: Option<i64>,
16586 #[serde(default)]
16587 pub started_at: Option<String>,
16588 #[serde(default)]
16589 pub completed_at: Option<String>,
16590 pub created_at: String,
16591 pub updated_at: String,
16592 pub status_url: String,
16594}
16595
16596#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
16598#[non_exhaustive]
16599pub enum WebhookVerificationAttemptOutcome {
16600 #[serde(rename = "verified")]
16602 Verified,
16603 #[serde(rename = "target_rejected")]
16605 TargetRejected,
16606 #[serde(rename = "challenge_timeout")]
16608 ChallengeTimeout,
16609 #[serde(rename = "transport_failed")]
16611 TransportFailed,
16612 #[serde(rename = "receiver_rejected")]
16614 ReceiverRejected,
16615 #[serde(rename = "token_expired")]
16617 TokenExpired,
16618 #[serde(rename = "endpoint_changed")]
16620 EndpointChanged,
16621 #[serde(rename = "owner_revoked")]
16623 OwnerRevoked,
16624 #[serde(rename = "attempts_exhausted")]
16626 AttemptsExhausted,
16627 #[serde(rename = "internal_error")]
16629 InternalError,
16630 #[serde(untagged)]
16632 Other(String),
16633}
16634
16635impl WebhookVerificationAttemptOutcome {
16636 pub fn as_str(&self) -> &str {
16638 match self {
16639 Self::Verified => "verified",
16640 Self::TargetRejected => "target_rejected",
16641 Self::ChallengeTimeout => "challenge_timeout",
16642 Self::TransportFailed => "transport_failed",
16643 Self::ReceiverRejected => "receiver_rejected",
16644 Self::TokenExpired => "token_expired",
16645 Self::EndpointChanged => "endpoint_changed",
16646 Self::OwnerRevoked => "owner_revoked",
16647 Self::AttemptsExhausted => "attempts_exhausted",
16648 Self::InternalError => "internal_error",
16649 Self::Other(value) => value,
16650 }
16651 }
16652}
16653
16654impl From<&str> for WebhookVerificationAttemptOutcome {
16655 fn from(value: &str) -> Self {
16656 match value {
16657 "verified" => Self::Verified,
16658 "target_rejected" => Self::TargetRejected,
16659 "challenge_timeout" => Self::ChallengeTimeout,
16660 "transport_failed" => Self::TransportFailed,
16661 "receiver_rejected" => Self::ReceiverRejected,
16662 "token_expired" => Self::TokenExpired,
16663 "endpoint_changed" => Self::EndpointChanged,
16664 "owner_revoked" => Self::OwnerRevoked,
16665 "attempts_exhausted" => Self::AttemptsExhausted,
16666 "internal_error" => Self::InternalError,
16667 other => Self::Other(other.to_owned()),
16668 }
16669 }
16670}
16671
16672impl std::fmt::Display for WebhookVerificationAttemptOutcome {
16673 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16674 f.write_str(self.as_str())
16675 }
16676}
16677
16678impl AsRef<str> for WebhookVerificationAttemptOutcome {
16679 fn as_ref(&self) -> &str {
16680 self.as_str()
16681 }
16682}
16683
16684#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
16686#[non_exhaustive]
16687pub enum WebhookVerificationAttemptState {
16688 #[serde(rename = "queued")]
16690 Queued,
16691 #[serde(rename = "running")]
16693 Running,
16694 #[serde(rename = "verified")]
16696 Verified,
16697 #[serde(rename = "failed")]
16699 Failed,
16700 #[serde(rename = "cancelled")]
16702 Cancelled,
16703 #[serde(rename = "expired")]
16705 Expired,
16706 #[serde(untagged)]
16708 Other(String),
16709}
16710
16711impl WebhookVerificationAttemptState {
16712 pub fn as_str(&self) -> &str {
16714 match self {
16715 Self::Queued => "queued",
16716 Self::Running => "running",
16717 Self::Verified => "verified",
16718 Self::Failed => "failed",
16719 Self::Cancelled => "cancelled",
16720 Self::Expired => "expired",
16721 Self::Other(value) => value,
16722 }
16723 }
16724}
16725
16726impl From<&str> for WebhookVerificationAttemptState {
16727 fn from(value: &str) -> Self {
16728 match value {
16729 "queued" => Self::Queued,
16730 "running" => Self::Running,
16731 "verified" => Self::Verified,
16732 "failed" => Self::Failed,
16733 "cancelled" => Self::Cancelled,
16734 "expired" => Self::Expired,
16735 other => Self::Other(other.to_owned()),
16736 }
16737 }
16738}
16739
16740impl std::fmt::Display for WebhookVerificationAttemptState {
16741 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16742 f.write_str(self.as_str())
16743 }
16744}
16745
16746impl AsRef<str> for WebhookVerificationAttemptState {
16747 fn as_ref(&self) -> &str {
16748 self.as_str()
16749 }
16750}
16751
16752#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
16753#[non_exhaustive]
16754pub struct WhaleDatasetArtifactManifest {
16755 pub manifest_version: String,
16757 pub format: String,
16758 pub schema_version: String,
16759 pub coverage: String,
16760 pub generation: WhaleDatasetGeneration,
16761 pub row_count: i64,
16763 pub content_size_bytes: i64,
16765 pub content_sha256: String,
16767 pub compressed_size_bytes: i64,
16769 pub compressed_sha256: String,
16771}
16772
16773#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
16774#[non_exhaustive]
16775pub struct WhaleDatasetContinuation {
16776 pub path: String,
16777 pub cursor: String,
16779 pub from_commit_xid: String,
16781 #[serde(default)]
16782 pub condition_id: Option<String>,
16783 #[serde(default)]
16785 pub min_size: Option<String>,
16786 pub deduplication_identity: String,
16787 pub time_window_applies_to_deltas: bool,
16788 pub delivery: String,
16789}
16790
16791#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
16793#[non_exhaustive]
16794pub struct WhaleDatasetFilters {
16795 pub from: String,
16796 pub to: String,
16797 #[serde(default)]
16798 pub condition_id: Option<String>,
16799 #[serde(default)]
16800 pub min_size_cents: Option<i64>,
16801}
16802
16803#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
16804#[non_exhaustive]
16805pub struct WhaleDatasetGeneration {
16806 pub dataset_schema_version: String,
16807 pub id: String,
16808 pub selected_at: String,
16809 pub consistency: String,
16810 pub filters: WhaleDatasetFilters,
16811 pub commit_horizon_xid: String,
16813 pub continuation: WhaleDatasetContinuation,
16814 pub source: String,
16815 pub coverage: String,
16817 pub expires_at: String,
16818 pub extraction_elapsed_ms: i64,
16819}
16820
16821#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
16822#[non_exhaustive]
16823pub struct WhaleDatasetJob {
16824 pub object: String,
16825 pub data: WhaleDatasetJobData,
16826 pub meta: ResponseMeta,
16827}
16828
16829#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
16830#[non_exhaustive]
16831pub struct WhaleDatasetJobData {
16832 pub job_id: i64,
16833 pub status: TraderExportJobDataStatus,
16835 pub format: String,
16836 #[serde(default)]
16837 pub total_trades: Option<i64>,
16838 #[serde(default)]
16839 pub processed_trades: Option<i64>,
16840 #[serde(default)]
16841 pub file_size: Option<i64>,
16842 #[serde(default)]
16843 pub error: Option<String>,
16844 pub terminal: bool,
16846 pub next_action: NextAction,
16848 #[serde(default, skip_serializing_if = "Option::is_none")]
16850 pub poll_after_s: Option<i64>,
16851 pub created_at: String,
16852 #[serde(default)]
16854 pub started_at: Option<String>,
16855 #[serde(default)]
16857 pub ready_at: Option<String>,
16858 #[serde(default)]
16859 pub failed_at: Option<String>,
16860 pub expires_at: String,
16862 #[serde(default)]
16864 pub expired_at: Option<String>,
16865 #[serde(default)]
16867 pub data_as_of: Option<String>,
16868 #[serde(default)]
16870 pub cancel_requested_at: Option<String>,
16871 #[serde(default)]
16873 pub cancelled_at: Option<String>,
16874 pub attempt: i64,
16876 pub max_attempts: i64,
16878 #[serde(default, skip_serializing_if = "Option::is_none")]
16880 pub artifact: Option<WhaleDatasetJobDataArtifact>,
16881 pub filters: WhaleDatasetFilters,
16882}
16883
16884#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
16886#[non_exhaustive]
16887pub struct WhaleDatasetJobDataArtifact {
16888 pub artifact_id: String,
16890 #[serde(default)]
16892 pub etag: Option<String>,
16893 #[serde(default)]
16895 pub compressed_size_bytes: Option<i64>,
16896 pub content_type: String,
16897 pub content_encoding: String,
16898 #[serde(default)]
16900 pub manifest: Option<WhaleDatasetArtifactManifest>,
16901}
16902
16903#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
16904#[non_exhaustive]
16905pub struct WhaleDatasetTrade {
16906 pub id: String,
16908 pub sequence: String,
16910 pub trader_id: String,
16912 pub condition_id: String,
16913 pub platform: String,
16914 pub traded_at: String,
16915 pub side: Side,
16916 #[serde(default)]
16918 pub outcome_index: Option<i64>,
16919 pub price: String,
16921 pub size_usd: String,
16923 pub inserted_xid: String,
16925 pub trade_event_id: String,
16927 #[serde(default)]
16928 pub source_trade_ingested_at: Option<String>,
16929}
16930
16931#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
16933#[non_exhaustive]
16934pub enum Window {
16935 #[serde(rename = "24h")]
16937 V24h,
16938 #[serde(rename = "7d")]
16940 V7d,
16941 #[serde(rename = "all")]
16943 All,
16944 #[serde(untagged)]
16946 Other(String),
16947}
16948
16949impl Window {
16950 pub fn as_str(&self) -> &str {
16952 match self {
16953 Self::V24h => "24h",
16954 Self::V7d => "7d",
16955 Self::All => "all",
16956 Self::Other(value) => value,
16957 }
16958 }
16959}
16960
16961impl From<&str> for Window {
16962 fn from(value: &str) -> Self {
16963 match value {
16964 "24h" => Self::V24h,
16965 "7d" => Self::V7d,
16966 "all" => Self::All,
16967 other => Self::Other(other.to_owned()),
16968 }
16969 }
16970}
16971
16972impl std::fmt::Display for Window {
16973 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16974 f.write_str(self.as_str())
16975 }
16976}
16977
16978impl AsRef<str> for Window {
16979 fn as_ref(&self) -> &str {
16980 self.as_str()
16981 }
16982}
16983
16984#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
16986#[non_exhaustive]
16987pub enum WithdrawalReason {
16988 #[serde(rename = "provider_game_cancelled")]
16990 ProviderGameCancelled,
16991 #[serde(rename = "published_after_kickoff")]
16993 PublishedAfterKickoff,
16994 #[serde(untagged)]
16996 Other(String),
16997}
16998
16999impl WithdrawalReason {
17000 pub fn as_str(&self) -> &str {
17002 match self {
17003 Self::ProviderGameCancelled => "provider_game_cancelled",
17004 Self::PublishedAfterKickoff => "published_after_kickoff",
17005 Self::Other(value) => value,
17006 }
17007 }
17008}
17009
17010impl From<&str> for WithdrawalReason {
17011 fn from(value: &str) -> Self {
17012 match value {
17013 "provider_game_cancelled" => Self::ProviderGameCancelled,
17014 "published_after_kickoff" => Self::PublishedAfterKickoff,
17015 other => Self::Other(other.to_owned()),
17016 }
17017 }
17018}
17019
17020impl std::fmt::Display for WithdrawalReason {
17021 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
17022 f.write_str(self.as_str())
17023 }
17024}
17025
17026impl AsRef<str> for WithdrawalReason {
17027 fn as_ref(&self) -> &str {
17028 self.as_str()
17029 }
17030}