Skip to content

Commit 7028ff0

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

7 files changed

Lines changed: 266 additions & 4 deletions

File tree

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
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/identifier.proto";
32+
import "systemathics/apis/type/shared/v1/keys.proto";
33+
import "systemathics/apis/type/shared/v2/book_updates.proto";
34+
import "systemathics/apis/type/shared/v2/book_data.proto";
35+
36+
package systemathics.apis.services.tick.v2;
37+
38+
// Called to request tick by tick normalized trades historical data.
39+
service TickBookService
40+
{
41+
// Get tick by tick normalized trades historical Book
42+
rpc TickBook(TickBookRequest) returns (stream TickBookResponse);
43+
}
44+
45+
// The required inputs to request the TickBookService.
46+
message TickBookRequest
47+
{
48+
// [Mandatory] The instrument identifiers: a list of tickers and exchanges
49+
repeated systemathics.apis.type.shared.v1.Identifier identifiers = 1;
50+
51+
// [Optional] The time constraints used to define the look-back period.
52+
// If empty, then all the available data is retrieved.
53+
systemathics.apis.type.shared.v1.Constraints constraints = 2;
54+
55+
// [Optional] The corporate action adjustment, by default the value is set to false
56+
bool adjustment = 3;
57+
58+
// [Optional] The maximum number of depth, if not set use the default (10).
59+
google.protobuf.Int32Value maxDepth = 4;
60+
61+
// [Mandatory] The book update scheme (snapshots only, or, initial snapshot then incremental updates)
62+
systemathics.apis.type.shared.v2.BookUpdates BookUpdates = 5;
63+
}
64+
65+
// Contains the tick by tick normalized trades data: key, time stamp, price, size, condition.
66+
message TickBookResponse
67+
{
68+
oneof payload
69+
{
70+
// The limit data
71+
systemathics.apis.type.shared.v2.BookData data = 1;
72+
73+
// The mapping data
74+
systemathics.apis.type.shared.v1.Keys mapping = 2;
75+
}
76+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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+
29+
import "systemathics/apis/type/shared/v1/constraints.proto";
30+
import "systemathics/apis/type/shared/v1/identifier.proto";
31+
import "systemathics/apis/type/shared/v1/keys.proto";
32+
import "systemathics/apis/type/shared/v2/trade_data.proto";
33+
34+
package systemathics.apis.services.tick.v2;
35+
36+
// Called to request tick by tick normalized trades historical data.
37+
service TickTradesService
38+
{
39+
// Get tick by tick normalized trades historical Trades
40+
rpc TickTrades(TickTradesRequest) returns (stream TickTradesResponse);
41+
}
42+
43+
// The required inputs to request the TickTradesService.
44+
message TickTradesRequest
45+
{
46+
// [Mandatory] The instrument identifiers: a list of tickers and exchanges
47+
repeated systemathics.apis.type.shared.v1.Identifier identifiers = 1;
48+
49+
// [Optional] The time constraints used to define the look-back period.
50+
// If empty, then all the available data is retrieved.
51+
systemathics.apis.type.shared.v1.Constraints constraints = 2;
52+
53+
// [Optional] The corporate action adjustment, by default the value is set to false
54+
bool adjustment = 3;
55+
}
56+
57+
// Contains the tick by tick normalized trades data: key, time stamp, price, size, condition.
58+
message TickTradesResponse
59+
{
60+
oneof payload
61+
{
62+
// The trade data
63+
systemathics.apis.type.shared.v2.TradeData data = 1;
64+
65+
// The mapping data
66+
systemathics.apis.type.shared.v1.Keys mapping = 2;
67+
}
68+
}

src/systemathics/apis/services/tick/v2/tick_trades_and_book.proto

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ import "google/protobuf/wrappers.proto";
3030
import "systemathics/apis/type/shared/v1/constraints.proto";
3131
import "systemathics/apis/type/shared/v1/identifierandlevel.proto";
3232
import "systemathics/apis/type/shared/v1/keys.proto";
33-
import "systemathics/apis/type/shared/v2/trade_and_book.proto";
33+
import "systemathics/apis/type/shared/v2/book_updates.proto";
34+
import "systemathics/apis/type/shared/v2/trade_and_book_data.proto";
3435

3536
package systemathics.apis.services.tick.v2;
3637

@@ -54,8 +55,11 @@ message TickTradesAndBookRequest
5455
// [Optional] The corporate action adjustment, by default the value is set to false
5556
bool adjustment = 3;
5657

57-
// [Optional] The maximum number of depth, if not set use the default.
58+
// [Optional] The maximum number of depth, if not set use the default (10).
5859
google.protobuf.Int32Value maxDepth = 4;
60+
61+
// [Mandatory] The book update scheme (snapshots only, or, initial snapshot then incremental updates)
62+
systemathics.apis.type.shared.v2.BookUpdates BookUpdates = 5;
5963
}
6064

6165
// Contains the tick by tick normalized trades data: key, time stamp, price, size, condition.
@@ -64,7 +68,7 @@ message TickTradesAndBookResponse
6468
oneof payload
6569
{
6670
// The trade and book data
67-
systemathics.apis.type.shared.v2.TradeAndBook data = 1;
71+
systemathics.apis.type.shared.v2.TradeAndBookData data = 1;
6872

6973
// The mapping data
7074
systemathics.apis.type.shared.v1.Keys mapping = 2;
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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 BookData
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+
// The book
40+
Book book = 4;
41+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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+
syntax = "proto3";
21+
22+
package systemathics.apis.type.shared.v2;
23+
24+
// Contains the types of updates book services are able to deliver
25+
enum BookUpdates
26+
{
27+
// The unspecfied update type
28+
BOOK_UPDATES_UNSPECIFIED = 0;
29+
// Snapshots on each change
30+
BOOK_UPDATES_SNAPSHOTS_ONLY = 1;
31+
// Initial Snapshot then incremental updates on each change
32+
BOOK_UPDATES_INITIAL_SNAPSHOT_THEN_INCREMENTAL_UPDATES = 2;
33+
}

src/systemathics/apis/type/shared/v2/trade_and_book.proto renamed to src/systemathics/apis/type/shared/v2/trade_and_book_data.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import "systemathics/apis/type/shared/v2/book.proto";
2828

2929
package systemathics.apis.type.shared.v2;
3030

31-
message TradeAndBook
31+
message TradeAndBookData
3232
{
3333
// The instrument mapping key: short code for instrument identifier.
3434
uint32 mapping = 1;
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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+
28+
package systemathics.apis.type.shared.v2;
29+
30+
message TradeData
31+
{
32+
// The instrument mapping key: short code for instrument identifier.
33+
uint32 mapping = 1;
34+
35+
// The times tamp of the trade and book
36+
google.protobuf.Timestamp time_stamp = 2;
37+
38+
// The trade
39+
Trade trade = 3;
40+
}

0 commit comments

Comments
 (0)