Skip to main content

arvo_api/generated/
arvo.session.v1.rs

1// This file is @generated by prost-build.
2#[derive(serde::Serialize, serde::Deserialize)]
3#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4pub struct StartRequest {
5    /// The finding whose rule runs: its selected experiment, warmed on the
6    /// library from the finding's own start to today.
7    #[prost(string, tag = "1")]
8    pub finding: ::prost::alloc::string::String,
9    /// `alpaca-paper`, `alpaca-live`, or `robinhood-<last four>`.
10    #[prost(string, tag = "2")]
11    pub executor: ::prost::alloc::string::String,
12}
13#[derive(serde::Serialize, serde::Deserialize)]
14#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
15pub struct SessionId {
16    #[prost(string, tag = "1")]
17    pub id: ::prost::alloc::string::String,
18}
19/// The kill switch (#127): arm the gate, then flatten everything the session
20/// holds. The halt is in force either way; what the venue would not exit is
21/// named in the session record.
22#[derive(serde::Serialize, serde::Deserialize)]
23#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
24pub struct HaltRequest {
25    #[prost(string, tag = "1")]
26    pub id: ::prost::alloc::string::String,
27    /// Why, for the record. Empty means "a person pressed it".
28    #[prost(string, tag = "2")]
29    pub reason: ::prost::alloc::string::String,
30}
31#[derive(serde::Serialize, serde::Deserialize)]
32#[derive(Clone, PartialEq, ::prost::Message)]
33pub struct SessionStatus {
34    #[prost(string, tag = "1")]
35    pub id: ::prost::alloc::string::String,
36    #[prost(string, tag = "2")]
37    pub finding: ::prost::alloc::string::String,
38    #[prost(string, tag = "3")]
39    pub executor: ::prost::alloc::string::String,
40    #[prost(string, tag = "4")]
41    pub instrument: ::prost::alloc::string::String,
42    #[prost(string, tag = "5")]
43    pub strategy: ::prost::alloc::string::String,
44    #[prost(string, tag = "6")]
45    pub started_at: ::prost::alloc::string::String,
46    /// starting, running, frozen, halted, stopped or failed.
47    #[prost(string, tag = "7")]
48    pub state: ::prost::alloc::string::String,
49    #[prost(uint32, tag = "8")]
50    pub signals: u32,
51    #[prost(uint32, tag = "9")]
52    pub submitted: u32,
53    #[prost(uint32, tag = "10")]
54    pub refused: u32,
55    #[prost(uint32, tag = "11")]
56    pub fills: u32,
57    /// Why the gate halted, when it did.
58    #[prost(string, optional, tag = "12")]
59    pub halted: ::core::option::Option<::prost::alloc::string::String>,
60    #[prost(string, optional, tag = "13")]
61    pub last_error: ::core::option::Option<::prost::alloc::string::String>,
62    #[prost(string, optional, tag = "14")]
63    pub last_bar: ::core::option::Option<::prost::alloc::string::String>,
64    /// What the gate and the venue disagreed about, while frozen (#187).
65    #[prost(string, optional, tag = "15")]
66    pub frozen: ::core::option::Option<::prost::alloc::string::String>,
67    /// Whether a frozen session has been reconciled, so ResumeSession is allowed.
68    #[prost(bool, tag = "16")]
69    pub reconciled: bool,
70    /// Whether the rule is still the rule its finding described: holding,
71    /// diverging or inconclusive, judged from the session's own trades against
72    /// the finding's out-of-sample expectation (#221). Never a risk limit.
73    #[prost(string, tag = "17")]
74    pub verdict: ::prost::alloc::string::String,
75    /// Why it is diverging, when it is: what was seen against what was expected.
76    #[prost(string, optional, tag = "18")]
77    pub verdict_reason: ::core::option::Option<::prost::alloc::string::String>,
78    /// The gate's limits this session is within four fifths of (#191), in the
79    /// gate's words: "drawdown 8.1% of a 10.0% limit". Empty while halted.
80    #[prost(string, repeated, tag = "19")]
81    pub warnings: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
82    /// What the fills cost against the decision prices (#18): the divergence a
83    /// paper session exists to measure. Absent until something filled.
84    #[prost(message, optional, tag = "20")]
85    pub divergence: ::core::option::Option<Divergence>,
86}
87/// Measured against assumed, over a session's fills so far (#18).
88#[derive(serde::Serialize, serde::Deserialize)]
89#[derive(Clone, Copy, PartialEq, ::prost::Message)]
90pub struct Divergence {
91    #[prost(uint32, tag = "1")]
92    pub fills: u32,
93    /// Approved orders that never filled. Never averaged into the slippage: a
94    /// backtest assumes every order fills, so this has nothing to compare to.
95    #[prost(uint32, tag = "2")]
96    pub unfilled: u32,
97    /// Mean adverse slippage across the fills, in basis points; positive is
98    /// worse than the decision price, whichever way the order went.
99    #[prost(double, tag = "3")]
100    pub mean_slippage_bps: f64,
101    #[prost(double, tag = "4")]
102    pub worst_slippage_bps: f64,
103    /// Signal to fill.
104    #[prost(double, tag = "5")]
105    pub mean_latency_ms: f64,
106    #[prost(int64, tag = "6")]
107    pub worst_latency_ms: i64,
108    /// What the finding's cost model assumed, so the difference is readable.
109    #[prost(double, optional, tag = "7")]
110    pub assumed_slippage_bps: ::core::option::Option<f64>,
111}
112/// The promotion gate's answer for one finding and one executor (#194).
113#[derive(serde::Serialize, serde::Deserialize)]
114#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
115pub struct PromotionView {
116    #[prost(bool, tag = "1")]
117    pub allowed: bool,
118    /// Every reason it is not, in the gate's words. Empty when allowed.
119    #[prost(string, repeated, tag = "2")]
120    pub reasons: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
121    /// The finding's own verdict: Supported, NotSupported or Inconclusive.
122    /// Empty when the finding cannot be opened.
123    #[prost(string, tag = "3")]
124    pub verdict: ::prost::alloc::string::String,
125    /// Days the finding has run on paper, by its paper record; absent when it
126    /// has not.
127    #[prost(int64, optional, tag = "4")]
128    pub paper_days: ::core::option::Option<i64>,
129    /// The paper session's last verdict against the finding (holding,
130    /// diverging, inconclusive), when it has one.
131    #[prost(string, optional, tag = "5")]
132    pub paper_verdict: ::core::option::Option<::prost::alloc::string::String>,
133}
134#[derive(serde::Serialize, serde::Deserialize)]
135#[derive(Clone, PartialEq, ::prost::Message)]
136pub struct SessionList {
137    #[prost(message, repeated, tag = "1")]
138    pub sessions: ::prost::alloc::vec::Vec<SessionStatus>,
139}