Skip to content

Commit 45576c1

Browse files
author
Build System
committed
'Protobuf files change'
1 parent b0390cd commit 45576c1

5 files changed

Lines changed: 231 additions & 0 deletions

File tree

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
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+
// Normalized tick by tick data extraction for a given watchlist and a specific look-back period. This can be useful to:
22+
// <br>- Get specific historical dataset such as trades, top of book data...
23+
// <br>- Compute analytics on the top of preselected tick by tick data dataset
24+
// <br>- Feed best execution reports for a given watchlist over the time
25+
syntax = "proto3";
26+
27+
import "google/protobuf/timestamp.proto";
28+
import "google/protobuf/wrappers.proto";
29+
30+
import "systemathics/apis/type/shared/v1/constraints.proto";
31+
import "systemathics/apis/type/shared/v1/identifierandlevel.proto";
32+
import "systemathics/apis/type/shared/v1/keys.proto";
33+
import "systemathics/apis/type/shared/v2/trade_and_book.proto";
34+
35+
package systemathics.apis.services.tick.v2;
36+
37+
// Called to request tick by tick normalized trades and book historical data.
38+
service TickTradesAndBookService
39+
{
40+
// Get tick by tick normalized trades and book historical
41+
rpc TickTradesAndBook(TickTradesAndBookRequest) returns (stream TickTradesAndBookResponse);
42+
}
43+
44+
// The required inputs to request the TickTradesAndBookService.
45+
message TickTradesAndBookRequest
46+
{
47+
// [Mandatory] The instrument and streams identifiers: a list of tickers and exchanges and streams
48+
repeated systemathics.apis.type.shared.v1.IdentifierAndLevel identifiers = 1;
49+
50+
// [Optional] The time constraints used to define the look-back period.
51+
// If empty, then all the available data is retrieved.
52+
systemathics.apis.type.shared.v1.Constraints constraints = 2;
53+
54+
// [Optional] The corporate action adjustment, by default the value is set to false
55+
bool adjustment = 3;
56+
57+
// [Optional] The maximum number of depth, if not set use the default.
58+
google.protobuf.Int32Value maxDepth = 4;
59+
}
60+
61+
// Contains the tick by tick normalized trades data: key, time stamp, price, size, condition.
62+
message TickTradesAndBookResponse
63+
{
64+
oneof payload
65+
{
66+
// The trade and book data
67+
systemathics.apis.type.shared.v2.TradeAndBook data = 1;
68+
69+
// The mapping data
70+
systemathics.apis.type.shared.v1.Keys mapping = 2;
71+
}
72+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
// The market data book
22+
syntax = "proto3";
23+
24+
import "systemathics/apis/type/shared/v2/limit.proto";
25+
26+
package systemathics.apis.type.shared.v2;
27+
28+
// The book : bid and ask
29+
message Book
30+
{
31+
// The bid side
32+
repeated Limit bid = 1;
33+
34+
// The ask side
35+
repeated Limit ask = 2;
36+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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+
// The market data book
22+
syntax = "proto3";
23+
24+
package systemathics.apis.type.shared.v2;
25+
26+
// The limit : bid or ask price and size at given depth
27+
message Limit
28+
{
29+
// The price of the side
30+
double price = 1;
31+
32+
// The size (volume) of the side
33+
int64 size = 2;
34+
35+
// The depth of the side
36+
int32 depth = 3;
37+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
// The market data trades
22+
syntax = "proto3";
23+
24+
package systemathics.apis.type.shared.v2;
25+
26+
message Trade
27+
{
28+
// The price of the trade
29+
double price = 1;
30+
31+
// The size (volume) of the trade
32+
int64 size = 2;
33+
34+
// The trading condition of the trade
35+
string condition = 3;
36+
37+
// The market unique identifier of the trade
38+
string id = 4;
39+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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+
// The market data trades
22+
syntax = "proto3";
23+
24+
import "google/protobuf/timestamp.proto";
25+
26+
import "systemathics/apis/type/shared/v2/trade.proto";
27+
import "systemathics/apis/type/shared/v2/book.proto";
28+
29+
package systemathics.apis.type.shared.v2;
30+
31+
message TradeAndBook
32+
{
33+
// The instrument mapping key: short code for instrument identifier.
34+
uint32 mapping = 1;
35+
36+
// The times tamp of the trade and book
37+
google.protobuf.Timestamp time_stamp = 2;
38+
39+
oneof payload
40+
{
41+
// The trade
42+
Trade trade = 3;
43+
44+
// The book
45+
Book book = 4;
46+
}
47+
}

0 commit comments

Comments
 (0)