Skip to content

Commit 541f91b

Browse files
author
Build System
committed
'Protobuf files change'
1 parent 0c89adf commit 541f91b

1 file changed

Lines changed: 136 additions & 0 deletions

File tree

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
// Copyright (c) 2021 Systemathics
2+
//
3+
// Permission is hereby granted, free of charge, to any person obtaining a copy
4+
// of this software and associated documentation files (the "Software"), to deal
5+
// in the Software without restriction, including without limitation the rights
6+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
// copies of the Software, and to permit persons to whom the Software is
8+
// furnished to do so, subject to the following conditions:
9+
//
10+
// The above copyright notice and this permission notice shall be included in all
11+
// copies or substantial portions of the Software.
12+
//
13+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
// SOFTWARE.
20+
21+
// <i>PRIIPs</i> regulation EU-wide rules governing information disclosure for all Packaged Retail and Insurance-based Investment Products (PRIIPs).
22+
// <br>Essentially, this covers any investment product used by a retail consumer that isn�t a UCITS fund.
23+
// <br>The method used to determine implicit transaction costs is the full PRIIPs method, also known as the arrival price methodology.
24+
syntax = "proto3";
25+
26+
import "google/protobuf/timestamp.proto";
27+
import "google/protobuf/duration.proto";
28+
29+
import "systemathics/apis/type/shared/v1/identifier.proto";
30+
31+
package systemathics.apis.services.tick_analytics.v1;
32+
33+
// Called to request TickPriipsService.
34+
service TickPriipsService
35+
{
36+
// Gets PRIIPs transaction cost analytics
37+
rpc TickPriips(TickPriipsRequest) returns (stream TickPriipsResponse);
38+
}
39+
40+
// The required input to request the TickPriipsService.
41+
message TickPriipsRequest
42+
{
43+
// [Mandatory] The instrument identifier: a ticker and exchange
44+
systemathics.apis.type.shared.v1.Identifier identifier = 1;
45+
46+
// [Mandatory] The order time stamp
47+
google.protobuf.Timestamp order_time = 2;
48+
49+
// [Mandatory] The execution time stamp
50+
google.protobuf.Timestamp execution_time = 3;
51+
52+
// [Mandatory] The execution price
53+
double execution_price = 4;
54+
55+
// [Optional] The price used to calculate the PRIIPs, by default the field is set to Trade
56+
PriipsPrice field = 5;
57+
58+
// [Optional] The latency, by default the latency is set to 00:00:00 (no latency)
59+
google.protobuf.Duration latency = 6;
60+
61+
// [Optional] Accept trading / quote conditions, by default the accept is set to null : accept all
62+
repeated string accept = 7;
63+
64+
// [Optional] Rejected trading / quote conditions, by default the reject is set to null : do not reject
65+
repeated string reject = 8;
66+
}
67+
68+
// Contains the PRIIPs data: timestamp, price, volume and ticks count.
69+
message TickPriipsResponse
70+
{
71+
// The arrival time stamp of the first trade when the market or the broker received the order
72+
google.protobuf.Timestamp arrival_time = 1;
73+
74+
// The arrival price is the mid price at the exact time the trade is sent to the market (or broker)
75+
double arrival_price = 2;
76+
77+
// The the arrival cost is the difference between the average execution price and the arrival price, expressed as a percentage
78+
//<br> Arrival Cost = (Execution Price - Arrival Price) / Arrival Price
79+
double arrival_cost = 3;
80+
81+
// The open time : first trade time stamp just after the order time
82+
google.protobuf.Timestamp open_time = 4;
83+
84+
// The close time : the last time stamp just after the execution time
85+
google.protobuf.Timestamp close_time = 5;
86+
87+
// The order time : the time stamp of te client's order
88+
google.protobuf.Timestamp order_time = 6;
89+
90+
// The execution time : the last time stamp of the oder execution
91+
google.protobuf.Timestamp execution_time = 7;
92+
93+
// The working period = Close Time - Arrival Time
94+
google.protobuf.Duration duration = 8;
95+
96+
// The latency : the time interval between the cliet's order time and the market's order received time
97+
google.protobuf.Duration latency = 9;
98+
99+
// The execution price : the execution price is the price achieved for the whole trade, or the average price achieved where the trade has been broken down into multiple parts
100+
double execution_price = 10;
101+
102+
// The total count of trades during the working period
103+
int64 count = 11;
104+
105+
// The open price of the working period
106+
double open_price = 12;
107+
108+
// The highest price of the working period
109+
double high_price = 13;
110+
111+
// The lowest price of the working period
112+
double low_price = 14;
113+
114+
// The close price of the working period
115+
double close_price = 15;
116+
117+
// The volume weighted average price of the working period
118+
double vwap = 16;
119+
120+
// The total volume of the working period
121+
int64 volume = 17;
122+
}
123+
124+
// The price types used to compute the Priips
125+
enum PriipsPrice
126+
{
127+
// The unspecfied field
128+
PRIIPS_PRICE_UNSPECIFIED = 0;
129+
// The last trade price
130+
PRIIPS_PRICE_TRADE = 1;
131+
// The best bid price
132+
PRIIPS_PRICE_BID = 2;
133+
// The best ask price
134+
PRIIPS_PRICE_ASK = 3;
135+
}
136+

0 commit comments

Comments
 (0)